static void /* scaling callback */ _btn_scale_cb(void *data, Evas_Object *obj, void *event) { elm_object_scale_set(d.btn, elm_slider_value_get(obj)); }
static void slider_print_value(void *data, Evas_Object *obj, void *event_info) { Evas_Object *slider = data; double value; value = elm_slider_value_get(slider); printf("%f\n", value); }
SH_API void slider_callback(void *data, Evas_Object *obj, void *event_info) { Evas_Object *slider = data; double value; value = elm_slider_value_get(slider); printf("%f\n", value); elm_exit(); }
/* page relative size change */ static void _page_change_cb(void *data, Evas_Object *obj, void *event_info) { double val = elm_slider_value_get(obj); elm_scroller_page_relative_set(data, val, val); fprintf(stdout, "Setting grid page's relative size to %f\n", val); }
static void _slider_changed_cb(void *data, Evas_Object *obj, void *event_info) { sd->slider_runing = TRUE; double val = elm_slider_value_get(obj); uint32_t new_play_time = val * sd->cur_track_duration; INF("val: %f ,new play time : %d, cur duration : %d\n", val, new_play_time, sd->cur_track_duration ); emusic_playback_seek(new_play_time); sd->slider_runing = FALSE; }
static void _v_align_change_cb(void *data, Evas_Object *obj, void *event_info) { double h_align; double val = elm_slider_value_get(obj); elm_gengrid_align_get(data, &h_align, NULL); fprintf(stdout, "Setting vertical alignment to %f\n", val); elm_gengrid_align_set(data, h_align, val); }
/* items grid horizontal alignment change */ static void _h_align_change_cb(void *data, Evas_Object *obj, void *event_info) { double v_align; double val = elm_slider_value_get(obj); elm_gengrid_align_get(data, NULL, &v_align); fprintf(stdout, "Setting horizontal alignment to %f\n", val); elm_gengrid_align_set(data, val, v_align); }
{ return (char*)eina_stringshare_printf("%'d", sback_double_to_expo_int(d)); } static char * sback_units_format(double d) { return (char*)eina_stringshare_printf(_("%'d lines"), sback_double_to_expo_int(d)); } static void _cb_op_behavior_sback_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED) { Evas_Object *term = data; Config *config = termio_config_get(term); config->scrollback = (double) sback_double_to_expo_int(elm_slider_value_get(obj)); termio_config_update(term); config_save(config, NULL); } static void _cb_op_behavior_tab_zoom_slider_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED) { Evas_Object *term = data; Config *config = termio_config_get(term); config->tab_zoom = (double)(int)round(elm_slider_value_get(obj) * 10.0) / 10.0; termio_config_update(term); config_save(config, NULL); }
#include <Elementary.h> #ifdef HAVE_CONFIG_H # include "elementary_config.h" #endif #ifndef ELM_LIB_QUICKLAUNCH void _change_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) { double val = elm_slider_value_get(obj); elm_slider_value_set(data, val); } void test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Object *win, *bg, *bx, *sl, *ic, *sl1, *bx2; char buf[PATH_MAX]; win = elm_win_add(NULL, "slider", ELM_WIN_BASIC); elm_win_title_set(win, "Slider"); elm_win_autodel_set(win, EINA_TRUE); 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); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bx);
static void _zoom(void *data, Evas_Object *obj, void *event_info) { double z = elm_slider_value_get(obj) * 8; elm_photocam_zoom_set(data, z); }
_cube_update(Evas_Object *win, Cube *c) { Evas_Coord w, h; evas_object_geometry_get(win, NULL, NULL, &w, &h); _cube_pos(c, (w / 2), (h / 2), 512, rotx, roty, rotz, (w / 2) + cxo, (h / 2) + cyo, z0v, focv); } void _ch_rot_x(void *data, Evas_Object *obj, void *event_info __UNUSED__) { Evas_Object *win = data; rotx = elm_slider_value_get(obj); _cube_update(win, cube); } void _ch_rot_y(void *data, Evas_Object *obj, void *event_info __UNUSED__) { Evas_Object *win = data; roty = elm_slider_value_get(obj); _cube_update(win, cube); } void _ch_rot_z(void *data, Evas_Object *obj, void *event_info __UNUSED__) { Evas_Object *win = data;
void slider_change_cb(void *data, Evas_Object *obj, void *event_info ) { e->quality = elm_slider_value_get(obj); printf("Percent: %1.0f\n",e->quality); }
EXPAND(sl); \ FILL(sl); \ elm_slider_unit_format_set(sl, UNITS); \ elm_slider_min_max_set(sl, 0, MAX); \ elm_object_text_set(sl, LABEL); \ elm_object_tooltip_text_set(sl, TOOLTIP); \ elm_object_tooltip_window_mode_set(sl, EINA_TRUE); \ evas_object_smart_callback_add(sl, "delay,changed", (Evas_Smart_Cb)_settings_ ##CB## _change, ui); \ elm_box_pack_end(frbox, sl); \ evas_object_show(sl); \ } while (0) static void _settings_image_size_change(UI_WIN *ui, Evas_Object *obj, void *event_info __UNUSED__) { ui->settings->allowed_image_size = elm_slider_value_get(obj); } static void _settings_image_age_change(UI_WIN *ui, Evas_Object *obj, void *event_info __UNUSED__) { ui->settings->allowed_image_age = elm_slider_value_get(obj); } static void _settings_logging_change(Contact_List *cl, Evas_Object *obj, void *event_info __UNUSED__) { Eina_List *l, *ll; const char *dir; Chat_Window *cw; Contact *c;
double Slider::getValue () const { return elm_slider_value_get (o); }
void volumebar_drag_stop_cb(void *data, Evas_Object *obj, void *event_info) { int volume = (int)elm_slider_value_get(obj); cmd_volume_change_all((rockon_data*)data, volume); ((rockon_data*)data)->widgets.volumebar_update = 1; }
void seekbar_drag_stop_cb(void *data, Evas_Object *obj, void *event_info) { int seconds = (int)elm_slider_value_get(obj); cmd_seek_ms((rockon_data*)data, seconds*1000); ((rockon_data*)data)->widgets.seekbar_update = 1; }