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

Last change on this file since 327 was 327, checked in by cbratschi, 26 years ago

API Open32 -> PM

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