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

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

Icon + Cursor resource changes

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