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

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

WS_DISABLED fix + removed frame + poschanged bugfixes

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