cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=3d7f5f6f6d537177b26cc60145c9c4abfe9e516b

commit 3d7f5f6f6d537177b26cc60145c9c4abfe9e516b
Author: Vincent Torri <vincent dot torri at gmail dot com>
Date:   Mon Oct 19 20:43:36 2015 +0200

    cursor: add cursor support on Windows.
    
    @feature
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/els_cursor.c | 214 ++++++++++++++++++++++++++++++---------------------
 1 file changed, 127 insertions(+), 87 deletions(-)

diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index 6aae337..6800554 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -15,6 +15,9 @@
 #ifdef HAVE_ELEMENTARY_COCOA
 # include <Ecore_Cocoa_Cursor.h>
 #endif
+#ifdef HAVE_ELEMENTARY_WIN32
+#include <Ecore_Win32.h>
+#endif
 
 #define _cursor_key "_elm_cursor"
 
@@ -22,7 +25,7 @@ struct _Cursor_Id
 {
    const char *name;
 
-#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA)
+#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA) || 
defined(HAVE_ELEMENTARY_WIN32)
    int id; /* For X */
    int cid; /* For Cocoa */
 #endif
@@ -30,98 +33,98 @@ struct _Cursor_Id
 
 #if defined(HAVE_ELEMENTARY_X)
 # if defined(HAVE_ELEMENTARY_COCOA)
-#  define CURSOR(_name, _id, _cid) {_name, _id, _cid}
+#  define CURSOR(_name, _id, _cid) {_name, ECORE_X_CURSOR_##_id, _cid}
 # else
-#  define CURSOR(_name, _id, _cid) { _name, _id, -1 }
+#  define CURSOR(_name, _id, _cid) { _name, ECORE_X_CURSOR_##_id, -1 }
 # endif
-#else
-# if defined(HAVE_ELEMENTARY_COCOA)
+#elif defined(HAVE_ELEMENTARY_COCOA)
 #  define CURSOR(_name, _id, _cid) {_name, -1, _cid}
-# else
+#elif defined(HAVE_ELEMENTARY_WIN32)
+#  define CURSOR(_name, _id, _cid) {_name, 
ECORE_WIN32_CURSOR_X11_SHAPE_##_xid, -1 }
+#else
 #  define CURSOR(_name, _id, _cid) { _name }
-# endif
 #endif
 
 /* Please keep order in sync with Ecore_X_Cursor.h values! */
 struct _Cursor_Id _cursors[] =
 {
-   CURSOR(ELM_CURSOR_X                  , ECORE_X_CURSOR_X                  , 
ECORE_COCOA_CURSOR_CROSSHAIR),
-   CURSOR(ELM_CURSOR_ARROW              , ECORE_X_CURSOR_ARROW              , 
ECORE_COCOA_CURSOR_ARROW),
-   CURSOR(ELM_CURSOR_BASED_ARROW_DOWN   , ECORE_X_CURSOR_BASED_ARROW_DOWN   , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_BASED_ARROW_UP     , ECORE_X_CURSOR_UP                 , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_BOAT               , ECORE_X_CURSOR_BOAT               , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_BOGOSITY           , ECORE_X_CURSOR_BOGOSITY           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_BOTTOM_LEFT_CORNER , ECORE_X_CURSOR_BOTTOM_LEFT_CORNER , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_BOTTOM_RIGHT_CORNER, ECORE_X_CURSOR_BOTTOM_RIGHT_CORNER, 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_BOTTOM_SIDE        , ECORE_X_CURSOR_BOTTOM_SIDE        , 
ECORE_COCOA_CURSOR_RESIZE_DOWN),
-   CURSOR(ELM_CURSOR_BOTTOM_TEE         , ECORE_X_CURSOR_BOTTOM_TEE         , 
ECORE_COCOA_CURSOR_RESIZE_DOWN),
-   CURSOR(ELM_CURSOR_BOX_SPIRAL         , ECORE_X_CURSOR_BOX_SPIRAL         , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_CENTER_PTR         , ECORE_X_CURSOR_CENTER_PTR         , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_CIRCLE             , ECORE_X_CURSOR_CIRCLE             , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_CLOCK              , ECORE_X_CURSOR_CLOCK              , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_COFFEE_MUG         , ECORE_X_CURSOR_COFFEE_MUG         , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_CROSS              , ECORE_X_CURSOR_CROSS              , 
ECORE_COCOA_CURSOR_CROSSHAIR),
-   CURSOR(ELM_CURSOR_CROSS_REVERSE      , ECORE_X_CURSOR_CROSS_REVERSE      , 
ECORE_COCOA_CURSOR_CROSSHAIR),
-   CURSOR(ELM_CURSOR_CROSSHAIR          , ECORE_X_CURSOR_CROSSHAIR          , 
ECORE_COCOA_CURSOR_CROSSHAIR),
-   CURSOR(ELM_CURSOR_DIAMOND_CROSS      , ECORE_X_CURSOR_DIAMOND_CROSS      , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_DOT                , ECORE_X_CURSOR_DOT                , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_DOT_BOX_MASK       , ECORE_X_CURSOR_DOT_BOX_MASK       , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_DOUBLE_ARROW       , ECORE_X_CURSOR_DOUBLE_ARROW       , 
ECORE_COCOA_CURSOR_RESIZE_UP_DOWN),
-   CURSOR(ELM_CURSOR_DRAFT_LARGE        , ECORE_X_CURSOR_DRAFT_LARGE        , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_DRAFT_SMALL        , ECORE_X_CURSOR_DRAFT_SMALL        , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_DRAPED_BOX         , ECORE_X_CURSOR_DRAPED_BOX         , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_EXCHANGE           , ECORE_X_CURSOR_EXCHANGE           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_FLEUR              , ECORE_X_CURSOR_FLEUR              , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_GOBBLER            , ECORE_X_CURSOR_GOBBLER            , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_GUMBY              , ECORE_X_CURSOR_GUMBY              , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_HAND1              , ECORE_X_CURSOR_HAND1              , 
ECORE_COCOA_CURSOR_POINTING_HAND),
-   CURSOR(ELM_CURSOR_HAND2              , ECORE_X_CURSOR_HAND2              , 
ECORE_COCOA_CURSOR_POINTING_HAND),
-   CURSOR(ELM_CURSOR_HEART              , ECORE_X_CURSOR_HEART              , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_ICON               , ECORE_X_CURSOR_ICON               , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_IRON_CROSS         , ECORE_X_CURSOR_IRON_CROSS         , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_LEFT_PTR           , ECORE_X_CURSOR_LEFT_PTR           , 
ECORE_COCOA_CURSOR_ARROW),
-   CURSOR(ELM_CURSOR_LEFT_SIDE          , ECORE_X_CURSOR_LEFT_SIDE          , 
ECORE_COCOA_CURSOR_RESIZE_LEFT),
-   CURSOR(ELM_CURSOR_LEFT_TEE           , ECORE_X_CURSOR_LEFT_TEE           , 
ECORE_COCOA_CURSOR_RESIZE_LEFT),
-   CURSOR(ELM_CURSOR_LEFTBUTTON         , ECORE_X_CURSOR_LEFTBUTTON         , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_LL_ANGLE           , ECORE_X_CURSOR_LL_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_LR_ANGLE           , ECORE_X_CURSOR_LR_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_MAN                , ECORE_X_CURSOR_MAN                , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_MIDDLEBUTTON       , ECORE_X_CURSOR_MIDDLEBUTTON       , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_MOUSE              , ECORE_X_CURSOR_MOUSE              , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_PENCIL             , ECORE_X_CURSOR_PENCIL             , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_PIRATE             , ECORE_X_CURSOR_PIRATE             , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_PLUS               , ECORE_X_CURSOR_PLUS               , 
ECORE_COCOA_CURSOR_CROSSHAIR),
-   CURSOR(ELM_CURSOR_QUESTION_ARROW     , ECORE_X_CURSOR_QUESTION_ARROW     , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_RIGHT_PTR          , ECORE_X_CURSOR_RIGHT_PTR          , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_RIGHT_SIDE         , ECORE_X_CURSOR_RIGHT_SIDE         , 
ECORE_COCOA_CURSOR_RESIZE_RIGHT),
-   CURSOR(ELM_CURSOR_RIGHT_TEE          , ECORE_X_CURSOR_RIGHT_TEE          , 
ECORE_COCOA_CURSOR_RESIZE_RIGHT),
-   CURSOR(ELM_CURSOR_RIGHTBUTTON        , ECORE_X_CURSOR_RIGHTBUTTON        , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_RTL_LOGO           , ECORE_X_CURSOR_RTL_LOGO           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_SAILBOAT           , ECORE_X_CURSOR_SAILBOAT           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_SB_DOWN_ARROW      , ECORE_X_CURSOR_SB_DOWN_ARROW      , 
ECORE_COCOA_CURSOR_RESIZE_DOWN),
-   CURSOR(ELM_CURSOR_SB_H_DOUBLE_ARROW  , ECORE_X_CURSOR_SB_H_DOUBLE_ARROW  , 
ECORE_COCOA_CURSOR_RESIZE_LEFT_RIGHT),
-   CURSOR(ELM_CURSOR_SB_LEFT_ARROW      , ECORE_X_CURSOR_SB_LEFT_ARROW      , 
ECORE_COCOA_CURSOR_RESIZE_LEFT),
-   CURSOR(ELM_CURSOR_SB_RIGHT_ARROW     , ECORE_X_CURSOR_SB_RIGHT_ARROW     , 
ECORE_COCOA_CURSOR_RESIZE_RIGHT),
-   CURSOR(ELM_CURSOR_SB_UP_ARROW        , ECORE_X_CURSOR_SB_UP_ARROW        , 
ECORE_COCOA_CURSOR_RESIZE_UP),
-   CURSOR(ELM_CURSOR_SB_V_DOUBLE_ARROW  , ECORE_X_CURSOR_SB_V_DOUBLE_ARROW  , 
ECORE_COCOA_CURSOR_RESIZE_UP_DOWN),
-   CURSOR(ELM_CURSOR_SHUTTLE            , ECORE_X_CURSOR_SHUTTLE            , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_SIZING             , ECORE_X_CURSOR_SIZING             , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_SPIDER             , ECORE_X_CURSOR_SPIDER             , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_SPRAYCAN           , ECORE_X_CURSOR_SPRAYCAN           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_STAR               , ECORE_X_CURSOR_STAR               , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TARGET             , ECORE_X_CURSOR_TARGET             , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TCROSS             , ECORE_X_CURSOR_TCROSS             , 
ECORE_COCOA_CURSOR_CROSSHAIR),
-   CURSOR(ELM_CURSOR_TOP_LEFT_ARROW     , ECORE_X_CURSOR_TOP_LEFT_ARROW     , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TOP_LEFT_CORNER    , ECORE_X_CURSOR_TOP_LEFT_CORNER    , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TOP_RIGHT_CORNER   , ECORE_X_CURSOR_TOP_RIGHT_CORNER   , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TOP_SIDE           , ECORE_X_CURSOR_TOP_SIDE           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TOP_TEE            , ECORE_X_CURSOR_TOP_TEE            , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TREK               , ECORE_X_CURSOR_TREK               , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_UL_ANGLE           , ECORE_X_CURSOR_UL_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_UMBRELLA           , ECORE_X_CURSOR_UMBRELLA           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_UR_ANGLE           , ECORE_X_CURSOR_UR_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_WATCH              , ECORE_X_CURSOR_WATCH              , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_XTERM              , ECORE_X_CURSOR_XTERM              , 
ECORE_COCOA_CURSOR_IBEAM)
+   CURSOR(ELM_CURSOR_X                  , X                  , 
ECORE_COCOA_CURSOR_CROSSHAIR),
+   CURSOR(ELM_CURSOR_ARROW              , ARROW              , 
ECORE_COCOA_CURSOR_ARROW),
+   CURSOR(ELM_CURSOR_BASED_ARROW_DOWN   , BASED_ARROW_DOWN   , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_BASED_ARROW_UP     , UP                 , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_BOAT               , BOAT               , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_BOGOSITY           , BOGOSITY           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_BOTTOM_LEFT_CORNER , BOTTOM_LEFT_CORNER , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_BOTTOM_RIGHT_CORNER, BOTTOM_RIGHT_CORNER, 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_BOTTOM_SIDE        , BOTTOM_SIDE        , 
ECORE_COCOA_CURSOR_RESIZE_DOWN),
+   CURSOR(ELM_CURSOR_BOTTOM_TEE         , BOTTOM_TEE         , 
ECORE_COCOA_CURSOR_RESIZE_DOWN),
+   CURSOR(ELM_CURSOR_BOX_SPIRAL         , BOX_SPIRAL         , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_CENTER_PTR         , CENTER_PTR         , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_CIRCLE             , CIRCLE             , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_CLOCK              , CLOCK              , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_COFFEE_MUG         , COFFEE_MUG         , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_CROSS              , CROSS              , 
ECORE_COCOA_CURSOR_CROSSHAIR),
+   CURSOR(ELM_CURSOR_CROSS_REVERSE      , CROSS_REVERSE      , 
ECORE_COCOA_CURSOR_CROSSHAIR),
+   CURSOR(ELM_CURSOR_CROSSHAIR          , CROSSHAIR          , 
ECORE_COCOA_CURSOR_CROSSHAIR),
+   CURSOR(ELM_CURSOR_DIAMOND_CROSS      , DIAMOND_CROSS      , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_DOT                , DOT                , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_DOT_BOX_MASK       , DOT_BOX_MASK       , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_DOUBLE_ARROW       , DOUBLE_ARROW       , 
ECORE_COCOA_CURSOR_RESIZE_UP_DOWN),
+   CURSOR(ELM_CURSOR_DRAFT_LARGE        , DRAFT_LARGE        , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_DRAFT_SMALL        , DRAFT_SMALL        , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_DRAPED_BOX         , DRAPED_BOX         , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_EXCHANGE           , EXCHANGE           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_FLEUR              , FLEUR              , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_GOBBLER            , GOBBLER            , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_GUMBY              , GUMBY              , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_HAND1              , HAND1              , 
ECORE_COCOA_CURSOR_POINTING_HAND),
+   CURSOR(ELM_CURSOR_HAND2              , HAND2              , 
ECORE_COCOA_CURSOR_POINTING_HAND),
+   CURSOR(ELM_CURSOR_HEART              , HEART              , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_ICON               , ICON               , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_IRON_CROSS         , IRON_CROSS         , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_LEFT_PTR           , LEFT_PTR           , 
ECORE_COCOA_CURSOR_ARROW),
+   CURSOR(ELM_CURSOR_LEFT_SIDE          , LEFT_SIDE          , 
ECORE_COCOA_CURSOR_RESIZE_LEFT),
+   CURSOR(ELM_CURSOR_LEFT_TEE           , LEFT_TEE           , 
ECORE_COCOA_CURSOR_RESIZE_LEFT),
+   CURSOR(ELM_CURSOR_LEFTBUTTON         , LEFTBUTTON         , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_LL_ANGLE           , LL_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_LR_ANGLE           , LR_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_MAN                , MAN                , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_MIDDLEBUTTON       , MIDDLEBUTTON       , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_MOUSE              , MOUSE              , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_PENCIL             , PENCIL             , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_PIRATE             , PIRATE             , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_PLUS               , PLUS               , 
ECORE_COCOA_CURSOR_CROSSHAIR),
+   CURSOR(ELM_CURSOR_QUESTION_ARROW     , QUESTION_ARROW     , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_RIGHT_PTR          , RIGHT_PTR          , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_RIGHT_SIDE         , RIGHT_SIDE         , 
ECORE_COCOA_CURSOR_RESIZE_RIGHT),
+   CURSOR(ELM_CURSOR_RIGHT_TEE          , RIGHT_TEE          , 
ECORE_COCOA_CURSOR_RESIZE_RIGHT),
+   CURSOR(ELM_CURSOR_RIGHTBUTTON        , RIGHTBUTTON        , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_RTL_LOGO           , RTL_LOGO           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_SAILBOAT           , SAILBOAT           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_SB_DOWN_ARROW      , SB_DOWN_ARROW      , 
ECORE_COCOA_CURSOR_RESIZE_DOWN),
+   CURSOR(ELM_CURSOR_SB_H_DOUBLE_ARROW  , SB_H_DOUBLE_ARROW  , 
ECORE_COCOA_CURSOR_RESIZE_LEFT_RIGHT),
+   CURSOR(ELM_CURSOR_SB_LEFT_ARROW      , SB_LEFT_ARROW      , 
ECORE_COCOA_CURSOR_RESIZE_LEFT),
+   CURSOR(ELM_CURSOR_SB_RIGHT_ARROW     , SB_RIGHT_ARROW     , 
ECORE_COCOA_CURSOR_RESIZE_RIGHT),
+   CURSOR(ELM_CURSOR_SB_UP_ARROW        , SB_UP_ARROW        , 
ECORE_COCOA_CURSOR_RESIZE_UP),
+   CURSOR(ELM_CURSOR_SB_V_DOUBLE_ARROW  , SB_V_DOUBLE_ARROW  , 
ECORE_COCOA_CURSOR_RESIZE_UP_DOWN),
+   CURSOR(ELM_CURSOR_SHUTTLE            , SHUTTLE            , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_SIZING             , SIZING             , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_SPIDER             , SPIDER             , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_SPRAYCAN           , SPRAYCAN           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_STAR               , STAR               , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TARGET             , TARGET             , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TCROSS             , TCROSS             , 
ECORE_COCOA_CURSOR_CROSSHAIR),
+   CURSOR(ELM_CURSOR_TOP_LEFT_ARROW     , TOP_LEFT_ARROW     , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TOP_LEFT_CORNER    , TOP_LEFT_CORNER    , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TOP_RIGHT_CORNER   , TOP_RIGHT_CORNER   , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TOP_SIDE           , TOP_SIDE           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TOP_TEE            , TOP_TEE            , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TREK               , TREK               , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_UL_ANGLE           , UL_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_UMBRELLA           , UMBRELLA           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_UR_ANGLE           , UR_ANGLE           , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_WATCH              , WATCH              , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_XTERM              , XTERM              , 
ECORE_COCOA_CURSOR_IBEAM)
 };
 static const int _cursors_count = sizeof(_cursors)/sizeof(struct _Cursor_Id);
 
@@ -163,6 +166,12 @@ struct _Elm_Cursor
      Ecore_Wl2_Window *win;
    } wl;
 #endif
