Hi,
I received segfault and broke my X, with this attached patch. When
selected Cube Y animation and push one new page in elm pager test.
Can anyone see the BT and fix the Evas?
GDB:
ti...@ivanka:~$ gdb --args elementary_test Pager
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/tiago/stable/usr/bin/elementary_test...done.
(gdb) r
Starting program: /home/tiago/stable/usr/bin/elementary_test Pager
[Thread debugging using libthread_db enabled]
Key F12 exclusive for dot tree generation. (1)
Key F12 exclusive for dot tree generation. (1)
ERR<1697>:edje edje_util.c:3003 edje_object_size_min_restricted_calc()
file /home/tiago/stable/usr/share/elementary/themes/default.edj, group
elm/pager/base/cube_y has a non-fixed part 'center'. Adding 'fixed: 1
1;' to source EDC may help. Continuing discarding faulty part.
ERR<1697>:edje edje_util.c:3003 edje_object_size_min_restricted_calc()
file /home/tiago/stable/usr/share/elementary/themes/default.edj, group
elm/pager/base/cube_y has a non-fixed part 'center'. Adding 'fixed: 1
1;' to source EDC may help. Continuing discarding faulty part.
ERR<1697>:edje edje_util.c:3006 edje_object_size_min_restricted_calc()
file /home/tiago/stable/usr/share/elementary/themes/default.edj, group
elm/pager/base/cube_y overflowed 4000x4000 with minimum size of
1x99999. Continuing discarding faulty parts.
ERR<1697>:edje edje_util.c:3003 edje_object_size_min_restricted_calc()
file /home/tiago/stable/usr/share/elementary/themes/default.edj, group
elm/pager/base/cube_y has a non-fixed part 'elm.swallow.content'.
Adding 'fixed: 1 1;' to source EDC may help. Continuing discarding
faulty part.
ERR<1697>:edje edje_util.c:3003 edje_object_size_min_restricted_calc()
file /home/tiago/stable/usr/share/elementary/themes/default.edj, group
elm/pager/base/cube_y has a non-fixed part 'elm.swallow.content'.
Adding 'fixed: 1 1;' to source EDC may help. Continuing discarding
faulty part.
ERR<1697>:edje edje_util.c:3006 edje_object_size_min_restricted_calc()
file /home/tiago/stable/usr/share/elementary/themes/default.edj, group
elm/pager/base/cube_y overflowed 4000x4000 with minimum size of
202x99999. Continuing discarding faulty parts.
Program received signal SIGSEGV, Segmentation fault.
evas_common_map4_rgba_internal_mmx (src=<value optimized out>,
dst=<value optimized out>,
dc=<value optimized out>, p=<value optimized out>, smooth=<value
optimized out>,
level=<value optimized out>) at evas_map_image_loop.c:38
38 val3 = *s;
(gdb) bt
#0 evas_common_map4_rgba_internal_mmx (src=<value optimized out>,
dst=<value optimized out>,
dc=<value optimized out>, p=<value optimized out>, smooth=<value
optimized out>,
level=<value optimized out>) at evas_map_image_loop.c:38
#1 0x00007ffff6171964 in evas_common_map4_rgba (src=0x8e03c0,
dst=0x8e0710, dc=0x8bd460,
p=<value optimized out>, smooth=<value optimized out>,
level=<value optimized out>)
at evas_map_image.c:389
#2 0x00007fffed575311 in eng_image_map4_draw
(data=0xffffffffff7a4a0c, context=0x0, surface=0xff,
image=0xffffffffff7a4a0d, p=0x10000, smooth=0, level=-8762866) at
evas_engine.c:556
#3 0x00007ffff612bf30 in evas_render_mapped (e=0x8d2f80,
obj=0x8ddd80, context=<value optimized out>,
surface=0x8e0710, off_x=0, off_y=0, mapped=0) at evas_render.c:865
#4 0x00007ffff612ec2b in evas_render_updates_internal (e=0x8d2f80,
make_updates=<value optimized out>,
do_draw=<value optimized out>) at evas_render.c:1265
#5 0x00007ffff482f374 in _ecore_evas_x_render (ee=0x8d38b0) at
ecore_evas_x.c:415
#6 0x00007ffff48264a1 in _ecore_evas_idle_enter (data=<value
optimized out>) at ecore_evas.c:47
#7 0x00007ffff76eb063 in _ecore_idle_enterer_call () at
ecore_idle_enterer.c:146
#8 0x00007ffff76ecc45 in _ecore_main_loop_iterate_internal
(once_only=0) at ecore_main.c:1285
#9 0x00007ffff76ecdc7 in ecore_main_loop_begin () at ecore_main.c:628
#10 0x0000000000410162 in elm_main (argc=<value optimized out>,
argv=<value optimized out>) at test.c:405
#11 0x00007ffff6a9ec4d in __libc_start_main (main=<value optimized
out>, argc=<value optimized out>,
ubp_av=<value optimized out>, init=<value optimized out>,
fini=<value optimized out>,
rtld_fini=<value optimized out>, stack_end=0x7fffffffe658) at
libc-start.c:226
#12 0x000000000040f5a9 in _start ()
(gdb)
--
Tiago Rezende Campos Falcão
Developer @ ProFUSION Embedded Systems
From ff1b479eb5f334baa3f315d054854e5b9c8c4f3d Mon Sep 17 00:00:00 2001
From: Tiago Rezende Campos Falcao <ti...@profusion.mobi>
Date: Fri, 12 Nov 2010 14:01:44 -0200
Subject: [PATCH] More Flip effects to Pager
---
data/themes/default.edc | 316 +++++++++++++++++++++++++++++++++++++++++++++--
src/bin/test_pager.c | 260 +++++++++++----------------------------
2 files changed, 381 insertions(+), 195 deletions(-)
diff --git a/data/themes/default.edc b/data/themes/default.edc
index 73bfa21..053820c 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -23672,7 +23672,8 @@ collections {
}
}
- group { name: "elm/pager/base/flip";
+#define PAGER_TIME 10.0
+ group { name: "elm/pager/base/flip_y";
data.item: "onshow" "raise";
images {
image: "frame_1.png" COMP;
@@ -23683,10 +23684,12 @@ collections {
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
+ color: 255 255 255 255;
map {
on: 1;
smooth: 1;
backface_cull: 1;
+ alpha: 1;
perspective_on: 1;
}
perspective {
@@ -23696,12 +23699,12 @@ collections {
}
description { state: "hidden" 0.0;
inherit: "default" 0.0;
- visible: 0;
+ visible: 1;
map.rotation.y: 90.0;
}
description { state: "before_hidden" 0.0;
inherit: "default" 0.0;
- visible: 0;
+ visible: 1;
map.rotation.y: -90.0;
}
}
@@ -23719,8 +23722,8 @@ collections {
}
program { name: "push2";
action: STATE_SET "default" 0.0;
- in: 0.5 0.0;
- transition: LINEAR 0.5;
+ in: PAGER_TIME/2 0.0;
+ transition: LINEAR PAGER_TIME/2;
target: "elm.swallow.content";
after: "push3";
}
@@ -23740,8 +23743,8 @@ collections {
}
program { name: "show2";
action: STATE_SET "default" 0.0;
- in: 0.5 0.0;
- transition: LINEAR 0.5;
+ in: PAGER_TIME/2 0.0;
+ transition: LINEAR PAGER_TIME/2;
target: "elm.swallow.content";
after: "show3";
}
@@ -23761,7 +23764,7 @@ collections {
}
program { name: "pop2";
action: STATE_SET "hidden" 0.0;
- transition: LINEAR 0.5;
+ transition: LINEAR PAGER_TIME/2;
target: "elm.swallow.content";
after: "pop3";
}
@@ -23781,7 +23784,301 @@ collections {
}
program { name: "hide2";
action: STATE_SET "before_hidden" 0.0;
- transition: LINEAR 0.5;
+ transition: LINEAR PAGER_TIME/2;
+ target: "elm.swallow.content";
+ after: "hide3";
+ }
+ program { name: "hide3";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "";
+ }
+
+ program { name: "reset";
+ signal: "elm,action,reset";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ }
+ }
+
+ group { name: "elm/pager/base/flip_x";
+ data.item: "onshow" "raise";
+ images {
+ image: "frame_1.png" COMP;
+ image: "frame_2.png" COMP;
+ image: "dia_grad.png" COMP;
+ }
+ parts {
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ map {
+ on: 1;
+ smooth: 1;
+ backface_cull: 1;
+ perspective_on: 1;
+ }
+ perspective {
+ zplane: 0;
+ focal: 1000;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ map.rotation.x: 90.0;
+ }
+ description { state: "before_hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ map.rotation.x: -90.0;
+ }
+ }
+ }
+ programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ after: "push1";
+ }
+ program { name: "push1";
+ action: STATE_SET "hidden" 0.0;
+ target: "elm.swallow.content";
+ after: "push2";
+ }
+ program { name: "push2";
+ action: STATE_SET "default" 0.0;
+ in: PAGER_TIME/2 0.0;
+ transition: LINEAR PAGER_TIME/2;
+ target: "elm.swallow.content";
+ after: "push3";
+ }
+ program { name: "push3";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+
+ program { name: "show_start";
+ signal: "elm,action,show";
+ source: "elm";
+ after: "show1";
+ }
+ program { name: "show1";
+ action: STATE_SET "before_hidden" 0.0;
+ target: "elm.swallow.content";
+ after: "show2";
+ }
+ program { name: "show2";
+ action: STATE_SET "default" 0.0;
+ in: PAGER_TIME/2 0.0;
+ transition: LINEAR PAGER_TIME/2;
+ target: "elm.swallow.content";
+ after: "show3";
+ }
+ program { name: "show3";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ after: "pop1";
+ }
+ program { name: "pop1";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ after: "pop2";
+ }
+ program { name: "pop2";
+ action: STATE_SET "hidden" 0.0;
+ transition: LINEAR PAGER_TIME/2;
+ target: "elm.swallow.content";
+ after: "pop3";
+ }
+ program { name: "pop3";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "";
+ }
+
+ program { name: "hide_start";
+ signal: "elm,action,hide";
+ source: "elm";
+ after: "hide1";
+ }
+ program { name: "hide1";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ after: "hide2";
+ }
+ program { name: "hide2";
+ action: STATE_SET "before_hidden" 0.0;
+ transition: LINEAR PAGER_TIME/2;
+ target: "elm.swallow.content";
+ after: "hide3";
+ }
+ program { name: "hide3";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "";
+ }
+
+ program { name: "reset";
+ signal: "elm,action,reset";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ }
+ }
+
+ group { name: "elm/pager/base/cube_y";
+ data.item: "onshow" "raise";
+ images {
+ image: "frame_1.png" COMP;
+ image: "frame_2.png" COMP;
+ image: "dia_grad.png" COMP;
+ }
+ parts {
+ part { name: "center";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 1;
+ color: 255 0 0 255;
+ rel1.relative: 0.5 0.0;
+ rel2.relative: 0.5 1.0;
+ }
+ description { state: "visible1" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "hidden1" 0.0;
+ inherit: "visible1" 0.0;
+ }
+ description { state: "visible2" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ description { state: "hidden2" 0.0;
+ inherit: "visible2" 0.0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ align: 0.5 0.5;
+ map {
+ on: 1;
+ smooth: 1;
+ backface_cull: 1;
+ perspective_on: 1;
+ rotation.center: "center";
+ }
+ perspective {
+ zplane: 0;
+ focal: 1000;
+ }
+ }
+ description { state: "visible1" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "hidden1" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ map.rotation.y: -90.0;
+ align: 1.0 0.5;
+ }
+ description { state: "visible2" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "hidden2" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ map.rotation.y: 90.0;
+ align: 0.0 0.5;
+ }
+ }
+ }
+ programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ after: "push1";
+ }
+ program { name: "push1";
+ action: STATE_SET "hidden1" 0.0;
+ target: "center";
+ target: "elm.swallow.content";
+ after: "push2";
+ }
+ program { name: "push2";
+ action: STATE_SET "visible1" 0.0;
+ transition: LINEAR PAGER_TIME;
+ target: "center";
+ target: "elm.swallow.content";
+ after: "push3";
+ }
+ program { name: "push3";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+
+ program { name: "show_start";
+ signal: "elm,action,show";
+ source: "elm";
+ after: "show1";
+ }
+ program { name: "show1";
+ action: STATE_SET "hidden2" 0.0;
+ target: "center";
+ target: "elm.swallow.content";
+ after: "show2";
+ }
+ program { name: "show2";
+ action: STATE_SET "visible2" 0.0;
+ transition: LINEAR PAGER_TIME;
+ target: "center";
+ target: "elm.swallow.content";
+ after: "show3";
+ }
+ program { name: "show3";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ after: "pop1";
+ }
+ program { name: "pop1";
+ action: STATE_SET "visible1" 0.0;
+ target: "center";
+ target: "elm.swallow.content";
+ after: "pop2";
+ }
+ program { name: "pop2";
+ action: STATE_SET "hidden1" 0.0;
+ transition: LINEAR PAGER_TIME;
+ target: "center";
+ target: "elm.swallow.content";
+ after: "pop3";
+ }
+ program { name: "pop3";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "";
+ }
+
+ program { name: "hide_start";
+ signal: "elm,action,hide";
+ source: "elm";
+ after: "hide1";
+ }
+ program { name: "hide1";
+ action: STATE_SET "visible2" 0.0;
+ target: "center";
+ target: "elm.swallow.content";
+ after: "hide2";
+ }
+ program { name: "hide2";
+ action: STATE_SET "hidden2" 0.0;
+ transition: LINEAR PAGER_TIME;
+ target: "center";
target: "elm.swallow.content";
after: "hide3";
}
@@ -23800,6 +24097,7 @@ collections {
+
///////////////////////////////////////////////////////////////////////////////
// FIXME: this doesn't look too hot. need to fix it up
group { name: "elm/progressbar/horizontal/default";
diff --git a/src/bin/test_pager.c b/src/bin/test_pager.c
index 924d77d..977b975 100644
--- a/src/bin/test_pager.c
+++ b/src/bin/test_pager.c
@@ -3,39 +3,46 @@
# include "elementary_config.h"
#endif
#ifndef ELM_LIB_QUICKLAUNCH
-typedef struct _Pginfo Pginfo;
-
-struct _Pginfo
-{
- Evas_Object *win, *pager, *pg1, *pg2, *pg3;
-};
-
static void
-my_pager_1(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+my_pager_push(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Pginfo *info = data;
- elm_pager_content_promote(info->pager, info->pg2);
-}
+ Evas_Object *pg = data;
+ Evas_Object *bx, *lb, *o;
+ static int count = 2;
+ char buf[PATH_MAX];
-static void
-my_pager_2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- elm_pager_content_promote(info->pager, info->pg3);
-}
+ bx = elm_box_add(pg);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bx);
-static void
-my_pager_3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- elm_pager_content_promote(info->pager, info->pg1);
+ lb = elm_label_add(bx);
+ evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.0);
+ evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
+ snprintf(buf, sizeof(buf), "This is page %d in the slide pager", count++);
+ elm_label_label_set(lb, buf);
+ elm_box_pack_end(bx, lb);
+ evas_object_show(lb);
+
+ if (count % 2)
+ snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_01.jpg");
+ else
+ snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_02.jpg");
+
+ o = elm_bg_add(pg);
+ evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_bg_file_set(o, buf, NULL);
+ elm_box_pack_end(bx, o);
+ evas_object_show(o);
+
+ elm_pager_content_push(pg, bx);
}
static void
my_pager_pop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Pginfo *info = data;
- elm_pager_content_pop(info->pager);
+ Evas_Object *pg = data;
+ elm_pager_content_pop(pg);
}
struct style_tuple {
@@ -49,7 +56,10 @@ static const struct style_tuple styles[] = {
{ "Fade", "fade"},
{ "Fade Translucide", "fade_translucide"},
{ "Fade Invisible", "fade_invisible"},
- { "Flip", "flip"},
+ { "Flip Y", "flip_y"},
+ { "Flip X", "flip_x"},
+ { "Cube Y", "cube_y"},
+ { "Cube X", "cube_x"},
};
static void
@@ -62,34 +72,30 @@ _style(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_pager(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *pg, *bx, *lb, *bt;
- static Pginfo info;
+ Evas_Object *win, *bg, *pg, *bx, *lb, *bt, *fr, *bx0, *bx1;
win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
elm_win_title_set(win, "Pager");
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
elm_win_autodel_set(win, 1);
- info.win = win;
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
- pg = elm_pager_add(win);
- elm_win_resize_object_add(win, pg);
- evas_object_show(pg);
-
- info.pager = pg;
+ bx0 = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx0, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, bx0);
+ evas_object_show(bx0);
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
+ fr = elm_frame_add(win);
+ elm_frame_label_set(fr, "Pager Information");
+ elm_box_pack_end(bx0, fr);
+ evas_object_show(fr);
lb = elm_label_add(win);
elm_label_label_set(lb,
- "This is page 1 in a pager stack.<br>"
- "<br>"
"So what is a pager stack? It is a stack<br>"
"of pages that hold widgets in it. The<br>"
"pages can be pushed and popped on and<br>"
@@ -99,10 +105,32 @@ test_pager(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
"the stack).<br>"
"<br>"
"The theme may define the animation how<br>"
- "show and hide of pages. Select one theme style:");
- elm_box_pack_end(bx, lb);
+ "show and hide of pages.");
+ elm_frame_content_set(fr, lb);
evas_object_show(lb);
+ bx1 = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx1, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bx1, EVAS_HINT_FILL, 0.0);
+ elm_box_horizontal_set(bx1, EINA_TRUE);
+ elm_box_pack_end(bx0, bx1);
+ evas_object_show(bx1);
+
+ pg = elm_pager_add(win);
+ evas_object_size_hint_weight_set(pg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pg, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(bx0, pg);
+ evas_object_show(pg);
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bx);
+ elm_pager_content_push(pg, bx);
+
+ lb = elm_label_add(win);
+ elm_label_label_set(lb, "Select Pager Theme:");
+ elm_box_pack_end(bx, lb);
+ evas_object_show(lb);
unsigned int i = 0;
Evas_Object *rdg = NULL, *rd;
@@ -122,162 +150,22 @@ test_pager(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
elm_radio_value_set(rd, 0);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Flip to 2");
- evas_object_smart_callback_add(bt, "clicked", my_pager_1, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_button_label_set(bt, "Popme");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(pg, bx);
- info.pg1 = bx;
-
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(win);
- elm_label_label_set(lb,
- "This is page 2 in a pager stack.<br>"
- "<br>"
- "This is just like the previous page in<br>"
- "the pager stack."
- );
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(win);
- elm_button_label_set(bt, "Flip to 3");
- evas_object_smart_callback_add(bt, "clicked", my_pager_2, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_button_label_set(bt, "Popme");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(pg, bx);
- info.pg2 = bx;
-
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(win);
- elm_label_label_set(lb,
- "This is page 3 in a pager stack.<br>"
- "<br>"
- "This is just like the previous page in<br>"
- "the pager stack.");
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(win);
- elm_button_label_set(bt, "Flip to 1");
- evas_object_smart_callback_add(bt, "clicked", my_pager_3, &info);
- elm_box_pack_end(bx, bt);
+ elm_button_label_set(bt, "Push a new page");
+ evas_object_smart_callback_add(bt, "clicked", my_pager_push, pg);
+ elm_box_pack_end(bx1, bt);
evas_object_show(bt);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Popme");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
+ elm_button_label_set(bt, "Go back (pop)");
+ evas_object_smart_callback_add(bt, "clicked", my_pager_pop, pg);
+ elm_box_pack_end(bx1, bt);
evas_object_show(bt);
- elm_pager_content_push(pg, bx);
- info.pg3 = bx;
evas_object_show(win);
}
-static void
-my_pager_push(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- Evas_Object *bx, *bt, *lb;
- static int count = 2;
- char buf[32];
-
- bx = elm_box_add(info->win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(info->win);
- snprintf(buf, sizeof(buf), "This is page %d in the slide pager<br><br>", count++);
- elm_label_label_set(lb, buf);
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(info->win);
- elm_button_label_set(bt, "Push a new page");
- evas_object_smart_callback_add(bt, "clicked", my_pager_push, info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(info->win);
- elm_button_label_set(bt, "Go back (pop)");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(info->pager, bx);
-}
-
void
test_pager_slide(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *pg, *bx, *lb, *bt;
- static Pginfo info;
-
- win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
- elm_win_title_set(win, "Pager Slide");
- elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
- elm_win_autodel_set(win, 1);
- info.win = win;
-
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
- pg = elm_pager_add(win);
- elm_win_resize_object_add(win, pg);
- elm_object_style_set(pg, "slide");
- evas_object_show(pg);
- info.pager = pg;
-
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(win);
- elm_label_label_set(lb,
- "This is page 1 in a slide pager.<br>"
- "<br>"
- "The slide pager style is useful for browsing<br>"
- "a hierarchy of objects, as it makes clear<br>"
- "the direction of the browse.<br>"
- "This is the 'slide' style, also available<br>"
- "a fully transparent style named 'slide_invisble'.<br>"
- "<br>");
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(win);
- elm_button_label_set(bt, "Push a new page");
- evas_object_smart_callback_add(bt, "clicked", my_pager_push, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_button_label_set(bt, "Go back (pop)");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(pg, bx);
-
- evas_object_show(win);
}
#endif
--
1.7.0.4
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel