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