rage - add (un)/fullscreen button/status gadget and close in fs mode

v-0.4.0
Carsten Haitzler 8 years ago
parent 8d941dc68e
commit f35241a154
  1. 2
      TODO
  2. 195
      data/themes/default.edc
  3. 9
      data/themes/images/Makefile.am
  4. BIN
      data/themes/images/icon_close.png
  5. BIN
      data/themes/images/icon_close2.png
  6. BIN
      data/themes/images/icon_fullscreen.png
  7. BIN
      data/themes/images/icon_fullscreen2.png
  8. BIN
      data/themes/images/icon_unfullscreen.png
  9. BIN
      data/themes/images/icon_unfullscreen2.png
  10. 26
      src/bin/controls.c
  11. 2
      src/bin/key.c

@ -15,4 +15,4 @@
* hide mouse on timeout in fullscreen move
* fullscreen mode should request suspend of screensaver (needs elm work)
* detect letterboxing and auto-crop
* add fullscreen/unfullscreen controls

@ -28,6 +28,9 @@ collections {
images.image: "icon_arrow_right.png" COMP;
images.image: "icon_spanner.png" COMP;
images.image: "icon_fullscreen.png" COMP;
images.image: "icon_unfullscreen.png" COMP;
images.image: "icon_close.png" COMP;
images.image: "horizontal_separated_bar_small_glow.png" COMP;
images.image: "vgrad_shadow_bi.png" COMP;
@ -43,6 +46,9 @@ collections {
images.image: "icon_pause2.png" COMP;
images.image: "icon_volume2.png" COMP;
images.image: "icon_spanner2.png" COMP;
images.image: "icon_fullscreen2.png" COMP;
images.image: "icon_unfullscreen2.png" COMP;
images.image: "icon_close2.png" COMP;
images.image: "tv-bg.png" COMP;
images.image: "tv-over.png" COMP;
@ -695,8 +701,45 @@ collections {
}
}
part { name: "rage.options.swallow"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.relative: 0.0 0.0;
rel1.offset: -6 0;
rel1.to: "rage.win.fullscreen";
rel2.relative: 0.0 1.0;
rel2.offset: -6 -1;
rel2.to: "rage.win.fullscreen";
min: 20 20;
align: 1.0 0.0;
}
}
part { name: "rage.win.fullscreen"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.relative: 0.0 0.0;
rel1.offset: -6 0;
rel1.to: "rage.win.close";
rel2.relative: 0.0 1.0;
rel2.offset: -6 -1;
rel2.to: "rage.win.close";
min: 20 20;
align: 1.0 0.0;
}
}
part { name: "rage.win.close"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.relative: 1.0 0.0;
rel1.offset: 0 5;
rel2.relative: 1.0 0.0;
rel2.offset: 0 5;
min: 20 20;
align: 0.0 0.0;
}
description { state: "fullscreen" 0.0;
fixed: 1 1;
rel1.relative: 1.0 0.0;
rel1.offset: -6 5;
@ -771,6 +814,144 @@ collections {
target: "vol";
}
part { name: "close";
scale: 1;
clip_to: "posclip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "rage.win.close";
rel2.to: "rage.win.close";
image.normal: "icon_close.png";
min: 20 20; max: 20 20;
}
description { state: "active" 0.0;
inherit: "default" 0.0;
image.normal: "icon_close2.png";
}
}
part { name: "closeev"; type: RECT;
description { state: "default" 0.0;
rel1.to: "rage.win.close";
rel2.to: "rage.win.close";
color: 0 0 0 0;
}
}
program {
signal: "mouse,down,1"; source: "closeev";
action: STATE_SET "active" 0.0;
target: "close";
}
program {
signal: "mouse,up,1"; source: "closeev";
action: STATE_SET "default" 0.0;
target: "close";
}
part { name: "fullscreenclip"; type: RECT;
clip_to: "posclip";
description { state: "default" 0.0;
rel1.to: "fullscreen";
rel2.to: "fullscreen";
visible: 1;
}
description { state: "fullscreen" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "unfullscreenclip"; type: RECT;
clip_to: "posclip";
description { state: "default" 0.0;
rel1.to: "unfullscreen";
rel2.to: "unfullscreen";
visible: 0;
}
description { state: "fullscreen" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
program {
signal: "state,win,fullscreen"; source: "rage";
action: STATE_SET "fullscreen" 0.0;
target: "fullscreenclip";
target: "unfullscreenclip";
target: "rage.win.close";
}
program {
signal: "state,win,normal"; source: "rage";
action: STATE_SET "default" 0.0;
target: "fullscreenclip";
target: "unfullscreenclip";
target: "rage.win.close";
}
part { name: "fullscreen";
scale: 1;
clip_to: "fullscreenclip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "rage.win.fullscreen";
rel2.to: "rage.win.fullscreen";
image.normal: "icon_fullscreen.png";
min: 20 20; max: 20 20;
}
description { state: "active" 0.0;
inherit: "default" 0.0;
image.normal: "icon_fullscreen2.png";
}
}
part { name: "fullscreenev"; type: RECT;
clip_to: "fullscreenclip";
description { state: "default" 0.0;
rel1.to: "rage.win.fullscreen";
rel2.to: "rage.win.fullscreen";
color: 0 0 0 0;
}
}
program {
signal: "mouse,down,1"; source: "fullscreenev";
action: STATE_SET "active" 0.0;
target: "fullscreen";
}
program {
signal: "mouse,up,1"; source: "fullscreenev";
action: STATE_SET "default" 0.0;
target: "fullscreen";
}
part { name: "unfullscreen";
scale: 1;
clip_to: "unfullscreenclip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "rage.win.fullscreen";
rel2.to: "rage.win.fullscreen";
image.normal: "icon_unfullscreen.png";
min: 20 20; max: 20 20;
}
description { state: "active" 0.0;
inherit: "default" 0.0;
image.normal: "icon_unfullscreen2.png";
}
}
part { name: "unfullscreenev"; type: RECT;
clip_to: "unfullscreenclip";
description { state: "default" 0.0;
rel1.to: "rage.win.fullscreen";
rel2.to: "rage.win.fullscreen";
color: 0 0 0 0;
}
}
program {
signal: "mouse,down,1"; source: "unfullscreenev";
action: STATE_SET "active" 0.0;
target: "unfullscreen";
}
program {
signal: "mouse,up,1"; source: "unfullscreenev";
action: STATE_SET "default" 0.0;
target: "unfullscreen";
}
part { name: "opt";
scale: 1;
clip_to: "posclip";
@ -974,6 +1155,20 @@ collections {
action: SIGNAL_EMIT "pos,action,options" "rage";
}
program {
signal: "mouse,clicked,1"; source: "fullscreenev";
action: SIGNAL_EMIT "win,fullscreen" "rage";
}
program {
signal: "mouse,clicked,1"; source: "unfullscreenev";
action: SIGNAL_EMIT "win,unfullscreen" "rage";
}
program {
signal: "mouse,clicked,1"; source: "closeev";
action: SIGNAL_EMIT "win,close" "rage";
}
program {
signal: "mouse,clicked,1"; source: "pos_prevev";
action: SIGNAL_EMIT "pos,action,prev" "rage";

@ -39,5 +39,12 @@ r-0.png \
r-1.png \
r-2.png \
r-3.png \
r-4.png
r-4.png \
icon_close.png \
icon_close2.png \
icon_fullscreen.png \
icon_fullscreen2.png \
icon_unfullscreen.png \
icon_unfullscreen2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

@ -62,6 +62,24 @@ _cb_list_hide(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EIN
win_list_hide(data);
}
static void
_cb_win_fullscreen(void *data EINA_UNUSED, Evas_Object *obj, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
elm_win_fullscreen_set(elm_object_top_widget_get(obj), EINA_TRUE);
}
static void
_cb_win_unfullscreen(void *data EINA_UNUSED, Evas_Object *obj, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
elm_win_fullscreen_set(elm_object_top_widget_get(obj), EINA_FALSE);
}
static void
_cb_win_close(void *data EINA_UNUSED, Evas_Object *obj, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
evas_object_del(elm_object_top_widget_get(obj));
}
static void
_time_print(double t, double max, int size, char *buf, Eina_Bool subsec)
{
@ -128,6 +146,12 @@ controls_init(Evas_Object *win, Evas_Object *lay)
_cb_list_show, win);
elm_layout_signal_callback_add(lay, "list,hide", "rage",
_cb_list_hide, win);
elm_layout_signal_callback_add(lay, "win,fullscreen", "rage",
_cb_win_fullscreen, win);
elm_layout_signal_callback_add(lay, "win,unfullscreen", "rage",
_cb_win_unfullscreen, win);
elm_layout_signal_callback_add(lay, "win,close", "rage",
_cb_win_close, win);
sz = 0;
elm_coords_finger_size_adjust(1, &sz, 1, &sz);
@ -141,6 +165,8 @@ controls_init(Evas_Object *win, Evas_Object *lay)
FINGER_SIZE("rage.pos.swallow");
FINGER_SIZE("rage.vol.swallow");
FINGER_SIZE("rage.options.swallow");
FINGER_SIZE("rage.win.fullscreen");
FINGER_SIZE("rage.win.close");
FINGER_SIZE("rage.pos.prev.swallow");
FINGER_SIZE("rage.pos.play.swallow");
FINGER_SIZE("rage.pos.next.swallow");

@ -151,7 +151,7 @@ key_handle(Evas_Object *win, Evas_Event_Key_Down *ev)
else if ((!strcmp(ev->keyname, "q")) ||
(!strcmp(ev->key, "Escape")))
{
elm_exit();
evas_object_del(win);
}
else if ((!strcmp(ev->keyname, "f")) ||
(!strcmp(ev->key, "F11")))

Loading…
Cancel
Save