📄 fpcwin.h
字号:
/*--------------------------------------------------------------------
- Dialog manager styles
--------------------------------------------------------------------*/
#define WS_GROUP 0x00010000L
#define WS_TABSTOP 0x00020000L
#define WS_MULTISELECT 0x00040000L
/*--------------------------------------------------------------------
- Class styles
--------------------------------------------------------------------*/
#define CS_MOVENOTIFY 0x00000001L
#define CS_SIZEREDRAW 0x00000004L
#define CS_HITTEST 0x00000008L
#define CS_PUBLIC 0x00000010L
#define CS_FRAME 0x00000020L
#define CS_CLIPCHILDREN 0x20000000L
#define CS_CLIPSIBLINGS 0x10000000L
#define CS_PARENTCLIP 0x08000000L
#define CS_SAVEBITS 0x04000000L
#define CS_SYNCPAINT 0x02000000L
/*--------------------------------------------------------------------
- Standard Window Messages
--------------------------------------------------------------------*/
#define WM_CREATE 0x0001
#define WM_DESTROY 0x0002
#define WM_OTHERWINDOWDESTROYED 0x0003
#define WM_ENABLE 0x0004
#define WM_SHOW 0x0005
#define WM_MOVE 0x0006
#define WM_SIZE 0x0007
#define WM_ADJUSTWINDOWPOS 0x0008
#define WM_CALCVALIDRECTS 0x0009
#define WM_SETWINDOWPARAMS 0x000a
#define WM_QUERYWINDOWPARAMS 0x000b
#define WM_HITTEST 0x000c
#define WM_ACTIVATE 0x000d
#define WM_SETFOCUS 0x000f
#define WM_SETSELECTION 0x0010
/*--------------------------------------------------------------------
-
--------------------------------------------------------------------*/
typedef enum _WINDOW_CLASS
{
WC_FRAME,
WC_BUTTON,
WC_ENTRYFIELD,
WC_LISTBOX,
WC_MENU,
WC_SCROLLBAR,
WC_STATIC,
WC_TITLE
} CLASS;
/*--------------------------------------------------------------------
-
--------------------------------------------------------------------*/
#define EXPENTRY pascal far _loadds
#define APIENTRY pascal far
/*--------------------------------------------------------------------
-
--------------------------------------------------------------------*/
typedef struct _POINTL /* ptl */
{
SHORT x;
SHORT y;
} POINTL;
/*--------------------------------------------------------------------
- The following structure and macro are used to access the
- WM_COMMAND, WM_HELP, and WM_SYSCOMMAND message parameters:
--------------------------------------------------------------------*/
typedef struct _COMMANDMSG /* commandmsg */
{
USHORT source; /* mp2 */
BOOL fMouse;
USHORT cmd; /* mp1 */
USHORT unused;
} CMDMSG;
/*--------------------------------------------------------------------
- The following structure and macro are used to access the
- WM_MOUSEMOVE, and WM_BUTTON message parameters
--------------------------------------------------------------------*/
typedef struct _MOUSEMSG /* mousemsg */
{
USHORT codeHitTest; /* mp2 */
USHORT unused;
SHORT x; /* mp1 */
SHORT y;
} MSEMSG;
/*--------------------------------------------------------------------
- The following structure and macro are used to access the
- WM_CHAR message parameters.
--------------------------------------------------------------------*/
typedef struct _CHARMSG /* charmsg */
{
USHORT chr; /* mp2 */
USHORT vkey;
USHORT fs; /* mp1 */
UCHAR cRepeat;
UCHAR scancode;
} CHRMSG;
/*--------------------------------------------------------------------
- QMSG structure
--------------------------------------------------------------------*/
typedef struct _QMSG
{
HWND hwnd;
USHORT msg;
MPARAM mp1;
MPARAM mp2;
ULONG time;
POINTL ptl;
} QMSG;
/*--------------------------------------------------------------------
- structure for message queue
--------------------------------------------------------------------*/
typedef struct _MSGQUEUE_t
{
QMSG *MsgQ;
SHORT MaxEvents;
SHORT NEvents; /* number of events|msgs */
SHORT CEvent; /* next pos to place event */
} MSGQUEUE_t;
/*--------------------------------------------------------------------
- structure for message queues
--------------------------------------------------------------------*/
typedef struct _MSGQ_t
{
MSGQUEUE_t SysQ;
MSGQUEUE_t AppQ;
QMSG PaintMsg;
USHORT ShiftKeys;
} MSGQ_t;
/*--------------------------------------------------------------------
-
--------------------------------------------------------------------*/
typedef struct _CLASSDEF_t
{
struct _CLASSDEF_t *Next;
CLASS class;
CLASS base;
BYTE *CWindow;
BYTE *CSelected;
BYTE *CFrame;
ULONG Style;
HAB hab;
PSZ pszClassName;
MRESULT (EXPENTRY *PFNWP)(HWND, USHORT, MPARAM, MPARAM);
USHORT cbWindowData;
} CLASSDEF_t;
/*--------------------------------------------------------------------
-
--------------------------------------------------------------------*/
typedef struct _WINDOW_t
{
struct _WINDOW_t *Next;
PCHAR WinClass;
PCHAR WinName;
struct _WINDOW_t *WinOwner;
struct _WINDOW_t *WinParent;
struct _WINDOW_t *WinFirstChild;
struct _WINDOW_t *WinLastChild;
struct _WINDOW_t *WinPrevSibling;
struct _WINDOW_t *WinNextSibling;
SHORT Winx; // horizontal position of window
SHORT Winy; // vertical position of window
SHORT Wincx; // width of window
SHORT Wincy; // height of window
ULONG WinStyle;
USHORT WinIdent;
SHORT WinDataAmt;
PVOID WinData;
} WINDOW_t;
/*--------------------------------------------------------------------
-
--------------------------------------------------------------------*/
typedef CMDMSG FAR * PCMDMSG;
typedef POINTL FAR * PPOINTL;
typedef MSEMSG FAR * PMSEMSG;
typedef CHRMSG FAR * PCHRMSG;
typedef QMSG FAR * PQMSG;
typedef MSGQUEUE_t FAR * PMSGQUEUE_t;
typedef MSGQ_t FAR * PMSGQ_t;
typedef CLASSDEF_t FAR * PCLASSDEF_t;
typedef WINDOW_t FAR * PWINDOW_t;
/*--------------------------------------------------------------------
- one handle anchor block is created for each thread
--------------------------------------------------------------------*/
typedef struct _GLOBAL_HAB_t
{
struct _GLOBAL_HAB_t *Next;
struct _GLOBAL_HAB_t *Prev;
PCHAR PgmName; /* program name */
PMSGQ_t MsgQ; /* message queues */
PWINDOW_t WinFocus; /* window that has the focus */
PWINDOW_t DeskTop;
PWINDOW_t DeskTopObj;
PCLASSDEF_t ClassDef;
} GLOBAL_HAB_t;
typedef GLOBAL_HAB_t FAR * PGLOBAL_HAB_t;
/*--------------------------------------------------------------------
- global variables for fpwin.
--------------------------------------------------------------------*/
extern PGLOBAL_HAB_t ghabHead;
extern PGLOBAL_HAB_t ghab;
extern PGLOBAL_HAB_t ghabTail;
extern SHORT gSysVal[];
/*--------------------------------------------------------------------
-
- MODULE: queues.c
-
--------------------------------------------------------------------*/
HAB APIENTRY WinInitialize( USHORT fsOptions );
BOOL APIENTRY WinTerminate( HAB hab );
BOOL APIENTRY WinPeekMsg( HAB syshab,
PQMSG pqmsg,
HWND hwndFilter,
USHORT msgFilterFirst,
USHORT msgFilterLast,
USHORT fs );
BOOL APIENTRY WinGetMsg( HAB hab,
PQMSG qmsg,
HWND hwndFilter,
USHORT msgFilterFirst,
USHORT msgFilterLast );
HMQ APIENTRY WinCreateMsgQueue( HAB hab, SHORT cmsg );
BOOL APIENTRY WinDestroyMsgQueue( HMQ hmq );
BOOL APIENTRY WinPostMsg( HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2 );
/*--------------------------------------------------------------------
-
- MODULE: dynarray.c
-
--------------------------------------------------------------------*/
SHORT ExpandArray( PVOID *Array, SHORT ElmtSize,
SHORT NElmts, PSHORT LastElmt );
VOID ShrinkArray( PVOID *Array, SHORT ElmtSize,
SHORT NElmts, PSHORT LastElmt );
VOID Release( PVOID *Node );
/*--------------------------------------------------------------------
-
- MODULE: window.c
-
--------------------------------------------------------------------*/
typedef MRESULT (EXPENTRY *PFNWP)(HWND, USHORT, MPARAM, MPARAM);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -