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