summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-09-18 19:23:36 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-09-18 19:23:36 +0900
commite126fa1af52ff667d597123dc877e25347deb606 (patch)
tree013d25c237da4666ef87bf98fa4e0301dc4f9faf
parentb8e72119caf56508e226c953eab8d4af101c7164 (diff)
[WIP] config: add stub for gesture layer config paneldevs/jpeg/smooth
Need to add some EAPIs first...
-rw-r--r--src/bin/config.c80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/bin/config.c b/src/bin/config.c
index a194344ee..7846c41bf 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -1036,6 +1036,14 @@ _cf_scrolling(void *data,
1036} 1036}
1037 1037
1038static void 1038static void
1039_cf_glayer(void *data,
1040 Evas_Object *obj EINA_UNUSED,
1041 void *event_info EINA_UNUSED)
1042{
1043 _flip_to(data, "glayer");
1044}
1045
1046static void
1039_cf_rendering(void *data, 1047_cf_rendering(void *data,
1040 Evas_Object *obj EINA_UNUSED, 1048 Evas_Object *obj EINA_UNUSED,
1041 void *event_info EINA_UNUSED) 1049 void *event_info EINA_UNUSED)
@@ -1807,6 +1815,76 @@ _status_config_focus(Evas_Object *win,
1807} 1815}
1808 1816
1809static void 1817static void
1818glz_change(void *data EINA_UNUSED,
1819 Evas_Object *obj,
1820 void *event_info EINA_UNUSED)
1821{
1822 // crap. there aren't even any Gesture Layer functions for most config options
1823 // those could NEVER be changed! wtf.
1824
1825 /*
1826 Eina_Bool val = elm_check_state_get(obj);
1827 Eina_Bool ss = elm_config_glayer_;
1828
1829 if (val == ss) return;
1830 elm_config_scroll_thumbscroll_smooth_start_set(val);
1831 elm_config_all_flush();
1832 */
1833}
1834
1835static void
1836_status_config_glayer_zoom(Evas_Object *win,
1837 Evas_Object *box)
1838{
1839 Evas_Object *fr, *bx, *ck, *pd, *lb, *sl;
1840
1841 fr = elm_frame_add(box);
1842 evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0.0);
1843 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
1844 elm_object_text_set(fr, "Zoom");
1845 elm_box_pack_end(box, fr);
1846 evas_object_show(fr);
1847
1848 bx = elm_box_add(fr);
1849 elm_object_content_set(fr, bx);
1850 evas_object_show(bx);
1851
1852 //ELM_CONFIG_VAL(D, T, glayer_zoom_finger_enable, T_UCHAR);
1853 //ELM_CONFIG_VAL(D, T, glayer_zoom_finger_factor, T_DOUBLE);
1854 //ELM_CONFIG_VAL(D, T, glayer_zoom_wheel_factor, T_DOUBLE);
1855 //ELM_CONFIG_VAL(D, T, glayer_zoom_distance_tolerance, T_DOUBLE);
1856
1857 CHECK_ADD("Enable finger zoom", "Pinch to zoom with two fingers.",
1858 glz_change, NULL);
1859 evas_object_data_set(win, "scroll_smooth_start", ck);
1860 elm_check_state_set(ck, elm_config_scroll_thumbscroll_smooth_start_get());
1861
1862}
1863
1864static void
1865_status_config_glayer(Evas_Object *win,
1866 Evas_Object *naviframe)
1867{
1868 Evas_Object *bx, *sc;
1869
1870 bx = elm_box_add(win);
1871 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
1872 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
1873
1874 sc = elm_scroller_add(win);
1875 evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1876 evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
1877 elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
1878 evas_object_show(sc);
1879 elm_object_content_set(sc, bx);
1880
1881 _status_config_glayer_zoom(win, bx);
1882
1883 evas_object_data_set(win, "glayer", bx);
1884 elm_naviframe_item_simple_push(naviframe, bx);
1885}
1886
1887static void
1810_status_config_etc(Evas_Object *win, 1888_status_config_etc(Evas_Object *win,
1811 Evas_Object *naviframe) 1889 Evas_Object *naviframe)
1812{ 1890{
@@ -3850,6 +3928,7 @@ _status_config_full(Evas_Object *win,
3850 elm_toolbar_item_append(tb, "video-display", "Rendering", 3928 elm_toolbar_item_append(tb, "video-display", "Rendering",
3851 _cf_rendering, win); 3929 _cf_rendering, win);
3852 elm_toolbar_item_append(tb, "appointment-new", "Caches", _cf_caches, win); 3930 elm_toolbar_item_append(tb, "appointment-new", "Caches", _cf_caches, win);
3931 elm_toolbar_item_append(tb, NULL, "Gestures", _cf_glayer, win);
3853 elm_toolbar_item_append(tb, "sound", "Audio", _cf_audio, win); 3932 elm_toolbar_item_append(tb, "sound", "Audio", _cf_audio, win);
3854 elm_toolbar_item_append(tb, NULL, "Focus", _cf_focus, win); 3933 elm_toolbar_item_append(tb, NULL, "Focus", _cf_focus, win);
3855 elm_toolbar_item_append(tb, NULL, "Etc", _cf_etc, win); 3934 elm_toolbar_item_append(tb, NULL, "Etc", _cf_etc, win);
@@ -3870,6 +3949,7 @@ _status_config_full(Evas_Object *win,
3870 _status_config_caches(win, naviframe); 3949 _status_config_caches(win, naviframe);
3871 _status_config_audio(win, naviframe); 3950 _status_config_audio(win, naviframe);
3872 _status_config_focus(win, naviframe); 3951 _status_config_focus(win, naviframe);
3952 _status_config_glayer(win, naviframe);
3873 _status_config_etc(win, naviframe); 3953 _status_config_etc(win, naviframe);
3874 _status_config_sizing(win, naviframe); // Note: call this at the end. 3954 _status_config_sizing(win, naviframe); // Note: call this at the end.
3875 3955