1 | /* $Id: oslibwin.h,v 1.5 1999-07-17 11:52:22 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * Window API wrappers 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 __OSLIBWIN_H__
|
---|
13 | #define __OSLIBWIN_H__
|
---|
14 |
|
---|
15 | #define OS2TOWIN32POINT(height, y) (height - y)
|
---|
16 |
|
---|
17 | #define OSLIB_HWND_DESKTOP 0
|
---|
18 | BOOL OSLibWinSetParent(HWND hwnd, HWND hwndParent, ULONG fRedraw = TRUE);
|
---|
19 |
|
---|
20 |
|
---|
21 | HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle,
|
---|
22 | char *pszName, ULONG x, ULONG y, ULONG cx, ULONG cy,
|
---|
23 | HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame);
|
---|
24 |
|
---|
25 | BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle);
|
---|
26 |
|
---|
27 | BOOL OSLibWinSetWindowULong(HWND hwnd, ULONG offset, ULONG value);
|
---|
28 | ULONG OSLibWinGetWindowULong(HWND hwnd, ULONG offset);
|
---|
29 |
|
---|
30 | BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
|
---|
31 |
|
---|
32 | HWND OSLibWinCreateMenu(HWND hwndParent, PVOID menutemplate);
|
---|
33 |
|
---|
34 |
|
---|
35 | #define SWPOS_SIZE 0x0001
|
---|
36 | #define SWPOS_MOVE 0x0002
|
---|
37 | #define SWPOS_ZORDER 0x0004
|
---|
38 | #define SWPOS_SHOW 0x0008
|
---|
39 | #define SWPOS_HIDE 0x0010
|
---|
40 | #define SWPOS_NOREDRAW 0x0020
|
---|
41 | #define SWPOS_NOADJUST 0x0040
|
---|
42 | #define SWPOS_ACTIVATE 0x0080
|
---|
43 | #define SWPOS_DEACTIVATE 0x0100
|
---|
44 | #define SWPOS_EXTSTATECHANGE 0x0200
|
---|
45 | #define SWPOS_MINIMIZE 0x0400
|
---|
46 | #define SWPOS_MAXIMIZE 0x0800
|
---|
47 | #define SWPOS_RESTORE 0x1000
|
---|
48 | #define SWPOS_FOCUSACTIVATE 0x2000
|
---|
49 | #define SWPOS_FOCUSDEACTIVATE 0x4000
|
---|
50 | #define SWPOS_NOAUTOCLOSE 0x8000 /* Valid in PROGDETAILS struct only */
|
---|
51 |
|
---|
52 | #define HWNDOS_TOP (HWND)3
|
---|
53 | #define HWNDOS_BOTTOM (HWND)4
|
---|
54 |
|
---|
55 | BOOL OSLibWinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y, LONG cx, LONG cy, ULONG fl);
|
---|
56 | BOOL OSLibWinShowWindow(HWND hwnd, ULONG fl);
|
---|
57 |
|
---|
58 | BOOL OSLibWinDestroyWindow(HWND hwnd);
|
---|
59 | BOOL OSLibWinQueryUpdateRect(HWND hwnd, PVOID pRect); //must be RECTL pointer!
|
---|
60 | BOOL OSLibWinIsIconic(HWND hwnd);
|
---|
61 | BOOL OSLibWinSetActiveWindow(HWND hwnd);
|
---|
62 | BOOL OSLibWinSetFocus(HWND hwnd);
|
---|
63 | BOOL OSLibWinEnableWindow(HWND hwnd, BOOL fEnable);
|
---|
64 | BOOL OSLibWinIsWindowEnabled(HWND hwnd);
|
---|
65 | BOOL OSLibWinIsWindowVisible(HWND hwnd);
|
---|
66 | BOOL OSLibWinQueryActiveWindow();
|
---|
67 |
|
---|
68 | #define QWOS_NEXT 0
|
---|
69 | #define QWOS_PREV 1
|
---|
70 | #define QWOS_TOP 2
|
---|
71 | #define QWOS_BOTTOM 3
|
---|
72 | #define QWOS_OWNER 4
|
---|
73 | #define QWOS_PARENT 5
|
---|
74 | #define QWOS_NEXTTOP 6
|
---|
75 | #define QWOS_PREVTOP 7
|
---|
76 | #define QWOS_FRAMEOWNER 8
|
---|
77 |
|
---|
78 | HWND OSLibWinQueryWindow(HWND hwnd, ULONG lCode);
|
---|
79 |
|
---|
80 |
|
---|
81 | void OSLibWinPostQuitMessage(ULONG nExitCode);
|
---|
82 | LONG OSLibWinDispatchMsg(MSG *msg, BOOL isUnicode = FALSE);
|
---|
83 |
|
---|
84 | BOOL OSLibWinGetMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax, BOOL isUnicode = FALSE);
|
---|
85 |
|
---|
86 | #endif //__OSLIBWIN_H__
|
---|