/* wintern.h*/
|
/* wintern.h*/
|
/*
|
/*
|
* Copyright (c) 1999 Greg Haerr <greg@censoft.com>
|
* Copyright (c) 1999 Greg Haerr <greg@censoft.com>
|
*
|
*
|
* Microwindows internal routines header file
|
* Microwindows internal routines header file
|
*/
|
*/
|
#include <string.h>
|
#include <string.h>
|
|
|
#if (UNIX | DOS_DJGPP)
|
#if (UNIX | DOS_DJGPP)
|
#define strcmpi strcasecmp
|
#define strcmpi strcasecmp
|
#elif (VXWORKS)
|
#elif (VXWORKS)
|
int strcmpi(const char *s1, const char *s2);
|
int strcmpi(const char *s1, const char *s2);
|
#endif
|
#endif
|
|
|
#ifdef __PACIFIC__
|
#ifdef __PACIFIC__
|
#define strcmpi stricmp
|
#define strcmpi stricmp
|
#endif
|
#endif
|
|
|
#define DBLCLICKSPEED 750 /* mouse dblclik speed msecs (was 450)*/
|
#define DBLCLICKSPEED 750 /* mouse dblclik speed msecs (was 450)*/
|
|
|
/* gotPaintMsg values*/
|
/* gotPaintMsg values*/
|
#define PAINT_PAINTED 0 /* WM_PAINT msg has been processed*/
|
#define PAINT_PAINTED 0 /* WM_PAINT msg has been processed*/
|
#define PAINT_NEEDSPAINT 1 /* WM_PAINT seen, paint when can*/
|
#define PAINT_NEEDSPAINT 1 /* WM_PAINT seen, paint when can*/
|
#define PAINT_DELAYPAINT 2 /* WM_PAINT seen,paint after user move*/
|
#define PAINT_DELAYPAINT 2 /* WM_PAINT seen,paint after user move*/
|
|
|
/* non-win32 api access for microwin*/
|
/* non-win32 api access for microwin*/
|
BOOL MwSetDesktopWallpaper(PMWIMAGEHDR pImage);
|
BOOL MwSetDesktopWallpaper(PMWIMAGEHDR pImage);
|
void MwRegisterFdInput(HWND hwnd,int fd);
|
void MwRegisterFdInput(HWND hwnd,int fd);
|
void MwUnregisterFdInput(HWND hwnd,int fd);
|
void MwUnregisterFdInput(HWND hwnd,int fd);
|
void MwRegisterFdOutput(HWND hwnd,int fd);
|
void MwRegisterFdOutput(HWND hwnd,int fd);
|
void MwUnregisterFdOutput(HWND hwnd,int fd);
|
void MwUnregisterFdOutput(HWND hwnd,int fd);
|
void MwRegisterFdExcept(HWND hwnd,int fd);
|
void MwRegisterFdExcept(HWND hwnd,int fd);
|
void MwUnregisterFdExcept(HWND hwnd,int fd);
|
void MwUnregisterFdExcept(HWND hwnd,int fd);
|
|
|
/* internal routines*/
|
/* internal routines*/
|
|
|
/* winuser.c*/
|
/* winuser.c*/
|
PWNDCLASS MwFindClassByName(LPCSTR lpClassName);
|
PWNDCLASS MwFindClassByName(LPCSTR lpClassName);
|
void MwDestroyWindow(HWND hwnd,BOOL bSendMsg);
|
void MwDestroyWindow(HWND hwnd,BOOL bSendMsg);
|
HWND MwGetTopWindow(HWND hwnd);
|
HWND MwGetTopWindow(HWND hwnd);
|
void MwCalcClientRect(HWND hwnd);
|
void MwCalcClientRect(HWND hwnd);
|
void MwSendSizeMove(HWND hwnd, BOOL bSize, BOOL bMove);
|
void MwSendSizeMove(HWND hwnd, BOOL bSize, BOOL bMove);
|
void MwSetCursor(HWND wp, PMWCURSOR pcursor);
|
void MwSetCursor(HWND wp, PMWCURSOR pcursor);
|
|
|
/* wingdi.c*/
|
/* wingdi.c*/
|
#define MwIsClientDC(hdc) (((hdc)->flags & DCX_WINDOW) == 0)
|
#define MwIsClientDC(hdc) (((hdc)->flags & DCX_WINDOW) == 0)
|
#define MwIsMemDC(hdc) ((hdc)->psd->flags == PSF_MEMORY)
|
#define MwIsMemDC(hdc) ((hdc)->psd->flags == PSF_MEMORY)
|
void MwPaintNCArea(HWND hwnd);
|
void MwPaintNCArea(HWND hwnd);
|
HWND MwPrepareDC(HDC hdc);
|
HWND MwPrepareDC(HDC hdc);
|
void MwSetClipWindow(HDC hdc);
|
void MwSetClipWindow(HDC hdc);
|
|
|
/* winsbar.c*/
|
/* winsbar.c*/
|
void MwAdjustNCScrollbars(HWND hwnd);
|
void MwAdjustNCScrollbars(HWND hwnd);
|
void MwPaintNCScrollbars(HWND hwnd, HDC hdc);
|
void MwPaintNCScrollbars(HWND hwnd, HDC hdc);
|
void MwHandleNCMessageScrollbar(HWND hwnd, UINT msg, WPARAM hitcode,
|
void MwHandleNCMessageScrollbar(HWND hwnd, UINT msg, WPARAM hitcode,
|
LPARAM lParam);
|
LPARAM lParam);
|
|
|
/* winexpos.c*/
|
/* winexpos.c*/
|
void MwRedrawScreen(void);
|
void MwRedrawScreen(void);
|
void MwHideWindow(HWND hwnd,BOOL bChangeFocus,BOOL bSendMsg);
|
void MwHideWindow(HWND hwnd,BOOL bChangeFocus,BOOL bSendMsg);
|
void MwShowWindow(HWND hwnd,BOOL bSendMsg);
|
void MwShowWindow(HWND hwnd,BOOL bSendMsg);
|
void MwRaiseWindow(HWND hwnd);
|
void MwRaiseWindow(HWND hwnd);
|
void MwLowerWindow(HWND hwnd);
|
void MwLowerWindow(HWND hwnd);
|
BOOL MwCheckOverlap(HWND topwp, HWND botwp);
|
BOOL MwCheckOverlap(HWND topwp, HWND botwp);
|
void MwClearWindow(HWND wp,MWCOORD x,MWCOORD y,MWCOORD width,
|
void MwClearWindow(HWND wp,MWCOORD x,MWCOORD y,MWCOORD width,
|
MWCOORD height,BOOL exposeflag);
|
MWCOORD height,BOOL exposeflag);
|
void MwExposeArea(HWND wp, MWCOORD rootx,MWCOORD rooty,
|
void MwExposeArea(HWND wp, MWCOORD rootx,MWCOORD rooty,
|
MWCOORD width,MWCOORD height);
|
MWCOORD width,MWCOORD height);
|
/* winevent.c*/
|
/* winevent.c*/
|
BOOL MwCheckMouseEvent(void);
|
BOOL MwCheckMouseEvent(void);
|
BOOL MwCheckKeyboardEvent(void);
|
BOOL MwCheckKeyboardEvent(void);
|
void MwHandleMouseStatus(MWCOORD newx, MWCOORD newy, int newbuttons);
|
void MwHandleMouseStatus(MWCOORD newx, MWCOORD newy, int newbuttons);
|
void MwTranslateMouseMessage(HWND hwnd,UINT msg,int hittest);
|
void MwTranslateMouseMessage(HWND hwnd,UINT msg,int hittest);
|
void MwDeliverMouseEvent(int buttons, int changebuttons,
|
void MwDeliverMouseEvent(int buttons, int changebuttons,
|
MWKEYMOD modifiers);
|
MWKEYMOD modifiers);
|
void MwDeliverKeyboardEvent(MWKEY keyvalue, MWKEYMOD modifiers,
|
void MwDeliverKeyboardEvent(MWKEY keyvalue, MWKEYMOD modifiers,
|
MWSCANCODE scancode, BOOL pressed);
|
MWSCANCODE scancode, BOOL pressed);
|
void MwDeliverExposureEvent(HWND wp, MWCOORD x, MWCOORD y,
|
void MwDeliverExposureEvent(HWND wp, MWCOORD x, MWCOORD y,
|
MWCOORD width,MWCOORD height);
|
MWCOORD width,MWCOORD height);
|
void MwUnionUpdateRegion(HWND wp, MWCOORD x, MWCOORD y,
|
void MwUnionUpdateRegion(HWND wp, MWCOORD x, MWCOORD y,
|
MWCOORD width,MWCOORD height, BOOL bUnion);
|
MWCOORD width,MWCOORD height, BOOL bUnion);
|
void MwMoveCursor(MWCOORD x, MWCOORD y);
|
void MwMoveCursor(MWCOORD x, MWCOORD y);
|
void MwCheckCursor(void);
|
void MwCheckCursor(void);
|
HWND MwFindVisibleWindow(MWCOORD x, MWCOORD y);
|
HWND MwFindVisibleWindow(MWCOORD x, MWCOORD y);
|
void MwCheckMouseWindow(void);
|
void MwCheckMouseWindow(void);
|
int strzcpy(char *dst,const char *src,int dstsiz);
|
int strzcpy(char *dst,const char *src,int dstsiz);
|
|
|
/* winuser.c*/
|
/* winuser.c*/
|
extern int mwSYSMETRICS_CYCAPTION;
|
extern int mwSYSMETRICS_CYCAPTION;
|
extern int mwSYSMETRICS_CXBORDER;
|
extern int mwSYSMETRICS_CXBORDER;
|
extern int mwSYSMETRICS_CYBORDER;
|
extern int mwSYSMETRICS_CYBORDER;
|
extern int mwSYSMETRICS_CXFRAME;
|
extern int mwSYSMETRICS_CXFRAME;
|
extern int mwSYSMETRICS_CYFRAME;
|
extern int mwSYSMETRICS_CYFRAME;
|
extern int mwSYSMETRICS_CXDOUBLECLK;
|
extern int mwSYSMETRICS_CXDOUBLECLK;
|
extern int mwSYSMETRICS_CYDOUBLECLK;
|
extern int mwSYSMETRICS_CYDOUBLECLK;
|
extern int mwSYSMETRICS_CYHSCROLL;
|
extern int mwSYSMETRICS_CYHSCROLL;
|
extern int mwSYSMETRICS_CXHSCROLL;
|
extern int mwSYSMETRICS_CXHSCROLL;
|
extern int mwSYSMETRICS_CXVSCROLL;
|
extern int mwSYSMETRICS_CXVSCROLL;
|
extern int mwSYSMETRICS_CYVSCROLL;
|
extern int mwSYSMETRICS_CYVSCROLL;
|
|
|
/* wingdi.c*/
|
/* wingdi.c*/
|
extern BOOL mwERASEMOVE; /* default repaint algorithm*/
|
extern BOOL mwERASEMOVE; /* default repaint algorithm*/
|
|
|
/* winmain.c*/
|
/* winmain.c*/
|
int MwOpen(void);
|
int MwOpen(void);
|
void MwClose(void);
|
void MwClose(void);
|
void MwSelect(void);
|
void MwSelect(void);
|
int MwInitialize(void);
|
int MwInitialize(void);
|
void MwTerminate(void);
|
void MwTerminate(void);
|
extern HWND listwp; /* list of all windows */
|
extern HWND listwp; /* list of all windows */
|
extern HWND rootwp; /* root window pointer */
|
extern HWND rootwp; /* root window pointer */
|
extern HWND focuswp; /* focus window for keyboard */
|
extern HWND focuswp; /* focus window for keyboard */
|
extern HWND mousewp; /* window mouse is currently in */
|
extern HWND mousewp; /* window mouse is currently in */
|
extern HWND capturewp; /* capture window*/
|
extern HWND capturewp; /* capture window*/
|
extern HWND dragwp; /* window user is dragging*/
|
extern HWND dragwp; /* window user is dragging*/
|
extern HCURSOR curcursor; /* currently enabled cursor */
|
extern HCURSOR curcursor; /* currently enabled cursor */
|
extern MWCOORD cursorx; /* x position of cursor */
|
extern MWCOORD cursorx; /* x position of cursor */
|
extern MWCOORD cursory; /* y position of cursor */
|
extern MWCOORD cursory; /* y position of cursor */
|
extern MWSCREENINFO sinfo; /* screen information */
|
extern MWSCREENINFO sinfo; /* screen information */
|
extern DWORD startTicks; /* tickcount on startup */
|
extern DWORD startTicks; /* tickcount on startup */
|
extern int mwpaintNC; /* experimental nonclient regions*/
|
extern int mwpaintNC; /* experimental nonclient regions*/
|
extern BOOL mwforceNCpaint; /* force NC paint for alphablend*/
|
extern BOOL mwforceNCpaint; /* force NC paint for alphablend*/
|
|
|
#if VTSWITCH
|
#if VTSWITCH
|
/* temp framebuffer vt switch stuff at upper level
|
/* temp framebuffer vt switch stuff at upper level
|
* this should be handled at the lower level, just like vgalib does.
|
* this should be handled at the lower level, just like vgalib does.
|
*/
|
*/
|
void MwInitVt(void);
|
void MwInitVt(void);
|
int MwCurrentVt(void);
|
int MwCurrentVt(void);
|
int MwCheckVtChange(void);
|
int MwCheckVtChange(void);
|
void MwRedrawVt(int t);
|
void MwRedrawVt(int t);
|
void MwExitVt(void);
|
void MwExitVt(void);
|
extern int mwvterm;
|
extern int mwvterm;
|
#endif /* VTSWITCH*/
|
#endif /* VTSWITCH*/
|
|
|