diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h b/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h new file mode 100644 index 0000000..4533169 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h | |||
@@ -0,0 +1,169 @@ | |||
1 | #ifndef __ECORE_WIN32_PRIVATE_H__ | ||
2 | #define __ECORE_WIN32_PRIVATE_H__ | ||
3 | |||
4 | |||
5 | #ifdef __cplusplus | ||
6 | extern "C" { | ||
7 | #endif | ||
8 | |||
9 | #ifdef MIN | ||
10 | # undef MIN | ||
11 | #endif | ||
12 | #define MIN(a,b) (((a) < (b)) ? (a) : (b)) | ||
13 | |||
14 | #ifdef MAX | ||
15 | # undef MAX | ||
16 | #endif | ||
17 | #define MAX(a,b) (((a) < (b)) ? (b) : (a)) | ||
18 | |||
19 | /* logging messages macros */ | ||
20 | extern int _ecore_win32_log_dom_global; | ||
21 | |||
22 | #ifdef ECORE_WIN32_DEFAULT_LOG_COLOR | ||
23 | # undef ECORE_WIN32_DEFAULT_LOG_COLOR | ||
24 | #endif | ||
25 | #define ECORE_WIN32_DEFAULT_LOG_COLOR EINA_COLOR_LIGHTBLUE | ||
26 | |||
27 | #ifdef ERR | ||
28 | # undef ERR | ||
29 | #endif | ||
30 | #define ERR(...) EINA_LOG_DOM_ERR(_ecore_win32_log_dom_global , __VA_ARGS__) | ||
31 | #ifdef DBG | ||
32 | #undef DBG | ||
33 | #endif | ||
34 | #define DBG(...) EINA_LOG_DOM_DBG(_ecore_win32_log_dom_global , __VA_ARGS__) | ||
35 | |||
36 | #ifdef INF | ||
37 | #undef INF | ||
38 | #endif | ||
39 | #define INF(...) EINA_LOG_DOM_INFO(_ecore_win32_log_dom_global , __VA_ARGS__) | ||
40 | |||
41 | #ifdef WRN | ||
42 | # undef WRN | ||
43 | #endif | ||
44 | #define WRN(...) EINA_LOG_DOM_WARN(_ecore_win32_log_dom_global, __VA_ARGS__) | ||
45 | |||
46 | #define ECORE_WIN32_WINDOW_CLASS "Ecore_Win32_Window_Class" | ||
47 | |||
48 | typedef struct _Ecore_Win32_Callback_Data Ecore_Win32_Callback_Data; | ||
49 | |||
50 | struct _Ecore_Win32_Callback_Data | ||
51 | { | ||
52 | RECT update; | ||
53 | HWND window; | ||
54 | unsigned int message; | ||
55 | WPARAM window_param; | ||
56 | LPARAM data_param; | ||
57 | long time; | ||
58 | int x; | ||
59 | int y; | ||
60 | }; | ||
61 | |||
62 | struct _Ecore_Win32_Window | ||
63 | { | ||
64 | HWND window; | ||
65 | |||
66 | DWORD style; /* used to go fullscreen to normal */ | ||
67 | RECT rect; /* used to go fullscreen to normal */ | ||
68 | |||
69 | unsigned int min_width; | ||
70 | unsigned int min_height; | ||
71 | unsigned int max_width; | ||
72 | unsigned int max_height; | ||
73 | unsigned int base_width; | ||
74 | unsigned int base_height; | ||
75 | unsigned int step_width; | ||
76 | unsigned int step_height; | ||
77 | |||
78 | struct { | ||
79 | unsigned int iconified : 1; | ||
80 | unsigned int modal : 1; | ||
81 | unsigned int sticky : 1; | ||
82 | unsigned int maximized_vert : 1; | ||
83 | unsigned int maximized_horz : 1; | ||
84 | unsigned int shaded : 1; | ||
85 | unsigned int hidden : 1; | ||
86 | unsigned int fullscreen : 1; | ||
87 | unsigned int above : 1; | ||
88 | unsigned int below : 1; | ||
89 | unsigned int demands_attention : 1; | ||
90 | } state; | ||
91 | |||
92 | struct { | ||
93 | unsigned int desktop : 1; | ||
94 | unsigned int dock : 1; | ||
95 | unsigned int toolbar : 1; | ||
96 | unsigned int menu : 1; | ||
97 | unsigned int utility : 1; | ||
98 | unsigned int splash : 1; | ||
99 | unsigned int dialog : 1; | ||
100 | unsigned int normal : 1; | ||
101 | } type; | ||
102 | |||
103 | unsigned int pointer_is_in : 1; | ||
104 | unsigned int borderless : 1; | ||
105 | unsigned int iconified : 1; | ||
106 | unsigned int fullscreen : 1; | ||
107 | |||
108 | struct { | ||
109 | unsigned short width; | ||
110 | unsigned short height; | ||
111 | unsigned char *mask; | ||
112 | unsigned int enabled : 1; | ||
113 | unsigned int layered : 1; | ||
114 | } shape; | ||
115 | |||
116 | struct { | ||
117 | DWORD type; | ||
118 | int x; | ||
119 | int y; | ||
120 | int w; | ||
121 | int h; | ||
122 | int px; | ||
123 | int py; | ||
124 | unsigned int dragging : 1; | ||
125 | } drag; | ||
126 | |||
127 | void *dnd_drop_target; | ||
128 | }; | ||
129 | |||
130 | |||
131 | extern HINSTANCE _ecore_win32_instance; | ||
132 | extern double _ecore_win32_double_click_time; | ||
133 | extern long _ecore_win32_event_last_time; | ||
134 | extern Ecore_Win32_Window *_ecore_win32_event_last_window; | ||
135 | |||
136 | |||
137 | void _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, int is_keystroke); | ||
138 | void _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg); | ||
139 | void _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, int button); | ||
140 | void _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg, int button); | ||
141 | void _ecore_win32_event_handle_motion_notify(Ecore_Win32_Callback_Data *msg); | ||
142 | void _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg); | ||
143 | void _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg); | ||
144 | void _ecore_win32_event_handle_focus_in(Ecore_Win32_Callback_Data *msg); | ||
145 | void _ecore_win32_event_handle_focus_out(Ecore_Win32_Callback_Data *msg); | ||
146 | void _ecore_win32_event_handle_expose(Ecore_Win32_Callback_Data *msg); | ||
147 | void _ecore_win32_event_handle_create_notify(Ecore_Win32_Callback_Data *msg); | ||
148 | void _ecore_win32_event_handle_destroy_notify(Ecore_Win32_Callback_Data *msg); | ||
149 | void _ecore_win32_event_handle_map_notify(Ecore_Win32_Callback_Data *msg); | ||
150 | void _ecore_win32_event_handle_unmap_notify(Ecore_Win32_Callback_Data *msg); | ||
151 | void _ecore_win32_event_handle_configure_notify(Ecore_Win32_Callback_Data *msg); | ||
152 | void _ecore_win32_event_handle_resize(Ecore_Win32_Callback_Data *msg); | ||
153 | void _ecore_win32_event_handle_delete_request(Ecore_Win32_Callback_Data *msg); | ||
154 | |||
155 | void *_ecore_win32_dnd_data_object_new(void *fmtetc, void *stgmeds, int count); | ||
156 | void _ecore_win32_dnd_data_object_free(void *data_object); | ||
157 | void *_ecore_win32_dnd_drop_source_new(); | ||
158 | void _ecore_win32_dnd_drop_source_free(void *drop_source); | ||
159 | void *_ecore_win32_dnd_register_drop_window(HWND hwnd, | ||
160 | Ecore_Win32_Dnd_DropTarget_Callback callback, void *ptr); | ||
161 | void _ecore_win32_dnd_unregister_drop_window(HWND hwnd, void *drop_target); | ||
162 | |||
163 | |||
164 | #ifdef __cplusplus | ||
165 | } | ||
166 | #endif | ||
167 | |||
168 | |||
169 | #endif /* __ECORE_WIN32_PRIVATE_H__ */ | ||