} \
while (0)
+#define LABEL_FRAME_ADD(label) \
+ do \
+ { \
+ pd = elm_frame_add(win); \
+ evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0); \
+ evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5); \
+ elm_object_style_set(pd, "pad_medium"); \
+ elm_box_pack_end(bx, pd); \
+ evas_object_show(pd); \
+ \
+ lb = elm_label_add(win); \
+ evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); \
+ evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); \
+ elm_label_label_set(lb, label); \
+ elm_frame_content_set(pd, lb); \
+ evas_object_show(lb); \
+ } \
+ while (0)
+
static int quiet = 0;
static int interactive = 1;
elm_exit(); /* exit the program's main loop that runs in elm_run() */
}
+static void
+sb_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ Eina_Bool val = elm_check_state_get(obj);
+ Eina_Bool sb = elm_scroll_bounce_enabled_get();
+
+ if (val == sb) return;
+ elm_scroll_bounce_enabled_all_set(val);
+
+ /*TODO: enable/disable subordinate sliders (make 'em support it 1st)*/
+}
+
+static void
+bf_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+bf_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double bf = elm_scroll_bounce_friction_get();
+ double val = elm_slider_value_get(obj);
+
+ if (bf == val) return;
+ elm_scroll_bounce_friction_all_set(val);
+}
+
+static void
+ps_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+ps_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double ps = elm_scroll_page_scroll_friction_get();
+ double val = elm_slider_value_get(obj);
+
+ if (ps == val) return;
+ elm_scroll_page_scroll_friction_all_set(val);
+}
+
+static void
+bis_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+bis_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double bis = elm_scroll_bring_in_scroll_friction_get();
+ double val = elm_slider_value_get(obj);
+
+ if (bis == val) return;
+ elm_scroll_bring_in_scroll_friction_all_set(val);
+}
+
+static void
+zf_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+zf_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double zf = elm_scroll_zoom_friction_get();
+ double val = elm_slider_value_get(obj);
+
+ if (zf == val) return;
+ elm_scroll_zoom_friction_all_set(val);
+}
+
+static void
+ts_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ Eina_Bool val = elm_check_state_get(obj);
+ Eina_Bool sb = elm_scroll_bounce_enabled_get();
+
+ if (val == sb) return;
+ elm_scroll_thumbscroll_enabled_all_set(val);
+
+ /*TODO: enable/disable subordinate sliders (make 'em support it 1st)*/
+}
+
+static void
+tst_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+tst_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double tst = elm_scroll_thumbscroll_threshold_get();
+ double val = elm_slider_value_get(obj);
+
+ if (tst == val) return;
+ elm_scroll_thumbscroll_threshold_all_set(val);
+}
+
+static void
+tsmt_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+tsmt_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double tsmt = elm_scroll_thumbscroll_momentum_threshold_get();
+ double val = elm_slider_value_get(obj);
+
+ if (tsmt == val) return;
+ elm_scroll_thumbscroll_momentum_threshold_all_set(val);
+}
+
+static void
+tsf_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+tsf_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double tsf = elm_scroll_thumbscroll_friction_get();
+ double val = elm_slider_value_get(obj);
+
+ if (tsf == val) return;
+ elm_scroll_thumbscroll_friction_all_set(val);
+}
+
+static void
+tsbf_round(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double val = elm_slider_value_get(obj);
+ double v;
+
+ v = ((double)((int)(val * 10.0))) / 10.0;
+ if (v != val) elm_slider_value_set(obj, v);
+}
+
+static void
+tsbf_change(void *data __UNUSED__,
+ Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ double tsbf = elm_scroll_thumbscroll_border_friction_get();
+ double val = elm_slider_value_get(obj);
+
+ if (tsbf == val) return;
+ elm_scroll_thumbscroll_border_friction_all_set(val);
+}
+
static void
cf_round(void *data __UNUSED__,
Evas_Object *obj,
_status_config(Evas_Object *win,
Evas_Object *bx0)
{
- Evas_Object *lb, *pd, *bx2, *fr, *sl, *sp;
+ Evas_Object *lb, *pd, *bx, *fr, *sl, *sp;
fr = elm_frame_add(win);
- evas_object_size_hint_weight_set(fr, 1.0, 1.0);
+ evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_frame_label_set(fr, "Sizing");
elm_box_pack_end(bx0, fr);
evas_object_show(fr);
- bx2 = elm_box_add(win);
- evas_object_size_hint_weight_set(bx2, 1.0, 0.0);
- evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, 0.5);
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, 1.0, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx2, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, 1.0, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Scale</>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Scale</>");
sl = elm_slider_add(win);
- evas_object_size_hint_weight_set(sl, 1.0, 0.0);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
elm_slider_span_size_set(sl, 120);
elm_slider_unit_format_set(sl, "%1.2f");
elm_slider_indicator_format_set(sl, "%1.2f");
elm_slider_min_max_set(sl, 0.25, 5.0);
elm_slider_value_set(sl, elm_scale_get());
- elm_box_pack_end(bx2, sl);
+ elm_box_pack_end(bx, sl);
evas_object_show(sl);
evas_object_smart_callback_add(sl, "changed", sc_round, NULL);
sp = elm_separator_add(win);
elm_separator_horizontal_set(sp, 1);
- evas_object_size_hint_weight_set(sp, 1.0, 0.0);
+ evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
- elm_box_pack_end(bx2, sp);
+ elm_box_pack_end(bx, sp);
evas_object_show(sp);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, 1.0, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx2, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, 1.0, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Finger Size</><br>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Finger Size</><br>");
sl = elm_slider_add(win);
- evas_object_size_hint_weight_set(sl, 1.0, 0.0);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
elm_slider_span_size_set(sl, 120);
elm_slider_unit_format_set(sl, "%1.0f");
elm_slider_indicator_format_set(sl, "%1.0f");
elm_slider_min_max_set(sl, 5, 200);
elm_slider_value_set(sl, elm_finger_size_get());
- elm_box_pack_end(bx2, sl);
+ elm_box_pack_end(bx, sl);
evas_object_show(sl);
evas_object_smart_callback_add(sl, "changed", fs_round, NULL);
// FIXME: add theme selector (basic mode and advanced for fallbacks)
// FIXME: save config
// FIXME: profile selector / creator etc.
- elm_frame_content_set(fr, bx2);
- evas_object_show(bx2);
+ elm_frame_content_set(fr, bx);
+ evas_object_show(bx);
}
static void
_profile_change_do(Evas_Object *win,
const char *profile)
{
- int flush_interval, font_c, image_c, edje_file_c, edje_col_c;
+ int flush_interval, font_c, image_c, edje_file_c, edje_col_c, ts_threshould;
+ double scale, s_bounce_friction, ts_momentum_threshold, ts_friction,
+ ts_border_friction, page_friction, bring_in_friction, zoom_friction;
const char *curr_theme, *curr_engine;
const Eina_List *l_items, *l;
+ Eina_Bool s_bounce, ts;
Elm_List_Item *it;
Elm_Theme *th;
- double scale;
int fs;
elm_profile_all_set(profile);
edje_file_c = elm_edje_file_cache_get();
edje_col_c = elm_edje_collection_cache_get();
+ s_bounce = elm_scroll_bounce_enabled_get();
+ s_bounce_friction = elm_scroll_bounce_friction_get();
+ ts = elm_scroll_thumbscroll_enabled_get();
+ ts_threshould = elm_scroll_thumbscroll_threshold_get();
+ ts_momentum_threshold = elm_scroll_thumbscroll_momentum_threshold_get();
+ ts_friction = elm_scroll_thumbscroll_friction_get();
+ ts_border_friction = elm_scroll_thumbscroll_border_friction_get();
+ page_friction = elm_scroll_page_scroll_friction_get();
+ bring_in_friction = elm_scroll_bring_in_scroll_friction_get();
+ zoom_friction = elm_scroll_zoom_friction_get();
+
/* gotta update root windows' atoms */
elm_scale_all_set(scale);
elm_slider_value_set(evas_object_data_get(win, "scale_slider"), scale);
"edje_collection_cache_slider"),
edje_col_c);
+ elm_scroll_bounce_enabled_all_set(s_bounce);
+ elm_check_state_set(evas_object_data_get(win, "scroll_bounce_check"),
+ s_bounce);
+ elm_scroll_bounce_friction_all_set(s_bounce_friction);
+ elm_slider_value_set(evas_object_data_get(win, "bounce_friction_slider"),
+ s_bounce_friction);
+ elm_scroll_thumbscroll_enabled_all_set(ts);
+ elm_check_state_set(evas_object_data_get(win, "thumbscroll_check"), ts);
+ elm_scroll_thumbscroll_threshold_all_set(ts_threshould);
+ elm_slider_value_set(evas_object_data_get(win,
+ "thumbscroll_threshold_slider"),
+ ts_threshould);
+ elm_scroll_thumbscroll_momentum_threshold_all_set(ts_momentum_threshold);
+ elm_slider_value_set(evas_object_data_get(win,
+ "ts_momentum_threshold_slider"),
+ ts_momentum_threshold);
+ elm_scroll_thumbscroll_friction_all_set(ts_friction);
+ elm_slider_value_set(evas_object_data_get(win,
+ "thumbscroll_friction_slider"),
+ ts_friction);
+ elm_scroll_thumbscroll_border_friction_all_set(ts_border_friction);
+ elm_slider_value_set(evas_object_data_get(win, "ts_border_friction_slider"),
+ ts_border_friction);
+ elm_scroll_page_scroll_friction_all_set(page_friction);
+ elm_slider_value_set(evas_object_data_get(win,
+ "page_scroll_friction_slider"),
+ page_friction);
+ elm_scroll_bring_in_scroll_friction_all_set(bring_in_friction);
+ elm_slider_value_set(evas_object_data_get(win,
+ "bring_in_scroll_friction_slider"),
+ bring_in_friction);
+ elm_scroll_zoom_friction_all_set(zoom_friction);
+ elm_slider_value_set(evas_object_data_get(win,
+ "zoom_scroll_friction_slider"),
+ zoom_friction);
+
curr_theme = _elm_theme_current_get(elm_theme_get(NULL));
elm_theme_all_set(curr_theme);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Scale</>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Scale</>");
sl = elm_slider_add(win);
evas_object_data_set(win, "scale_slider", sl);
elm_box_pack_end(bx, sp);
evas_object_show(sp);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Finger Size</><br>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Finger Size</><br>");
sl = elm_slider_add(win);
evas_object_data_set(win, "fs_slider", sl);
elm_pager_content_push(pager, tb);
}
-static void
-_unimplemented(Evas_Object *win,
- Evas_Object *pager,
- const char *name)
-{
- Evas_Object *lb, *pd, *bx2;
-
- bx2 = elm_box_add(win);
- evas_object_size_hint_weight_set(bx2, 1.0, 0.0);
- evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, 0.5);
-
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, 0.0, 0.0);
- evas_object_size_hint_align_set(pd, 0.5, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx2, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, 0.0, 0.0);
- evas_object_size_hint_align_set(lb, 0.5, 0.5);
- elm_label_label_set(lb, "<hilight>Not implemented yet</>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
-
- evas_object_data_set(win, name, bx2);
- elm_pager_content_push(pager, bx2);
-}
-
static void
_font_preview_update(Evas_Object *win)
{
_status_config_scrolling(Evas_Object *win,
Evas_Object *pager)
{
- _unimplemented(win, pager, "scrolling");
+ Evas_Object *lb, *pd, *bx, *sl, *sp, *ck, *sc;
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
+
+ sc = elm_scroller_add(win);
+ evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
+ evas_object_show(sc);
+ elm_scroller_content_set(sc, bx);
+
+ ck = elm_check_add(win);
+ elm_object_tooltip_text_set(ck, "Set whether scrollers should bounce<br>"
+ "when they reach their viewport's edge<br>"
+ "during a scroll");
+ elm_check_label_set(ck, "Enable scroll bounce");
+ evas_object_data_set(win, "scroll_bounce_check", ck);
+ evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
+ elm_check_state_set(ck, elm_scroll_bounce_enabled_get());
+ elm_box_pack_end(bx, ck);
+ evas_object_show(ck);
+
+ evas_object_smart_callback_add(ck, "changed", sb_change, NULL);
+
+ LABEL_FRAME_ADD("<hilight>Scroll bounce friction</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the amount of inertia a <br>"
+ "scroller will impose at bounce animations");
+ evas_object_data_set(win, "bounce_friction_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.2f");
+ elm_slider_indicator_format_set(sl, "%1.2f");
+ elm_slider_min_max_set(sl, 0.0, 4.0);
+ elm_slider_value_set(sl, elm_scroll_bounce_friction_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", bf_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", bf_change, NULL);
+
+ sp = elm_separator_add(win);
+ elm_separator_horizontal_set(sp, EINA_TRUE);
+ evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
+ elm_box_pack_end(bx, sp);
+ evas_object_show(sp);
+
+ ck = elm_check_add(win);
+ elm_object_tooltip_text_set(ck, "Set whether scrollers should be<br>"
+ "draggable from any point in their views");
+ elm_check_label_set(ck, "Enable thumb scroll");
+ evas_object_data_set(win, "thumbscroll_check", ck);
+ evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
+ elm_check_state_set(ck, elm_scroll_thumbscroll_enabled_get());
+ elm_box_pack_end(bx, ck);
+ evas_object_show(ck);
+
+ evas_object_smart_callback_add(ck, "changed", ts_change, NULL);
+
+ LABEL_FRAME_ADD("<hilight>Thumb scroll threshold</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the number of pixels one should<br>"
+ "travel while dragging a scroller's view to<br>"
+ "actually trigger scrolling");
+ evas_object_data_set(win, "thumbscroll_threshold_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.0f pixels");
+ elm_slider_indicator_format_set(sl, "%1.0f");
+ elm_slider_min_max_set(sl, 8.0, 50.0);
+ elm_slider_value_set(sl, elm_scroll_thumbscroll_threshold_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", tst_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", tst_change, NULL);
+
+ LABEL_FRAME_ADD("<hilight>Thumb scroll momentum threshold</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the minimum speed of mouse <br>"
+ "cursor movement which will trigger<br>"
+ "list self scrolling animation after a<br>"
+ "mouse up event (pixels/second)");
+ evas_object_data_set(win, "ts_momentum_threshold_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.0f pixels/s");
+ elm_slider_indicator_format_set(sl, "%1.0f");
+ elm_slider_min_max_set(sl, 10.0, 200.0);
+ elm_slider_value_set(sl, elm_scroll_thumbscroll_momentum_threshold_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", tsmt_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", tsmt_change,
+ NULL);
+
+ LABEL_FRAME_ADD("<hilight>Thumb scroll friction</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the amount of inertia a<br>"
+ "scroller will impose at self scrolling<br>"
+ "animations");
+ evas_object_data_set(win, "thumbscroll_friction_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.1f");
+ elm_slider_indicator_format_set(sl, "%1.1f");
+ elm_slider_min_max_set(sl, 0.0, 15.0);
+ elm_slider_value_set(sl, elm_scroll_thumbscroll_friction_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", tsf_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", tsf_change, NULL);
+
+ LABEL_FRAME_ADD("<hilight>Thumb scroll border friction</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the amount of lag between your<br>"
+ "actual mouse cursor dragging movement and<br>"
+ "a scroller's view movement itself, while<br>"
+ "pushing it into bounce state manually");
+ evas_object_data_set(win, "ts_border_friction_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.2f");
+ elm_slider_indicator_format_set(sl, "%1.2f");
+ elm_slider_min_max_set(sl, 0.0, 1.0);
+ elm_slider_value_set(sl, elm_scroll_thumbscroll_border_friction_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", tsbf_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", tsbf_change, NULL);
+
+ sp = elm_separator_add(win);
+ elm_separator_horizontal_set(sp, EINA_TRUE);
+ evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
+ elm_box_pack_end(bx, sp);
+ evas_object_show(sp);
+
+ LABEL_FRAME_ADD("<hilight>Page scroll friction</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the amount of inertia a<br>"
+ "paged scroller will impose at<br>"
+ "page fitting animations");
+ evas_object_data_set(win, "page_scroll_friction_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.1f");
+ elm_slider_indicator_format_set(sl, "%1.1f");
+ elm_slider_min_max_set(sl, 0.0, 5.0);
+ elm_slider_value_set(sl, elm_scroll_page_scroll_friction_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", ps_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", ps_change, NULL);
+
+ LABEL_FRAME_ADD("<hilight>Bring in scroll friction</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the amount of inertia a<br>"
+ "scroller will impose at region bring<br>"
+ "animations");
+ evas_object_data_set(win, "bring_in_scroll_friction_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.1f");
+ elm_slider_indicator_format_set(sl, "%1.1f");
+ elm_slider_min_max_set(sl, 0.0, 5.0);
+ elm_slider_value_set(sl, elm_scroll_bring_in_scroll_friction_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", bis_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", bis_change, NULL);
+
+ LABEL_FRAME_ADD("<hilight>Zoom scroll friction</>");
+
+ sl = elm_slider_add(win);
+ elm_object_tooltip_text_set(sl, "This is the amount of inertia inertia<br>"
+ "scrollers will impose at animations<br>"
+ "triggered by Elementary widgets' zooming API");
+ evas_object_data_set(win, "zoom_scroll_friction_slider", sl);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.1f");
+ elm_slider_indicator_format_set(sl, "%1.1f");
+ elm_slider_min_max_set(sl, 0.0, 5.0);
+ elm_slider_value_set(sl, elm_scroll_zoom_friction_get());
+ elm_box_pack_end(bx, sl);
+ evas_object_show(sl);
+
+ evas_object_smart_callback_add(sl, "changed", zf_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", zf_change, NULL);
+
+ evas_object_data_set(win, "scrolling", sc);
+
+ elm_pager_content_push(pager, sc);
}
static char *
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Cache Flush Interval</>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Cache Flush Interval</>");
sl = elm_slider_add(win);
evas_object_data_set(win, "cache_flush_interval_slider", sl);
elm_box_pack_end(bx, sp);
evas_object_show(sp);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Font Cache Size</>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Font Cache Size</>");
sl = elm_slider_add(win);
evas_object_data_set(win, "font_cache_slider", sl);
elm_box_pack_end(bx, sp);
evas_object_show(sp);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Image Cache Size</><br>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Image Cache Size</>");
sl = elm_slider_add(win);
evas_object_data_set(win, "image_cache_slider", sl);
elm_box_pack_end(bx, sp);
evas_object_show(sp);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Number of Edje Files to Cache</>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Number of Edje Files to Cache</>");
sl = elm_slider_add(win);
evas_object_data_set(win, "edje_file_cache_slider", sl);
elm_box_pack_end(bx, sp);
evas_object_show(sp);
- pd = elm_frame_add(win);
- evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
- elm_object_style_set(pd, "pad_medium");
- elm_box_pack_end(bx, pd);
- evas_object_show(pd);
-
- lb = elm_label_add(win);
- evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
- elm_label_label_set(lb, "<hilight>Number of Edje Collections to Cache</>");
- elm_frame_content_set(pd, lb);
- evas_object_show(lb);
+ LABEL_FRAME_ADD("<hilight>Number of Edje Collections to Cache</>");
sl = elm_slider_add(win);
evas_object_data_set(win, "edje_collection_cache_slider", sl);
EAPI void elm_object_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir) EINA_ARG_NONNULL(1);
EAPI void elm_object_focus_direction_go(Evas_Object *obj, int x, int y) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_scroll_bounce_enabled_get(void);
+ EAPI void elm_scroll_bounce_enabled_set(Eina_Bool enabled);
+ EAPI void elm_scroll_bounce_enabled_all_set(Eina_Bool enabled);
+ EAPI double elm_scroll_bounce_friction_get(void);
+ EAPI void elm_scroll_bounce_friction_set(double friction);
+ EAPI void elm_scroll_bounce_friction_all_set(double friction);
+ EAPI double elm_scroll_page_scroll_friction_get(void);
+ EAPI void elm_scroll_page_scroll_friction_set(double friction);
+ EAPI void elm_scroll_page_scroll_friction_all_set(double friction);
+ EAPI double elm_scroll_bring_in_scroll_friction_get(void);
+ EAPI void elm_scroll_bring_in_scroll_friction_set(double friction);
+ EAPI void elm_scroll_bring_in_scroll_friction_all_set(double friction);
+ EAPI double elm_scroll_zoom_friction_get(void);
+ EAPI void elm_scroll_zoom_friction_set(double friction);
+ EAPI void elm_scroll_zoom_friction_all_set(double friction);
+ EAPI Eina_Bool elm_scroll_thumbscroll_enabled_get(void);
+ EAPI void elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled);
+ EAPI void elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled);
+ EAPI unsigned int elm_scroll_thumbscroll_threshold_get(void);
+ EAPI void elm_scroll_thumbscroll_threshold_set(unsigned int threshold);
+ EAPI void elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold);
+ EAPI double elm_scroll_thumbscroll_momentum_threshold_get(void);
+ EAPI void elm_scroll_thumbscroll_momentum_threshold_set(double threshold);
+ EAPI void elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold);
+ EAPI double elm_scroll_thumbscroll_friction_get(void);
+ EAPI void elm_scroll_thumbscroll_friction_set(double friction);
+ EAPI void elm_scroll_thumbscroll_friction_all_set(double friction);
+ EAPI double elm_scroll_thumbscroll_border_friction_get(void);
+ EAPI void elm_scroll_thumbscroll_border_friction_set(double friction);
+ EAPI void elm_scroll_thumbscroll_border_friction_all_set(double friction);
+
EAPI void elm_object_scroll_hold_push(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_object_scroll_hold_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_object_scroll_freeze_push(Evas_Object *obj) EINA_ARG_NONNULL(1);
* "focus,out" - window lost focus
* "moved" - window that holds the canvas was moved
*/
-
+
/* bg */
typedef enum _Elm_Bg_Option
{
ELM_BG_OPTION_STRETCH, /**< stretch the background to fill */
ELM_BG_OPTION_TILE /**< tile background at its original size */
} Elm_Bg_Option;
-
+
EAPI Evas_Object *elm_bg_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_bg_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1);
EAPI void elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
ELM_ICON_STANDARD
} Elm_Icon_Type;
typedef struct _Elm_Hoversel_Item Elm_Hoversel_Item; /**< Item of Elm_Hoversel. Sub-type of Elm_Widget_Item */
-
+
EAPI Evas_Object *elm_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
* "generate,error" - the thumbnail generation failed
* "load,error" - the thumbnail image loading failed
*/
-
+
/* hoversel */
EAPI Evas_Object *elm_hoversel_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1);
typedef struct _Elm_Toolbar_Item Elm_Toolbar_Item; /**< Item of Elm_Toolbar. Sub-type of Elm_Widget_Item */
typedef struct _Elm_Toolbar_Item_State Elm_Toolbar_Item_State; /** State of a Elm_Toolbar_Item */
-
+
EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size) EINA_ARG_NONNULL(1);
EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
* default
* transparent (no background or shadow, just show the provided content)
*/
-
+
/* tooltip */
EAPI double elm_tooltip_delay_get(void);
EAPI Eina_Bool elm_tooltip_delay_set(double delay);
/* index */
typedef struct _Elm_Index_Item Elm_Index_Item; /**< Item of Elm_Index. Sub-type of Elm_Widget_Item */
-
+
EAPI Evas_Object *elm_index_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_index_active_set(Evas_Object *obj, Eina_Bool active) EINA_ARG_NONNULL(1);
EAPI void elm_index_item_level_set(Evas_Object *obj, int level) EINA_ARG_NONNULL(1);
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL,
ELM_PHOTOCAM_ZOOM_MODE_LAST
} Elm_Photocam_Zoom_Mode;
-
+
EAPI Evas_Object *elm_photocam_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file) EINA_ARG_NONNULL(1);
EAPI const char *elm_photocam_file_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
typedef Evas_Object *(*ElmMapMarkerIconGetFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data);
typedef Evas_Object *(*ElmMapGroupIconGetFunc) (Evas_Object *obj, void *data);
typedef char *(*ElmMapSourceURLFunc) (int x, int y, int zoom);
-
+
EAPI Evas_Object *elm_map_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1);
EAPI double elm_map_zoom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
ELM_PANEL_ORIENT_LEFT,
ELM_PANEL_ORIENT_RIGHT,
} Elm_Panel_Orient;
-
+
EAPI Evas_Object *elm_panel_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient) EINA_ARG_NONNULL(1);
EAPI Elm_Panel_Orient elm_panel_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/* smart callbacks called:
* "animate,done" - when a flip animation is finished
*/
-
+
/* scrolledentry */
EAPI Evas_Object *elm_scrolled_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1);
*/
/* animator */
- typedef enum
+ typedef enum
{
ELM_ANIMATOR_CURVE_LINEAR,
ELM_ANIMATOR_CURVE_IN_OUT,
EAPI void elm_animator_resume(Elm_Animator *animator) EINA_ARG_NONNULL(1);
/* calendar */
- typedef enum
+ typedef enum
{
- ELM_CALENDAR_UNIQUE,
+ ELM_CALENDAR_UNIQUE,
ELM_CALENDAR_DAILY,
ELM_CALENDAR_WEEKLY,
- ELM_CALENDAR_MONTHLY,
+ ELM_CALENDAR_MONTHLY,
ELM_CALENDAR_ANNUALLY
} Elm_Calendar_Mark_Repeat;
typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark;
EAPI void elm_calendar_text_saturday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1);
EAPI void elm_calendar_text_sunday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1);
EAPI void elm_calendar_text_weekday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1);
-
+
/* smart callbacks called:
* changed - emitted when the user select a day or change the displayed
* month.
/* ctxpopup */
typedef struct _Elm_Ctxpopup_Item Elm_Ctxpopup_Item;
-
+
EAPI Evas_Object *elm_ctxpopup_add(Evas_Object* parent) EINA_ARG_NONNULL(1);
EAPI void elm_ctxpopup_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI Evas_Object *elm_ctxpopup_item_icon_get(const Elm_Ctxpopup_Item *item) EINA_ARG_NONNULL(1);
ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE,
ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW
} Elm_Fx_Wipe_Type;
-
+
typedef struct _Elm_Transit Elm_Transit;
EAPI Elm_Transit *elm_transit_add(double duration);
typedef void (*Elm_Store_Item_Fetch_Cb) (void *data, Elm_Store_Item *sti);
typedef void (*Elm_Store_Item_Unfetch_Cb) (void *data, Elm_Store_Item *sti);
typedef void *(*Elm_Store_Item_Mapping_Cb) (void *data, Elm_Store_Item *sti, const char *part);
-
+
typedef enum
{
ELM_STORE_ITEM_MAPPING_NONE = 0,
// can add more here as needed by common apps
ELM_STORE_ITEM_MAPPING_LAST
} Elm_Store_Item_Mapping_Type;
-
+
struct _Elm_Store_Item_Mapping_Icon
{
// FIXME: allow edje file icons
Eina_Bool scale_up : 1;
Eina_Bool scale_down : 1;
};
-
+
struct _Elm_Store_Item_Mapping_Empty
{
Eina_Bool dummy;
};
-
+
struct _Elm_Store_Item_Mapping_Photo
{
int size;
};
-
+
struct _Elm_Store_Item_Mapping_Custom
{
Elm_Store_Item_Mapping_Cb func;
};
-
+
struct _Elm_Store_Item_Mapping
{
Elm_Store_Item_Mapping_Type type;
// add more types here
} details;
};
-
+
struct _Elm_Store_Item_Info
{
Elm_Genlist_Item_Class *item_class;
Elm_Store_Item_Info base;
char *path;
};
-
+
#define ELM_STORE_ITEM_MAPPING_END { ELM_STORE_ITEM_MAPPING_NONE, NULL, 0, { .empty = { EINA_TRUE } } }
#define ELM_STORE_ITEM_MAPPING_OFFSET(st, it) offsetof(st, it)
-
+
EAPI void elm_store_free(Elm_Store *st);
-
+
EAPI Elm_Store *elm_store_filesystem_new(void);
EAPI void elm_store_filesystem_directory_set(Elm_Store *st, const char *dir) EINA_ARG_NONNULL(1);
EAPI const char *elm_store_filesystem_directory_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
EAPI const char *elm_store_item_filesystem_path_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
-
+
EAPI void elm_store_target_genlist_set(Elm_Store *st, Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+
EAPI void elm_store_cache_set(Elm_Store *st, int max) EINA_ARG_NONNULL(1);
EAPI int elm_store_cache_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
EAPI void elm_store_list_func_set(Elm_Store *st, Elm_Store_Item_List_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
EAPI void elm_store_fetch_func_set(Elm_Store *st, Elm_Store_Item_Fetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
EAPI void elm_store_fetch_thread_set(Elm_Store *st, Eina_Bool use_thread) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_store_fetch_thread_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
-
+
EAPI void elm_store_unfetch_func_set(Elm_Store *st, Elm_Store_Item_Unfetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
EAPI void elm_store_sorted_set(Elm_Store *st, Eina_Bool sorted) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_store_sorted_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
EAPI void *elm_store_item_data_get(Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
EAPI const Elm_Store *elm_store_item_store_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
EAPI const Elm_Genlist_Item *elm_store_item_genlist_item_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
-
+
#ifdef __cplusplus
}
#endif
#ifdef HAVE_ELEMENTARY_X
static Ecore_X_Atom atom = 0;
- if (!atom)
- atom = ecore_x_atom_get("ENLIGHTENMENT_PROFILE");
+ if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_PROFILE");
ecore_x_window_prop_string_set(ecore_x_window_root_first_get(),
atom, profile);
#endif
_elm_config->focus_highlight_animate = !!animate;
}
+/**
+ * @defgroup Scrolling Scrolling
+ *
+ * These are functions setting how scrollable views in Elementary
+ * widgets should behave on user interaction.
+ */
+
+/**
+ * Get whether scrollers should bounce when they reach their
+ * viewport's edge during a scroll.
+ *
+ * @return the thumb scroll bouncing state
+ *
+ * This is the default behavior for touch screens, in general.
+ * @ingroup Scrolling
+ */
+EAPI Eina_Bool
+elm_scroll_bounce_enabled_get(void)
+{
+ return _elm_config->thumbscroll_bounce_enable;
+}
+
+/**
+ * Set whether scrollers should bounce when they reach their
+ * viewport's edge during a scroll.
+ *
+ * @param enabled the thumb scroll bouncing state
+ *
+ * @see elm_thumbscroll_bounce_enabled_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_bounce_enabled_set(Eina_Bool enabled)
+{
+ _elm_config->thumbscroll_bounce_enable = enabled;
+}
+
+/**
+ * Set whether scrollers should bounce when they reach their
+ * viewport's edge during a scroll, for all Elementary application
+ * windows.
+ *
+ * @param enabled the thumb scroll bouncing state
+ *
+ * @see elm_thumbscroll_bounce_enabled_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_bounce_enabled_all_set(Eina_Bool enabled)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int bounce_enable_i = (unsigned int)enabled;
+
+ if (!atom)
+ atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BOUNCE_ENABLE");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &bounce_enable_i, 1);
+#endif
+}
+
+/**
+ * Get the amount of inertia a scroller will impose at bounce
+ * animations.
+ *
+ * @return the thumb scroll bounce friction
+ *
+ * @ingroup Scrolling
+ */
+EAPI double
+elm_scroll_bounce_friction_get(void)
+{
+ return _elm_config->thumbscroll_bounce_friction;
+}
+
+/**
+ * Set the amount of inertia a scroller will impose at bounce
+ * animations.
+ *
+ * @param friction the thumb scroll bounce friction
+ *
+ * @see elm_thumbscroll_bounce_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_bounce_friction_set(double friction)
+{
+ _elm_config->thumbscroll_bounce_friction = friction;
+}
+
+/**
+ * Set the amount of inertia a scroller will impose at bounce
+ * animations, for all Elementary application windows.
+ *
+ * @param friction the thumb scroll bounce friction
+ *
+ * @see elm_thumbscroll_bounce_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_bounce_friction_all_set(double friction)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int bounce_friction_i = (unsigned int)(friction * 1000.0);
+
+ if (!atom)
+ atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BOUNCE_FRICTION");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &bounce_friction_i, 1);
+#endif
+}
+
+/**
+ * Get the amount of inertia a <b>paged</b> scroller will impose at
+ * page fitting animations.
+ *
+ * @return the page scroll friction
+ *
+ * @ingroup Scrolling
+ */
+EAPI double
+elm_scroll_page_scroll_friction_get(void)
+{
+ return _elm_config->page_scroll_friction;
+}
+
+/**
+ * Set the amount of inertia a <b>paged</b> scroller will impose at
+ * page fitting animations.
+ *
+ * @param friction the page scroll friction
+ *
+ * @see elm_thumbscroll_page_scroll_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_page_scroll_friction_set(double friction)
+{
+ _elm_config->page_scroll_friction = friction;
+}
+
+/**
+ * Set the amount of inertia a <b>paged</b> scroller will impose at
+ * page fitting animations, for all Elementary application windows.
+ *
+ * @param friction the page scroll friction
+ *
+ * @see elm_thumbscroll_page_scroll_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_page_scroll_friction_all_set(double friction)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int page_scroll_friction_i = (unsigned int)(friction * 1000.0);
+
+ if (!atom)
+ atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_PAGE_SCROLL_FRICTION");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &page_scroll_friction_i, 1);
+#endif
+}
+
+/**
+ * Get the amount of inertia a scroller will impose at region bring
+ * animations.
+ *
+ * @return the bring in scroll friction
+ *
+ * @ingroup Scrolling
+ */
+EAPI double
+elm_scroll_bring_in_scroll_friction_get(void)
+{
+ return _elm_config->bring_in_scroll_friction;
+}
+
+/**
+ * Set the amount of inertia a scroller will impose at region bring
+ * animations.
+ *
+ * @param friction the bring in scroll friction
+ *
+ * @see elm_thumbscroll_bring_in_scroll_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_bring_in_scroll_friction_set(double friction)
+{
+ _elm_config->bring_in_scroll_friction = friction;
+}
+
+/**
+ * Set the amount of inertia a scroller will impose at region bring
+ * animations, for all Elementary application windows.
+ *
+ * @param friction the bring in scroll friction
+ *
+ * @see elm_thumbscroll_bring_in_scroll_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_bring_in_scroll_friction_all_set(double friction)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int bring_in_scroll_friction_i = (unsigned int)(friction * 1000.0);
+
+ if (!atom)
+ atom =
+ ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BRING_IN_SCROLL_FRICTION");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &bring_in_scroll_friction_i, 1);
+#endif
+}
+
+/**
+ * Get the amount of inertia scrollers will impose at animations
+ * triggered by Elementary widgets' zooming API.
+ *
+ * @return the zoom friction
+ *
+ * @ingroup Scrolling
+ */
+EAPI double
+elm_scroll_zoom_friction_get(void)
+{
+ return _elm_config->zoom_friction;
+}
+
+/**
+ * Set the amount of inertia scrollers will impose at animations
+ * triggered by Elementary widgets' zooming API.
+ *
+ * @param friction the zoom friction
+ *
+ * @see elm_thumbscroll_zoom_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_zoom_friction_set(double friction)
+{
+ _elm_config->zoom_friction = friction;
+}
+
+/**
+ * Set the amount of inertia scrollers will impose at animations
+ * triggered by Elementary widgets' zooming API, for all Elementary
+ * application windows.
+ *
+ * @param friction the zoom friction
+ *
+ * @see elm_thumbscroll_zoom_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_zoom_friction_all_set(double friction)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int zoom_friction_i = (unsigned int)(friction * 1000.0);
+
+ if (!atom)
+ atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_ZOOM_FRICTION");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &zoom_friction_i, 1);
+#endif
+}
+
+/**
+ * Get whether scrollers should be draggable from any point in their
+ * views.
+ *
+ * @return the thumb scroll state
+ *
+ * @note This is the default behavior for touch screens, in general.
+ * @note All other functions namespaced with "thumbscroll" will only
+ * have effect if this mode is enabled.
+ *
+ * @ingroup Scrolling
+ */
+EAPI Eina_Bool
+elm_scroll_thumbscroll_enabled_get(void)
+{
+ return _elm_config->thumbscroll_enable;
+}
+
+/**
+ * Set whether scrollers should be draggable from any point in their
+ * views.
+ *
+ * @param enabled the thumb scroll state
+ *
+ * @see elm_thumbscroll_enabled_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
+{
+ _elm_config->thumbscroll_enable = enabled;
+}
+
+/**
+ * Set whether scrollers should be draggable from any point in their
+ * views, for all Elementary application windows.
+ *
+ * @param enabled the thumb scroll state
+ *
+ * @see elm_thumbscroll_enabled_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int ts_enable_i = (unsigned int)enabled;
+
+ if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_ENABLE");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &ts_enable_i, 1);
+#endif
+}
+
+/**
+ * Get the number of pixels one should travel while dragging a
+ * scroller's view to actually trigger scrolling.
+ *
+ * @return the thumb scroll threshould
+ *
+ * One would use higher values for touch screens, in general, because
+ * of their inherent imprecision.
+ * @ingroup Scrolling
+ */
+EAPI unsigned int
+elm_scroll_thumbscroll_threshold_get(void)
+{
+ return _elm_config->thumbscroll_threshold;
+}
+
+/**
+ * Set the number of pixels one should travel while dragging a
+ * scroller's view to actually trigger scrolling.
+ *
+ * @param threshold the thumb scroll threshould
+ *
+ * @see elm_thumbscroll_threshould_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_threshold_set(unsigned int threshold)
+{
+ _elm_config->thumbscroll_threshold = threshold;
+}
+
+/**
+ * Set the number of pixels one should travel while dragging a
+ * scroller's view to actually trigger scrolling, for all Elementary
+ * application windows.
+ *
+ * @param threshold the thumb scroll threshould
+ *
+ * @see elm_thumbscroll_threshould_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int ts_threshold_i = (unsigned int)threshold;
+
+ if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_THRESHOLD");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &ts_threshold_i, 1);
+#endif
+}
+
+/**
+ * Get the minimum speed of mouse cursor movement which will trigger
+ * list self scrolling animation after a mouse up event
+ * (pixels/second).
+ *
+ * @return the thumb scroll momentum threshould
+ *
+ * @ingroup Scrolling
+ */
+EAPI double
+elm_scroll_thumbscroll_momentum_threshold_get(void)
+{
+ return _elm_config->thumbscroll_momentum_threshold;
+}
+
+/**
+ * Set the minimum speed of mouse cursor movement which will trigger
+ * list self scrolling animation after a mouse up event
+ * (pixels/second).
+ *
+ * @param threshold the thumb scroll momentum threshould
+ *
+ * @see elm_thumbscroll_momentum_threshould_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_momentum_threshold_set(double threshold)
+{
+ _elm_config->thumbscroll_momentum_threshold = threshold;
+}
+
+/**
+ * Set the minimum speed of mouse cursor movement which will trigger
+ * list self scrolling animation after a mouse up event
+ * (pixels/second), for all Elementary application windows.
+ *
+ * @param threshold the thumb scroll momentum threshould
+ *
+ * @see elm_thumbscroll_momentum_threshould_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int ts_momentum_threshold_i = (unsigned int)(threshold * 1000.0);
+
+ if (!atom)
+ atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_MOMENTUM_THRESHOLD");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &ts_momentum_threshold_i, 1);
+#endif
+}
+
+/**
+ * Get the amount of inertia a scroller will impose at self scrolling
+ * animations.
+ *
+ * @return the thumb scroll friction
+ *
+ * @ingroup Scrolling
+ */
+EAPI double
+elm_scroll_thumbscroll_friction_get(void)
+{
+ return _elm_config->thumbscroll_friction;
+}
+
+/**
+ * Set the amount of inertia a scroller will impose at self scrolling
+ * animations.
+ *
+ * @param friction the thumb scroll friction
+ *
+ * @see elm_thumbscroll_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_friction_set(double friction)
+{
+ _elm_config->thumbscroll_friction = friction;
+}
+
+/**
+ * Set the amount of inertia a scroller will impose at self scrolling
+ * animations, for all Elementary application windows.
+ *
+ * @param friction the thumb scroll friction
+ *
+ * @see elm_thumbscroll_friction_get()
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_friction_all_set(double friction)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int ts_friction_i = (unsigned int)(friction * 1000.0);
+
+ if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_FRICTION");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &ts_friction_i, 1);
+#endif
+}
+
+/**
+ * Get the amount of lag between your actual mouse cursor dragging
+ * movement and a scroller's view movement itself, while pushing it
+ * into bounce state manually.
+ *
+ * @return the thumb scroll border friction
+ *
+ * @ingroup Scrolling
+ */
+EAPI double
+elm_scroll_thumbscroll_border_friction_get(void)
+{
+ return _elm_config->thumbscroll_border_friction;
+}
+
+/**
+ * Set the amount of lag between your actual mouse cursor dragging
+ * movement and a scroller's view movement itself, while pushing it
+ * into bounce state manually.
+ *
+ * @param friction the thumb scroll border friction. @c 0.0 for
+ * perfect synchrony between two movements, @c 1.0 for maximum
+ * lag.
+ *
+ * @see elm_thumbscroll_border_friction_get()
+ * @note parameter value will get bound to 0.0 - 1.0 interval, always
+ *
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_border_friction_set(double friction)
+{
+ if (friction < 0.0)
+ friction = 0.0;
+
+ if (friction > 1.0)
+ friction = 1.0;
+
+ _elm_config->thumbscroll_friction = friction;
+}
+
+/**
+ * Set the amount of lag between your actual mouse cursor dragging
+ * movement and a scroller's view movement itself, while pushing it
+ * into bounce state manually, for all Elementary application windows.
+ *
+ * @param friction the thumb scroll border friction. @c 0.0 for
+ * perfect synchrony between two movements, @c 1.0 for maximum
+ * lag.
+ *
+ * @see elm_thumbscroll_border_friction_get()
+ * @note parameter value will get bound to 0.0 - 1.0 interval, always
+ *
+ * @ingroup Scrolling
+ */
+EAPI void
+elm_scroll_thumbscroll_border_friction_all_set(double friction)
+{
+ if (friction < 0.0)
+ friction = 0.0;
+
+ if (friction > 1.0)
+ friction = 1.0;
+
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int border_friction_i = (unsigned int)(friction * 1000.0);
+
+ if (!atom)
+ atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BORDER_FRICTION");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &border_friction_i, 1);
+#endif
+}
+
/**
* @defgroup Scrollhints Scrollhints
*