source: trunk/src/user32/new/oslibwin.h@ 724

Last change on this file since 724 was 724, checked in by sandervl, 26 years ago

Use shared memory for class & window objects

File size: 8.9 KB
Line 
1/* $Id: oslibwin.h,v 1.23 1999-08-28 14:09:29 sandervl Exp $ */
2/*
3 * Window API wrappers for OS/2
4 *
5 *
6 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1999 Daniela Engert (dani@ngrt.de)
8 *
9 *
10 * Project Odin Software License can be found in LICENSE.TXT
11 *
12 */
13#ifndef __OSLIBWIN_H__
14#define __OSLIBWIN_H__
15#include <oslibgdi.h>
16
17#ifndef WIN_INCLUDED
18typedef struct _SWP /* swp */
19{
20 ULONG fl;
21 LONG cy;
22 LONG cx;
23 LONG y;
24 LONG x;
25 HWND hwndInsertBehind;
26 HWND hwnd;
27 ULONG ulReserved1;
28 ULONG ulReserved2;
29} SWP, *PSWP;
30#endif
31
32#define OSLIB_HWND_DESKTOP 0
33BOOL OSLibWinSetParent(HWND hwnd, HWND hwndParent, ULONG fRedraw = TRUE);
34
35
36HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle,
37 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame);
38
39BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle);
40
41BOOL OSLibWinSetWindowULong(HWND hwnd, ULONG offset, ULONG value);
42ULONG OSLibWinGetWindowULong(HWND hwnd, ULONG offset);
43
44BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
45
46#define WAOS_WARNING 0
47#define WAOS_NOTE 1
48#define WAOS_ERROR 2
49#define WAOS_CWINALARMS 13 /* count of valid alarms 53304*/
50
51BOOL OSLibWinAlarm(HWND hwndDeskTop,ULONG flStyle);
52ULONG OSLibDosBeep(ULONG freg,ULONG dur);
53HWND OSLibWinQueryFocus(HWND hwndDeskTop);
54HWND OSLibWinWindowFromID(HWND hwndParent,ULONG id);
55BOOL OSLibWinSetFocus(HWND hwndDeskTop,HWND hwndNewFocus);
56ULONG OSLibGetWindowHeight(HWND hwnd); //for point transformation
57
58extern ULONG ScreenHeight;
59inline ULONG OSLibQueryScreenHeight(void) { return (ScreenHeight); }
60
61//reserved deleted
62
63#define SVOS_SWAPBUTTON 0
64#define SVOS_DBLCLKTIME 1
65#define SVOS_CXDBLCLK 2
66#define SVOS_CYDBLCLK 3
67#define SVOS_CXSIZEBORDER 4
68#define SVOS_CYSIZEBORDER 5
69#define SVOS_ALARM 6
70#define SVOS_CURSORRATE 9
71#define SVOS_FIRSTSCROLLRATE 10
72#define SVOS_SCROLLRATE 11
73#define SVOS_NUMBEREDLISTS 12
74#define SVOS_WARNINGFREQ 13
75#define SVOS_NOTEFREQ 14
76#define SVOS_ERRORFREQ 15
77#define SVOS_WARNINGDURATION 16
78#define SVOS_NOTEDURATION 17
79#define SVOS_ERRORDURATION 18
80#define SVOS_CXSCREEN 20
81#define SVOS_CYSCREEN 21
82#define SVOS_CXVSCROLL 22
83#define SVOS_CYHSCROLL 23
84#define SVOS_CYVSCROLLARROW 24
85#define SVOS_CXHSCROLLARROW 25
86#define SVOS_CXBORDER 26
87#define SVOS_CYBORDER 27
88#define SVOS_CXDLGFRAME 28
89#define SVOS_CYDLGFRAME 29
90#define SVOS_CYTITLEBAR 30
91#define SVOS_CYVSLIDER 31
92#define SVOS_CXHSLIDER 32
93#define SVOS_CXMINMAXBUTTON 33
94#define SVOS_CYMINMAXBUTTON 34
95#define SVOS_CYMENU 35
96#define SVOS_CXFULLSCREEN 36
97#define SVOS_CYFULLSCREEN 37
98#define SVOS_CXICON 38
99#define SVOS_CYICON 39
100#define SVOS_CXPOINTER 40
101#define SVOS_CYPOINTER 41
102#define SVOS_DEBUG 42
103#define SVOS_CMOUSEBUTTONS 43
104#define SVOS_CPOINTERBUTTONS 43
105#define SVOS_POINTERLEVEL 44
106#define SVOS_CURSORLEVEL 45
107#define SVOS_TRACKRECTLEVEL 46
108#define SVOS_CTIMERS 47
109#define SVOS_MOUSEPRESENT 48
110#define SVOS_CXBYTEALIGN 49
111#define SVOS_CXALIGN 49
112#define SVOS_CYBYTEALIGN 50
113#define SVOS_CYALIGN 50
114
115/* The following value enables any greater value to be set by WinSetSysValue. */
116/* This is to enable the setting of SV_EXTRAKEYBEEP by applications. */
117
118#define SVOS_NOTRESERVED 56
119#define SVOS_EXTRAKEYBEEP 57
120
121/* The following system value controls whether PM controls the keyboard */
122/* lights for light key keystrokes (else applications will) */
123#define SVOS_SETLIGHTS 58
124#define SVOS_INSERTMODE 59
125
126#define SVOS_MENUROLLDOWNDELAY 64
127#define SVOS_MENUROLLUPDELAY 65
128#define SVOS_ALTMNEMONIC 66
129#define SVOS_TASKLISTMOUSEACCESS 67
130#define SVOS_CXICONTEXTWIDTH 68
131#define SVOS_CICONTEXTLINES 69
132#define SVOS_CHORDTIME 70
133#define SVOS_CXCHORD 71
134#define SVOS_CYCHORD 72
135#define SVOS_CXMOTIONSTART 73
136#define SVOS_CYMOTIONSTART 74
137#define SVOS_BEGINDRAG 75
138#define SVOS_ENDDRAG 76
139#define SVOS_SINGLESELECT 77
140#define SVOS_OPEN 78
141#define SVOS_CONTEXTMENU 79
142#define SVOS_CONTEXTHELP 80
143#define SVOS_TEXTEDIT 81
144#define SVOS_BEGINSELECT 82
145#define SVOS_ENDSELECT 83
146#define SVOS_BEGINDRAGKB 84
147#define SVOS_ENDDRAGKB 85
148#define SVOS_SELECTKB 86
149#define SVOS_OPENKB 87
150#define SVOS_CONTEXTMENUKB 88
151#define SVOS_CONTEXTHELPKB 89
152#define SVOS_TEXTEDITKB 90
153#define SVOS_BEGINSELECTKB 91
154#define SVOS_ENDSELECTKB 92
155#define SVOS_ANIMATION 93
156#define SVOS_ANIMATIONSPEED 94
157#define SVOS_MONOICONS 95
158#define SVOS_KBDALTERED 96
159#define SVOS_PRINTSCREEN 97
160#define SVOS_LOCKSTARTINPUT 98
161#define SVOS_CSYSVALUES 108
162
163LONG OSLibWinQuerySysValue(HWND hwndDeskTop,LONG iSysValue);
164ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer);
165BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText);
166BOOL OSLibWinQueryPointerPos(HWND hwndDeskTop,PPOINT pptlPoint); //pptlPoint == POINTL pointer!
167
168#define SWPOS_SIZE 0x0001
169#define SWPOS_MOVE 0x0002
170#define SWPOS_ZORDER 0x0004
171#define SWPOS_SHOW 0x0008
172#define SWPOS_HIDE 0x0010
173#define SWPOS_NOREDRAW 0x0020
174#define SWPOS_NOADJUST 0x0040
175#define SWPOS_ACTIVATE 0x0080
176#define SWPOS_DEACTIVATE 0x0100
177#define SWPOS_EXTSTATECHANGE 0x0200
178#define SWPOS_MINIMIZE 0x0400
179#define SWPOS_MAXIMIZE 0x0800
180#define SWPOS_RESTORE 0x1000
181#define SWPOS_FOCUSACTIVATE 0x2000
182#define SWPOS_FOCUSDEACTIVATE 0x4000
183#define SWPOS_NOAUTOCLOSE 0x8000 /* Valid in PROGDETAILS struct only */
184
185#define HWNDOS_TOP (HWND)3
186#define HWNDOS_BOTTOM (HWND)4
187
188BOOL OSLibWinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y, LONG cx, LONG cy, ULONG fl);
189BOOL OSLibWinSetMultWindowPos(struct _SWP *pswp, ULONG num);
190BOOL OSLibWinShowWindow(HWND hwnd, ULONG fl);
191
192BOOL OSLibWinDestroyWindow(HWND hwnd);
193
194BOOL OSLibWinIsIconic(HWND hwnd);
195BOOL OSLibWinSetActiveWindow(HWND hwnd);
196BOOL OSLibWinSetFocus(HWND hwnd);
197BOOL OSLibWinEnableWindow(HWND hwnd, BOOL fEnable);
198BOOL OSLibWinIsWindowEnabled(HWND hwnd);
199BOOL OSLibWinIsWindowVisible(HWND hwnd);
200BOOL OSLibWinQueryActiveWindow();
201
202
203#define RELATIVE_TO_WINDOW 0
204#define RELATIVE_TO_SCREEN 1
205BOOL OSLibWinQueryWindowRect(HWND hwnd, PRECT pRect, int RelativeTo = RELATIVE_TO_WINDOW);
206
207#define QWOS_NEXT 0
208#define QWOS_PREV 1
209#define QWOS_TOP 2
210#define QWOS_BOTTOM 3
211#define QWOS_OWNER 4
212#define QWOS_PARENT 5
213#define QWOS_NEXTTOP 6
214#define QWOS_PREVTOP 7
215#define QWOS_FRAMEOWNER 8
216
217HWND OSLibWinQueryWindow(HWND hwnd, ULONG lCode);
218
219
220void OSLibWinPostQuitMessage(ULONG nExitCode);
221LONG OSLibWinDispatchMsg(MSG *msg, BOOL isUnicode = FALSE);
222
223BOOL OSLibWinGetMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax, BOOL isUnicode = FALSE);
224
225LONG OSLibWinQueryWindowTextLength(HWND hwnd);
226LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz);
227BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz);
228BOOL OSLibWinFlashWindow(HWND hwnd, BOOL fFlash);
229HWND OSLibWinWindowFromPoint(HWND hwnd, PVOID ppoint);
230BOOL OSLibWinMinimizeWindow(HWND hwnd);
231
232BOOL OSLibWinGetBorderSize(HWND hwnd, OSLIBPOINT *pointl);
233BOOL OSLibWinSetIcon(HWND hwnd, HANDLE hIcon);
234
235BOOL OSLibWinQueryWindowPos (HWND hwnd, PSWP pswp);
236void OSLibMapSWPtoWINDOWPOS(PSWP pswp, struct tagWINDOWPOS *pwpos, PSWP pswpOld, HWND hParent, HWND hFrame);
237void OSLibMapWINDOWPOStoSWP(struct tagWINDOWPOS *pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame);
238
239HWND OSLibWinBeginEnumWindows(HWND hwnd);
240HWND OSLibWinGetNextWindow(HWND hwndEnum);
241HWND OSLibWinQueryClientWindow(HWND hwndFrame);
242BOOL OSLibWinEndEnumWindows(HWND hwndEnum);
243
244#endif //__OSLIBWIN_H__
Note: See TracBrowser for help on using the repository browser.