1 | /* $Id: oslibres.h,v 1.9 2001-07-04 09:55:17 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * Window GUI resource wrapper functions for OS/2
|
---|
4 | *
|
---|
5 | *
|
---|
6 | * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
10 | *
|
---|
11 | */
|
---|
12 | #ifndef __OSLIBRES_H__
|
---|
13 | #define __OSLIBRES_H__
|
---|
14 |
|
---|
15 | #ifdef OS2_INCLUDED
|
---|
16 | #include <win32type.h>
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | #include <win\cursoricon.h>
|
---|
20 |
|
---|
21 | #ifdef OS2_INCLUDED
|
---|
22 | typedef struct
|
---|
23 | {
|
---|
24 | BYTE rgbBlue;
|
---|
25 | BYTE rgbGreen;
|
---|
26 | BYTE rgbRed;
|
---|
27 | BYTE rgbReserved;
|
---|
28 | } RGBQUAD, *LPRGBQUAD;
|
---|
29 | #endif
|
---|
30 |
|
---|
31 | typedef struct
|
---|
32 | {
|
---|
33 | INT bmType;
|
---|
34 | INT bmWidth;
|
---|
35 | INT bmHeight;
|
---|
36 | INT bmWidthBytes;
|
---|
37 | WORD bmPlanes;
|
---|
38 | WORD bmBitsPixel;
|
---|
39 | LPVOID bmBits;
|
---|
40 | } BITMAP_W, *LPBITMAP_W;
|
---|
41 |
|
---|
42 | HANDLE OSLibWinSetAccelTable(HWND hwnd, HANDLE hAccel, PVOID acceltemplate);
|
---|
43 |
|
---|
44 | HANDLE OSLibWinCreatePointer(CURSORICONINFO *pInfo, char *pAndBits, BITMAP_W *pAndBmp, char *pXorBits, BITMAP_W *pXorBmp, BOOL fCursor);
|
---|
45 | HANDLE OSLibWinQuerySysPointer(ULONG type,INT w,INT h);
|
---|
46 | HANDLE OSLibWinQuerySysIcon(ULONG type,INT w,INT h);
|
---|
47 | VOID OSLibWinDestroyPointer(HANDLE hPointer);
|
---|
48 | BOOL OSLibWinSetPointer(HANDLE hPointer);
|
---|
49 | HANDLE OSLibWinQueryPointer();
|
---|
50 | BOOL OSLibWinClipCursor(const RECT * pRect);
|
---|
51 | BOOL OSLibWinGetClipCursor(LPRECT pRect);
|
---|
52 |
|
---|
53 |
|
---|
54 |
|
---|
55 | BOOL APIENTRY _WinSetPointerClipRect(HWND hwnd, PRECTL pRect);
|
---|
56 | BOOL APIENTRY _WinQueryPointerClipRect(HWND hwnd, PRECTL pRect);
|
---|
57 |
|
---|
58 | inline BOOL APIENTRY WinSetPointerClipRect(HWND hwnd, PRECTL pRect)
|
---|
59 | {
|
---|
60 | BOOL yyrc;
|
---|
61 | USHORT sel = RestoreOS2FS();
|
---|
62 |
|
---|
63 | yyrc = _WinSetPointerClipRect(hwnd, pRect);
|
---|
64 | SetFS(sel);
|
---|
65 |
|
---|
66 | return yyrc;
|
---|
67 | }
|
---|
68 |
|
---|
69 | inline BOOL APIENTRY WinQueryPointerClipRect(HWND hwnd, PRECTL pRect)
|
---|
70 | {
|
---|
71 | BOOL yyrc;
|
---|
72 | USHORT sel = RestoreOS2FS();
|
---|
73 |
|
---|
74 | yyrc = _WinQueryPointerClipRect(hwnd, pRect);
|
---|
75 | SetFS(sel);
|
---|
76 |
|
---|
77 | return yyrc;
|
---|
78 | }
|
---|
79 |
|
---|
80 | #endif //__OSLIBGDI_H__
|
---|