hide mouse on mouse idle on fullscreen mode in rage

v-0.4.0
Carsten Haitzler 8 years ago
parent f35241a154
commit ee19bdb485
  1. 4
      TODO
  2. 2
      configure.ac
  3. 45
      src/bin/win.c
  4. 3
      src/bin/win.h

@ -1,5 +1,5 @@
* volume status display when changed (slider/image/percentage)
* emotion engine selection options
* emotion engine selection options (gui)
* timeline thumbnails on position slider
* right click control panel (ala terminology - need elm config ui code)
* about display/popup (from panel?)
@ -12,7 +12,5 @@
* loop all option
* show busy anim until opened cb or failure
* add button/control top-left next to audio to do fullscreen/normal toggle
* hide mouse on timeout in fullscreen move
* fullscreen mode should request suspend of screensaver (needs elm work)
* detect letterboxing and auto-crop

@ -16,7 +16,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_C___ATTRIBUTE__
efl_version="1.9.0"
efl_version="1.10.99"
requirements="\
elementary >= ${efl_version} \
edje >= ${efl_version} \

@ -14,6 +14,8 @@ _cb_fullscreen(void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED
{
Inf *inf = evas_object_data_get(obj, "inf");
elm_layout_signal_emit(inf->lay, "state,win,fullscreen", "rage");
elm_win_noblank_set(obj, EINA_TRUE);
evas_object_show(inf->event2);
}
static void
@ -21,6 +23,8 @@ _cb_unfullscreen(void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUS
{
Inf *inf = evas_object_data_get(obj, "inf");
elm_layout_signal_emit(inf->lay, "state,win,normal", "rage");
elm_win_noblank_set(obj, EINA_FALSE);
evas_object_hide(inf->event2);
}
static void
@ -28,10 +32,11 @@ _cb_win_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
{
Inf *inf = evas_object_data_get(obj, "inf");
const char *f;
if (inf->next_job) ecore_job_del(inf->next_job);
if (inf->show_timeout) ecore_timer_del(inf->show_timeout);
if (inf->drag_anim) ecore_animator_del(inf->drag_anim);
if (inf->mouse_idle_timeout) ecore_timer_del(inf->mouse_idle_timeout);
EINA_LIST_FREE(inf->file_list, f) eina_stringshare_del(f);
evas_object_data_del(obj, "inf");
free(inf);
@ -43,6 +48,25 @@ _cb_key_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
key_handle(data, event_info);
}
static Eina_Bool
_cb_mouse_idle(void *data)
{
Inf *inf = evas_object_data_get(data, "inf");
inf->mouse_idle_timeout = NULL;
if (elm_win_fullscreen_get(data)) evas_object_show(inf->event2);
return EINA_FALSE;
}
static void
_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Inf *inf = evas_object_data_get(data, "inf");
if (inf->mouse_idle_timeout) ecore_timer_del(inf->mouse_idle_timeout);
inf->mouse_idle_timeout = ecore_timer_add(5.0, _cb_mouse_idle, data);
evas_object_hide(inf->event2);
}
void
win_do_play(Evas_Object *win)
{
@ -273,11 +297,30 @@ win_add(void)
controls_init(win, o);
o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, o);
evas_object_color_set(o, 0, 0, 0, 0);
evas_object_repeat_events_set(o, EINA_TRUE);
evas_object_show(o);
inf->event = o;
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE,
_cb_mouse_move, win);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_IN,
_cb_mouse_move, win);
o = elm_button_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, o);
evas_object_color_set(o, 0, 0, 0, 0);
evas_object_repeat_events_set(o, EINA_TRUE);
elm_object_cursor_set(o, "blank");
elm_object_cursor_theme_search_enabled_set(o, EINA_TRUE);
inf->event2 = o;
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE,
_cb_mouse_move, win);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_OUT,
_cb_mouse_move, win);
dnd_init(win, o);
gesture_init(win, o);

@ -5,10 +5,11 @@ typedef struct _Inf Inf;
struct _Inf
{
Evas_Object *vid, *lay, *event, *glayer;
Evas_Object *vid, *lay, *event, *event2, *glayer;
Eina_List *file_list, *file_cur;
Ecore_Job *next_job;
Ecore_Timer *show_timeout;
Ecore_Timer *mouse_idle_timeout;
Ecore_Animator *drag_anim;
double last_action;
double jump;

Loading…
Cancel
Save