elm_test/window_states: Add a checkbox for enabling fullscreen.
authorRafael Antognolli <rafael.antognolli@intel.com>
Wed, 24 Apr 2013 20:44:22 +0000 (17:44 -0300)
committerRafael Antognolli <rafael.antognolli@intel.com>
Thu, 25 Apr 2013 17:52:55 +0000 (14:52 -0300)
legacy/elementary/src/bin/test_win_state.c

index 1a3f699..c396d04 100644 (file)
@@ -10,6 +10,7 @@ typedef struct _Testitem
 } Testitem;
 
 static int rotate_with_resize = 0;
+static Eina_Bool fullscreen = EINA_FALSE;
 
 static void
 my_bt_38_alpha_on(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
@@ -112,6 +113,14 @@ my_bt_38_rot_270(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNU
 }
 
 static void
+my_ck_38_fullscreen(void *data, Evas_Object *obj, void *event_info __UNUSED__)
+{
+   Evas_Object *win = data;
+   fullscreen = elm_check_state_get(obj);
+   elm_win_fullscreen_set(win, fullscreen);
+}
+
+static void
 my_win_move(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
 {
    Evas_Coord x, y;
@@ -240,6 +249,15 @@ test_win_state(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    evas_object_show(ck);
    elm_box_pack_end(bx, ck);
 
+   ck = elm_check_add(win);
+   elm_object_text_set(ck, "fullscreen");
+   elm_check_state_set(ck, fullscreen);
+   evas_object_smart_callback_add(ck, "changed", my_ck_38_fullscreen, win);
+   evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(ck, 0.02, 0.99);
+   evas_object_show(ck);
+   elm_box_pack_end(bx, ck);
+
    bx2 = elm_box_add(win);
    elm_box_horizontal_set(bx2, EINA_TRUE);
    elm_box_homogeneous_set(bx2, EINA_TRUE);