source: trunk/src/user32/oslibwin.h@ 1118

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

Lots of changes by several people (see changelog for 4 October

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