struct {
int x, y;
} screen;
-
+ struct
+ {
+ Ecore_Evas *ee;
+ Evas *evas;
+ Evas_Object *obj, *hot_obj;
+ } pointer;
struct {
Evas_Object *top;
static void _elm_win_frame_cb_maximize(void *data, Evas_Object *obj __UNUSED__, const char *sig __UNUSED__, const char *source __UNUSED__);
static void _elm_win_frame_cb_close(void *data, Evas_Object *obj __UNUSED__, const char *sig __UNUSED__, const char *source __UNUSED__);
+static void _elm_win_pointer_add(Elm_Win *win, const char *style);
+
static const char SIG_DELETE_REQUEST[] = "delete,request";
static const char SIG_FOCUS_OUT[] = "focus,out";
static const char SIG_FOCUS_IN[] = "focus,in";
{
evas_object_hide(win->img_obj);
}
+ if (win->pointer.obj)
+ {
+ evas_object_hide(win->pointer.obj);
+ ecore_evas_hide(win->pointer.ee);
+ }
}
static void
{
evas_object_show(win->img_obj);
}
+ if (win->pointer.obj)
+ {
+ ecore_evas_show(win->pointer.ee);
+ evas_object_show(win->pointer.obj);
+ }
evas_object_show(obj);
}
else
win->resize_location = 0;
- /* FIXME: Change to more generic wayland resize function */
if (win->resize_location > 0)
ecore_evas_wayland_resize(win->ee, win->resize_location);
}
evas_object_del(win->win_obj);
}
+static void
+_elm_win_pointer_add(Elm_Win *win, const char *style)
+{
+ int mw, mh;
+
+ win->pointer.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 32, 32, 0);
+ ecore_evas_resize(win->pointer.ee, 32, 32);
+
+ win->pointer.evas = ecore_evas_get(win->ee);
+
+ win->pointer.obj = edje_object_add(win->pointer.evas);
+ _elm_theme_set(NULL, win->pointer.obj, "pointer", "base", style);
+ edje_object_size_min_calc(win->pointer.obj, &mw, &mh);
+ printf("ELM Win Pointer Size: %d %d\n", mw, mh);
+ evas_object_move(win->pointer.obj, 0, 0);
+ evas_object_resize(win->pointer.obj, 32, 32);
+ evas_object_show(win->pointer.obj);
+}
+
#ifdef ELM_DEBUG
static void
_debug_key_down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info)
win->evas = ecore_evas_get(win->ee);
_elm_win_frame_add(win, "default");
+ _elm_win_pointer_add(win, "default");
}
else if (ENGINE_COMPARE(ELM_WAYLAND_EGL))
{
win->evas = ecore_evas_get(win->ee);
_elm_win_frame_add(win, "default");
+ _elm_win_pointer_add(win, "default");
}
else if (!strncmp(_elm_config->engine, "shot:", 5))
{