Hey,
I have attached example code for checking restacking feature of ctxpopup.
Please review the code and give any feedbacks. Thanks.
2011/12/22 Daniel Juyung Seo <seojuyu...@gmail.com>
> We need more test! Anyhow thanks!
>
> Daniel Juyung Seo (SeoZ)
>
> On Thu, Dec 22, 2011 at 10:34 AM, Michael Blumenkrantz
> <michael.blumenkra...@gmail.com> wrote:
> > On Thu, 22 Dec 2011 10:31:50 +0900
> > Carsten Haitzler (The Rasterman) <ras...@rasterman.com> wrote:
> >
> >> On Thu, 22 Dec 2011 10:22:05 +0900 Kim Shinwoo <kimcinoo....@gmail.com>
> said:
> >>
> >> > Wow~ The test code also in the SVN. It is just for checking the
> restacking
> >> > feature.
> >> > It does not (definitely not) have to in the SVN as I mentioned in the
> >> > previous mail: "please throw the test example away! :-)"
> >> > So, you guys want to add new and GOOD test code or remove it?
> >>
> >> i like there being tests :)
> >>
> >> > 2011년 12월 21일 오후 6:18, ChunEon Park <her...@naver.com>님의 말:
> >> >
> >> > > Code does not matter.
> >> > > But test working looks like bug.
> >> > > It creates label but never remove them until close the window.
> >> > > cinoo should consider other way for the test case.
> >> > > ------------------------------------
> >> > > -Regards, Hermet-
> >> > >
> >> > > -----Original Message-----
> >> > > From: "Carsten Haitzler"<ras...@rasterman.com>
> >> > > To: "Enlightenment developer list"&
> >> > > lt;enlightenment-devel@lists.sourceforge.net>
> >> > > Cc: "ChunEon Park"<her...@naver.com>; "cnook"&
> lt;kimci...@gmail.com
> >> > > >
> >> > > Sent: 11-12-21(수) 18:12:12
> >> > > Subject: Re: [E-devel] [Patch] elc_ctxpopup, add restacking feature
> >> > > On Wed, 21 Dec 2011 17:58:33 +0900 ChunEon Park<her...@naver.com
> >
> >> > > said:
> >> > > bug? the patch looked fine to me other than not deleting timer if
> ctxpopup
> >> > > is
> >> > > deleted...
> >> > > > The test looks like bug!
> >> > > > I don't wanna this kind of changes pushed in.
> >> > > > ------------------------------------
> >> > > > -Regards, Hermet-
> >> > > >
> >> > > > -----Original Message-----
> >> > > > From: "Carsten Haitzler"<ras...@rasterman.com>
> >> > > > To: "Enlightenment developer
> >> > > > list"<enlightenment-devel@lists.sourceforge.net> Cc:
> >> > > > "cnook"<kimci...@gmail.com> Sent: 11-12-21(수) 15:35:00
> >> > > > Subject: Re: [E-devel] [Patch] elc_ctxpopup, add restacking
> feature
> >> > > > On Tue, 20 Dec 2011 10:27:46 +0900 cnook <kimci...@gmail.com
> >
> >> > > said:
> >> > > > in! :)
> >> > > > > Dear All, Hello
> >> > > > >
> >> > > > > I have attached two files, one is the patch(*.diff) for adding
> >> > > > > restacking feature to the ctxpopup.
> >> > > > > The other is test example(*.TEST_EXAMPLE). You can test on the
> >> > > > > elementary_test > ctxpopup > "Ctxpopup with user content"
> >> > > > > And click the button which is labeled "Enlightenment". Then
> label will
> >> > > > > overlap the ctxpopup.. The ctxpopup will raise in a little time.
> >> > > > > Please review the patch and if there is no problem, please
> throw the
> >> > > > > test example away! :-)
> >> > > > >
> >> > > > > Sincerely,
> >> > > > > Shinwoo Kim.
> >> > > > --
> >> > > > ------------- Codito, ergo sum - "I code, therefore I am"
> --------------
> >> > > > The Rasterman (Carsten Haitzler) ras...@rasterman.com
> >> > > >
> >> > >
> ------------------------------------------------------------------------------
> >> > > > Write once. Port to many.
> >> > > > Get the SDK and tools to simplify cross-platform app development.
> Create
> >> > > > new or port existing apps to sell to consumers worldwide. Explore
> the
> >> > > > Intel AppUpSM program developer opportunity.
> appdeveloper.intel.com/join
> >> > > > http://p.sf.net/sfu/intel-appdev
> >> > > > _______________________________________________
> >> > > > enlightenment-devel mailing list
> >> > > > enlightenment-devel@lists.sourceforge.net
> >> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >> > > >
> >> > >
> ------------------------------------------------------------------------------
> >> > > > Write once. Port to many.
> >> > > > Get the SDK and tools to simplify cross-platform app development.
> Create
> >> > > > new or port existing apps to sell to consumers worldwide. Explore
> the
> >> > > > Intel AppUpSM program developer opportunity.
> appdeveloper.intel.com/join
> >> > > > http://p.sf.net/sfu/intel-appdev
> >> > > > _______________________________________________
> >> > > > enlightenment-devel mailing list
> >> > > > enlightenment-devel@lists.sourceforge.net
> >> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >> > > --
> >> > > ------------- Codito, ergo sum - "I code, therefore I am"
> --------------
> >> > > The Rasterman (Carsten Haitzler) ras...@rasterman.com
> >> > >
> >> > >
> ------------------------------------------------------------------------------
> >> > > Write once. Port to many.
> >> > > Get the SDK and tools to simplify cross-platform app development.
> Create
> >> > > new or port existing apps to sell to consumers worldwide. Explore
> the
> >> > > Intel AppUpSM program developer opportunity.
> appdeveloper.intel.com/join
> >> > > http://p.sf.net/sfu/intel-appdev
> >> > > _______________________________________________
> >> > > enlightenment-devel mailing list
> >> > > enlightenment-devel@lists.sourceforge.net
> >> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >> > >
> >> >
> ------------------------------------------------------------------------------
> >> > Write once. Port to many.
> >> > Get the SDK and tools to simplify cross-platform app development.
> Create
> >> > new or port existing apps to sell to consumers worldwide. Explore the
> >> > Intel AppUpSM program developer opportunity.
> appdeveloper.intel.com/join
> >> > http://p.sf.net/sfu/intel-appdev
> >> > _______________________________________________
> >> > enlightenment-devel mailing list
> >> > enlightenment-devel@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >>
> > MORE TESTS!
> >
> >
> ------------------------------------------------------------------------------
> > Write once. Port to many.
> > Get the SDK and tools to simplify cross-platform app development. Create
> > new or port existing apps to sell to consumers worldwide. Explore the
> > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> > http://p.sf.net/sfu/intel-appdev
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
Index: src/bin/test_ctxpopup.c
===================================================================
--- src/bin/test_ctxpopup.c (revision 66731)
+++ src/bin/test_ctxpopup.c (working copy)
@@ -8,6 +8,14 @@
static void
_dismissed(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
+ void *ctxpopup_data;
+ ctxpopup_data = evas_object_data_get(obj, "im");
+ if(ctxpopup_data)
+ {
+ evas_object_hide(ctxpopup_data);
+ evas_object_del(ctxpopup_data);
+ }
+
evas_object_del(obj);
}
@@ -38,9 +46,33 @@ _print_current_dir(Evas_Object *obj)
}
static void
-_btn_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+_btn_clicked(void *data, Evas_Object *obj, void *event_info __UNUSED__)
{
printf("Button Clicked\n");
+
+ Evas_Object *im;
+ char buf[PATH_MAX];
+ void *ctxpopup_data;
+
+ ctxpopup_data = evas_object_data_get(data, "id");
+ if(!ctxpopup_data) return;
+
+ if(!strcmp("list_item_6", (char *) ctxpopup_data))
+ {
+ ctxpopup_data = evas_object_data_get(data, "im");
+ if(ctxpopup_data) return;
+
+ im = evas_object_image_filled_add(evas_object_evas_get(obj));
+ snprintf(buf, sizeof(buf), "%s/images/%s",
+ elm_app_data_dir_get(), "twofish.jpg");
+ evas_object_image_file_set(im, buf, NULL);
+ evas_object_move(im, 40, 40);
+ evas_object_resize(im, 320, 320);
+ evas_object_show(im);
+ evas_object_data_set((Evas_Object *)data, "im", im);
+
+ evas_object_raise((Evas_Object *)data);
+ }
}
static void
@@ -211,10 +243,49 @@ _list_item_cb5(void *data __UNUSED__, Evas_Object
evas_object_show(ctxpopup);
_print_current_dir(ctxpopup);
+ evas_object_smart_callback_add(btn, "clicked", _btn_clicked, "list_item_5");
+}
+
+static void
+_list_item_cb6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Evas_Object *ctxpopup, *btn, *sc, *bx;
+ Evas_Coord x,y;
+
+ bx = elm_box_add(obj);
+ evas_object_size_hint_min_set(bx, 200, 150);
+
+ sc = elm_scroller_add(bx);
+ elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
+ evas_object_size_hint_fill_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(sc);
+
+ btn = elm_button_add(sc);
+ elm_object_text_set(btn, "Ctxpop will be on the top of layer");
+ evas_object_size_hint_min_set(btn, 190, 140);
+
+ elm_object_content_set(sc, btn);
+
+ elm_box_pack_end(bx, sc);
+
+ ctxpopup = elm_ctxpopup_add(obj);
+ evas_object_smart_callback_add(ctxpopup,
+ "dismissed",
+ _dismissed,
+ NULL);
+
+ elm_object_content_set(ctxpopup, bx);
+
+ evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
+ evas_object_move(ctxpopup, x, y);
+ evas_object_show(ctxpopup);
+ _print_current_dir(ctxpopup);
+
+ evas_object_data_set(ctxpopup, "id", "list_item_6");
evas_object_smart_callback_add(btn, "clicked", _btn_clicked, ctxpopup);
}
-
static void _list_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
elm_list_item_selected_set(event_info, EINA_FALSE);
@@ -251,6 +322,8 @@ test_ctxpopup(void *data __UNUSED__, Evas_Object *
_list_item_cb4, NULL);
elm_list_item_append(list, "Ctxpopup with user content", NULL, NULL,
_list_item_cb5, NULL);
+ elm_list_item_append(list, "Ctxpopup with restacking", NULL, NULL,
+ _list_item_cb6, NULL);
evas_object_show(list);
elm_list_go(list);
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel