comparison dw.h @ 433:f225f16bebbd

Compile fixes for MacOS X.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 27 May 2003 21:43:49 +0000
parents a4197ddfc50d
children fac2afe7bda3
comparison
equal deleted inserted replaced
432:5f9f185e4aa0 433:f225f16bebbd
222 extern HMQ dwhmq; 222 extern HMQ dwhmq;
223 #endif 223 #endif
224 224
225 #if defined(__MAC__) 225 #if defined(__MAC__)
226 /* MacOS specific section */ 226 /* MacOS specific section */
227 #include <carbon.h> 227 #include <Carbon/Carbon.h>
228 228
229 typedef ControlRef HWND; 229 typedef ControlRef HWND;
230 typedef ThreadID DWTID;
231 typedef unsigned long ULONG;
232 typedef long LONG;
233 typedef unsigned short USHORT;
234 typedef short SHORT;
235 typedef unsigned short UWORD;
236 typedef short WORD ;
237 typedef unsigned char UCHAR;
238 typedef char CHAR;
239 typedef unsigned UINT;
240 typedef int INT;
230 typedef void *HMTX; 241 typedef void *HMTX;
231 typedef void *HEV; 242 typedef void *HEV;
232 typedef void *HMOD; 243 typedef void *HMOD;
233 typedef void *HPIXMAP; 244 typedef void *HPIXMAP;
234 typedef void *HTREEITEM; 245 typedef void *HTREEITEM;
235 typedef void *HMENUI; 246 typedef void *HMENUI;
247
248 typedef struct _window_data {
249 UserData *root;
250 HWND clickdefault;
251 ULONG flags;
252 void *data;
253 } WindowData;
236 254
237 #define DW_DT_LEFT 0 255 #define DW_DT_LEFT 0
238 #define DW_DT_QUERYEXTENT 0 256 #define DW_DT_QUERYEXTENT 0
239 #define DW_DT_UNDERSCORE 0 257 #define DW_DT_UNDERSCORE 0
240 #define DW_DT_STRIKEOUT 0 258 #define DW_DT_STRIKEOUT 0
251 #define DW_DT_ERASERECT 0 269 #define DW_DT_ERASERECT 0
252 270
253 #define DW_FCF_TITLEBAR 0 271 #define DW_FCF_TITLEBAR 0
254 #define DW_FCF_SYSMENU 0 272 #define DW_FCF_SYSMENU 0
255 #define DW_FCF_MENU 0 273 #define DW_FCF_MENU 0
256 #define DW_FCF_SIZEBORDER FCF_SIZEBORDER 274 #define DW_FCF_SIZEBORDER 0
257 #define DW_FCF_MINBUTTON FCF_MINBUTTON 275 #define DW_FCF_MINBUTTON 0
258 #define DW_FCF_MAXBUTTON FCF_MAXBUTTON 276 #define DW_FCF_MAXBUTTON 0
259 #define DW_FCF_MINMAX FCF_MINMAX 277 #define DW_FCF_MINMAX 0
260 #define DW_FCF_VERTSCROLL FCF_VERTSCROLL 278 #define DW_FCF_VERTSCROLL 0
261 #define DW_FCF_HORZSCROLL FCF_HORZSCROLL 279 #define DW_FCF_HORZSCROLL 0
262 #define DW_FCF_DLGBORDER FCF_DLGBORDER 280 #define DW_FCF_DLGBORDER 0
263 #define DW_FCF_BORDER FCF_BORDER 281 #define DW_FCF_BORDER 0
264 #define DW_FCF_SHELLPOSITION FCF_SHELLPOSITION 282 #define DW_FCF_SHELLPOSITION 0
265 #define DW_FCF_TASKLIST FCF_TASKLIST 283 #define DW_FCF_TASKLIST 0
266 #define DW_FCF_NOBYTEALIGN FCF_NOBYTEALIGN 284 #define DW_FCF_NOBYTEALIGN 0
267 #define DW_FCF_NOMOVEWITHOWNER FCF_NOMOVEWITHOWNER 285 #define DW_FCF_NOMOVEWITHOWNER 0
268 #define DW_FCF_SYSMODAL FCF_SYSMODAL 286 #define DW_FCF_SYSMODAL 0
269 #define DW_FCF_HIDEBUTTON FCF_HIDEBUTTON 287 #define DW_FCF_HIDEBUTTON 0
270 #define DW_FCF_HIDEMAX FCF_HIDEMAX 288 #define DW_FCF_HIDEMAX 0
271 #define DW_FCF_AUTOICON FCF_AUTOICON 289 #define DW_FCF_AUTOICON 0
272 290
273 #define DW_CFA_BITMAPORICON CFA_BITMAPORICON 291 #define DW_CFA_BITMAPORICON 1
274 #define DW_CFA_STRING CFA_STRING 292 #define DW_CFA_STRING (1 << 1)
275 #define DW_CFA_ULONG CFA_ULONG 293 #define DW_CFA_ULONG (1 << 2)
276 #define DW_CFA_TIME CFA_TIME 294 #define DW_CFA_TIME (1 << 3)
277 #define DW_CFA_DATE CFA_DATE 295 #define DW_CFA_DATE (1 << 4)
278 #define DW_CFA_CENTER CFA_CENTER 296 #define DW_CFA_CENTER (1 << 5)
279 #define DW_CFA_LEFT CFA_LEFT 297 #define DW_CFA_LEFT (1 << 6)
280 #define DW_CFA_RIGHT CFA_RIGHT 298 #define DW_CFA_RIGHT (1 << 7)
281 #define DW_CFA_HORZSEPARATOR CFA_HORZSEPARATOR 299 #define DW_CFA_HORZSEPARATOR 0
282 #define DW_CFA_SEPARATOR CFA_SEPARATOR 300 #define DW_CFA_SEPARATOR 0
283 301
284 #define DW_CRA_SELECTED CRA_SELECTED 302 #define DW_CRA_SELECTED 1
285 #define DW_CRA_CURSORED CRA_CURSORED 303 #define DW_CRA_CURSORED (1 << 1)
286 304
287 #define DW_LS_MULTIPLESEL LS_MULTIPLESEL 305 #define DW_LS_MULTIPLESEL 1
288 306
289 #define DW_LIT_NONE -1 307 #define DW_LIT_NONE -1
290 308
291 #define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE 309 #define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE
292 310
829 #define DWSIGNAL API 847 #define DWSIGNAL API
830 848
831 /* Public function prototypes */ 849 /* Public function prototypes */
832 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); 850 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad);
833 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); 851 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad);
834 #if !defined(__OS2__) && !defined(__WIN32__) && !defined(__EMX__) 852 #if !defined(__OS2__) && !defined(__WIN32__) && !defined(__EMX__) && !defined(__MAC__)
835 int API dw_int_init(DWResources *res, int newthread, int *argc, char **argv[]); 853 int API dw_int_init(DWResources *res, int newthread, int *argc, char **argv[]);
836 #define dw_init(a, b, c) dw_int_init(&_resources, a, &b, &c) 854 #define dw_init(a, b, c) dw_int_init(&_resources, a, &b, &c)
837 #else 855 #else
838 int API dw_init(int newthread, int argc, char *argv[]); 856 int API dw_init(int newthread, int argc, char *argv[]);
839 #endif 857 #endif