Mercurial > dwindows
annotate dw.h @ 46:30d091bc7899
Fixed an error in the container date code on Windows and Unix.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 30 Oct 2001 10:49:09 +0000 |
parents | 88c9c7410c22 |
children | bf42d08d72d7 |
rev | line source |
---|---|
3 | 1 /* $Id$ */ |
2 | |
3 #ifndef _H_DW | |
4 #define _H_DW | |
5 | |
15
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
6 /* Dynamic Windows version numbers */ |
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
7 #define DW_MAJOR_VERSION 0 |
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
8 #define DW_MINOR_VERSION 5 |
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
9 #define DW_SUB_VERSION 0 |
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
10 |
3 | 11 #if defined(__OS2__) || defined(__WIN32__) || defined(WINNT) || defined(__EMX__) |
12 /* OS/2 or Windows */ | |
13 | |
14 /* Used internally */ | |
15 #define TYPEBOX 0 | |
16 #define TYPEITEM 1 | |
17 | |
18 #define SIZESTATIC 0 | |
19 #define SIZEEXPAND 1 | |
20 | |
21 #define SPLITBAR_WIDTH 3 | |
22 #define BUBBLE_HELP_MAX 256 | |
23 | |
24 #if defined(__OS2__) || defined(__EMX__) | |
25 #define INCL_DOS | |
26 #define INCL_WIN | |
27 #define INCL_GPI | |
28 | |
29 #include <os2.h> | |
30 | |
31 /* Lets make some platform independent defines :) */ | |
32 #define DW_DT_LEFT DT_LEFT | |
33 #define DW_DT_QUERYEXTENT DT_QUERYEXTENT | |
34 #define DW_DT_UNDERSCORE DT_UNDERSCORE | |
35 #define DW_DT_STRIKEOUT DT_STRIKEOUT | |
36 #define DW_DT_TEXTATTRS DT_TEXTATTRS | |
37 #define DW_DT_EXTERNALLEADING DT_EXTERNALLEADING | |
38 #define DW_DT_CENTER DT_CENTER | |
39 #define DW_DT_RIGHT DT_RIGHT | |
40 #define DW_DT_TOP DT_TOP | |
41 #define DW_DT_VCENTER DT_VCENTER | |
42 #define DW_DT_BOTTOM DT_BOTTOM | |
43 #define DW_DT_HALFTONE DT_HALFTONE | |
44 #define DW_DT_MNEMONIC DT_MNEMONIC | |
45 #define DW_DT_WORDBREAK DT_WORDBREAK | |
46 #define DW_DT_ERASERECT DT_ERASERECT | |
47 | |
48 #define DW_CLR_WHITE 16 | |
49 #define DW_CLR_BLACK 17 | |
50 #define DW_CLR_BLUE CLR_BLUE | |
51 #define DW_CLR_RED CLR_RED | |
52 #define DW_CLR_PINK CLR_PINK | |
53 #define DW_CLR_GREEN CLR_GREEN | |
54 #define DW_CLR_CYAN CLR_CYAN | |
55 #define DW_CLR_YELLOW CLR_YELLOW | |
56 #define DW_CLR_DARKGRAY CLR_DARKGRAY | |
57 #define DW_CLR_DARKBLUE CLR_DARKBLUE | |
58 #define DW_CLR_DARKRED CLR_DARKRED | |
59 #define DW_CLR_DARKPINK CLR_DARKPINK | |
60 #define DW_CLR_DARKGREEN CLR_DARKGREEN | |
61 #define DW_CLR_DARKCYAN CLR_DARKCYAN | |
62 #define DW_CLR_BROWN CLR_BROWN | |
63 #define DW_CLR_PALEGRAY CLR_PALEGRAY | |
64 | |
65 #define DW_FCF_TITLEBAR FCF_TITLEBAR | |
66 #define DW_FCF_SYSMENU FCF_SYSMENU | |
67 #define DW_FCF_MENU FCF_MENU | |
68 #define DW_FCF_SIZEBORDER FCF_SIZEBORDER | |
69 #define DW_FCF_MINBUTTON FCF_MINBUTTON | |
70 #define DW_FCF_MAXBUTTON FCF_MAXBUTTON | |
71 #define DW_FCF_MINMAX FCF_MINMAX | |
72 #define DW_FCF_VERTSCROLL FCF_VERTSCROLL | |
73 #define DW_FCF_HORZSCROLL FCF_HORZSCROLL | |
74 #define DW_FCF_DLGBORDER FCF_DLGBORDER | |
75 #define DW_FCF_BORDER FCF_BORDER | |
76 #define DW_FCF_SHELLPOSITION FCF_SHELLPOSITION | |
77 #define DW_FCF_TASKLIST FCF_TASKLIST | |
78 #define DW_FCF_NOBYTEALIGN FCF_NOBYTEALIGN | |
79 #define DW_FCF_NOMOVEWITHOWNER FCF_NOMOVEWITHOWNER | |
80 #define DW_FCF_SYSMODAL FCF_SYSMODAL | |
81 #define DW_FCF_HIDEBUTTON FCF_HIDEBUTTON | |
82 #define DW_FCF_HIDEMAX FCF_HIDEMAX | |
83 #define DW_FCF_AUTOICON FCF_AUTOICON | |
84 | |
85 #define DW_CFA_BITMAPORICON CFA_BITMAPORICON | |
86 #define DW_CFA_STRING CFA_STRING | |
87 #define DW_CFA_ULONG CFA_ULONG | |
88 #define DW_CFA_TIME CFA_TIME | |
89 #define DW_CFA_DATE CFA_DATE | |
90 #define DW_CFA_CENTER CFA_CENTER | |
91 #define DW_CFA_LEFT CFA_LEFT | |
92 #define DW_CFA_RIGHT CFA_RIGHT | |
93 #define DW_CFA_HORZSEPARATOR CFA_HORZSEPARATOR | |
94 #define DW_CFA_SEPARATOR CFA_SEPARATOR | |
95 | |
96 #define DW_CA_DETAILSVIEWTITLES CA_DETAILSVIEWTITLES | |
97 #define DW_CV_MINI CV_MINI | |
98 #define DW_CV_DETAIL CV_DETAIL | |
99 | |
100 #define DW_SLS_READONLY SLS_READONLY | |
101 #define DW_SLS_RIBBONSTRIP SLS_RIBBONSTRIP | |
102 | |
103 #define DW_CCS_SINGLESEL CCS_SINGLESEL | |
104 #define DW_CCS_EXTENDSEL CCS_EXTENDSEL | |
105 | |
106 #define DW_LS_MULTIPLESEL LS_MULTIPLESEL | |
107 | |
108 #define DW_LIT_NONE -1 | |
109 | |
110 #define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE | |
111 | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
112 #define DW_POINTER_ARROW SPTR_ARROW |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
113 #define DW_POINTER_CLOCK SPTR_WAIT |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
114 |
40
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
115 typedef struct _window_data { |
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
116 PFNWP oldproc; |
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
117 HWND clickdefault; |
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
118 } WindowData; |
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
119 |
3 | 120 typedef struct _hpixmap { |
121 unsigned long width, height; | |
122 HDC hdc; | |
123 HPS hps; | |
124 HBITMAP hbm; | |
125 HWND handle; | |
126 } *HPIXMAP; | |
127 | |
128 typedef struct _hmenui { | |
129 HWND menu; | |
130 } *HMENUI; | |
131 | |
33
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
132 typedef struct _percentbar { |
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
133 unsigned long pos; |
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
134 PFNWP oldproc; |
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
135 } PercentBar; |
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
136 |
3 | 137 extern HAB dwhab; |
138 extern HMQ dwhmq; | |
139 #endif | |
140 | |
141 #if defined(__WIN32__) || defined(WINNT) | |
142 #include <windows.h> | |
143 #include <commctrl.h> | |
144 | |
145 /* Cygwin doesn't seem to have these... */ | |
146 #if defined(__CYGWIN32__) | |
147 #define LVS_EX_GRIDLINES 0x00000001 | |
148 #define LVS_EX_FULLROWSELECT 0x00000020 | |
149 #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54) | |
150 #define ListView_SetExtendedListViewStyle(hwndLV, dw) (DWORD)SendMessage((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dw) | |
151 #endif | |
152 #ifndef UDM_SETPOS32 | |
153 #define UDM_SETPOS32 (WM_USER+113) | |
154 #endif | |
155 #ifndef UDM_GETPOS32 | |
156 #define UDM_GETPOS32 (WM_USER+114) | |
157 #endif | |
158 | |
159 /* Lets make some platform independent defines :) */ | |
160 #define DW_DT_LEFT SS_LEFT | |
161 #define DW_DT_QUERYEXTENT 0 | |
162 #define DW_DT_UNDERSCORE 0 | |
163 #define DW_DT_STRIKEOUT 0 | |
164 #define DW_DT_TEXTATTRS 0 | |
165 #define DW_DT_EXTERNALLEADING 0 | |
166 #define DW_DT_CENTER SS_CENTER | |
167 #define DW_DT_RIGHT SS_RIGHT | |
168 #define DW_DT_TOP 0 | |
169 #define DW_DT_VCENTER 0 | |
170 #define DW_DT_BOTTOM 0 | |
171 #define DW_DT_HALFTONE 0 | |
172 #define DW_DT_MNEMONIC 0 | |
173 #define DW_DT_WORDBREAK 0 | |
174 #define DW_DT_ERASERECT 0 | |
175 | |
176 /* These corespond to the entries in the color | |
177 * arrays in the Win32 dw.c, they are also the | |
178 * same as DOS ANSI colors. | |
179 */ | |
180 #define DW_CLR_BLACK 0 | |
181 #define DW_CLR_DARKRED 1 | |
182 #define DW_CLR_DARKGREEN 2 | |
183 #define DW_CLR_BROWN 3 | |
184 #define DW_CLR_DARKBLUE 4 | |
185 #define DW_CLR_DARKPINK 5 | |
186 #define DW_CLR_DARKCYAN 6 | |
187 #define DW_CLR_PALEGRAY 7 | |
188 #define DW_CLR_DARKGRAY 8 | |
189 #define DW_CLR_RED 9 | |
190 #define DW_CLR_GREEN 10 | |
191 #define DW_CLR_YELLOW 11 | |
192 #define DW_CLR_BLUE 12 | |
193 #define DW_CLR_PINK 13 | |
194 #define DW_CLR_CYAN 14 | |
195 #define DW_CLR_WHITE 15 | |
196 | |
197 #define DW_FCF_TITLEBAR WS_CAPTION | |
198 #define DW_FCF_SYSMENU WS_SYSMENU | |
199 #define DW_FCF_MENU 0 | |
200 #define DW_FCF_SIZEBORDER WS_THICKFRAME | |
201 #define DW_FCF_MINBUTTON WS_MINIMIZEBOX | |
202 #define DW_FCF_MAXBUTTON WS_MAXIMIZEBOX | |
203 #define DW_FCF_MINMAX (WS_MINIMIZEBOX|WS_MAXIMIZEBOX) | |
204 #define DW_FCF_VERTSCROLL WS_VSCROLL | |
205 #define DW_FCF_HORZSCROLL WS_HSCROLL | |
206 #define DW_FCF_DLGBORDER WS_DLGFRAME | |
207 #define DW_FCF_BORDER WS_BORDER | |
208 #define DW_FCF_SHELLPOSITION 0 | |
209 #define DW_FCF_TASKLIST WS_VSCROLL | |
210 #define DW_FCF_NOBYTEALIGN 0 | |
211 #define DW_FCF_NOMOVEWITHOWNER 0 | |
212 #define DW_FCF_SYSMODAL 0 | |
213 #define DW_FCF_HIDEBUTTON WS_MINIMIZEBOX | |
214 #define DW_FCF_HIDEMAX 0 | |
215 #define DW_FCF_AUTOICON 0 | |
216 | |
217 #define DW_CFA_BITMAPORICON 1 | |
218 #define DW_CFA_STRING 1 << 2 | |
219 #define DW_CFA_ULONG 1 << 3 | |
220 #define DW_CFA_TIME 1 << 4 | |
221 #define DW_CFA_DATE 1 << 5 | |
222 #define DW_CFA_CENTER 1 << 6 | |
223 #define DW_CFA_LEFT 1 << 7 | |
224 #define DW_CFA_RIGHT 1 << 8 | |
225 #define DW_CFA_HORZSEPARATOR 0 | |
226 #define DW_CFA_SEPARATOR 0 | |
227 | |
228 #define DW_CA_DETAILSVIEWTITLES 0 | |
229 #define DW_CV_MINI 0 | |
230 #define DW_CV_DETAIL 0 | |
231 | |
232 #define DW_SLS_READONLY 0 | |
233 #define DW_SLS_RIBBONSTRIP 0 | |
234 | |
235 #define DW_CCS_SINGLESEL 0 | |
236 #define DW_CCS_EXTENDSEL 0 | |
237 | |
238 #define DW_LS_MULTIPLESEL LBS_MULTIPLESEL | |
239 | |
240 #define DW_LIT_NONE -1 | |
241 | |
242 #define DW_MLE_CASESENSITIVE 1 | |
243 | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
244 #define DW_POINTER_ARROW 32512 |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
245 #define DW_POINTER_CLOCK 32514 |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
246 |
3 | 247 #define STATICCLASSNAME "STATIC" |
248 #define COMBOBOXCLASSNAME "COMBOBOX" | |
249 #define LISTBOXCLASSNAME "LISTBOX" | |
250 #define BUTTONCLASSNAME "BUTTON" | |
251 #define POPUPMENUCLASSNAME "POPUPMENU" | |
252 #define EDITCLASSNAME "EDIT" | |
253 #define FRAMECLASSNAME "FRAME" | |
254 | |
255 #define ClassName "dynamicwindows" | |
256 #define SplitbarClassName "dwsplitbar" | |
257 #define ObjectClassName "dwobjectclass" | |
258 #define DefaultFont NULL | |
259 | |
260 typedef struct _color { | |
261 int fore; | |
262 int back; | |
39
3aa9ef0b3996
Added focus fixes and set-focus fixes on all three platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
38
diff
changeset
|
263 HWND combo, buddy; |
3 | 264 int user; |
40
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
265 HWND clickdefault; |
3 | 266 HBRUSH hbrush; |
267 char fontname[128]; | |
268 WNDPROC pOldProc; | |
269 } ColorInfo; | |
270 | |
271 typedef struct _notebookpage { | |
272 ColorInfo cinfo; | |
273 TC_ITEM item; | |
274 HWND hwnd; | |
275 int realid; | |
276 } NotebookPage; | |
277 | |
278 typedef unsigned long HAB; | |
279 typedef HANDLE HMTX; | |
280 typedef HANDLE HEV; | |
281 | |
282 typedef struct _container { | |
283 ColorInfo cinfo; | |
284 ULONG *flags; | |
285 WNDPROC pOldProc; | |
286 } ContainerInfo; | |
287 | |
288 typedef struct _hpixmap { | |
289 unsigned long width, height; | |
290 HBITMAP hbm; | |
291 HDC hdc; | |
292 HWND handle; | |
293 void *bits; | |
294 } *HPIXMAP; | |
295 | |
296 typedef struct _hmenui { | |
297 HMENU menu; | |
298 HWND hwnd; | |
299 } *HMENUI; | |
300 | |
301 #endif | |
302 | |
303 typedef struct _item { | |
304 /* Item type - Box or Item */ | |
305 int type; | |
306 /* Handle to Frame or Window */ | |
307 HWND hwnd; | |
308 /* Width and Height of static size */ | |
309 int width, height, origwidth, origheight; | |
310 /* Size Type - Static or Expand */ | |
311 int hsize, vsize; | |
312 /* Padding */ | |
313 int pad; | |
314 /* Ratio of current item */ | |
315 float xratio, yratio; | |
316 } Item; | |
317 | |
318 typedef struct _box { | |
319 #if defined(__WIN32__) || defined(WINNT) | |
320 ColorInfo cinfo; | |
24
d9e87e8bcf1d
Updated dynamic windows to build with EMX.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
22
diff
changeset
|
321 #elif defined(__OS2__) || defined(__EMX__) |
3 | 322 PFNWP oldproc; |
40
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
323 HWND hwndtitle; |
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
324 int titlebar; |
3 | 325 #endif |
326 /* Number of items in the box */ | |
327 int count; | |
328 /* Box type - horizontal or vertical */ | |
329 int type; | |
330 /* Padding */ | |
331 int pad, parentpad; | |
332 /* Groupbox */ | |
34
b03b24bb95f8
Added dw_window_default() to set the default focus widget in a dialog.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
33
diff
changeset
|
333 HWND grouphwnd; |
b03b24bb95f8
Added dw_window_default() to set the default focus widget in a dialog.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
33
diff
changeset
|
334 /* Default item */ |
b03b24bb95f8
Added dw_window_default() to set the default focus widget in a dialog.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
33
diff
changeset
|
335 HWND defaultitem; |
3 | 336 /* Used as temporary storage in the calculation stage */ |
337 int upx, upy, minheight, minwidth; | |
338 /* Ratio in this box */ | |
339 float xratio, yratio, parentxratio, parentyratio; | |
340 /* Used for calculating individual item ratios */ | |
7
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
341 int width, height; |
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
342 /* Any combinations of flags describing the box */ |
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
343 unsigned long flags; |
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
344 /* Array of item structures */ |
3 | 345 struct _item *items; |
346 } Box; | |
347 | |
348 typedef struct _bubblebutton { | |
349 #if defined(__WIN32__) || defined(WINNT) | |
350 ColorInfo cinfo; | |
351 #endif | |
352 unsigned long id; | |
353 char bubbletext[BUBBLE_HELP_MAX]; | |
354 #if defined(__OS2__) || defined(__EMX__) | |
355 PFNWP pOldProc; | |
356 #else | |
357 WNDPROC pOldProc; | |
358 #endif | |
359 } BubbleButton; | |
360 | |
361 void dw_box_pack_start_stub(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); | |
362 void dw_box_pack_end_stub(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); | |
363 #else | |
364 /* GTK */ | |
365 #include <gtk/gtk.h> | |
366 #include <gdk/gdkx.h> | |
367 #include <gdk/gdkprivate.h> | |
368 #include <pthread.h> | |
369 | |
370 /* Lets make some platform independent defines :) */ | |
371 #define DW_DT_LEFT 1 | |
372 #define DW_DT_UNDERSCORE (1 << 1) | |
373 #define DW_DT_STRIKEOUT (1 << 2) | |
374 #define DW_DT_CENTER (1 << 3) | |
375 #define DW_DT_RIGHT (1 << 4) | |
376 #define DW_DT_TOP (1 << 5) | |
377 #define DW_DT_VCENTER (1 << 6) | |
378 #define DW_DT_BOTTOM (1 << 7) | |
379 #define DW_DT_HALFTONE (1 << 8) | |
380 #define DW_DT_MNEMONIC (1 << 9) | |
381 #define DW_DT_WORDBREAK (1 << 10) | |
382 #define DW_DT_ERASERECT (1 << 11) | |
383 | |
384 #define DW_CLR_BLACK 0 | |
385 #define DW_CLR_DARKRED 1 | |
386 #define DW_CLR_DARKGREEN 2 | |
387 #define DW_CLR_BROWN 3 | |
388 #define DW_CLR_DARKBLUE 4 | |
389 #define DW_CLR_DARKPINK 5 | |
390 #define DW_CLR_DARKCYAN 6 | |
391 #define DW_CLR_PALEGRAY 7 | |
392 #define DW_CLR_DARKGRAY 8 | |
393 #define DW_CLR_RED 9 | |
394 #define DW_CLR_GREEN 10 | |
395 #define DW_CLR_YELLOW 11 | |
396 #define DW_CLR_BLUE 12 | |
397 #define DW_CLR_PINK 13 | |
398 #define DW_CLR_CYAN 14 | |
399 #define DW_CLR_WHITE 15 | |
400 | |
401 #define DW_FCF_TITLEBAR 1 | |
402 #define DW_FCF_SYSMENU (1 << 1) | |
403 #define DW_FCF_MENU (1 << 2) | |
404 #define DW_FCF_SIZEBORDER (1 << 3) | |
405 #define DW_FCF_MINBUTTON (1 << 4) | |
406 #define DW_FCF_MAXBUTTON (1 << 5) | |
407 #define DW_FCF_MINMAX (1 << 6) | |
408 #define DW_FCF_VERTSCROLL (1 << 7) | |
409 #define DW_FCF_HORZSCROLL (1 << 8) | |
410 #define DW_FCF_DLGBORDER (1 << 9) | |
411 #define DW_FCF_BORDER (1 << 10) | |
412 #define DW_FCF_SHELLPOSITION (1 << 11) | |
413 #define DW_FCF_TASKLIST (1 << 12) | |
414 #define DW_FCF_NOBYTEALIGN (1 << 13) | |
415 #define DW_FCF_NOMOVEWITHOWNER (1 << 14) | |
416 #define DW_FCF_SYSMODAL (1 << 15) | |
417 #define DW_FCF_HIDEBUTTON (1 << 16) | |
418 #define DW_FCF_HIDEMAX (1 << 17) | |
419 #define DW_FCF_AUTOICON (1 << 18) | |
420 | |
421 #define DW_CFA_BITMAPORICON 1 | |
422 #define DW_CFA_STRING (1 << 1) | |
423 #define DW_CFA_ULONG (1 << 2) | |
424 #define DW_CFA_TIME (1 << 3) | |
425 #define DW_CFA_DATE (1 << 4) | |
426 #define DW_CFA_CENTER (1 << 5) | |
427 #define DW_CFA_LEFT (1 << 6) | |
428 #define DW_CFA_RIGHT (1 << 7) | |
429 #define DW_CFA_HORZSEPARATOR (1 << 8) | |
430 #define DW_CFA_SEPARATOR (1 << 9) | |
431 | |
432 #define DW_CA_DETAILSVIEWTITLES 1 | |
433 #define DW_CV_MINI (1 << 1) | |
434 #define DW_CV_DETAIL (1 << 2) | |
435 | |
436 #define DW_SLS_READONLY 1 | |
437 #define DW_SLS_RIBBONSTRIP (1 << 1) | |
438 | |
439 #define DW_CCS_SINGLESEL 1 | |
440 #define DW_CCS_EXTENDSEL (1 << 1) | |
441 | |
442 #define DW_LS_MULTIPLESEL 1 | |
443 | |
444 #define DW_LIT_NONE -1 | |
445 | |
446 #define DW_MLE_CASESENSITIVE 1 | |
447 | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
448 #define DW_POINTER_ARROW GDK_ARROW |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
449 #define DW_POINTER_CLOCK GDK_CLOCK |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
450 |
3 | 451 #define DW_DESKTOP ((HWND)0) |
452 #define HWND_DESKTOP ((HWND)0) | |
453 | |
454 typedef GtkWidget *HWND; | |
455 typedef void *HAB; | |
38
538db2a48bac
Added typecast to MPARAM.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
34
diff
changeset
|
456 #ifndef _ENVRNMNT_H |
3 | 457 typedef unsigned long ULONG; |
38
538db2a48bac
Added typecast to MPARAM.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
34
diff
changeset
|
458 #endif |
3 | 459 typedef unsigned char UCHAR; |
460 typedef long LONG; | |
461 typedef unsigned short USHORT; | |
462 typedef short SHORT; | |
463 typedef pthread_mutex_t HMTX; | |
464 typedef struct _dw_unix_event { | |
465 pthread_mutex_t mutex; | |
466 pthread_cond_t event; | |
467 pthread_t thread; | |
468 int alive; | |
469 int posted; | |
470 } *HEV; | |
471 typedef pthread_t DWTID; | |
472 | |
473 typedef struct _hpixmap { | |
474 unsigned long width, height; | |
475 GdkPixmap *pixmap; | |
476 HWND handle; | |
477 } *HPIXMAP; | |
478 | |
479 typedef struct _hmenui { | |
480 GtkWidget *menu; | |
481 } *HMENUI; | |
482 | |
483 typedef struct _resource_struct { | |
484 long resource_max, *resource_id; | |
485 char **resource_data; | |
486 } DWResources; | |
487 | |
488 #if !defined(DW_RESOURCES) || defined(BUILD_DLL) | |
489 static DWResources _resources = { 0, 0, 0 }; | |
490 #else | |
491 extern DWResources _resources; | |
492 #endif | |
493 | |
494 #endif | |
495 | |
496 #if !defined(__OS2__) && !defined(__EMX__) | |
497 typedef struct _CDATE | |
498 { | |
499 UCHAR day; | |
500 UCHAR month; | |
501 USHORT year; | |
502 } CDATE; | |
503 typedef CDATE *PCDATE; | |
504 | |
505 typedef struct _CTIME | |
506 { | |
507 UCHAR hours; | |
508 UCHAR minutes; | |
509 UCHAR seconds; | |
510 UCHAR ucReserved; | |
511 } CTIME; | |
512 typedef CTIME *PCTIME; | |
513 #endif | |
514 | |
515 #if defined(__OS2__) || defined(__WIN32__) || defined(WINNT) || defined(__EMX__) | |
516 typedef unsigned long DWTID; | |
517 #endif | |
518 | |
519 typedef struct _dwenv { | |
15
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
520 /* Operating System Name and DW Build Date/Time */ |
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
521 char osName[30], buildDate[30], buildTime[30]; |
3 | 522 /* Versions and builds */ |
523 short MajorVersion, MinorVersion, MajorBuild, MinorBuild; | |
15
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
524 /* Dynamic Window version */ |
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
525 short DWMajorVersion, DWMinorVersion, DWSubVersion; |
3 | 526 } DWEnv; |
527 | |
528 | |
529 typedef struct _dwexpose { | |
530 int x, y; | |
531 int width, height; | |
532 } DWExpose; | |
533 | |
534 typedef struct _dwdialog { | |
535 HEV eve; | |
536 int done; | |
537 void *data, *result; | |
538 } DWDialog; | |
539 | |
540 #define DW_SIGNAL_FUNC(a) ((void *)a) | |
541 | |
7
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
542 #define DW_MINIMIZED 1 |
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
543 |
3 | 544 #define DW_BUTTON1_MASK 1 |
545 #define DW_BUTTON2_MASK (1 << 1) | |
546 #define DW_BUTTON3_MASK (1 << 2) | |
547 | |
548 #define DW_EXEC_CON 0 | |
549 #define DW_EXEC_GUI 1 | |
550 | |
551 #define DW_FILE_OPEN 0 | |
552 #define DW_FILE_SAVE 1 | |
553 | |
554 #define BOXHORZ 0 | |
555 #define BOXVERT 1 | |
556 | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
557 #define DW_SCROLL_UP 0 |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
558 #define DW_SCROLL_DOWN 1 |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
559 #define DW_SCROLL_TOP 2 |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
560 #define DW_SCROLL_BOTTOM 3 |
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
561 |
3 | 562 #define DW_PIXMAP_WIDTH(x) (x ? x->width : 0) |
563 #define DW_PIXMAP_HEIGHT(x) (x ? x->height : 0) | |
564 | |
565 #define DW_RGB_COLOR (0xFF000000) | |
566 #define DW_RGB_MASK (0x00FFFFFF) | |
567 #define DW_RED_MASK (0x000000FF) | |
568 #define DW_GREEN_MASK (0x0000FF00) | |
569 #define DW_BLUE_MASK (0x00FF0000) | |
570 #define DW_RED_VALUE(a) (a & DW_RED_MASK) | |
571 #define DW_GREEN_VALUE(a) ((a & DW_GREEN_MASK) >> 8) | |
572 #define DW_BLUE_VALUE(a) ((a & DW_BLUE_MASK) >> 16) | |
573 #define DW_RGB(a, b, c) (0xFF000000 | a | b << 8 | c << 16) | |
574 | |
24
d9e87e8bcf1d
Updated dynamic windows to build with EMX.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
22
diff
changeset
|
575 #if defined(__OS2__) || defined(__EMX__) |
3 | 576 #define DW_OS2_RGB(a) ((DW_RED_VALUE(a) << 16) | (DW_GREEN_VALUE(a) << 8) | DW_BLUE_VALUE(a)) |
577 #endif | |
578 | |
579 /* Public function prototypes */ | |
580 void dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); | |
581 void dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); | |
24
d9e87e8bcf1d
Updated dynamic windows to build with EMX.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
22
diff
changeset
|
582 #if !defined(__OS2__) && !defined(__WIN32__) && !defined(__EMX__) |
14
176cee043f1b
Lots of Windows and Unix bug fixes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
13
diff
changeset
|
583 int dw_int_init(DWResources *res, int newthread, int argc, char *argv[]); |
176cee043f1b
Lots of Windows and Unix bug fixes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
13
diff
changeset
|
584 #define dw_init(a, b, c) dw_int_init(&_resources, a, b, c) |
3 | 585 #else |
14
176cee043f1b
Lots of Windows and Unix bug fixes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
13
diff
changeset
|
586 int dw_init(int newthread, int argc, char *argv[]); |
3 | 587 #endif |
588 void dw_main(HAB currenthab, void *filterfunc); | |
38
538db2a48bac
Added typecast to MPARAM.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
34
diff
changeset
|
589 void dw_main_sleep(int seconds); |
3 | 590 void dw_free(void *ptr); |
591 int dw_window_show(HWND handle); | |
592 int dw_window_hide(HWND handle); | |
14
176cee043f1b
Lots of Windows and Unix bug fixes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
13
diff
changeset
|
593 int dw_window_minimize(HWND handle); |
40
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
594 int dw_window_raise(HWND handle); |
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
595 int dw_window_lower(HWND handle); |
3 | 596 int dw_window_destroy(HWND handle); |
597 int dw_window_set_font(HWND handle, char *fontname); | |
598 int dw_window_set_color(HWND handle, unsigned long fore, unsigned long back); | |
599 HWND dw_window_new(HWND hwndOwner, char *title, unsigned long flStyle); | |
600 HWND dw_box_new(int type, int pad); | |
601 HWND dw_groupbox_new(int type, int pad, char *title); | |
14
176cee043f1b
Lots of Windows and Unix bug fixes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
13
diff
changeset
|
602 HWND dw_mdi_new(unsigned long id); |
3 | 603 HWND dw_bitmap_new(unsigned long id); |
604 HWND dw_bitmapbutton_new(char *text, unsigned long id); | |
605 HWND dw_container_new(unsigned long id); | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
606 HWND dw_tree_new(unsigned long id); |
3 | 607 HWND dw_text_new(char *text, unsigned long id); |
7
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
608 HWND dw_status_text_new(char *text, unsigned long id); |
3 | 609 HWND dw_mle_new(unsigned long id); |
610 HWND dw_entryfield_new(char *text, unsigned long id); | |
611 HWND dw_entryfield_password_new(char *text, ULONG id); | |
612 HWND dw_combobox_new(char *text, unsigned long id); | |
613 HWND dw_button_new(char *text, unsigned long id); | |
614 HWND dw_spinbutton_new(char *text, unsigned long id); | |
615 HWND dw_radiobutton_new(char *text, ULONG id); | |
33
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
616 HWND dw_percent_new(unsigned long id); |
3 | 617 HWND dw_checkbox_new(char *text, unsigned long id); |
618 HWND dw_listbox_new(unsigned long id, int multi); | |
619 void dw_listbox_append(HWND handle, char *text); | |
620 void dw_listbox_clear(HWND handle); | |
621 int dw_listbox_count(HWND handle); | |
622 void dw_listbox_set_top(HWND handle, int top); | |
623 void dw_listbox_select(HWND handle, int index, int state); | |
624 void dw_listbox_delete(HWND handle, int index); | |
625 void dw_listbox_query_text(HWND handle, unsigned int index, char *buffer, unsigned int length); | |
626 void dw_listbox_set_text(HWND handle, unsigned int index, char *buffer); | |
627 unsigned int dw_listbox_selected(HWND handle); | |
628 int dw_listbox_selected_multi(HWND handle, int where); | |
33
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
629 unsigned int dw_percent_query_range(HWND handle); |
72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
32
diff
changeset
|
630 void dw_percent_set_pos(HWND handle, unsigned int position); |
3 | 631 void dw_window_set_pos(HWND handle, unsigned long x, unsigned long y); |
632 void dw_window_set_usize(HWND handle, unsigned long width, unsigned long height); | |
633 void dw_window_set_pos_size(HWND handle, unsigned long x, unsigned long y, unsigned long width, unsigned long height); | |
634 void dw_window_get_pos_size(HWND handle, unsigned long *x, unsigned long *y, unsigned long *width, unsigned long *height); | |
635 void dw_window_set_style(HWND handle, unsigned long style, unsigned long mask); | |
636 void dw_window_set_icon(HWND handle, unsigned long id); | |
637 void dw_window_set_bitmap(HWND handle, unsigned long id); | |
638 char *dw_window_get_text(HWND handle); | |
639 void dw_window_set_text(HWND handle, char *text); | |
640 int dw_window_set_border(HWND handle, int border); | |
641 void dw_window_disable(HWND handle); | |
642 void dw_window_enable(HWND handle); | |
643 void dw_window_capture(HWND handle); | |
644 void dw_window_release(void); | |
645 void dw_window_reparent(HWND handle, HWND newparent); | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
646 void dw_window_pointer(HWND handle, int pointertype); |
34
b03b24bb95f8
Added dw_window_default() to set the default focus widget in a dialog.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
33
diff
changeset
|
647 void dw_window_default(HWND window, HWND defaultitem); |
40
88c9c7410c22
Lots of fixes and new functions on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
39
diff
changeset
|
648 void dw_window_click_default(HWND window, HWND next); |
3 | 649 unsigned int dw_mle_import(HWND handle, char *buffer, int startpoint); |
650 void dw_mle_export(HWND handle, char *buffer, int startpoint, int length); | |
651 void dw_mle_query(HWND handle, unsigned long *bytes, unsigned long *lines); | |
652 void dw_mle_delete(HWND handle, int startpoint, int length); | |
653 void dw_mle_clear(HWND handle); | |
654 void dw_mle_freeze(HWND handle); | |
655 void dw_mle_thaw(HWND handle); | |
656 void dw_mle_set(HWND handle, int point); | |
657 void dw_mle_set_visible(HWND handle, int line); | |
7
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
658 void dw_mle_set_editable(HWND handle, int state); |
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
659 void dw_mle_set_word_wrap(HWND handle, int state); |
3 | 660 int dw_mle_search(HWND handle, char *text, int point, unsigned long flags); |
661 void dw_spinbutton_set_pos(HWND handle, long position); | |
662 void dw_spinbutton_set_limits(HWND handle, long upper, long lower); | |
663 void dw_entryfield_set_limit(HWND handle, ULONG limit); | |
664 long dw_spinbutton_query(HWND handle); | |
665 int dw_checkbox_query(HWND handle); | |
666 void dw_checkbox_set(HWND handle, int value); | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
667 HWND dw_tree_insert(HWND handle, char *title, unsigned long icon, HWND parent); |
32
f3bf96c2786d
Added missing exports, added new tree functions and signals, fixed Win32
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
24
diff
changeset
|
668 void dw_tree_clear(HWND handle); |
f3bf96c2786d
Added missing exports, added new tree functions and signals, fixed Win32
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
24
diff
changeset
|
669 void dw_tree_delete(HWND handle, HWND item); |
3 | 670 int dw_container_setup(HWND handle, unsigned long *flags, char **titles, int count, int separator); |
671 unsigned long dw_icon_load(unsigned long module, unsigned long id); | |
672 void dw_icon_free(unsigned long handle); | |
673 void *dw_container_alloc(HWND handle, int rowcount); | |
674 void dw_container_set_item(HWND handle, void *pointer, int column, int row, void *data); | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
675 void dw_container_set_column_width(HWND handle, int column, int width); |
3 | 676 void dw_container_set_row_title(void *pointer, int row, char *title); |
677 void dw_container_insert(HWND handle, void *pointer, int rowcount); | |
678 void dw_container_clear(HWND handle); | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
679 void dw_container_delete(HWND handle, int rowcount); |
3 | 680 void dw_container_set_view(HWND handle, unsigned long flags, int iconwidth, int iconheight); |
681 char *dw_container_query_start(HWND handle, unsigned long flags); | |
682 char *dw_container_query_next(HWND handle, unsigned long flags); | |
22
6a246b3bb14f
Added tree widgets, fixed some delete event processing, fixed a layout bug
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
15
diff
changeset
|
683 void dw_container_scroll(HWND handle, int direction, long rows); |
3 | 684 int dw_filesystem_setup(HWND handle, unsigned long *flags, char **titles, int count); |
685 void dw_filesystem_set_item(HWND handle, void *pointer, int column, int row, void *data); | |
686 void dw_filesystem_set_file(HWND handle, void *pointer, int row, char *filename, unsigned long icon); | |
687 int dw_screen_width(void); | |
688 int dw_screen_height(void); | |
689 unsigned long dw_color_depth(void); | |
690 HWND dw_notebook_new(unsigned long id, int top); | |
691 unsigned long dw_notebook_page_new(HWND handle, unsigned long flags, int front); | |
692 void dw_notebook_page_destroy(HWND handle, unsigned int pageid); | |
693 void dw_notebook_page_set_text(HWND handle, unsigned long pageid, char *text); | |
694 void dw_notebook_page_set_status_text(HWND handle, unsigned long pageid, char *text); | |
695 void dw_notebook_page_set(HWND handle, unsigned int pageid); | |
696 unsigned int dw_notebook_page_query(HWND handle); | |
697 void dw_notebook_pack(HWND handle, unsigned long pageid, HWND page); | |
698 void dw_box_pack_splitbar_start(HWND box); | |
699 void dw_box_pack_splitbar_end(HWND box); | |
700 HMENUI dw_menu_new(unsigned long id); | |
701 HMENUI dw_menubar_new(HWND location); | |
702 HWND dw_menu_append_item(HMENUI menu, char *title, unsigned long id, unsigned long flags, int end, int check, HMENUI submenu); | |
13
156281539fb3
Fixed misdeclaration in dw_menu_item_set_check(), id was int should be
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
7
diff
changeset
|
703 void dw_menu_item_set_check(HMENUI menu, unsigned long id, int check); |
3 | 704 void dw_menu_popup(HMENUI *menu, HWND parent, int x, int y); |
705 void dw_menu_destroy(HMENUI *menu); | |
706 void dw_pointer_query_pos(long *x, long *y); | |
707 void dw_pointer_set_pos(long x, long y); | |
708 void dw_window_function(HWND handle, void *function, void *data); | |
709 HWND dw_window_from_id(HWND handle, int id); | |
710 HMTX dw_mutex_new(void); | |
711 void dw_mutex_close(HMTX mutex); | |
712 void dw_mutex_lock(HMTX mutex); | |
713 void dw_mutex_unlock(HMTX mutex); | |
714 HEV dw_event_new(void); | |
715 int dw_event_reset(HEV eve); | |
716 int dw_event_post(HEV eve); | |
717 int dw_event_wait(HEV eve, unsigned long timeout); | |
718 int dw_event_close (HEV *eve); | |
719 DWTID dw_thread_new(void *func, void *data, int stack); | |
720 void dw_thread_end(void); | |
721 DWTID dw_thread_id(void); | |
722 void dw_exit(int exitcode); | |
723 HWND dw_render_new(unsigned long id); | |
724 void dw_color_foreground_set(unsigned long value); | |
725 void dw_color_background_set(unsigned long value); | |
726 void dw_draw_point(HWND handle, HPIXMAP pixmap, int x, int y); | |
727 void dw_draw_line(HWND handle, HPIXMAP pixmap, int x1, int y1, int x2, int y2); | |
728 void dw_draw_rect(HWND handle, HPIXMAP pixmap, int fill, int x, int y, int width, int height); | |
729 void dw_draw_text(HWND handle, HPIXMAP pixmap, int x, int y, char *text); | |
730 void dw_flush(void); | |
731 void dw_pixmap_bitblt(HWND dest, HPIXMAP destp, int xdest, int ydest, int width, int height, HWND src, HPIXMAP srcp, int xsrc, int ysrc); | |
732 HPIXMAP dw_pixmap_new(HWND handle, unsigned long width, unsigned long height, int depth); | |
733 HPIXMAP dw_pixmap_grab(HWND handle, ULONG id); | |
734 void dw_pixmap_destroy(HPIXMAP pixmap); | |
735 void dw_beep(int freq, int dur); | |
736 int dw_messagebox(char *title, char *format, ...); | |
737 int dw_yesno(char *title, char *text); | |
738 void dw_environment_query(DWEnv *env); | |
739 int dw_exec(char *program, int type, char **params); | |
740 int dw_browse(char *url); | |
741 char *dw_file_browse(char *title, char *defpath, char *ext, int flags); | |
742 char *dw_user_dir(void); | |
743 DWDialog *dw_dialog_new(void *data); | |
744 int dw_dialog_dismiss(DWDialog *dialog, void *result); | |
745 void *dw_dialog_wait(DWDialog *dialog); | |
746 #ifndef NO_SIGNALS | |
747 void dw_signal_connect(HWND window, char *signame, void *sigfunc, void *data); | |
748 void dw_signal_disconnect_by_window(HWND window); | |
749 void dw_signal_disconnect_by_data(HWND window, void *data); | |
750 void dw_signal_disconnect_by_name(HWND window, char *signame); | |
751 #endif | |
752 | |
753 #endif |