summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-10-19 20:43:36 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-12-03 11:44:16 -0800
commit3d7f5f6f6d537177b26cc60145c9c4abfe9e516b (patch)
tree2b27633b357a3594d28469c6059a42fd9e0804ad
parent00348888292564e5fff514ae21566fe670276a73 (diff)
cursor: add cursor support on Windows.
@feature Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/els_cursor.c214
1 files changed, 127 insertions, 87 deletions
diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index 6aae337b0..68005542f 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -15,6 +15,9 @@
15#ifdef HAVE_ELEMENTARY_COCOA 15#ifdef HAVE_ELEMENTARY_COCOA
16# include <Ecore_Cocoa_Cursor.h> 16# include <Ecore_Cocoa_Cursor.h>
17#endif 17#endif
18#ifdef HAVE_ELEMENTARY_WIN32
19#include <Ecore_Win32.h>
20#endif
18 21
19#define _cursor_key "_elm_cursor" 22#define _cursor_key "_elm_cursor"
20 23
@@ -22,7 +25,7 @@ struct _Cursor_Id
22{ 25{
23 const char *name; 26 const char *name;
24 27
25#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA) 28#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA) || defined(HAVE_ELEMENTARY_WIN32)
26 int id; /* For X */ 29 int id; /* For X */
27 int cid; /* For Cocoa */ 30 int cid; /* For Cocoa */
28#endif 31#endif
@@ -30,98 +33,98 @@ struct _Cursor_Id
30 33
31#if defined(HAVE_ELEMENTARY_X) 34#if defined(HAVE_ELEMENTARY_X)
32# if defined(HAVE_ELEMENTARY_COCOA) 35# if defined(HAVE_ELEMENTARY_COCOA)
33# define CURSOR(_name, _id, _cid) {_name, _id, _cid} 36# define CURSOR(_name, _id, _cid) {_name, ECORE_X_CURSOR_##_id, _cid}
34# else 37# else
35# define CURSOR(_name, _id, _cid) { _name, _id, -1 } 38# define CURSOR(_name, _id, _cid) { _name, ECORE_X_CURSOR_##_id, -1 }
36# endif 39# endif
37#else 40#elif defined(HAVE_ELEMENTARY_COCOA)
38# if defined(HAVE_ELEMENTARY_COCOA)
39# define CURSOR(_name, _id, _cid) {_name, -1, _cid} 41# define CURSOR(_name, _id, _cid) {_name, -1, _cid}
40# else 42#elif defined(HAVE_ELEMENTARY_WIN32)
43# define CURSOR(_name, _id, _cid) {_name, ECORE_WIN32_CURSOR_X11_SHAPE_##_xid, -1 }
44#else
41# define CURSOR(_name, _id, _cid) { _name } 45# define CURSOR(_name, _id, _cid) { _name }
42# endif
43#endif 46#endif
44 47
45/* Please keep order in sync with Ecore_X_Cursor.h values! */ 48/* Please keep order in sync with Ecore_X_Cursor.h values! */
46struct _Cursor_Id _cursors[] = 49struct _Cursor_Id _cursors[] =
47{ 50{
48 CURSOR(ELM_CURSOR_X , ECORE_X_CURSOR_X , ECORE_COCOA_CURSOR_CROSSHAIR), 51 CURSOR(ELM_CURSOR_X , X , ECORE_COCOA_CURSOR_CROSSHAIR),
49 CURSOR(ELM_CURSOR_ARROW , ECORE_X_CURSOR_ARROW , ECORE_COCOA_CURSOR_ARROW), 52 CURSOR(ELM_CURSOR_ARROW , ARROW , ECORE_COCOA_CURSOR_ARROW),
50 CURSOR(ELM_CURSOR_BASED_ARROW_DOWN , ECORE_X_CURSOR_BASED_ARROW_DOWN , ECORE_COCOA_CURSOR_DEFAULT), 53 CURSOR(ELM_CURSOR_BASED_ARROW_DOWN , BASED_ARROW_DOWN , ECORE_COCOA_CURSOR_DEFAULT),
51 CURSOR(ELM_CURSOR_BASED_ARROW_UP , ECORE_X_CURSOR_UP , ECORE_COCOA_CURSOR_DEFAULT), 54 CURSOR(ELM_CURSOR_BASED_ARROW_UP , UP , ECORE_COCOA_CURSOR_DEFAULT),
52 CURSOR(ELM_CURSOR_BOAT , ECORE_X_CURSOR_BOAT , ECORE_COCOA_CURSOR_DEFAULT), 55 CURSOR(ELM_CURSOR_BOAT , BOAT , ECORE_COCOA_CURSOR_DEFAULT),
53 CURSOR(ELM_CURSOR_BOGOSITY , ECORE_X_CURSOR_BOGOSITY , ECORE_COCOA_CURSOR_DEFAULT), 56 CURSOR(ELM_CURSOR_BOGOSITY , BOGOSITY , ECORE_COCOA_CURSOR_DEFAULT),
54 CURSOR(ELM_CURSOR_BOTTOM_LEFT_CORNER , ECORE_X_CURSOR_BOTTOM_LEFT_CORNER , ECORE_COCOA_CURSOR_DEFAULT), 57 CURSOR(ELM_CURSOR_BOTTOM_LEFT_CORNER , BOTTOM_LEFT_CORNER , ECORE_COCOA_CURSOR_DEFAULT),
55 CURSOR(ELM_CURSOR_BOTTOM_RIGHT_CORNER, ECORE_X_CURSOR_BOTTOM_RIGHT_CORNER, ECORE_COCOA_CURSOR_DEFAULT), 58 CURSOR(ELM_CURSOR_BOTTOM_RIGHT_CORNER, BOTTOM_RIGHT_CORNER, ECORE_COCOA_CURSOR_DEFAULT),
56 CURSOR(ELM_CURSOR_BOTTOM_SIDE , ECORE_X_CURSOR_BOTTOM_SIDE , ECORE_COCOA_CURSOR_RESIZE_DOWN), 59 CURSOR(ELM_CURSOR_BOTTOM_SIDE , BOTTOM_SIDE , ECORE_COCOA_CURSOR_RESIZE_DOWN),
57 CURSOR(ELM_CURSOR_BOTTOM_TEE , ECORE_X_CURSOR_BOTTOM_TEE , ECORE_COCOA_CURSOR_RESIZE_DOWN), 60 CURSOR(ELM_CURSOR_BOTTOM_TEE , BOTTOM_TEE , ECORE_COCOA_CURSOR_RESIZE_DOWN),
58 CURSOR(ELM_CURSOR_BOX_SPIRAL , ECORE_X_CURSOR_BOX_SPIRAL , ECORE_COCOA_CURSOR_DEFAULT), 61 CURSOR(ELM_CURSOR_BOX_SPIRAL , BOX_SPIRAL , ECORE_COCOA_CURSOR_DEFAULT),
59 CURSOR(ELM_CURSOR_CENTER_PTR , ECORE_X_CURSOR_CENTER_PTR , ECORE_COCOA_CURSOR_DEFAULT), 62 CURSOR(ELM_CURSOR_CENTER_PTR , CENTER_PTR , ECORE_COCOA_CURSOR_DEFAULT),
60 CURSOR(ELM_CURSOR_CIRCLE , ECORE_X_CURSOR_CIRCLE , ECORE_COCOA_CURSOR_DEFAULT), 63 CURSOR(ELM_CURSOR_CIRCLE , CIRCLE , ECORE_COCOA_CURSOR_DEFAULT),
61 CURSOR(ELM_CURSOR_CLOCK , ECORE_X_CURSOR_CLOCK , ECORE_COCOA_CURSOR_DEFAULT), 64 CURSOR(ELM_CURSOR_CLOCK , CLOCK , ECORE_COCOA_CURSOR_DEFAULT),
62 CURSOR(ELM_CURSOR_COFFEE_MUG , ECORE_X_CURSOR_COFFEE_MUG , ECORE_COCOA_CURSOR_DEFAULT), 65 CURSOR(ELM_CURSOR_COFFEE_MUG , COFFEE_MUG , ECORE_COCOA_CURSOR_DEFAULT),
63 CURSOR(ELM_CURSOR_CROSS , ECORE_X_CURSOR_CROSS , ECORE_COCOA_CURSOR_CROSSHAIR), 66 CURSOR(ELM_CURSOR_CROSS , CROSS , ECORE_COCOA_CURSOR_CROSSHAIR),
64 CURSOR(ELM_CURSOR_CROSS_REVERSE , ECORE_X_CURSOR_CROSS_REVERSE , ECORE_COCOA_CURSOR_CROSSHAIR), 67 CURSOR(ELM_CURSOR_CROSS_REVERSE , CROSS_REVERSE , ECORE_COCOA_CURSOR_CROSSHAIR),
65 CURSOR(ELM_CURSOR_CROSSHAIR , ECORE_X_CURSOR_CROSSHAIR , ECORE_COCOA_CURSOR_CROSSHAIR), 68 CURSOR(ELM_CURSOR_CROSSHAIR , CROSSHAIR , ECORE_COCOA_CURSOR_CROSSHAIR),
66 CURSOR(ELM_CURSOR_DIAMOND_CROSS , ECORE_X_CURSOR_DIAMOND_CROSS , ECORE_COCOA_CURSOR_DEFAULT), 69 CURSOR(ELM_CURSOR_DIAMOND_CROSS , DIAMOND_CROSS , ECORE_COCOA_CURSOR_DEFAULT),
67 CURSOR(ELM_CURSOR_DOT , ECORE_X_CURSOR_DOT , ECORE_COCOA_CURSOR_DEFAULT), 70 CURSOR(ELM_CURSOR_DOT , DOT , ECORE_COCOA_CURSOR_DEFAULT),
68 CURSOR(ELM_CURSOR_DOT_BOX_MASK , ECORE_X_CURSOR_DOT_BOX_MASK , ECORE_COCOA_CURSOR_DEFAULT), 71 CURSOR(ELM_CURSOR_DOT_BOX_MASK , DOT_BOX_MASK , ECORE_COCOA_CURSOR_DEFAULT),
69 CURSOR(ELM_CURSOR_DOUBLE_ARROW , ECORE_X_CURSOR_DOUBLE_ARROW , ECORE_COCOA_CURSOR_RESIZE_UP_DOWN), 72 CURSOR(ELM_CURSOR_DOUBLE_ARROW , DOUBLE_ARROW , ECORE_COCOA_CURSOR_RESIZE_UP_DOWN),
70 CURSOR(ELM_CURSOR_DRAFT_LARGE , ECORE_X_CURSOR_DRAFT_LARGE , ECORE_COCOA_CURSOR_DEFAULT), 73 CURSOR(ELM_CURSOR_DRAFT_LARGE , DRAFT_LARGE , ECORE_COCOA_CURSOR_DEFAULT),
71 CURSOR(ELM_CURSOR_DRAFT_SMALL , ECORE_X_CURSOR_DRAFT_SMALL , ECORE_COCOA_CURSOR_DEFAULT), 74 CURSOR(ELM_CURSOR_DRAFT_SMALL , DRAFT_SMALL , ECORE_COCOA_CURSOR_DEFAULT),
72 CURSOR(ELM_CURSOR_DRAPED_BOX , ECORE_X_CURSOR_DRAPED_BOX , ECORE_COCOA_CURSOR_DEFAULT), 75 CURSOR(ELM_CURSOR_DRAPED_BOX , DRAPED_BOX , ECORE_COCOA_CURSOR_DEFAULT),
73 CURSOR(ELM_CURSOR_EXCHANGE , ECORE_X_CURSOR_EXCHANGE , ECORE_COCOA_CURSOR_DEFAULT), 76 CURSOR(ELM_CURSOR_EXCHANGE , EXCHANGE , ECORE_COCOA_CURSOR_DEFAULT),
74 CURSOR(ELM_CURSOR_FLEUR , ECORE_X_CURSOR_FLEUR , ECORE_COCOA_CURSOR_DEFAULT), 77 CURSOR(ELM_CURSOR_FLEUR , FLEUR , ECORE_COCOA_CURSOR_DEFAULT),
75 CURSOR(ELM_CURSOR_GOBBLER , ECORE_X_CURSOR_GOBBLER , ECORE_COCOA_CURSOR_DEFAULT), 78 CURSOR(ELM_CURSOR_GOBBLER , GOBBLER , ECORE_COCOA_CURSOR_DEFAULT),
76 CURSOR(ELM_CURSOR_GUMBY , ECORE_X_CURSOR_GUMBY , ECORE_COCOA_CURSOR_DEFAULT), 79 CURSOR(ELM_CURSOR_GUMBY , GUMBY , ECORE_COCOA_CURSOR_DEFAULT),
77 CURSOR(ELM_CURSOR_HAND1 , ECORE_X_CURSOR_HAND1 , ECORE_COCOA_CURSOR_POINTING_HAND), 80 CURSOR(ELM_CURSOR_HAND1 , HAND1 , ECORE_COCOA_CURSOR_POINTING_HAND),
78 CURSOR(ELM_CURSOR_HAND2 , ECORE_X_CURSOR_HAND2 , ECORE_COCOA_CURSOR_POINTING_HAND), 81 CURSOR(ELM_CURSOR_HAND2 , HAND2 , ECORE_COCOA_CURSOR_POINTING_HAND),
79 CURSOR(ELM_CURSOR_HEART , ECORE_X_CURSOR_HEART , ECORE_COCOA_CURSOR_DEFAULT), 82 CURSOR(ELM_CURSOR_HEART , HEART , ECORE_COCOA_CURSOR_DEFAULT),
80 CURSOR(ELM_CURSOR_ICON , ECORE_X_CURSOR_ICON , ECORE_COCOA_CURSOR_DEFAULT), 83 CURSOR(ELM_CURSOR_ICON , ICON , ECORE_COCOA_CURSOR_DEFAULT),
81 CURSOR(ELM_CURSOR_IRON_CROSS , ECORE_X_CURSOR_IRON_CROSS , ECORE_COCOA_CURSOR_DEFAULT), 84 CURSOR(ELM_CURSOR_IRON_CROSS , IRON_CROSS , ECORE_COCOA_CURSOR_DEFAULT),
82 CURSOR(ELM_CURSOR_LEFT_PTR , ECORE_X_CURSOR_LEFT_PTR , ECORE_COCOA_CURSOR_ARROW), 85 CURSOR(ELM_CURSOR_LEFT_PTR , LEFT_PTR , ECORE_COCOA_CURSOR_ARROW),
83 CURSOR(ELM_CURSOR_LEFT_SIDE , ECORE_X_CURSOR_LEFT_SIDE , ECORE_COCOA_CURSOR_RESIZE_LEFT), 86 CURSOR(ELM_CURSOR_LEFT_SIDE , LEFT_SIDE , ECORE_COCOA_CURSOR_RESIZE_LEFT),
84 CURSOR(ELM_CURSOR_LEFT_TEE , ECORE_X_CURSOR_LEFT_TEE , ECORE_COCOA_CURSOR_RESIZE_LEFT), 87 CURSOR(ELM_CURSOR_LEFT_TEE , LEFT_TEE , ECORE_COCOA_CURSOR_RESIZE_LEFT),
85 CURSOR(ELM_CURSOR_LEFTBUTTON , ECORE_X_CURSOR_LEFTBUTTON , ECORE_COCOA_CURSOR_DEFAULT), 88 CURSOR(ELM_CURSOR_LEFTBUTTON , LEFTBUTTON , ECORE_COCOA_CURSOR_DEFAULT),
86 CURSOR(ELM_CURSOR_LL_ANGLE , ECORE_X_CURSOR_LL_ANGLE , ECORE_COCOA_CURSOR_DEFAULT), 89 CURSOR(ELM_CURSOR_LL_ANGLE , LL_ANGLE , ECORE_COCOA_CURSOR_DEFAULT),
87 CURSOR(ELM_CURSOR_LR_ANGLE , ECORE_X_CURSOR_LR_ANGLE , ECORE_COCOA_CURSOR_DEFAULT), 90 CURSOR(ELM_CURSOR_LR_ANGLE , LR_ANGLE , ECORE_COCOA_CURSOR_DEFAULT),
88 CURSOR(ELM_CURSOR_MAN , ECORE_X_CURSOR_MAN , ECORE_COCOA_CURSOR_DEFAULT), 91 CURSOR(ELM_CURSOR_MAN , MAN , ECORE_COCOA_CURSOR_DEFAULT),
89 CURSOR(ELM_CURSOR_MIDDLEBUTTON , ECORE_X_CURSOR_MIDDLEBUTTON , ECORE_COCOA_CURSOR_DEFAULT), 92 CURSOR(ELM_CURSOR_MIDDLEBUTTON , MIDDLEBUTTON , ECORE_COCOA_CURSOR_DEFAULT),
90 CURSOR(ELM_CURSOR_MOUSE , ECORE_X_CURSOR_MOUSE , ECORE_COCOA_CURSOR_DEFAULT), 93 CURSOR(ELM_CURSOR_MOUSE , MOUSE , ECORE_COCOA_CURSOR_DEFAULT),
91 CURSOR(ELM_CURSOR_PENCIL , ECORE_X_CURSOR_PENCIL , ECORE_COCOA_CURSOR_DEFAULT), 94 CURSOR(ELM_CURSOR_PENCIL , PENCIL , ECORE_COCOA_CURSOR_DEFAULT),
92 CURSOR(ELM_CURSOR_PIRATE , ECORE_X_CURSOR_PIRATE , ECORE_COCOA_CURSOR_DEFAULT), 95 CURSOR(ELM_CURSOR_PIRATE , PIRATE , ECORE_COCOA_CURSOR_DEFAULT),
93 CURSOR(ELM_CURSOR_PLUS , ECORE_X_CURSOR_PLUS , ECORE_COCOA_CURSOR_CROSSHAIR), 96 CURSOR(ELM_CURSOR_PLUS , PLUS , ECORE_COCOA_CURSOR_CROSSHAIR),
94 CURSOR(ELM_CURSOR_QUESTION_ARROW , ECORE_X_CURSOR_QUESTION_ARROW , ECORE_COCOA_CURSOR_DEFAULT), 97 CURSOR(ELM_CURSOR_QUESTION_ARROW , QUESTION_ARROW , ECORE_COCOA_CURSOR_DEFAULT),
95 CURSOR(ELM_CURSOR_RIGHT_PTR , ECORE_X_CURSOR_RIGHT_PTR , ECORE_COCOA_CURSOR_DEFAULT), 98 CURSOR(ELM_CURSOR_RIGHT_PTR , RIGHT_PTR , ECORE_COCOA_CURSOR_DEFAULT),
96 CURSOR(ELM_CURSOR_RIGHT_SIDE , ECORE_X_CURSOR_RIGHT_SIDE , ECORE_COCOA_CURSOR_RESIZE_RIGHT), 99 CURSOR(ELM_CURSOR_RIGHT_SIDE , RIGHT_SIDE , ECORE_COCOA_CURSOR_RESIZE_RIGHT),
97 CURSOR(ELM_CURSOR_RIGHT_TEE , ECORE_X_CURSOR_RIGHT_TEE , ECORE_COCOA_CURSOR_RESIZE_RIGHT), 100 CURSOR(ELM_CURSOR_RIGHT_TEE , RIGHT_TEE , ECORE_COCOA_CURSOR_RESIZE_RIGHT),
98 CURSOR(ELM_CURSOR_RIGHTBUTTON , ECORE_X_CURSOR_RIGHTBUTTON , ECORE_COCOA_CURSOR_DEFAULT), 101 CURSOR(ELM_CURSOR_RIGHTBUTTON , RIGHTBUTTON , ECORE_COCOA_CURSOR_DEFAULT),
99 CURSOR(ELM_CURSOR_RTL_LOGO , ECORE_X_CURSOR_RTL_LOGO , ECORE_COCOA_CURSOR_DEFAULT), 102 CURSOR(ELM_CURSOR_RTL_LOGO , RTL_LOGO , ECORE_COCOA_CURSOR_DEFAULT),
100 CURSOR(ELM_CURSOR_SAILBOAT , ECORE_X_CURSOR_SAILBOAT , ECORE_COCOA_CURSOR_DEFAULT), 103 CURSOR(ELM_CURSOR_SAILBOAT , SAILBOAT , ECORE_COCOA_CURSOR_DEFAULT),
101 CURSOR(ELM_CURSOR_SB_DOWN_ARROW , ECORE_X_CURSOR_SB_DOWN_ARROW , ECORE_COCOA_CURSOR_RESIZE_DOWN), 104 CURSOR(ELM_CURSOR_SB_DOWN_ARROW , SB_DOWN_ARROW , ECORE_COCOA_CURSOR_RESIZE_DOWN),
102 CURSOR(ELM_CURSOR_SB_H_DOUBLE_ARROW , ECORE_X_CURSOR_SB_H_DOUBLE_ARROW , ECORE_COCOA_CURSOR_RESIZE_LEFT_RIGHT), 105 CURSOR(ELM_CURSOR_SB_H_DOUBLE_ARROW , SB_H_DOUBLE_ARROW , ECORE_COCOA_CURSOR_RESIZE_LEFT_RIGHT),
103 CURSOR(ELM_CURSOR_SB_LEFT_ARROW , ECORE_X_CURSOR_SB_LEFT_ARROW , ECORE_COCOA_CURSOR_RESIZE_LEFT), 106 CURSOR(ELM_CURSOR_SB_LEFT_ARROW , SB_LEFT_ARROW , ECORE_COCOA_CURSOR_RESIZE_LEFT),
104 CURSOR(ELM_CURSOR_SB_RIGHT_ARROW , ECORE_X_CURSOR_SB_RIGHT_ARROW , ECORE_COCOA_CURSOR_RESIZE_RIGHT), 107 CURSOR(ELM_CURSOR_SB_RIGHT_ARROW , SB_RIGHT_ARROW , ECORE_COCOA_CURSOR_RESIZE_RIGHT),
105 CURSOR(ELM_CURSOR_SB_UP_ARROW , ECORE_X_CURSOR_SB_UP_ARROW , ECORE_COCOA_CURSOR_RESIZE_UP), 108 CURSOR(ELM_CURSOR_SB_UP_ARROW , SB_UP_ARROW , ECORE_COCOA_CURSOR_RESIZE_UP),
106 CURSOR(ELM_CURSOR_SB_V_DOUBLE_ARROW , ECORE_X_CURSOR_SB_V_DOUBLE_ARROW , ECORE_COCOA_CURSOR_RESIZE_UP_DOWN), 109 CURSOR(ELM_CURSOR_SB_V_DOUBLE_ARROW , SB_V_DOUBLE_ARROW , ECORE_COCOA_CURSOR_RESIZE_UP_DOWN),
107 CURSOR(ELM_CURSOR_SHUTTLE , ECORE_X_CURSOR_SHUTTLE , ECORE_COCOA_CURSOR_DEFAULT), 110 CURSOR(ELM_CURSOR_SHUTTLE , SHUTTLE , ECORE_COCOA_CURSOR_DEFAULT),
108 CURSOR(ELM_CURSOR_SIZING , ECORE_X_CURSOR_SIZING , ECORE_COCOA_CURSOR_DEFAULT), 111 CURSOR(ELM_CURSOR_SIZING , SIZING , ECORE_COCOA_CURSOR_DEFAULT),
109 CURSOR(ELM_CURSOR_SPIDER , ECORE_X_CURSOR_SPIDER , ECORE_COCOA_CURSOR_DEFAULT), 112 CURSOR(ELM_CURSOR_SPIDER , SPIDER , ECORE_COCOA_CURSOR_DEFAULT),
110 CURSOR(ELM_CURSOR_SPRAYCAN , ECORE_X_CURSOR_SPRAYCAN , ECORE_COCOA_CURSOR_DEFAULT), 113 CURSOR(ELM_CURSOR_SPRAYCAN , SPRAYCAN , ECORE_COCOA_CURSOR_DEFAULT),
111 CURSOR(ELM_CURSOR_STAR , ECORE_X_CURSOR_STAR , ECORE_COCOA_CURSOR_DEFAULT), 114 CURSOR(ELM_CURSOR_STAR , STAR , ECORE_COCOA_CURSOR_DEFAULT),
112 CURSOR(ELM_CURSOR_TARGET , ECORE_X_CURSOR_TARGET , ECORE_COCOA_CURSOR_DEFAULT), 115 CURSOR(ELM_CURSOR_TARGET , TARGET , ECORE_COCOA_CURSOR_DEFAULT),
113 CURSOR(ELM_CURSOR_TCROSS , ECORE_X_CURSOR_TCROSS , ECORE_COCOA_CURSOR_CROSSHAIR), 116 CURSOR(ELM_CURSOR_TCROSS , TCROSS , ECORE_COCOA_CURSOR_CROSSHAIR),
114 CURSOR(ELM_CURSOR_TOP_LEFT_ARROW , ECORE_X_CURSOR_TOP_LEFT_ARROW , ECORE_COCOA_CURSOR_DEFAULT), 117 CURSOR(ELM_CURSOR_TOP_LEFT_ARROW , TOP_LEFT_ARROW , ECORE_COCOA_CURSOR_DEFAULT),
115 CURSOR(ELM_CURSOR_TOP_LEFT_CORNER , ECORE_X_CURSOR_TOP_LEFT_CORNER , ECORE_COCOA_CURSOR_DEFAULT), 118 CURSOR(ELM_CURSOR_TOP_LEFT_CORNER , TOP_LEFT_CORNER , ECORE_COCOA_CURSOR_DEFAULT),
116 CURSOR(ELM_CURSOR_TOP_RIGHT_CORNER , ECORE_X_CURSOR_TOP_RIGHT_CORNER , ECORE_COCOA_CURSOR_DEFAULT), 119 CURSOR(ELM_CURSOR_TOP_RIGHT_CORNER , TOP_RIGHT_CORNER , ECORE_COCOA_CURSOR_DEFAULT),
117 CURSOR(ELM_CURSOR_TOP_SIDE , ECORE_X_CURSOR_TOP_SIDE , ECORE_COCOA_CURSOR_DEFAULT), 120 CURSOR(ELM_CURSOR_TOP_SIDE , TOP_SIDE , ECORE_COCOA_CURSOR_DEFAULT),
118 CURSOR(ELM_CURSOR_TOP_TEE , ECORE_X_CURSOR_TOP_TEE , ECORE_COCOA_CURSOR_DEFAULT), 121 CURSOR(ELM_CURSOR_TOP_TEE , TOP_TEE , ECORE_COCOA_CURSOR_DEFAULT),
119 CURSOR(ELM_CURSOR_TREK , ECORE_X_CURSOR_TREK , ECORE_COCOA_CURSOR_DEFAULT), 122 CURSOR(ELM_CURSOR_TREK , TREK , ECORE_COCOA_CURSOR_DEFAULT),
120 CURSOR(ELM_CURSOR_UL_ANGLE , ECORE_X_CURSOR_UL_ANGLE , ECORE_COCOA_CURSOR_DEFAULT), 123 CURSOR(ELM_CURSOR_UL_ANGLE , UL_ANGLE , ECORE_COCOA_CURSOR_DEFAULT),
121 CURSOR(ELM_CURSOR_UMBRELLA , ECORE_X_CURSOR_UMBRELLA , ECORE_COCOA_CURSOR_DEFAULT), 124 CURSOR(ELM_CURSOR_UMBRELLA , UMBRELLA , ECORE_COCOA_CURSOR_DEFAULT),
122 CURSOR(ELM_CURSOR_UR_ANGLE , ECORE_X_CURSOR_UR_ANGLE , ECORE_COCOA_CURSOR_DEFAULT), 125 CURSOR(ELM_CURSOR_UR_ANGLE , UR_ANGLE , ECORE_COCOA_CURSOR_DEFAULT),
123 CURSOR(ELM_CURSOR_WATCH , ECORE_X_CURSOR_WATCH , ECORE_COCOA_CURSOR_DEFAULT), 126 CURSOR(ELM_CURSOR_WATCH , WATCH , ECORE_COCOA_CURSOR_DEFAULT),
124 CURSOR(ELM_CURSOR_XTERM , ECORE_X_CURSOR_XTERM , ECORE_COCOA_CURSOR_IBEAM) 127 CURSOR(ELM_CURSOR_XTERM , XTERM , ECORE_COCOA_CURSOR_IBEAM)
125}; 128};
126static const int _cursors_count = sizeof(_cursors)/sizeof(struct _Cursor_Id); 129static const int _cursors_count = sizeof(_cursors)/sizeof(struct _Cursor_Id);
127 130
@@ -163,6 +166,12 @@ struct _Elm_Cursor
163 Ecore_Wl2_Window *win; 166 Ecore_Wl2_Window *win;
164 } wl; 167 } wl;
165#endif 168#endif
169#ifdef HAVE_ELEMENTARY_WIN32
170 struct {
171 Ecore_Win32_Cursor *cursor;
172 Ecore_Win32_Window *win;
173 } win32;
174#endif
166 175
167#ifdef HAVE_ELEMENTARY_COCOA 176#ifdef HAVE_ELEMENTARY_COCOA
168 struct { 177 struct {
@@ -311,6 +320,10 @@ _elm_cursor_set(Elm_Cursor *cur)
311 ecore_cocoa_window_cursor_set(cur->cocoa.win, cur->cocoa.cursor); 320 ecore_cocoa_window_cursor_set(cur->cocoa.win, cur->cocoa.cursor);
312#endif 321#endif
313 322
323#ifdef HAVE_ELEMENTARY_WIN32
324 if (cur->win32.win)
325 ecore_win32_window_cursor_set(cur->win32.win, cur->win32.cursor);
326#endif
314 } 327 }
315 evas_event_thaw(cur->evas); 328 evas_event_thaw(cur->evas);
316} 329}
@@ -375,6 +388,10 @@ _elm_cursor_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_
375 ecore_cocoa_window_cursor_set(cur->cocoa.win, ECORE_COCOA_CURSOR_DEFAULT); 388 ecore_cocoa_window_cursor_set(cur->cocoa.win, ECORE_COCOA_CURSOR_DEFAULT);
376#endif 389#endif
377 390
391#ifdef HAVE_ELEMENTARY_WIN32
392 if (cur->win32.win)
393 ecore_win32_window_cursor_set(cur->win32.win, ecore_win32_cursor_shaped_new(ECORE_WIN32_CURSOR_SHAPE_ARROW));
394#endif
378 } 395 }
379 evas_event_thaw(cur->evas); 396 evas_event_thaw(cur->evas);
380} 397}
@@ -385,7 +402,7 @@ _elm_cursor_del(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj
385 elm_object_cursor_unset(obj); 402 elm_object_cursor_unset(obj);
386} 403}
387 404
388#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA) 405#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA) || defined(HAVE_ELEMENTARY_WIN32)
389static int 406static int
390_elm_cursor_strcmp(const void *data1, const void *data2) 407_elm_cursor_strcmp(const void *data1, const void *data2)
391{ 408{
@@ -435,10 +452,10 @@ _elm_cursor_cur_set(Elm_Cursor *cur)
435 if (cur->x.win) 452 if (cur->x.win)
436 { 453 {
437 struct _Cursor_Id *cur_id; 454 struct _Cursor_Id *cur_id;
438 455
439 cur_id = bsearch(&(cur->cursor_name), _cursors, _cursors_count, 456 cur_id = bsearch(&(cur->cursor_name), _cursors, _cursors_count,
440 sizeof(struct _Cursor_Id), _elm_cursor_strcmp); 457 sizeof(struct _Cursor_Id), _elm_cursor_strcmp);
441 458
442 if (!cur_id) 459 if (!cur_id)
443 { 460 {
444 INF("X cursor couldn't be found: %s. Using default.", 461 INF("X cursor couldn't be found: %s. Using default.",
@@ -472,6 +489,25 @@ _elm_cursor_cur_set(Elm_Cursor *cur)
472#ifdef HAVE_ELEMENTARY_WL2 489#ifdef HAVE_ELEMENTARY_WL2
473 cur->wl.win = elm_win_wl_window_get(top); 490 cur->wl.win = elm_win_wl_window_get(top);
474#endif 491#endif
492#ifdef HAVE_ELEMENTARY_WIN32
493 cur->win32.win = elm_win_win32_window_get(top);
494 if (cur->win32.win)
495 {
496 struct _Cursor_Id *cur_id;
497
498 cur_id = bsearch(&(cur->cursor_name), _cursors, _cursors_count,
499 sizeof(struct _Cursor_Id), _elm_cursor_strcmp);
500
501 if (!cur_id)
502 {
503 INF("Win32 X cursor couldn't be found: %s. Using default.",
504 cur->cursor_name);
505 cur->win32.cursor = ecore_win32_cursor_shaped_new(ECORE_WIN32_CURSOR_SHAPE_ARROW);
506 }
507 else
508 cur->win32.cursor = ecore_win32_cursor_x11_shaped_get(cur_id->id);
509 }
510#endif
475 } 511 }
476 } 512 }
477 513
@@ -600,6 +636,10 @@ elm_object_cursor_unset(Evas_Object *obj)
600 else if (cur->wl.win) 636 else if (cur->wl.win)
601 ecore_wl2_window_cursor_from_name_set(cur->wl.win, NULL); 637 ecore_wl2_window_cursor_from_name_set(cur->wl.win, NULL);
602#endif 638#endif
639#ifdef HAVE_ELEMENTARY_WIN32
640 else
641 ecore_win32_window_cursor_set(cur->win32.win, ecore_win32_cursor_shaped_new(ECORE_WIN32_CURSOR_SHAPE_ARROW));
642#endif
603 } 643 }
604 644
605 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOUSE_IN, 645 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOUSE_IN,