comparison dw.h @ 3:67a643a734d9

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