Mercurial > dwindows
comparison dw.h @ 731:6a589a1a42b0
Add dw_window_get_font()
Add incomplete dw_scrollbox_get* functions
Add initial QNX Photon support
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 15 Mar 2011 01:46:41 +0000 |
parents | 41080d22edc8 |
children | d2de18d4ea50 |
comparison
equal
deleted
inserted
replaced
730:d3fb3613726a | 731:6a589a1a42b0 |
---|---|
6 /* Dynamic Windows version numbers */ | 6 /* Dynamic Windows version numbers */ |
7 #define DW_MAJOR_VERSION 1 | 7 #define DW_MAJOR_VERSION 1 |
8 #define DW_MINOR_VERSION 1 | 8 #define DW_MINOR_VERSION 1 |
9 #define DW_SUB_VERSION 0 | 9 #define DW_SUB_VERSION 0 |
10 | 10 |
11 #if !defined(__PHOTON__) | |
11 /* These corespond to the entries in the color | 12 /* These corespond to the entries in the color |
12 * arrays in the Win32 dw.c, they are also the | 13 * arrays in the Win32 dw.c, they are also the |
13 * same as DOS ANSI colors. | 14 * same as DOS ANSI colors. |
14 */ | 15 */ |
15 #define DW_CLR_BLACK 0 | 16 #define DW_CLR_BLACK 0 |
27 #define DW_CLR_BLUE 12 | 28 #define DW_CLR_BLUE 12 |
28 #define DW_CLR_PINK 13 | 29 #define DW_CLR_PINK 13 |
29 #define DW_CLR_CYAN 14 | 30 #define DW_CLR_CYAN 14 |
30 #define DW_CLR_WHITE 15 | 31 #define DW_CLR_WHITE 15 |
31 #define DW_CLR_DEFAULT 16 | 32 #define DW_CLR_DEFAULT 16 |
33 #endif | |
32 | 34 |
33 /* Signal handler defines */ | 35 /* Signal handler defines */ |
34 #define DW_SIGNAL_CONFIGURE "configure_event" | 36 #define DW_SIGNAL_CONFIGURE "configure_event" |
35 #define DW_SIGNAL_KEY_PRESS "key_press_event" | 37 #define DW_SIGNAL_KEY_PRESS "key_press_event" |
36 #define DW_SIGNAL_BUTTON_PRESS "button_press_event" | 38 #define DW_SIGNAL_BUTTON_PRESS "button_press_event" |
112 | 114 |
113 #ifndef FCF_CLOSEBUTTON | 115 #ifndef FCF_CLOSEBUTTON |
114 #define FCF_CLOSEBUTTON 0x04000000L | 116 #define FCF_CLOSEBUTTON 0x04000000L |
115 #endif | 117 #endif |
116 | 118 |
119 #define DW_FCF_CLOSEBUTTON 0 | |
117 #define DW_FCF_TITLEBAR FCF_TITLEBAR | 120 #define DW_FCF_TITLEBAR FCF_TITLEBAR |
118 #define DW_FCF_SYSMENU (FCF_SYSMENU | FCF_CLOSEBUTTON) | 121 #define DW_FCF_SYSMENU (FCF_SYSMENU | FCF_CLOSEBUTTON) |
119 #define DW_FCF_MENU FCF_MENU | 122 #define DW_FCF_MENU FCF_MENU |
120 #define DW_FCF_SIZEBORDER FCF_SIZEBORDER | 123 #define DW_FCF_SIZEBORDER FCF_SIZEBORDER |
121 #define DW_FCF_MINBUTTON FCF_MINBUTTON | 124 #define DW_FCF_MINBUTTON FCF_MINBUTTON |
158 #define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE | 161 #define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE |
159 | 162 |
160 #define DW_POINTER_DEFAULT 0 | 163 #define DW_POINTER_DEFAULT 0 |
161 #define DW_POINTER_ARROW SPTR_ARROW | 164 #define DW_POINTER_ARROW SPTR_ARROW |
162 #define DW_POINTER_CLOCK SPTR_WAIT | 165 #define DW_POINTER_CLOCK SPTR_WAIT |
166 #define DW_POINTER_QUESTION SPTR_ICONQUESICON | |
163 | 167 |
164 #define DW_OS2_NEW_WINDOW 1 | 168 #define DW_OS2_NEW_WINDOW 1 |
165 | 169 |
166 /* flag values for dw_messagebox() */ | 170 /* flag values for dw_messagebox() */ |
167 #define DW_MB_OK MB_OK | 171 #define DW_MB_OK MB_OK |
249 #include <pthread.h> | 253 #include <pthread.h> |
250 #include <dlfcn.h> | 254 #include <dlfcn.h> |
251 | 255 |
252 /* Unfortunately using Cocoa we can't include | 256 /* Unfortunately using Cocoa we can't include |
253 * Cocoa.h from C code, so we have to instead | 257 * Cocoa.h from C code, so we have to instead |
254 * use opaque types and use the values from | 258 * use opaque types and use the values from |
255 * Cocoa.h in the header here directly without | 259 * Cocoa.h in the header here directly without |
256 * using the symbolic names. | 260 * using the symbolic names. |
257 */ | 261 */ |
258 | 262 |
259 #define TRUE 1 | 263 #define TRUE 1 |
260 #define FALSE 0 | 264 #define FALSE 0 |
261 | 265 |
262 typedef void *HWND; | 266 typedef void *HWND; |
263 typedef void *HSHM; | 267 typedef void *HSHM; |
264 typedef unsigned long ULONG; | 268 typedef unsigned long ULONG; |
265 typedef long LONG; | 269 typedef long LONG; |
312 #define DW_DT_STRIKEOUT 0 | 316 #define DW_DT_STRIKEOUT 0 |
313 #define DW_DT_TEXTATTRS 0 | 317 #define DW_DT_TEXTATTRS 0 |
314 #define DW_DT_EXTERNALLEADING 0 | 318 #define DW_DT_EXTERNALLEADING 0 |
315 #define DW_DT_CENTER 2 /* NSCenterTextAlignment */ | 319 #define DW_DT_CENTER 2 /* NSCenterTextAlignment */ |
316 #define DW_DT_RIGHT 1 /* NSCenterTextAlignment */ | 320 #define DW_DT_RIGHT 1 /* NSCenterTextAlignment */ |
317 #define DW_DT_TOP 0 | 321 #define DW_DT_TOP 0 |
318 #define DW_DT_VCENTER 0 | 322 #define DW_DT_VCENTER 0 |
319 #define DW_DT_BOTTOM 0 | 323 #define DW_DT_BOTTOM 0 |
320 #define DW_DT_HALFTONE 0 | 324 #define DW_DT_HALFTONE 0 |
321 #define DW_DT_MNEMONIC 0 | 325 #define DW_DT_MNEMONIC 0 |
322 #define DW_DT_WORDBREAK 0 | 326 #define DW_DT_WORDBREAK 0 |
323 #define DW_DT_ERASERECT 0 | 327 #define DW_DT_ERASERECT 0 |
324 | 328 |
329 #define DW_FCF_CLOSEBUTTON 0 | |
325 #define DW_FCF_TITLEBAR (1 << 0) /* NSTitledWindowMask */ | 330 #define DW_FCF_TITLEBAR (1 << 0) /* NSTitledWindowMask */ |
326 #define DW_FCF_SYSMENU (1 << 1) /* NSClosableWindowMask */ | 331 #define DW_FCF_SYSMENU (1 << 1) /* NSClosableWindowMask */ |
327 #define DW_FCF_MENU 0 | 332 #define DW_FCF_MENU 0 |
328 #define DW_FCF_SIZEBORDER (1 << 3) /* NSResizableWindowMask */ | 333 #define DW_FCF_SIZEBORDER (1 << 3) /* NSResizableWindowMask */ |
329 #define DW_FCF_MINBUTTON (1 << 2) /* NSMiniaturizableWindowMask */ | 334 #define DW_FCF_MINBUTTON (1 << 2) /* NSMiniaturizableWindowMask */ |
503 #define DW_DT_HALFTONE 0 | 508 #define DW_DT_HALFTONE 0 |
504 #define DW_DT_MNEMONIC 0 | 509 #define DW_DT_MNEMONIC 0 |
505 #define DW_DT_WORDBREAK 0 | 510 #define DW_DT_WORDBREAK 0 |
506 #define DW_DT_ERASERECT 0 | 511 #define DW_DT_ERASERECT 0 |
507 | 512 |
513 #define DW_FCF_CLOSEBUTTON 0 | |
508 #define DW_FCF_TITLEBAR WS_CAPTION | 514 #define DW_FCF_TITLEBAR WS_CAPTION |
509 #define DW_FCF_SYSMENU WS_SYSMENU | 515 #define DW_FCF_SYSMENU WS_SYSMENU |
510 #define DW_FCF_MENU 0 | 516 #define DW_FCF_MENU 0 |
511 #define DW_FCF_SIZEBORDER WS_THICKFRAME | 517 #define DW_FCF_SIZEBORDER WS_THICKFRAME |
512 #define DW_FCF_MINBUTTON WS_MINIMIZEBOX | 518 #define DW_FCF_MINBUTTON WS_MINIMIZEBOX |
549 #define DW_MLE_CASESENSITIVE 1 | 555 #define DW_MLE_CASESENSITIVE 1 |
550 | 556 |
551 #define DW_POINTER_DEFAULT 0 | 557 #define DW_POINTER_DEFAULT 0 |
552 #define DW_POINTER_ARROW 32512 | 558 #define DW_POINTER_ARROW 32512 |
553 #define DW_POINTER_CLOCK 32514 | 559 #define DW_POINTER_CLOCK 32514 |
560 #define DW_POINTER_QUESTION 32651 | |
554 | 561 |
555 /* flag values for dw_messagebox() */ | 562 /* flag values for dw_messagebox() */ |
556 #define DW_MB_OK MB_OK | 563 #define DW_MB_OK MB_OK |
557 #define DW_MB_OKCANCEL MB_OKCANCEL | 564 #define DW_MB_OKCANCEL MB_OKCANCEL |
558 #define DW_MB_YESNO MB_YESNO | 565 #define DW_MB_YESNO MB_YESNO |
687 #endif | 694 #endif |
688 unsigned long id; | 695 unsigned long id; |
689 char bubbletext[BUBBLE_HELP_MAX]; | 696 char bubbletext[BUBBLE_HELP_MAX]; |
690 } BubbleButton; | 697 } BubbleButton; |
691 | 698 |
699 #elif defined(__PHOTON__) | |
700 #include <stdio.h> | |
701 #include <stdlib.h> | |
702 #include <unistd.h> | |
703 #include <sys/utsname.h> | |
704 /* Photon specific section */ | |
705 #include <Pt.h> | |
706 #include <Ph.h> | |
707 /* which image formats supported */ | |
708 #define PX_IMAGE_MODULES | |
709 #define PX_GIF_SUPPORT | |
710 #define PX_JPG_SUPPORT | |
711 #define PX_BMP_SUPPORT | |
712 #define PX_PND_SUPPORT | |
713 #include <photon/PxImage.h> | |
714 | |
715 #define TRUE 1 | |
716 #define FALSE 0 | |
717 | |
718 typedef PtWidget_t *pPtWidget_t; | |
719 typedef pPtWidget_t HWND; | |
720 | |
721 typedef unsigned long ULONG; | |
722 typedef long LONG; | |
723 typedef unsigned short USHORT; | |
724 typedef short SHORT; | |
725 typedef unsigned short UWORD; | |
726 typedef short WORD ; | |
727 typedef unsigned char UCHAR; | |
728 typedef char CHAR; | |
729 typedef unsigned UINT; | |
730 typedef int INT; | |
731 typedef void *HMTX; | |
732 typedef void *HEV; | |
733 typedef void *HSHM; | |
734 typedef void *HMOD; | |
735 typedef PtTreeItem_t *HTREEITEM; | |
736 typedef HWND HMENUI; | |
737 typedef int DWTID; | |
738 typedef unsigned long HICN; | |
739 | |
740 typedef struct _user_data | |
741 { | |
742 struct _user_data *next; | |
743 void *data; | |
744 char *varname; | |
745 } UserData; | |
746 | |
747 typedef struct _window_data { | |
748 UserData *root; | |
749 HWND clickdefault; | |
750 ULONG flags; | |
751 void *data; | |
752 } WindowData; | |
753 | |
754 typedef struct _hpixmap { | |
755 unsigned long width, height; | |
756 /* ?? *pixmap; */ | |
757 HWND handle; | |
758 } *HPIXMAP; | |
759 | |
760 /* colors matching Photon Graphics colors */ | |
761 #define DW_CLR_BLACK Pg_BLACK | |
762 #define DW_CLR_DARKRED Pg_DRED | |
763 #define DW_CLR_DARKGREEN Pg_DGREEN | |
764 #define DW_CLR_BROWN Pg_BROWN | |
765 #define DW_CLR_DARKBLUE Pg_DBLUE | |
766 #define DW_CLR_DARKPINK Pg_PURPLE | |
767 #define DW_CLR_DARKCYAN Pg_DCYAN | |
768 #define DW_CLR_PALEGRAY Pg_GRAY | |
769 #define DW_CLR_DARKGRAY Pg_MGRAY | |
770 #define DW_CLR_RED Pg_RED | |
771 #define DW_CLR_GREEN Pg_GREEN | |
772 #define DW_CLR_YELLOW Pg_YELLOW | |
773 #define DW_CLR_BLUE Pg_BLUE | |
774 #define DW_CLR_PINK Pg_MAGENTA | |
775 #define DW_CLR_CYAN Pg_CYAN | |
776 #define DW_CLR_WHITE Pg_WHITE | |
777 #define DW_CLR_DEFAULT Pg_GRAY | |
778 /* color manipulation macros */ | |
779 #define DW_RGB_COLOR (0xF0000000) | |
780 #define DW_RGB_TRANSPARENT (0x0F000000) | |
781 #define DW_RGB_MASK (0x00FFFFFF) | |
782 #define DW_RED_MASK (0x00FF0000) | |
783 #define DW_GREEN_MASK (0x0000FF00) | |
784 #define DW_BLUE_MASK (0x000000FF) | |
785 #define DW_RED_VALUE(a) PgRedValue(a) | |
786 #define DW_GREEN_VALUE(a) PgGreenValue(a) | |
787 #define DW_BLUE_VALUE(a) PgBluValue(a) | |
788 #define DW_RGB(a, b, c) PgRGB( a, b, c ) | |
789 | |
790 #define DW_DT_LEFT 0 | |
791 #define DW_DT_QUERYEXTENT 0 | |
792 #define DW_DT_UNDERSCORE 0 | |
793 #define DW_DT_STRIKEOUT 0 | |
794 #define DW_DT_TEXTATTRS 0 | |
795 #define DW_DT_EXTERNALLEADING 0 | |
796 #define DW_DT_CENTER 0 | |
797 #define DW_DT_RIGHT 0 | |
798 #define DW_DT_TOP 0 | |
799 #define DW_DT_VCENTER 0 | |
800 #define DW_DT_BOTTOM 0 | |
801 #define DW_DT_HALFTONE 0 | |
802 #define DW_DT_MNEMONIC 0 | |
803 #define DW_DT_WORDBREAK 0 | |
804 #define DW_DT_ERASERECT 0 | |
805 | |
806 #define DW_FCF_CLOSEBUTTON Ph_WM_RENDER_CLOSE | |
807 #define DW_FCF_TITLEBAR Ph_WM_RENDER_TITLE | |
808 #define DW_FCF_SYSMENU 0 | |
809 #define DW_FCF_MENU Ph_WM_RENDER_MENU | |
810 #define DW_FCF_SIZEBORDER Ph_WM_RENDER_RESIZE | |
811 #define DW_FCF_MINBUTTON Ph_WM_RENDER_MIN | |
812 #define DW_FCF_MAXBUTTON Ph_WM_RENDER_MAX | |
813 #define DW_FCF_MINMAX (Ph_WM_RENDER_MIN|Ph_WM_RENDER_MAX) | |
814 #define DW_FCF_VERTSCROLL 0 | |
815 #define DW_FCF_HORZSCROLL 0 | |
816 #define DW_FCF_DLGBORDER 0 | |
817 #define DW_FCF_BORDER Ph_WM_RENDER_BORDER | |
818 #define DW_FCF_SHELLPOSITION 0 | |
819 #define DW_FCF_TASKLIST 0 | |
820 #define DW_FCF_NOBYTEALIGN 0 | |
821 #define DW_FCF_NOMOVEWITHOWNER 0 | |
822 #define DW_FCF_SYSMODAL 0 | |
823 #define DW_FCF_HIDEBUTTON 0 | |
824 #define DW_FCF_HIDEMAX 0 | |
825 #define DW_FCF_AUTOICON (Ph_WM_RENDER_ASICON | ~Ph_WM_RENDER_ASAPP) | |
826 #define DW_FCF_MAXIMIZE 0 | |
827 #define DW_FCF_MINIMIZE 0 | |
828 | |
829 #define DW_CFA_BITMAPORICON 1 | |
830 #define DW_CFA_STRING (1 << 1) | |
831 #define DW_CFA_ULONG (1 << 2) | |
832 #define DW_CFA_TIME (1 << 3) | |
833 #define DW_CFA_DATE (1 << 4) | |
834 #define DW_CFA_CENTER (1 << 5) | |
835 #define DW_CFA_LEFT (1 << 6) | |
836 #define DW_CFA_RIGHT (1 << 7) | |
837 #define DW_CFA_STRINGANDICON (1 << 8) | |
838 #define DW_CFA_HORZSEPARATOR 0 | |
839 #define DW_CFA_SEPARATOR 0 | |
840 | |
841 #define DW_CRA_SELECTED 1 | |
842 #define DW_CRA_CURSORED (1 << 1) | |
843 | |
844 #define DW_LS_MULTIPLESEL 1 | |
845 | |
846 #define DW_LIT_NONE -1 | |
847 | |
848 #ifdef MLFSEARCH_CASESENSITIVE | |
849 # define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE | |
850 #else | |
851 # define DW_MLE_CASESENSITIVE 0 | |
852 #endif | |
853 | |
854 #define DW_POINTER_DEFAULT 0 | |
855 #define DW_POINTER_ARROW 0 | |
856 #define DW_POINTER_CLOCK 0 | |
857 #define DW_POINTER_QUESTION 0 | |
858 | |
859 #define HWND_DESKTOP ((HWND)0) | |
860 | |
861 /* flag values for dw_messagebox() */ | |
862 #define DW_MB_OK (1 << 1) | |
863 #define DW_MB_OKCANCEL (1 << 2) | |
864 #define DW_MB_YESNO (1 << 3) | |
865 #define DW_MB_YESNOCANCEL (1 << 4) | |
866 | |
867 #define DW_MB_WARNING (1 << 10) | |
868 #define DW_MB_ERROR (1 << 11) | |
869 #define DW_MB_INFORMATION (1 << 12) | |
870 #define DW_MB_QUESTION (1 << 13) | |
871 | |
872 /* Virtual Key Codes */ | |
873 #define VK_LBUTTON 0 | |
874 #define VK_RBUTTON 0 | |
875 #define VK_CANCEL 0 | |
876 #define VK_MBUTTON 0 | |
877 #define VK_BACK 0 | |
878 #define VK_TAB 0 | |
879 #define VK_CLEAR 0 | |
880 #define VK_RETURN 0 | |
881 #define VK_MENU 0 | |
882 #define VK_PAUSE 0 | |
883 #define VK_CAPITAL 0 | |
884 #define VK_ESCAPE 0 | |
885 #define VK_SPACE 0 | |
886 #define VK_PRIOR 0 | |
887 #define VK_NEXT 0 | |
888 #define VK_END 0 | |
889 #define VK_HOME 0 | |
890 #define VK_LEFT 0 | |
891 #define VK_UP 0 | |
892 #define VK_RIGHT 0 | |
893 #define VK_DOWN 0 | |
894 #define VK_SELECT 0 | |
895 #define VK_PRINT 0 | |
896 #define VK_EXECUTE 0 | |
897 #define VK_SNAPSHOT 0 | |
898 #define VK_INSERT 0 | |
899 #define VK_DELETE 0 | |
900 #define VK_HELP 0 | |
901 #define VK_LWIN 0 | |
902 #define VK_RWIN 0 | |
903 #define VK_NUMPAD0 0 | |
904 #define VK_NUMPAD1 0 | |
905 #define VK_NUMPAD2 0 | |
906 #define VK_NUMPAD3 0 | |
907 #define VK_NUMPAD4 0 | |
908 #define VK_NUMPAD5 0 | |
909 #define VK_NUMPAD6 0 | |
910 #define VK_NUMPAD7 0 | |
911 #define VK_NUMPAD8 0 | |
912 #define VK_NUMPAD9 0 | |
913 #define VK_MULTIPLY 0 | |
914 #define VK_ADD 0 | |
915 #define VK_SEPARATOR 0 | |
916 #define VK_SUBTRACT 0 | |
917 #define VK_DECIMAL 0 | |
918 #define VK_DIVIDE 0 | |
919 #define VK_F1 0 | |
920 #define VK_F2 0 | |
921 #define VK_F3 0 | |
922 #define VK_F4 0 | |
923 #define VK_F5 0 | |
924 #define VK_F6 0 | |
925 #define VK_F7 0 | |
926 #define VK_F8 0 | |
927 #define VK_F9 0 | |
928 #define VK_F10 0 | |
929 #define VK_F11 0 | |
930 #define VK_F12 0 | |
931 #define VK_F13 0 | |
932 #define VK_F14 0 | |
933 #define VK_F15 0 | |
934 #define VK_F16 0 | |
935 #define VK_F17 0 | |
936 #define VK_F18 0 | |
937 #define VK_F19 0 | |
938 #define VK_F20 0 | |
939 #define VK_F21 0 | |
940 #define VK_F22 0 | |
941 #define VK_F23 0 | |
942 #define VK_F24 0 | |
943 #define VK_NUMLOCK 0 | |
944 #define VK_SCROLL 0 | |
945 #define VK_LSHIFT 0 | |
946 #define VK_RSHIFT 0 | |
947 #define VK_LCONTROL 0 | |
948 #define VK_RCONTROL 0 | |
949 #define VK_LMENU 0 | |
950 #define VK_RMENU 0 | |
951 | |
952 /* Key Modifiers */ | |
953 #define KC_CTRL (1) | |
954 #define KC_SHIFT (1 << 1) | |
955 #define KC_ALT (1 << 2) | |
956 | |
692 #else | 957 #else |
693 /* GTK Specific section */ | 958 /* GTK Specific section */ |
694 #include <gtk/gtk.h> | 959 #include <gtk/gtk.h> |
695 #ifdef GDK_WINDOWING_X11 | 960 #ifdef GDK_WINDOWING_X11 |
696 # include <gdk/gdkx.h> | 961 # include <gdk/gdkx.h> |
741 #define DW_FCF_HIDEBUTTON (1 << 16) | 1006 #define DW_FCF_HIDEBUTTON (1 << 16) |
742 #define DW_FCF_HIDEMAX (1 << 17) | 1007 #define DW_FCF_HIDEMAX (1 << 17) |
743 #define DW_FCF_AUTOICON (1 << 18) | 1008 #define DW_FCF_AUTOICON (1 << 18) |
744 #define DW_FCF_MAXIMIZE (1 << 19) | 1009 #define DW_FCF_MAXIMIZE (1 << 19) |
745 #define DW_FCF_MINIMIZE (1 << 20) | 1010 #define DW_FCF_MINIMIZE (1 << 20) |
1011 #define DW_FCF_CLOSEBUTTON (1 << 21) | |
746 | 1012 |
747 #define DW_CFA_BITMAPORICON 1 | 1013 #define DW_CFA_BITMAPORICON 1 |
748 #define DW_CFA_STRING (1 << 1) | 1014 #define DW_CFA_STRING (1 << 1) |
749 #define DW_CFA_ULONG (1 << 2) | 1015 #define DW_CFA_ULONG (1 << 2) |
750 #define DW_CFA_TIME (1 << 3) | 1016 #define DW_CFA_TIME (1 << 3) |
766 #define DW_MLE_CASESENSITIVE 1 | 1032 #define DW_MLE_CASESENSITIVE 1 |
767 | 1033 |
768 #define DW_POINTER_DEFAULT 0 | 1034 #define DW_POINTER_DEFAULT 0 |
769 #define DW_POINTER_ARROW GDK_TOP_LEFT_ARROW | 1035 #define DW_POINTER_ARROW GDK_TOP_LEFT_ARROW |
770 #define DW_POINTER_CLOCK GDK_WATCH | 1036 #define DW_POINTER_CLOCK GDK_WATCH |
1037 #define DW_POINTER_QUESTION GDK_QUESTION_ARROW | |
771 | 1038 |
772 #define HWND_DESKTOP ((HWND)0) | 1039 #define HWND_DESKTOP ((HWND)0) |
773 | 1040 |
774 /* flag values for dw_messagebox() */ | 1041 /* flag values for dw_messagebox() */ |
775 #define DW_MB_OK (1 << 1) | 1042 #define DW_MB_OK (1 << 1) |
1002 #define DW_MB_RETURN_CANCEL 2 | 1269 #define DW_MB_RETURN_CANCEL 2 |
1003 | 1270 |
1004 #define DW_PIXMAP_WIDTH(x) (x ? x->width : 0) | 1271 #define DW_PIXMAP_WIDTH(x) (x ? x->width : 0) |
1005 #define DW_PIXMAP_HEIGHT(x) (x ? x->height : 0) | 1272 #define DW_PIXMAP_HEIGHT(x) (x ? x->height : 0) |
1006 | 1273 |
1274 #if !defined(__PHOTON__) | |
1007 #define DW_RGB_COLOR (0xF0000000) | 1275 #define DW_RGB_COLOR (0xF0000000) |
1008 #define DW_RGB_TRANSPARENT (0x0F000000) | 1276 #define DW_RGB_TRANSPARENT (0x0F000000) |
1009 #define DW_RGB_MASK (0x00FFFFFF) | 1277 #define DW_RGB_MASK (0x00FFFFFF) |
1010 #define DW_RED_MASK (0x000000FF) | 1278 #define DW_RED_MASK (0x000000FF) |
1011 #define DW_GREEN_MASK (0x0000FF00) | 1279 #define DW_GREEN_MASK (0x0000FF00) |
1012 #define DW_BLUE_MASK (0x00FF0000) | 1280 #define DW_BLUE_MASK (0x00FF0000) |
1013 #define DW_RED_VALUE(a) (a & DW_RED_MASK) | 1281 #define DW_RED_VALUE(a) (a & DW_RED_MASK) |
1014 #define DW_GREEN_VALUE(a) ((a & DW_GREEN_MASK) >> 8) | 1282 #define DW_GREEN_VALUE(a) ((a & DW_GREEN_MASK) >> 8) |
1015 #define DW_BLUE_VALUE(a) ((a & DW_BLUE_MASK) >> 16) | 1283 #define DW_BLUE_VALUE(a) ((a & DW_BLUE_MASK) >> 16) |
1016 #define DW_RGB(a, b, c) (0xF0000000 | a | b << 8 | c << 16) | 1284 #define DW_RGB(a, b, c) (0xF0000000 | a | b << 8 | c << 16) |
1285 #endif | |
1017 | 1286 |
1018 #define DW_MENU_SEPARATOR "" | 1287 #define DW_MENU_SEPARATOR "" |
1019 #define DW_NOMENU 0 | 1288 #define DW_NOMENU 0 |
1020 | 1289 |
1021 /* Return value error codes */ | 1290 /* Return value error codes */ |
1074 int API dw_window_raise(HWND handle); | 1343 int API dw_window_raise(HWND handle); |
1075 int API dw_window_lower(HWND handle); | 1344 int API dw_window_lower(HWND handle); |
1076 int API dw_window_destroy(HWND handle); | 1345 int API dw_window_destroy(HWND handle); |
1077 void API dw_window_redraw(HWND handle); | 1346 void API dw_window_redraw(HWND handle); |
1078 int API dw_window_set_font(HWND handle, char *fontname); | 1347 int API dw_window_set_font(HWND handle, char *fontname); |
1348 char * API dw_window_get_font(HWND handle); | |
1079 int API dw_window_set_color(HWND handle, unsigned long fore, unsigned long back); | 1349 int API dw_window_set_color(HWND handle, unsigned long fore, unsigned long back); |
1080 HWND API dw_window_new(HWND hwndOwner, char *title, unsigned long flStyle); | 1350 HWND API dw_window_new(HWND hwndOwner, char *title, unsigned long flStyle); |
1081 HWND API dw_box_new(int type, int pad); | 1351 HWND API dw_box_new(int type, int pad); |
1082 #ifdef INCOMPLETE | 1352 #ifndef INCOMPLETE |
1083 HWND API dw_scrollbox_new(int type, int pad); | 1353 HWND API dw_scrollbox_new(int type, int pad); |
1354 int API dw_scrollbox_get_pos( HWND handle, int orient ); | |
1355 int API dw_scrollbox_get_range( HWND handle, int orient ); | |
1084 #endif | 1356 #endif |
1085 HWND API dw_groupbox_new(int type, int pad, char *title); | 1357 HWND API dw_groupbox_new(int type, int pad, char *title); |
1086 HWND API dw_mdi_new(unsigned long id); | 1358 HWND API dw_mdi_new(unsigned long id); |
1087 HWND API dw_bitmap_new(unsigned long id); | 1359 HWND API dw_bitmap_new(unsigned long id); |
1088 HWND API dw_bitmapbutton_new(char *text, unsigned long id); | 1360 HWND API dw_bitmapbutton_new(char *text, unsigned long id); |