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