comparison dw.h @ 612:c5e5671dec8f

Modify Calendar widget Amke Mac port actually compile and run Add Clipboard support for GTK and Win Add *from_data() contructors allowing icons, bitmaps to be created from embedded data.
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 23 Mar 2008 04:54:30 +0000
parents a8ea3d68b9ec
children f7d318cffc3e
comparison
equal deleted inserted replaced
611:bc800fc67343 612:c5e5671dec8f
247 typedef int INT; 247 typedef int INT;
248 typedef void *HMTX; 248 typedef void *HMTX;
249 typedef void *HEV; 249 typedef void *HEV;
250 typedef void *HSHM; 250 typedef void *HSHM;
251 typedef void *HMOD; 251 typedef void *HMOD;
252 typedef void *HPIXMAP;
253 typedef void *HTREEITEM; 252 typedef void *HTREEITEM;
254 typedef MenuRef HMENUI; 253 typedef MenuRef HMENUI;
255 254
256 typedef struct _window_data { 255 typedef struct _window_data {
257 UserData *root; 256 UserData *root;
258 HWND clickdefault; 257 HWND clickdefault;
259 ULONG flags; 258 ULONG flags;
260 void *data; 259 void *data;
261 } WindowData; 260 } WindowData;
261
262 typedef struct _hpixmap {
263 unsigned long width, height;
264 /* ?? *pixmap; */
265 HWND handle;
266 } *HPIXMAP;
262 267
263 #define DW_DT_LEFT 0 268 #define DW_DT_LEFT 0
264 #define DW_DT_QUERYEXTENT 0 269 #define DW_DT_QUERYEXTENT 0
265 #define DW_DT_UNDERSCORE 0 270 #define DW_DT_UNDERSCORE 0
266 #define DW_DT_STRIKEOUT 0 271 #define DW_DT_STRIKEOUT 0
290 #define DW_FCF_SHELLPOSITION 0 295 #define DW_FCF_SHELLPOSITION 0
291 #define DW_FCF_TASKLIST 0 296 #define DW_FCF_TASKLIST 0
292 #define DW_FCF_NOBYTEALIGN 0 297 #define DW_FCF_NOBYTEALIGN 0
293 #define DW_FCF_NOMOVEWITHOWNER 0 298 #define DW_FCF_NOMOVEWITHOWNER 0
294 #define DW_FCF_SYSMODAL 0 299 #define DW_FCF_SYSMODAL 0
295 #define DW_FCF_HIDEBUTTON kWindowCollapseAttribute 300 #define DW_FCF_HIDEBUTTON kWindowCollapseBoxAttribute
296 #define DW_FCF_HIDEMAX 0 301 #define DW_FCF_HIDEMAX 0
297 #define DW_FCF_AUTOICON 0 302 #define DW_FCF_AUTOICON 0
298 #define DW_FCF_MAXIMIZE 0 303 #define DW_FCF_MAXIMIZE 0
299 #define DW_FCF_MINIMIZE 0 304 #define DW_FCF_MINIMIZE 0
300 305
315 320
316 #define DW_LS_MULTIPLESEL 1 321 #define DW_LS_MULTIPLESEL 1
317 322
318 #define DW_LIT_NONE -1 323 #define DW_LIT_NONE -1
319 324
320 #define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE 325 #ifdef MLFSEARCH_CASESENSITIVE
326 # define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE
327 #else
328 # define DW_MLE_CASESENSITIVE 0
329 #endif
321 330
322 #define DW_POINTER_DEFAULT 0 331 #define DW_POINTER_DEFAULT 0
323 #define DW_POINTER_ARROW 0 332 #define DW_POINTER_ARROW 0
324 #define DW_POINTER_CLOCK watchCursor 333 #define DW_POINTER_CLOCK watchCursor
325 334
334 #define DW_MB_WARNING (1 << 10) 343 #define DW_MB_WARNING (1 << 10)
335 #define DW_MB_ERROR (1 << 11) 344 #define DW_MB_ERROR (1 << 11)
336 #define DW_MB_INFORMATION (1 << 12) 345 #define DW_MB_INFORMATION (1 << 12)
337 #define DW_MB_QUESTION (1 << 13) 346 #define DW_MB_QUESTION (1 << 13)
338 347
348 /* Virtual Key Codes */
349 #define VK_LBUTTON 0
350 #define VK_RBUTTON 0
351 #define VK_CANCEL 0
352 #define VK_MBUTTON 0
353 #define VK_BACK 0
354 #define VK_TAB 0
355 #define VK_CLEAR 0
356 #define VK_RETURN 0
357 #define VK_MENU 0
358 #define VK_PAUSE 0
359 #define VK_CAPITAL 0
360 #define VK_ESCAPE 0
361 #define VK_SPACE 0
362 #define VK_PRIOR 0
363 #define VK_NEXT 0
364 #define VK_END 0
365 #define VK_HOME 0
366 #define VK_LEFT 0
367 #define VK_UP 0
368 #define VK_RIGHT 0
369 #define VK_DOWN 0
370 #define VK_SELECT 0
371 #define VK_PRINT 0
372 #define VK_EXECUTE 0
373 #define VK_SNAPSHOT 0
374 #define VK_INSERT 0
375 #define VK_DELETE 0
376 #define VK_HELP 0
377 #define VK_LWIN 0
378 #define VK_RWIN 0
379 #define VK_NUMPAD0 0
380 #define VK_NUMPAD1 0
381 #define VK_NUMPAD2 0
382 #define VK_NUMPAD3 0
383 #define VK_NUMPAD4 0
384 #define VK_NUMPAD5 0
385 #define VK_NUMPAD6 0
386 #define VK_NUMPAD7 0
387 #define VK_NUMPAD8 0
388 #define VK_NUMPAD9 0
389 #define VK_MULTIPLY 0
390 #define VK_ADD 0
391 #define VK_SEPARATOR 0
392 #define VK_SUBTRACT 0
393 #define VK_DECIMAL 0
394 #define VK_DIVIDE 0
395 #define VK_F1 0
396 #define VK_F2 0
397 #define VK_F3 0
398 #define VK_F4 0
399 #define VK_F5 0
400 #define VK_F6 0
401 #define VK_F7 0
402 #define VK_F8 0
403 #define VK_F9 0
404 #define VK_F10 0
405 #define VK_F11 0
406 #define VK_F12 0
407 #define VK_F13 0
408 #define VK_F14 0
409 #define VK_F15 0
410 #define VK_F16 0
411 #define VK_F17 0
412 #define VK_F18 0
413 #define VK_F19 0
414 #define VK_F20 0
415 #define VK_F21 0
416 #define VK_F22 0
417 #define VK_F23 0
418 #define VK_F24 0
419 #define VK_NUMLOCK 0
420 #define VK_SCROLL 0
421 #define VK_LSHIFT 0
422 #define VK_RSHIFT 0
423 #define VK_LCONTROL 0
424 #define VK_RCONTROL 0
425 #define VK_LMENU 0
426 #define VK_RMENU 0
427
428 /* Key Modifiers */
429 #define KC_CTRL (1)
430 #define KC_SHIFT (1 << 1)
431 #define KC_ALT (1 << 2)
339 432
340 #endif 433 #endif
341 434
342 /* Windows specific section */ 435 /* Windows specific section */
343 #if defined(__WIN32__) || defined(WINNT) 436 #if defined(__WIN32__) || defined(WINNT)
938 HWND API dw_groupbox_new(int type, int pad, char *title); 1031 HWND API dw_groupbox_new(int type, int pad, char *title);
939 HWND API dw_mdi_new(unsigned long id); 1032 HWND API dw_mdi_new(unsigned long id);
940 HWND API dw_bitmap_new(unsigned long id); 1033 HWND API dw_bitmap_new(unsigned long id);
941 HWND API dw_bitmapbutton_new(char *text, unsigned long id); 1034 HWND API dw_bitmapbutton_new(char *text, unsigned long id);
942 HWND API dw_bitmapbutton_new_from_file(char *text, unsigned long id, char *filename); 1035 HWND API dw_bitmapbutton_new_from_file(char *text, unsigned long id, char *filename);
1036 HWND API dw_bitmapbutton_new_from_data(char *text, unsigned long id, char *str, int len);
943 HWND API dw_container_new(unsigned long id, int multi); 1037 HWND API dw_container_new(unsigned long id, int multi);
944 HWND API dw_tree_new(unsigned long id); 1038 HWND API dw_tree_new(unsigned long id);
945 HWND API dw_text_new(char *text, unsigned long id); 1039 HWND API dw_text_new(char *text, unsigned long id);
946 HWND API dw_status_text_new(char *text, unsigned long id); 1040 HWND API dw_status_text_new(char *text, unsigned long id);
947 HWND API dw_mle_new(unsigned long id); 1041 HWND API dw_mle_new(unsigned long id);
978 void API dw_window_set_pos_size(HWND handle, unsigned long x, unsigned long y, unsigned long width, unsigned long height); 1072 void API dw_window_set_pos_size(HWND handle, unsigned long x, unsigned long y, unsigned long width, unsigned long height);
979 void API dw_window_get_pos_size(HWND handle, unsigned long *x, unsigned long *y, unsigned long *width, unsigned long *height); 1073 void API dw_window_get_pos_size(HWND handle, unsigned long *x, unsigned long *y, unsigned long *width, unsigned long *height);
980 void API dw_window_set_style(HWND handle, unsigned long style, unsigned long mask); 1074 void API dw_window_set_style(HWND handle, unsigned long style, unsigned long mask);
981 void API dw_window_set_icon(HWND handle, unsigned long id); 1075 void API dw_window_set_icon(HWND handle, unsigned long id);
982 void API dw_window_set_bitmap(HWND handle, unsigned long id, char *filename); 1076 void API dw_window_set_bitmap(HWND handle, unsigned long id, char *filename);
1077 void API dw_window_set_bitmap_from_data(HWND handle, unsigned long id, char *data, int len);
983 char * API dw_window_get_text(HWND handle); 1078 char * API dw_window_get_text(HWND handle);
984 void API dw_window_set_text(HWND handle, char *text); 1079 void API dw_window_set_text(HWND handle, char *text);
985 int API dw_window_set_border(HWND handle, int border); 1080 int API dw_window_set_border(HWND handle, int border);
986 void API dw_window_disable(HWND handle); 1081 void API dw_window_disable(HWND handle);
987 void API dw_window_enable(HWND handle); 1082 void API dw_window_enable(HWND handle);
1022 char * API dw_tree_get_title(HWND handle, HTREEITEM item); 1117 char * API dw_tree_get_title(HWND handle, HTREEITEM item);
1023 HTREEITEM API dw_tree_get_parent(HWND handle, HTREEITEM item); 1118 HTREEITEM API dw_tree_get_parent(HWND handle, HTREEITEM item);
1024 int API dw_container_setup(HWND handle, unsigned long *flags, char **titles, int count, int separator); 1119 int API dw_container_setup(HWND handle, unsigned long *flags, char **titles, int count, int separator);
1025 unsigned long API dw_icon_load(unsigned long module, unsigned long id); 1120 unsigned long API dw_icon_load(unsigned long module, unsigned long id);
1026 unsigned long API dw_icon_load_from_file(char *filename); 1121 unsigned long API dw_icon_load_from_file(char *filename);
1122 unsigned long API dw_icon_load_from_data(char *data, int len);
1027 void API dw_icon_free(unsigned long handle); 1123 void API dw_icon_free(unsigned long handle);
1028 void * API dw_container_alloc(HWND handle, int rowcount); 1124 void * API dw_container_alloc(HWND handle, int rowcount);
1029 void API dw_container_set_item(HWND handle, void *pointer, int column, int row, void *data); 1125 void API dw_container_set_item(HWND handle, void *pointer, int column, int row, void *data);
1030 void API dw_container_change_item(HWND handle, int column, int row, void *data); 1126 void API dw_container_change_item(HWND handle, int column, int row, void *data);
1031 void API dw_container_set_column_width(HWND handle, int column, int width); 1127 void API dw_container_set_column_width(HWND handle, int column, int width);
1100 void API dw_font_text_extents_get(HWND handle, HPIXMAP pixmap, char *text, int *width, int *height); 1196 void API dw_font_text_extents_get(HWND handle, HPIXMAP pixmap, char *text, int *width, int *height);
1101 void API dw_flush(void); 1197 void API dw_flush(void);
1102 void API dw_pixmap_bitblt(HWND dest, HPIXMAP destp, int xdest, int ydest, int width, int height, HWND src, HPIXMAP srcp, int xsrc, int ysrc); 1198 void API dw_pixmap_bitblt(HWND dest, HPIXMAP destp, int xdest, int ydest, int width, int height, HWND src, HPIXMAP srcp, int xsrc, int ysrc);
1103 HPIXMAP API dw_pixmap_new(HWND handle, unsigned long width, unsigned long height, int depth); 1199 HPIXMAP API dw_pixmap_new(HWND handle, unsigned long width, unsigned long height, int depth);
1104 HPIXMAP API dw_pixmap_new_from_file(HWND handle, char *filename); 1200 HPIXMAP API dw_pixmap_new_from_file(HWND handle, char *filename);
1201 HPIXMAP API dw_pixmap_new_from_data(HWND handle, char *data, int len);
1105 HPIXMAP API dw_pixmap_grab(HWND handle, ULONG id); 1202 HPIXMAP API dw_pixmap_grab(HWND handle, ULONG id);
1106 void API dw_pixmap_destroy(HPIXMAP pixmap); 1203 void API dw_pixmap_destroy(HPIXMAP pixmap);
1107 void API dw_beep(int freq, int dur); 1204 void API dw_beep(int freq, int dur);
1108 int API dw_messagebox(char *title, int flags, char *format, ...); 1205 int API dw_messagebox(char *title, int flags, char *format, ...);
1109 void API dw_environment_query(DWEnv *env); 1206 void API dw_environment_query(DWEnv *env);
1136 int API dw_named_memory_free(HSHM handle, void *ptr); 1233 int API dw_named_memory_free(HSHM handle, void *ptr);
1137 void API dw_html_action(HWND hwnd, int action); 1234 void API dw_html_action(HWND hwnd, int action);
1138 int API dw_html_raw(HWND hwnd, char *string); 1235 int API dw_html_raw(HWND hwnd, char *string);
1139 int API dw_html_url(HWND hwnd, char *url); 1236 int API dw_html_url(HWND hwnd, char *url);
1140 HWND API dw_html_new(unsigned long id); 1237 HWND API dw_html_new(unsigned long id);
1238 char API *dw_clipboard_get_text();
1239 void API dw_clipboard_set_text( char *str, int len );
1141 HWND API dw_calendar_new(unsigned long id); 1240 HWND API dw_calendar_new(unsigned long id);
1142 void API dw_calendar_set_date( HWND window, int year, int month, int day ); 1241 void API dw_calendar_set_date( HWND window, unsigned int year, unsigned int month, unsigned int day );
1143 void API dw_calendar_get_date( HWND window, int *year, int *month, int *day ); 1242 void API dw_calendar_get_date( HWND window, unsigned int *year, unsigned int *month, unsigned int *day );
1144 1243
1145 #endif 1244 #endif