Mercurial > dwindows
comparison dw.h @ 557:1a210e2f214b
Added a bunch of support routines I now own due to the settlement
agreement with F/X. Shared memory and named event semaphores in
particular.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 17 Apr 2004 05:38:09 +0000 |
parents | b0b5b880513a |
children | 05060ce4d6ae |
comparison
equal
deleted
inserted
replaced
556:f4093dce8155 | 557:1a210e2f214b |
---|---|
221 | 221 |
222 typedef void *HTREEITEM; | 222 typedef void *HTREEITEM; |
223 typedef HWND HMENUI; | 223 typedef HWND HMENUI; |
224 typedef HMODULE HMOD; | 224 typedef HMODULE HMOD; |
225 typedef unsigned short UWORD; | 225 typedef unsigned short UWORD; |
226 typedef unsigned long HSHM; | |
226 | 227 |
227 extern HAB dwhab; | 228 extern HAB dwhab; |
228 extern HMQ dwhmq; | 229 extern HMQ dwhmq; |
229 #endif | 230 #endif |
230 | 231 |
461 } NotebookPage; | 462 } NotebookPage; |
462 | 463 |
463 typedef HANDLE HMTX; | 464 typedef HANDLE HMTX; |
464 typedef HANDLE HEV; | 465 typedef HANDLE HEV; |
465 typedef HANDLE HMOD; | 466 typedef HANDLE HMOD; |
467 typedef HANDLE HSHM; | |
466 | 468 |
467 typedef struct _container { | 469 typedef struct _container { |
468 ColorInfo cinfo; | 470 ColorInfo cinfo; |
469 ULONG *flags; | 471 ULONG *flags; |
470 WNDPROC pOldProc; | 472 WNDPROC pOldProc; |
735 int alive; | 737 int alive; |
736 int posted; | 738 int posted; |
737 } *HEV; | 739 } *HEV; |
738 typedef pthread_t DWTID; | 740 typedef pthread_t DWTID; |
739 typedef void * HMOD; | 741 typedef void * HMOD; |
742 typedef struct _dw_unix_shm { | |
743 int fd; | |
744 char *path; | |
745 int sid; | |
746 int size; | |
747 } HSHM; | |
740 | 748 |
741 typedef struct _hpixmap { | 749 typedef struct _hpixmap { |
742 unsigned long width, height; | 750 unsigned long width, height; |
743 GdkPixmap *pixmap; | 751 GdkPixmap *pixmap; |
744 HWND handle; | 752 HWND handle; |
853 #define DW_BLUE_VALUE(a) ((a & DW_BLUE_MASK) >> 16) | 861 #define DW_BLUE_VALUE(a) ((a & DW_BLUE_MASK) >> 16) |
854 #define DW_RGB(a, b, c) (0xF0000000 | a | b << 8 | c << 16) | 862 #define DW_RGB(a, b, c) (0xF0000000 | a | b << 8 | c << 16) |
855 | 863 |
856 #define DW_MENU_SEPARATOR "" | 864 #define DW_MENU_SEPARATOR "" |
857 #define DW_NOMENU 0 | 865 #define DW_NOMENU 0 |
866 | |
867 /* Return value error codes */ | |
868 #define DW_ERROR_NONE 0 | |
869 #define DW_ERROR_GENERAL 1 | |
870 #define DW_ERROR_TIMEOUT 2 | |
871 #define DW_ERROR_NON_INIT 3 | |
872 #define DW_ERROR_NO_MEM 4 | |
873 #define DW_ERROR_INTERRUPT 5 | |
858 | 874 |
859 #if defined(__OS2__) || defined(__EMX__) | 875 #if defined(__OS2__) || defined(__EMX__) |
860 #define DW_OS2_RGB(a) ((DW_RED_VALUE(a) << 16) | (DW_GREEN_VALUE(a) << 8) | DW_BLUE_VALUE(a)) | 876 #define DW_OS2_RGB(a) ((DW_RED_VALUE(a) << 16) | (DW_GREEN_VALUE(a) << 8) | DW_BLUE_VALUE(a)) |
861 #endif | 877 #endif |
862 | 878 |
1087 void API dw_timer_disconnect(int id); | 1103 void API dw_timer_disconnect(int id); |
1088 void API dw_signal_connect(HWND window, char *signame, void *sigfunc, void *data); | 1104 void API dw_signal_connect(HWND window, char *signame, void *sigfunc, void *data); |
1089 void API dw_signal_disconnect_by_window(HWND window); | 1105 void API dw_signal_disconnect_by_window(HWND window); |
1090 void API dw_signal_disconnect_by_data(HWND window, void *data); | 1106 void API dw_signal_disconnect_by_data(HWND window, void *data); |
1091 void API dw_signal_disconnect_by_name(HWND window, char *signame); | 1107 void API dw_signal_disconnect_by_name(HWND window, char *signame); |
1092 | 1108 HEV API dw_named_event_new(char *name); |
1093 #endif | 1109 HEV API dw_named_event_get(char *name); |
1110 int API dw_named_event_reset(HEV eve); | |
1111 int API dw_named_event_post(HEV eve); | |
1112 int API dw_named_event_wait(HEV eve, unsigned long timeout); | |
1113 int API dw_named_event_close(HEV eve); | |
1114 HSHM API dw_named_memory_new(void **dest, int size, char *name); | |
1115 HSHM API dw_named_memory_get(void **dest, int size, char *name); | |
1116 int API dw_named_memory_free(HSHM handle, void *ptr); | |
1117 | |
1118 #endif |