| 1 | /* | 
|---|
| 2 | * Internal functions exported by user32 | 
|---|
| 3 | * | 
|---|
| 4 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 5 | * | 
|---|
| 6 | */ | 
|---|
| 7 | #ifndef __WINUSER32_H__ | 
|---|
| 8 | #define __WINUSER32_H__ | 
|---|
| 9 |  | 
|---|
| 10 | #if !defined(NO_DCDATA) && (defined(INCL_GPI) && defined(OS2_INCLUDED)) | 
|---|
| 11 |  | 
|---|
| 12 | #include <dcdata.h> | 
|---|
| 13 |  | 
|---|
| 14 | #ifdef __cplusplus | 
|---|
| 15 | extern "C" { | 
|---|
| 16 | #endif | 
|---|
| 17 |  | 
|---|
| 18 | ULONG OSLibGetScreenHeight(); | 
|---|
| 19 | ULONG OSLibGetScreenWidth(); | 
|---|
| 20 |  | 
|---|
| 21 | void WIN32API Calculate1PixelDelta(pDCData pHps); | 
|---|
| 22 | void WIN32API TestWideLine (pDCData pHps); | 
|---|
| 23 | BOOL WIN32API changePageXForm(pDCData pHps, POINTL *pValue, int x, int y, POINTL *pPrev); | 
|---|
| 24 | BOOL WIN32API setPageXForm(pDCData pHps); | 
|---|
| 25 | VOID WIN32API selectClientArea(pDCData pHps); | 
|---|
| 26 | VOID WIN32API checkOrigin(pDCData pHps); | 
|---|
| 27 | VOID WIN32API removeClientArea(pDCData pHps); | 
|---|
| 28 | LONG WIN32API clientHeight(HWND hwnd, pDCData pHps); | 
|---|
| 29 | int  WIN32API setMapModeDC(pDCData pHps, int mode); | 
|---|
| 30 |  | 
|---|
| 31 | #ifdef __cplusplus | 
|---|
| 32 | } // extern "C" | 
|---|
| 33 | #endif | 
|---|
| 34 |  | 
|---|
| 35 | #endif | 
|---|
| 36 |  | 
|---|
| 37 | #ifdef __cplusplus | 
|---|
| 38 | extern "C" { | 
|---|
| 39 | #endif | 
|---|
| 40 |  | 
|---|
| 41 | int  WIN32API DIB_GetDIBWidthBytes( int width, int depth ); | 
|---|
| 42 | int  WIN32API BITMAP_GetWidthBytes( INT width, INT depth ); | 
|---|
| 43 |  | 
|---|
| 44 | HWND WIN32API Win32ToOS2Handle(HWND hwndWin32); | 
|---|
| 45 | HWND WIN32API Win32ToOS2FrameHandle(HWND hwndWin32); | 
|---|
| 46 | HWND WIN32API OS2ToWin32Handle(HWND hwnd); | 
|---|
| 47 |  | 
|---|
| 48 | BOOL WIN32API IsSystemPen(HPEN hPen); | 
|---|
| 49 | BOOL WIN32API IsSystemBrush(HBRUSH hBrush); | 
|---|
| 50 |  | 
|---|
| 51 | HICON WIN32API GetOS2Icon(HICON hIcon); | 
|---|
| 52 |  | 
|---|
| 53 | //Turns native OS/2 window into window recognized by Odin (with only very | 
|---|
| 54 | //limited functionality) | 
|---|
| 55 | //Useful for creating an Odin window with an OS/2 window as parent. | 
|---|
| 56 | HWND WIN32API CreateFakeWindowEx(HWND hwndOS2, ATOM classAtom); | 
|---|
| 57 | HWND WIN32API DestroyFakeWindow(HWND hwndWin32); | 
|---|
| 58 |  | 
|---|
| 59 | #define WIN32_APPEARANCE        0 | 
|---|
| 60 | #define OS2_APPEARANCE          1  //OS/2 look with win32 system menu | 
|---|
| 61 | #define OS2_APPEARANCE_SYSMENU  2  //OS/2 look with native system menu | 
|---|
| 62 |  | 
|---|
| 63 | void WIN32API SetWindowAppearance(int fOS2Looks); | 
|---|
| 64 |  | 
|---|
| 65 | BOOL WIN32API OSLibWinCreateObject(LPSTR pszPath, LPSTR pszArgs, LPSTR pszWorkDir, LPSTR pszName, | 
|---|
| 66 | LPSTR pszDescription, LPSTR pszIcoPath, INT iIcoNdx, BOOL fDesktop); | 
|---|
| 67 |  | 
|---|
| 68 | typedef BOOL (* WIN32API VISRGN_NOTIFY_PROC)(HWND hwnd, BOOL fDrawingAllowed, DWORD dwUserData); | 
|---|
| 69 | //****************************************************************************** | 
|---|
| 70 | // WinSetVisibleRgnNotifyProc | 
|---|
| 71 | //   To set a notification procedure for visible region changes of a specific window. | 
|---|
| 72 | //   The procedure will be called when a WM_VRNENABLED message is posted | 
|---|
| 73 | //   with ffVisRgnChanged set to TRUE | 
|---|
| 74 | // | 
|---|
| 75 | // Parameters: | 
|---|
| 76 | //   HWND hwnd                          window handle | 
|---|
| 77 | //   VISRGN_NOTIFY_PROC lpNotifyProc    notification proc or NULL to clear proc | 
|---|
| 78 | //   DWORD dwUserData                   value used as 3rd parameter during | 
|---|
| 79 | //                                      visible region callback | 
|---|
| 80 | // | 
|---|
| 81 | // NOTE: Internal API | 
|---|
| 82 | //****************************************************************************** | 
|---|
| 83 | BOOL WIN32API WinSetVisibleRgnNotifyProc(HWND hwnd, VISRGN_NOTIFY_PROC lpNotifyProc, DWORD dwUserData); | 
|---|
| 84 |  | 
|---|
| 85 |  | 
|---|
| 86 | // | 
|---|
| 87 | // PM message definitions for Odin | 
|---|
| 88 | // | 
|---|
| 89 |  | 
|---|
| 90 | //PostThreadMessage is done through Open32; which means the message id will be translated | 
|---|
| 91 | //(0xc00 added) | 
|---|
| 92 | #define OPEN32_MSGDIFF                  0xC00 | 
|---|
| 93 | #define WIN32APP_POSTMSG                (0x1000+OPEN32_MSGDIFF) | 
|---|
| 94 | #define WIN32APP_FORWARDEDPOSTMSG       (0x1001+OPEN32_MSGDIFF) | 
|---|
| 95 | #define WIN32APP_FORWARDEDPOSTMSG_MAGIC 0x12345677 | 
|---|
| 96 |  | 
|---|
| 97 | //PM doesn't allow SetFocus during WM_SETFOCUS message processing; must delay | 
|---|
| 98 | //this by posting a message | 
|---|
| 99 | //NOTE Must be smaller than WIN32APP_POSTMSG! | 
|---|
| 100 | #define WIN32APP_POSTPONEDESTROY  (WIN32APP_POSTMSG-2) | 
|---|
| 101 | #define WIN32APP_DDRAWFULLSCREEN  (WIN32APP_POSTMSG-3) | 
|---|
| 102 | #define WIN32APP_CHNGEFRAMECTRLS  (WIN32APP_POSTMSG-4) | 
|---|
| 103 |  | 
|---|
| 104 | #define WIN32MSG_MAGICA           0x12345678 | 
|---|
| 105 | #define WIN32MSG_MAGICW           0x12345679 | 
|---|
| 106 |  | 
|---|
| 107 | typedef struct | 
|---|
| 108 | { | 
|---|
| 109 | ULONG wParam; | 
|---|
| 110 | ULONG lParam; | 
|---|
| 111 | } POSTMSG_PACKET; | 
|---|
| 112 |  | 
|---|
| 113 | #ifdef __cplusplus | 
|---|
| 114 | } // extern "C" | 
|---|
| 115 | #endif | 
|---|
| 116 |  | 
|---|
| 117 | #endif //__WINUSER32_H__ | 
|---|