+#ifdef HAVE_ELEMENTARY_WIN32
+   struct {
+     Ecore_Win32_Cursor *cursor;
+     Ecore_Win32_Window *win;
+   } win32;
+#endif
 
 #ifdef HAVE_ELEMENTARY_COCOA
    struct {
@@ -311,6 +320,10 @@ _elm_cursor_set(Elm_Cursor *cur)
           ecore_cocoa_window_cursor_set(cur->cocoa.win, cur->cocoa.cursor);
 #endif
 
+#ifdef HAVE_ELEMENTARY_WIN32
+        if (cur->win32.win)
+          ecore_win32_window_cursor_set(cur->win32.win, cur->win32.cursor);
+#endif
      }
    evas_event_thaw(cur->evas);
 }
@@ -375,6 +388,10 @@ _elm_cursor_mouse_out(void *data, Evas *evas EINA_UNUSED, 
Evas_Object *obj EINA_
           ecore_cocoa_window_cursor_set(cur->cocoa.win, 
ECORE_COCOA_CURSOR_DEFAULT);
 #endif
 
+#ifdef HAVE_ELEMENTARY_WIN32
+        if (cur->win32.win)
+          ecore_win32_window_cursor_set(cur->win32.win, 
ecore_win32_cursor_shaped_new(ECORE_WIN32_CURSOR_SHAPE_ARROW));
+#endif
      }
    evas_event_thaw(cur->evas);
 }
