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

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

Accelerator + icon changes

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