Mercurial > dwindows
annotate dw.h @ 126:72cb88af4490
Finalized splitbar support on Windows.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 20 Oct 2002 05:39:02 +0000 |
parents | 7d2108cbcd3e |
children | caeb52bb5ef4 |
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 | |
113
553f3b4f8b5b
Added the CLOSEBUTTON flag to the SYSMENU flag on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
90
diff
changeset
|
73 #define DW_FCF_SYSMENU (FCF_SYSMENU | FCF_CLOSEBUTTON) |
3 | 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 */ | |
120
7d2108cbcd3e
Porting DW to GTK 2.0... and changed the percent value from into to a float
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
119
diff
changeset
|
383 #define GTK_ENABLE_BROKEN 1 |
3 | 384 #include <gtk/gtk.h> |
385 #include <gdk/gdkx.h> | |
386 #include <gdk/gdkprivate.h> | |
387 #include <pthread.h> | |
388 | |
389 /* Lets make some platform independent defines :) */ | |
390 #define DW_DT_LEFT 1 | |
391 #define DW_DT_UNDERSCORE (1 << 1) | |
392 #define DW_DT_STRIKEOUT (1 << 2) | |
393 #define DW_DT_CENTER (1 << 3) | |
394 #define DW_DT_RIGHT (1 << 4) | |
395 #define DW_DT_TOP (1 << 5) | |
396 #define DW_DT_VCENTER (1 << 6) | |
397 #define DW_DT_BOTTOM (1 << 7) | |
398 #define DW_DT_HALFTONE (1 << 8) | |
399 #define DW_DT_MNEMONIC (1 << 9) | |
400 #define DW_DT_WORDBREAK (1 << 10) | |
401 #define DW_DT_ERASERECT (1 << 11) | |
402 | |
403 #define DW_CLR_BLACK 0 | |
404 #define DW_CLR_DARKRED 1 | |
405 #define DW_CLR_DARKGREEN 2 | |
406 #define DW_CLR_BROWN 3 | |
407 #define DW_CLR_DARKBLUE 4 | |
408 #define DW_CLR_DARKPINK 5 | |
409 #define DW_CLR_DARKCYAN 6 | |
410 #define DW_CLR_PALEGRAY 7 | |
411 #define DW_CLR_DARKGRAY 8 | |
412 #define DW_CLR_RED 9 | |
413 #define DW_CLR_GREEN 10 | |
414 #define DW_CLR_YELLOW 11 | |
415 #define DW_CLR_BLUE 12 | |
416 #define DW_CLR_PINK 13 | |
417 #define DW_CLR_CYAN 14 | |
418 #define DW_CLR_WHITE 15 | |
419 | |
420 #define DW_FCF_TITLEBAR 1 | |
421 #define DW_FCF_SYSMENU (1 << 1) | |
422 #define DW_FCF_MENU (1 << 2) | |
423 #define DW_FCF_SIZEBORDER (1 << 3) | |
424 #define DW_FCF_MINBUTTON (1 << 4) | |
425 #define DW_FCF_MAXBUTTON (1 << 5) | |
426 #define DW_FCF_MINMAX (1 << 6) | |
427 #define DW_FCF_VERTSCROLL (1 << 7) | |
428 #define DW_FCF_HORZSCROLL (1 << 8) | |
429 #define DW_FCF_DLGBORDER (1 << 9) | |
430 #define DW_FCF_BORDER (1 << 10) | |
431 #define DW_FCF_SHELLPOSITION (1 << 11) | |
432 #define DW_FCF_TASKLIST (1 << 12) | |
433 #define DW_FCF_NOBYTEALIGN (1 << 13) | |
434 #define DW_FCF_NOMOVEWITHOWNER (1 << 14) | |
435 #define DW_FCF_SYSMODAL (1 << 15) | |
436 #define DW_FCF_HIDEBUTTON (1 << 16) | |
437 #define DW_FCF_HIDEMAX (1 << 17) | |
438 #define DW_FCF_AUTOICON (1 << 18) | |
439 | |
440 #define DW_CFA_BITMAPORICON 1 | |
441 #define DW_CFA_STRING (1 << 1) | |
442 #define DW_CFA_ULONG (1 << 2) | |
443 #define DW_CFA_TIME (1 << 3) | |
444 #define DW_CFA_DATE (1 << 4) | |
445 #define DW_CFA_CENTER (1 << 5) | |
446 #define DW_CFA_LEFT (1 << 6) | |
447 #define DW_CFA_RIGHT (1 << 7) | |
448 #define DW_CFA_HORZSEPARATOR (1 << 8) | |
449 #define DW_CFA_SEPARATOR (1 << 9) | |
450 | |
451 #define DW_CA_DETAILSVIEWTITLES 1 | |
452 #define DW_CV_MINI (1 << 1) | |
453 #define DW_CV_DETAIL (1 << 2) | |
454 | |
455 #define DW_SLS_READONLY 1 | |
456 #define DW_SLS_RIBBONSTRIP (1 << 1) | |
457 | |
458 #define DW_CCS_SINGLESEL 1 | |
459 #define DW_CCS_EXTENDSEL (1 << 1) | |
460 | |
69
9510897c0b03
Added new container functions, and implemented some missing functionality.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
67
diff
changeset
|
461 #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
|
462 #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
|
463 |
3 | 464 #define DW_LS_MULTIPLESEL 1 |
465 | |
466 #define DW_LIT_NONE -1 | |
467 | |
468 #define DW_MLE_CASESENSITIVE 1 | |
469 | |
22
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_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
|
471 #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
|
472 |
3 | 473 #define DW_DESKTOP ((HWND)0) |
474 #define HWND_DESKTOP ((HWND)0) | |
475 | |
476 typedef GtkWidget *HWND; | |
477 typedef void *HAB; | |
38
538db2a48bac
Added typecast to MPARAM.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
34
diff
changeset
|
478 #ifndef _ENVRNMNT_H |
3 | 479 typedef unsigned long ULONG; |
38
538db2a48bac
Added typecast to MPARAM.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
34
diff
changeset
|
480 #endif |
3 | 481 typedef unsigned char UCHAR; |
482 typedef long LONG; | |
483 typedef unsigned short USHORT; | |
484 typedef short SHORT; | |
485 typedef pthread_mutex_t HMTX; | |
486 typedef struct _dw_unix_event { | |
487 pthread_mutex_t mutex; | |
488 pthread_cond_t event; | |
489 pthread_t thread; | |
490 int alive; | |
491 int posted; | |
492 } *HEV; | |
493 typedef pthread_t DWTID; | |
494 | |
495 typedef struct _hpixmap { | |
496 unsigned long width, height; | |
497 GdkPixmap *pixmap; | |
498 HWND handle; | |
499 } *HPIXMAP; | |
500 | |
501 typedef struct _hmenui { | |
502 GtkWidget *menu; | |
503 } *HMENUI; | |
504 | |
505 typedef struct _resource_struct { | |
506 long resource_max, *resource_id; | |
507 char **resource_data; | |
508 } DWResources; | |
509 | |
510 #if !defined(DW_RESOURCES) || defined(BUILD_DLL) | |
511 static DWResources _resources = { 0, 0, 0 }; | |
512 #else | |
513 extern DWResources _resources; | |
514 #endif | |
515 | |
516 #endif | |
517 | |
518 #if !defined(__OS2__) && !defined(__EMX__) | |
519 typedef struct _CDATE | |
520 { | |
521 UCHAR day; | |
522 UCHAR month; | |
523 USHORT year; | |
524 } CDATE; | |
525 typedef CDATE *PCDATE; | |
526 | |
527 typedef struct _CTIME | |
528 { | |
529 UCHAR hours; | |
530 UCHAR minutes; | |
531 UCHAR seconds; | |
532 UCHAR ucReserved; | |
533 } CTIME; | |
534 typedef CTIME *PCTIME; | |
535 #endif | |
536 | |
537 #if defined(__OS2__) || defined(__WIN32__) || defined(WINNT) || defined(__EMX__) | |
538 typedef unsigned long DWTID; | |
539 #endif | |
540 | |
541 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
|
542 /* 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
|
543 char osName[30], buildDate[30], buildTime[30]; |
3 | 544 /* Versions and builds */ |
545 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
|
546 /* Dynamic Window version */ |
81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
14
diff
changeset
|
547 short DWMajorVersion, DWMinorVersion, DWSubVersion; |
3 | 548 } DWEnv; |
549 | |
550 | |
551 typedef struct _dwexpose { | |
552 int x, y; | |
553 int width, height; | |
554 } DWExpose; | |
555 | |
556 typedef struct _dwdialog { | |
557 HEV eve; | |
558 int done; | |
559 void *data, *result; | |
560 } DWDialog; | |
561 | |
562 #define DW_SIGNAL_FUNC(a) ((void *)a) | |
563 | |
7
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
564 #define DW_MINIMIZED 1 |
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
565 |
3 | 566 #define DW_BUTTON1_MASK 1 |
567 #define DW_BUTTON2_MASK (1 << 1) | |
568 #define DW_BUTTON3_MASK (1 << 2) | |
569 | |
570 #define DW_EXEC_CON 0 | |
571 #define DW_EXEC_GUI 1 | |
572 | |
573 #define DW_FILE_OPEN 0 | |
574 #define DW_FILE_SAVE 1 | |
575 | |
576 #define BOXHORZ 0 | |
577 #define BOXVERT 1 | |
578 | |
22
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_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
|
580 #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
|
581 #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
|
582 #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
|
583 |
3 | 584 #define DW_PIXMAP_WIDTH(x) (x ? x->width : 0) |
585 #define DW_PIXMAP_HEIGHT(x) (x ? x->height : 0) | |
586 | |
62
2be5174bdb5d
Sync with latest DW code. Tab and RGB fixes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
61
diff
changeset
|
587 #define DW_RGB_COLOR (0xF0000000) |
3 | 588 #define DW_RGB_MASK (0x00FFFFFF) |
589 #define DW_RED_MASK (0x000000FF) | |
590 #define DW_GREEN_MASK (0x0000FF00) | |
591 #define DW_BLUE_MASK (0x00FF0000) | |
592 #define DW_RED_VALUE(a) (a & DW_RED_MASK) | |
593 #define DW_GREEN_VALUE(a) ((a & DW_GREEN_MASK) >> 8) | |
594 #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
|
595 #define DW_RGB(a, b, c) (0xF0000000 | a | b << 8 | c << 16) |
3 | 596 |
24
d9e87e8bcf1d
Updated dynamic windows to build with EMX.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
22
diff
changeset
|
597 #if defined(__OS2__) || defined(__EMX__) |
3 | 598 #define DW_OS2_RGB(a) ((DW_RED_VALUE(a) << 16) | (DW_GREEN_VALUE(a) << 8) | DW_BLUE_VALUE(a)) |
599 #endif | |
600 | |
601 /* Public function prototypes */ | |
602 void dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); | |
603 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
|
604 #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
|
605 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
|
606 #define dw_init(a, b, c) dw_int_init(&_resources, a, b, c) |
3 | 607 #else |
14
176cee043f1b
Lots of Windows and Unix bug fixes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
13
diff
changeset
|
608 int dw_init(int newthread, int argc, char *argv[]); |
3 | 609 #endif |
610 void dw_main(HAB currenthab, void *filterfunc); | |
38
538db2a48bac
Added typecast to MPARAM.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
34
diff
changeset
|
611 void dw_main_sleep(int seconds); |
3 | 612 void dw_free(void *ptr); |
613 int dw_window_show(HWND handle); | |
614 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
|
615 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
|
616 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
|
617 int dw_window_lower(HWND handle); |
3 | 618 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
|
619 void dw_window_redraw(HWND handle); |
3 | 620 int dw_window_set_font(HWND handle, char *fontname); |
621 int dw_window_set_color(HWND handle, unsigned long fore, unsigned long back); | |
622 HWND dw_window_new(HWND hwndOwner, char *title, unsigned long flStyle); | |
623 HWND dw_box_new(int type, int pad); | |
624 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
|
625 HWND dw_mdi_new(unsigned long id); |
3 | 626 HWND dw_bitmap_new(unsigned long id); |
627 HWND dw_bitmapbutton_new(char *text, unsigned long id); | |
628 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
|
629 HWND dw_tree_new(unsigned long id); |
3 | 630 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
|
631 HWND dw_status_text_new(char *text, unsigned long id); |
3 | 632 HWND dw_mle_new(unsigned long id); |
633 HWND dw_entryfield_new(char *text, unsigned long id); | |
634 HWND dw_entryfield_password_new(char *text, ULONG id); | |
635 HWND dw_combobox_new(char *text, unsigned long id); | |
636 HWND dw_button_new(char *text, unsigned long id); | |
637 HWND dw_spinbutton_new(char *text, unsigned long id); | |
638 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
|
639 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
|
640 HWND dw_slider_new(int vertical, int increments, ULONG id); |
3 | 641 HWND dw_checkbox_new(char *text, unsigned long id); |
642 HWND dw_listbox_new(unsigned long id, int multi); | |
643 void dw_listbox_append(HWND handle, char *text); | |
644 void dw_listbox_clear(HWND handle); | |
645 int dw_listbox_count(HWND handle); | |
646 void dw_listbox_set_top(HWND handle, int top); | |
647 void dw_listbox_select(HWND handle, int index, int state); | |
648 void dw_listbox_delete(HWND handle, int index); | |
649 void dw_listbox_query_text(HWND handle, unsigned int index, char *buffer, unsigned int length); | |
650 void dw_listbox_set_text(HWND handle, unsigned int index, char *buffer); | |
651 unsigned int dw_listbox_selected(HWND handle); | |
652 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
|
653 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
|
654 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
|
655 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
|
656 void dw_slider_set_pos(HWND handle, unsigned int position); |
3 | 657 void dw_window_set_pos(HWND handle, unsigned long x, unsigned long y); |
658 void dw_window_set_usize(HWND handle, unsigned long width, unsigned long height); | |
659 void dw_window_set_pos_size(HWND handle, unsigned long x, unsigned long y, unsigned long width, unsigned long height); | |
660 void dw_window_get_pos_size(HWND handle, unsigned long *x, unsigned long *y, unsigned long *width, unsigned long *height); | |
661 void dw_window_set_style(HWND handle, unsigned long style, unsigned long mask); | |
662 void dw_window_set_icon(HWND handle, unsigned long id); | |
663 void dw_window_set_bitmap(HWND handle, unsigned long id); | |
664 char *dw_window_get_text(HWND handle); | |
665 void dw_window_set_text(HWND handle, char *text); | |
666 int dw_window_set_border(HWND handle, int border); | |
667 void dw_window_disable(HWND handle); | |
668 void dw_window_enable(HWND handle); | |
669 void dw_window_capture(HWND handle); | |
670 void dw_window_release(void); | |
671 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
|
672 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
|
673 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
|
674 void dw_window_click_default(HWND window, HWND next); |
3 | 675 unsigned int dw_mle_import(HWND handle, char *buffer, int startpoint); |
676 void dw_mle_export(HWND handle, char *buffer, int startpoint, int length); | |
677 void dw_mle_query(HWND handle, unsigned long *bytes, unsigned long *lines); | |
678 void dw_mle_delete(HWND handle, int startpoint, int length); | |
679 void dw_mle_clear(HWND handle); | |
680 void dw_mle_freeze(HWND handle); | |
681 void dw_mle_thaw(HWND handle); | |
682 void dw_mle_set(HWND handle, int point); | |
683 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
|
684 void dw_mle_set_editable(HWND handle, int state); |
005fa766e8c2
Updates to latest build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
3
diff
changeset
|
685 void dw_mle_set_word_wrap(HWND handle, int state); |
3 | 686 int dw_mle_search(HWND handle, char *text, int point, unsigned long flags); |
687 void dw_spinbutton_set_pos(HWND handle, long position); | |
688 void dw_spinbutton_set_limits(HWND handle, long upper, long lower); | |
689 void dw_entryfield_set_limit(HWND handle, ULONG limit); | |
690 long dw_spinbutton_query(HWND handle); | |
691 int dw_checkbox_query(HWND handle); | |
692 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
|
693 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
|
694 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
|
695 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
|
696 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
|
697 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
|
698 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
|
699 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
|
700 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
|
701 void dw_tree_set_data(HWND handle, HWND item, void *itemdata); |
3 | 702 int dw_container_setup(HWND handle, unsigned long *flags, char **titles, int count, int separator); |
703 unsigned long dw_icon_load(unsigned long module, unsigned long id); | |
704 void dw_icon_free(unsigned long handle); | |
705 void *dw_container_alloc(HWND handle, int rowcount); | |
706 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
|
707 void dw_container_set_column_width(HWND handle, int column, int width); |
3 | 708 void dw_container_set_row_title(void *pointer, int row, char *title); |
709 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
|
710 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
|
711 void dw_container_delete(HWND handle, int rowcount); |
3 | 712 void dw_container_set_view(HWND handle, unsigned long flags, int iconwidth, int iconheight); |
713 char *dw_container_query_start(HWND handle, unsigned long flags); | |
714 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
|
715 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
|
716 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
|
717 void dw_container_optimize(HWND handle); |
3 | 718 int dw_filesystem_setup(HWND handle, unsigned long *flags, char **titles, int count); |
719 void dw_filesystem_set_item(HWND handle, void *pointer, int column, int row, void *data); | |
720 void dw_filesystem_set_file(HWND handle, void *pointer, int row, char *filename, unsigned long icon); | |
721 int dw_screen_width(void); | |
722 int dw_screen_height(void); | |
723 unsigned long dw_color_depth(void); | |
724 HWND dw_notebook_new(unsigned long id, int top); | |
725 unsigned long dw_notebook_page_new(HWND handle, unsigned long flags, int front); | |
726 void dw_notebook_page_destroy(HWND handle, unsigned int pageid); | |
727 void dw_notebook_page_set_text(HWND handle, unsigned long pageid, char *text); | |
728 void dw_notebook_page_set_status_text(HWND handle, unsigned long pageid, char *text); | |
729 void dw_notebook_page_set(HWND handle, unsigned int pageid); | |
730 unsigned int dw_notebook_page_query(HWND handle); | |
731 void dw_notebook_pack(HWND handle, unsigned long pageid, HWND page); | |
119
1cad81b7cc4c
Implemented initial splitbar code on Unix. And made some fixes for
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
117
diff
changeset
|
732 HWND dw_splitbar_new(int type, HWND topleft, HWND bottomright, unsigned long id); |
120
7d2108cbcd3e
Porting DW to GTK 2.0... and changed the percent value from into to a float
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
119
diff
changeset
|
733 void dw_splitbar_set(HWND handle, float percent); |
7d2108cbcd3e
Porting DW to GTK 2.0... and changed the percent value from into to a float
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
119
diff
changeset
|
734 float dw_splitbar_get(HWND handle); |
3 | 735 HMENUI dw_menu_new(unsigned long id); |
736 HMENUI dw_menubar_new(HWND location); | |
737 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
|
738 void dw_menu_item_set_check(HMENUI menu, unsigned long id, int check); |
3 | 739 void dw_menu_popup(HMENUI *menu, HWND parent, int x, int y); |
740 void dw_menu_destroy(HMENUI *menu); | |
741 void dw_pointer_query_pos(long *x, long *y); | |
742 void dw_pointer_set_pos(long x, long y); | |
743 void dw_window_function(HWND handle, void *function, void *data); | |
744 HWND dw_window_from_id(HWND handle, int id); | |
745 HMTX dw_mutex_new(void); | |
746 void dw_mutex_close(HMTX mutex); | |
747 void dw_mutex_lock(HMTX mutex); | |
748 void dw_mutex_unlock(HMTX mutex); | |
749 HEV dw_event_new(void); | |
750 int dw_event_reset(HEV eve); | |
751 int dw_event_post(HEV eve); | |
752 int dw_event_wait(HEV eve, unsigned long timeout); | |
753 int dw_event_close (HEV *eve); | |
754 DWTID dw_thread_new(void *func, void *data, int stack); | |
755 void dw_thread_end(void); | |
756 DWTID dw_thread_id(void); | |
757 void dw_exit(int exitcode); | |
758 HWND dw_render_new(unsigned long id); | |
759 void dw_color_foreground_set(unsigned long value); | |
760 void dw_color_background_set(unsigned long value); | |
761 void dw_draw_point(HWND handle, HPIXMAP pixmap, int x, int y); | |
762 void dw_draw_line(HWND handle, HPIXMAP pixmap, int x1, int y1, int x2, int y2); | |
763 void dw_draw_rect(HWND handle, HPIXMAP pixmap, int fill, int x, int y, int width, int height); | |
764 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
|
765 void dw_font_text_extents(HWND handle, HPIXMAP pixmap, char *text, int *width, int *height); |
3 | 766 void dw_flush(void); |
767 void dw_pixmap_bitblt(HWND dest, HPIXMAP destp, int xdest, int ydest, int width, int height, HWND src, HPIXMAP srcp, int xsrc, int ysrc); | |
768 HPIXMAP dw_pixmap_new(HWND handle, unsigned long width, unsigned long height, int depth); | |
769 HPIXMAP dw_pixmap_grab(HWND handle, ULONG id); | |
770 void dw_pixmap_destroy(HPIXMAP pixmap); | |
771 void dw_beep(int freq, int dur); | |
772 int dw_messagebox(char *title, char *format, ...); | |
773 int dw_yesno(char *title, char *text); | |
774 void dw_environment_query(DWEnv *env); | |
775 int dw_exec(char *program, int type, char **params); | |
776 int dw_browse(char *url); | |
777 char *dw_file_browse(char *title, char *defpath, char *ext, int flags); | |
778 char *dw_user_dir(void); | |
779 DWDialog *dw_dialog_new(void *data); | |
780 int dw_dialog_dismiss(DWDialog *dialog, void *result); | |
781 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
|
782 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
|
783 void *dw_window_get_data(HWND window, char *dataname); |
3 | 784 #ifndef NO_SIGNALS |
785 void dw_signal_connect(HWND window, char *signame, void *sigfunc, void *data); | |
786 void dw_signal_disconnect_by_window(HWND window); | |
787 void dw_signal_disconnect_by_data(HWND window, void *data); | |
788 void dw_signal_disconnect_by_name(HWND window, char *signame); | |
789 #endif | |
790 | |
791 #endif |