@@ -385,7 +402,7 @@ _elm_cursor_del(void *data EINA_UNUSED, Evas *evas 
EINA_UNUSED, Evas_Object *obj
    elm_object_cursor_unset(obj);
 }
 
-#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA)
+#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_COCOA) || 
defined(HAVE_ELEMENTARY_WIN32)
 static int
 _elm_cursor_strcmp(const void *data1, const void *data2)
 {
@@ -435,10 +452,10 @@ _elm_cursor_cur_set(Elm_Cursor *cur)
              if (cur->x.win)
                {
                   struct _Cursor_Id *cur_id;
-                  
+
                   cur_id = bsearch(&(cur->cursor_name), _cursors, 
_cursors_count,
                                    sizeof(struct _Cursor_Id), 
_elm_cursor_strcmp);
-                  
+
                   if (!cur_id)
                     {
                        INF("X cursor couldn't be found: %s. Using default.",
@@ -472,6 +489,25 @@ _elm_cursor_cur_set(Elm_Cursor *cur)
 #ifdef HAVE_ELEMENTARY_WL2
              cur->wl.win = elm_win_wl_window_get(top);
 #endif
+#ifdef HAVE_ELEMENTARY_WIN32
+             cur->win32.win = elm_win_win32_window_get(top);
+             if (cur->win32.win)
+               {
+                  struct _Cursor_Id *cur_id;
+
+                  cur_id = bsearch(&(cur->cursor_name), _cursors, 
_cursors_count,
+                                   sizeof(struct _Cursor_Id), 
_elm_cursor_strcmp);
+
+                  if (!cur_id)
+                    {
+                       INF("Win32 X cursor couldn't be found: %s. Using 
default.",
+                           cur->cursor_name);
+                       cur->win32.cursor = 
ecore_win32_cursor_shaped_new(ECORE_WIN32_CURSOR_SHAPE_ARROW);
+                    }
+                  else
+                    cur->win32.cursor = 
ecore_win32_cursor_x11_shaped_get(cur_id->id);
+               }
+#endif
           }
      }
 
@@ -600,6 +636,10 @@ elm_object_cursor_unset(Evas_Object *obj)
         else if (cur->wl.win)
           ecore_wl2_window_cursor_from_name_set(cur->wl.win, NULL);
 #endif
+#ifdef HAVE_ELEMENTARY_WIN32
+        else
+          ecore_win32_window_cursor_set(cur->win32.win, 
ecore_win32_cursor_shaped_new(ECORE_WIN32_CURSOR_SHAPE_ARROW));
+#endif
      }
 
    evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOUSE_IN,

-- 


Reply via email to