2007-08-26 04:17:21 -07:00
|
|
|
#ifndef __ECORE_WIN32_PRIVATE_H__
|
|
|
|
#define __ECORE_WIN32_PRIVATE_H__
|
|
|
|
|
|
|
|
|
2008-11-27 11:30:39 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-02-20 00:37:43 -08:00
|
|
|
#ifdef MIN
|
|
|
|
# undef MIN
|
|
|
|
#endif
|
|
|
|
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
|
|
|
|
|
|
#ifdef MAX
|
|
|
|
# undef MAX
|
|
|
|
#endif
|
|
|
|
#define MAX(a,b) (((a) < (b)) ? (b) : (a))
|
2008-11-27 11:30:39 -08:00
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
/* logging messages macros */
|
2009-10-09 20:45:06 -07:00
|
|
|
extern int _ecore_win32_log_dom_global;
|
2009-09-05 01:39:34 -07:00
|
|
|
|
2010-01-06 16:30:05 -08:00
|
|
|
#ifdef ECORE_WIN32_DEFAULT_LOG_COLOR
|
|
|
|
# undef ECORE_WIN32_DEFAULT_LOG_COLOR
|
|
|
|
#endif
|
|
|
|
#define ECORE_WIN32_DEFAULT_LOG_COLOR EINA_COLOR_LIGHTBLUE
|
|
|
|
|
|
|
|
#ifdef ERR
|
|
|
|
# undef ERR
|
|
|
|
#endif
|
2009-10-09 20:45:06 -07:00
|
|
|
#define ERR(...) EINA_LOG_DOM_ERR(_ecore_win32_log_dom_global , __VA_ARGS__)
|
2010-01-06 16:30:05 -08:00
|
|
|
#ifdef DBG
|
|
|
|
#undef DBG
|
|
|
|
#endif
|
2009-10-09 20:45:06 -07:00
|
|
|
#define DBG(...) EINA_LOG_DOM_DBG(_ecore_win32_log_dom_global , __VA_ARGS__)
|
2010-01-06 16:30:05 -08:00
|
|
|
|
|
|
|
#ifdef INF
|
|
|
|
#undef INF
|
|
|
|
#endif
|
2009-10-09 20:45:06 -07:00
|
|
|
#define INF(...) EINA_LOG_DOM_INFO(_ecore_win32_log_dom_global , __VA_ARGS__)
|
2009-09-07 22:39:09 -07:00
|
|
|
|
2011-02-20 00:37:43 -08:00
|
|
|
#ifdef WRN
|
|
|
|
# undef WRN
|
|
|
|
#endif
|
|
|
|
#define WRN(...) EINA_LOG_DOM_WARN(_ecore_win32_log_dom_global, __VA_ARGS__)
|
|
|
|
|
2009-09-07 22:39:09 -07:00
|
|
|
#define ECORE_WIN32_WINDOW_CLASS "Ecore_Win32_Window_Class"
|
2007-08-26 04:17:21 -07:00
|
|
|
|
|
|
|
typedef struct _Ecore_Win32_Callback_Data Ecore_Win32_Callback_Data;
|
|
|
|
|
|
|
|
struct _Ecore_Win32_Callback_Data
|
|
|
|
{
|
|
|
|
RECT update;
|
|
|
|
HWND window;
|
|
|
|
unsigned int message;
|
|
|
|
WPARAM window_param;
|
|
|
|
LPARAM data_param;
|
|
|
|
long time;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Ecore_Win32_Window
|
|
|
|
{
|
2007-11-16 11:31:32 -08:00
|
|
|
HWND window;
|
|
|
|
|
|
|
|
DWORD style; /* used to go fullscreen to normal */
|
|
|
|
RECT rect; /* used to go fullscreen to normal */
|
|
|
|
|
|
|
|
unsigned int min_width;
|
|
|
|
unsigned int min_height;
|
|
|
|
unsigned int max_width;
|
|
|
|
unsigned int max_height;
|
|
|
|
unsigned int base_width;
|
|
|
|
unsigned int base_height;
|
|
|
|
unsigned int step_width;
|
|
|
|
unsigned int step_height;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
unsigned int iconified : 1;
|
|
|
|
unsigned int modal : 1;
|
|
|
|
unsigned int sticky : 1;
|
|
|
|
unsigned int maximized_vert : 1;
|
|
|
|
unsigned int maximized_horz : 1;
|
|
|
|
unsigned int shaded : 1;
|
|
|
|
unsigned int hidden : 1;
|
|
|
|
unsigned int fullscreen : 1;
|
|
|
|
unsigned int above : 1;
|
|
|
|
unsigned int below : 1;
|
|
|
|
unsigned int demands_attention : 1;
|
|
|
|
} state;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
unsigned int desktop : 1;
|
|
|
|
unsigned int dock : 1;
|
|
|
|
unsigned int toolbar : 1;
|
|
|
|
unsigned int menu : 1;
|
|
|
|
unsigned int utility : 1;
|
|
|
|
unsigned int splash : 1;
|
|
|
|
unsigned int dialog : 1;
|
|
|
|
unsigned int normal : 1;
|
|
|
|
} type;
|
|
|
|
|
|
|
|
unsigned int pointer_is_in : 1;
|
|
|
|
unsigned int borderless : 1;
|
|
|
|
unsigned int iconified : 1;
|
|
|
|
unsigned int fullscreen : 1;
|
2008-11-27 11:30:39 -08:00
|
|
|
|
|
|
|
struct {
|
|
|
|
unsigned short width;
|
|
|
|
unsigned short height;
|
|
|
|
unsigned char *mask;
|
|
|
|
unsigned int enabled : 1;
|
|
|
|
unsigned int layered : 1;
|
|
|
|
} shape;
|
|
|
|
|
2010-12-10 13:15:05 -08:00
|
|
|
struct {
|
2011-02-20 00:37:43 -08:00
|
|
|
DWORD type;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
int px;
|
|
|
|
int py;
|
|
|
|
unsigned int dragging : 1;
|
2010-12-10 13:15:05 -08:00
|
|
|
} drag;
|
|
|
|
|
2008-11-27 11:30:39 -08:00
|
|
|
void *dnd_drop_target;
|
2007-08-26 04:17:21 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern HINSTANCE _ecore_win32_instance;
|
|
|
|
extern double _ecore_win32_double_click_time;
|
2009-09-28 10:36:43 -07:00
|
|
|
extern long _ecore_win32_event_last_time;
|
2007-08-26 04:17:21 -07:00
|
|
|
extern Ecore_Win32_Window *_ecore_win32_event_last_window;
|
|
|
|
|
|
|
|
|
|
|
|
void _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, int is_keystroke);
|
|
|
|
void _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg, int is_keystroke);
|
|
|
|
void _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, int button);
|
|
|
|
void _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg, int button);
|
|
|
|
void _ecore_win32_event_handle_motion_notify(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_focus_in(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_focus_out(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_expose(Ecore_Win32_Callback_Data *msg);
|
2007-09-23 04:08:52 -07:00
|
|
|
void _ecore_win32_event_handle_create_notify(Ecore_Win32_Callback_Data *msg);
|
2007-08-26 04:17:21 -07:00
|
|
|
void _ecore_win32_event_handle_destroy_notify(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_map_notify(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_unmap_notify(Ecore_Win32_Callback_Data *msg);
|
2007-09-23 04:08:52 -07:00
|
|
|
void _ecore_win32_event_handle_configure_notify(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_resize(Ecore_Win32_Callback_Data *msg);
|
|
|
|
void _ecore_win32_event_handle_delete_request(Ecore_Win32_Callback_Data *msg);
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2008-11-27 11:30:39 -08:00
|
|
|
void *_ecore_win32_dnd_data_object_new(void *fmtetc, void *stgmeds, int count);
|
|
|
|
void _ecore_win32_dnd_data_object_free(void *data_object);
|
|
|
|
void *_ecore_win32_dnd_drop_source_new();
|
|
|
|
void _ecore_win32_dnd_drop_source_free(void *drop_source);
|
|
|
|
void *_ecore_win32_dnd_register_drop_window(HWND hwnd,
|
|
|
|
Ecore_Win32_Dnd_DropTarget_Callback callback, void *ptr);
|
|
|
|
void _ecore_win32_dnd_unregister_drop_window(HWND hwnd, void *drop_target);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
|
|
|
|
#endif /* __ECORE_WIN32_PRIVATE_H__ */
|