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