gui_option -> option_gui.
This commit is contained in:
parent
fdd71ced73
commit
6e4a28e462
|
@ -10,7 +10,7 @@ elm_theme_viewer_LDADD = @ELM_THEME_VIEWER_LIBS@
|
|||
|
||||
elm_theme_viewer_SOURCES = \
|
||||
gui.c gui.h \
|
||||
gui_option.c gui_option.h \
|
||||
option_gui.c option_gui.h \
|
||||
option.c option.h \
|
||||
log.c log.h \
|
||||
theme.c theme.h \
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "widget.h"
|
||||
#include "widget_option.h"
|
||||
#include "gui.h"
|
||||
#include "gui_option.h"
|
||||
#include "option_gui.h"
|
||||
#include "gui_mobile.h"
|
||||
#include "util.h"
|
||||
#include "option.h"
|
||||
|
@ -245,7 +245,7 @@ _toolbar_option_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
Elm_Object_Item *it = event_info;
|
||||
|
||||
elm_toolbar_item_selected_set(it, EINA_FALSE);
|
||||
gui_option_create();
|
||||
option_gui_create();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "theme.h"
|
||||
#include "widget.h"
|
||||
#include "gui.h"
|
||||
#include "gui_option.h"
|
||||
#include "option_gui.h"
|
||||
|
||||
void gui_mobile_description_set(void);
|
||||
Evas_Object *bt_desc;
|
||||
|
@ -31,7 +31,7 @@ _option_finger_size_sel_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
elm_layout_content_set(gd->gui_layout, "option_set", o);
|
||||
evas_object_show(o);
|
||||
|
||||
gui_option_finger_size_create(box);
|
||||
option_gui_finger_size_create(box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -47,7 +47,7 @@ _option_scale_sel_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
elm_layout_content_set(gd->gui_layout, "option_set", o);
|
||||
evas_object_show(o);
|
||||
|
||||
gui_option_scale_create(box);
|
||||
option_gui_scale_create(box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -63,9 +63,9 @@ _option_size_sel_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
elm_layout_content_set(gd->gui_layout, "option_set", o);
|
||||
evas_object_show(o);
|
||||
|
||||
gui_option_force_resize_create(box);
|
||||
gui_option_width_size_create(box);
|
||||
gui_option_height_size_create(box);
|
||||
option_gui_force_resize_create(box);
|
||||
option_gui_width_size_create(box);
|
||||
option_gui_height_size_create(box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#ifndef __INCLUDE_GUI_OPTION__
|
||||
#define __INCLUDE_GUI_OPTION__
|
||||
|
||||
typedef struct _Gui_Option_Data Gui_Option_Data;
|
||||
struct _Gui_Option_Data
|
||||
{
|
||||
Evas_Object *size_width_slider;
|
||||
Evas_Object *size_height_slider;
|
||||
Eina_Bool option_force_resize_prev;
|
||||
Evas_Coord option_size_width_prev;
|
||||
Evas_Coord option_size_height_prev;
|
||||
double option_scale_prev;
|
||||
};
|
||||
|
||||
void gui_option_finger_size_create(Evas_Object *box);
|
||||
void gui_option_scale_create(Evas_Object *box);
|
||||
void gui_option_force_resize_create(Evas_Object *box);
|
||||
void gui_option_width_size_create(Evas_Object *box);
|
||||
void gui_option_height_size_create(Evas_Object *box);
|
||||
void gui_option_create(void);
|
||||
|
||||
#endif
|
|
@ -3,10 +3,10 @@
|
|||
#include "log.h"
|
||||
#include "util.h"
|
||||
#include "gui.h"
|
||||
#include "gui_option.h"
|
||||
#include "option_gui.h"
|
||||
#include "option.h"
|
||||
|
||||
Gui_Option_Data *god = NULL;
|
||||
Option_Gui_Data *ogd = NULL;
|
||||
extern Gui_Data *gd;
|
||||
|
||||
static void
|
||||
|
@ -15,16 +15,16 @@ _force_resize_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
{
|
||||
option_force_resize_set(elm_check_state_get(obj));
|
||||
|
||||
elm_object_disabled_set(god->size_width_slider, !option_force_resize_get());
|
||||
elm_object_disabled_set(god->size_height_slider, !option_force_resize_get());
|
||||
elm_object_disabled_set(ogd->size_width_slider, !option_force_resize_get());
|
||||
elm_object_disabled_set(ogd->size_height_slider, !option_force_resize_get());
|
||||
}
|
||||
|
||||
void
|
||||
gui_option_force_resize_create(Evas_Object *box)
|
||||
option_gui_force_resize_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
god->option_force_resize_prev = option_force_resize_get();
|
||||
ogd->option_force_resize_prev = option_force_resize_get();
|
||||
|
||||
o = elm_check_add(box);
|
||||
elm_object_text_set(o, "Force resize");
|
||||
|
@ -51,12 +51,12 @@ _size_width_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_width_size_create(Evas_Object *box)
|
||||
option_gui_width_size_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o;
|
||||
Evas_Coord w = 0;
|
||||
|
||||
option_size_get(&god->option_size_width_prev, NULL);
|
||||
option_size_get(&ogd->option_size_width_prev, NULL);
|
||||
|
||||
o = elm_label_add(box);
|
||||
elm_object_text_set(o, "Size Width");
|
||||
|
@ -65,7 +65,7 @@ gui_option_width_size_create(Evas_Object *box)
|
|||
elm_box_pack_end(box, o);
|
||||
evas_object_show(o);
|
||||
|
||||
god->size_width_slider = o = elm_slider_add(box);
|
||||
ogd->size_width_slider = o = elm_slider_add(box);
|
||||
elm_slider_unit_format_set(o, "%1.0f");
|
||||
elm_slider_indicator_format_set(o, "%1.0f");
|
||||
elm_slider_min_max_set(o, SIZE_WIDTH_MIN, SIZE_WIDTH_MAX);
|
||||
|
@ -95,12 +95,12 @@ _size_height_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_height_size_create(Evas_Object *box)
|
||||
option_gui_height_size_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o;
|
||||
Evas_Coord h = 0;
|
||||
|
||||
option_size_get(NULL, &god->option_size_height_prev);
|
||||
option_size_get(NULL, &ogd->option_size_height_prev);
|
||||
|
||||
o = elm_label_add(box);
|
||||
elm_object_text_set(o, "Size Height");
|
||||
|
@ -109,7 +109,7 @@ gui_option_height_size_create(Evas_Object *box)
|
|||
elm_box_pack_end(box, o);
|
||||
evas_object_show(o);
|
||||
|
||||
god->size_height_slider = o = elm_slider_add(box);
|
||||
ogd->size_height_slider = o = elm_slider_add(box);
|
||||
elm_slider_unit_format_set(o, "%1.0f");
|
||||
elm_slider_indicator_format_set(o, "%1.0f");
|
||||
elm_slider_min_max_set(o, SIZE_HEIGHT_MIN, SIZE_HEIGHT_MAX);
|
||||
|
@ -135,7 +135,7 @@ _disabled_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_disabled_create(Evas_Object *box)
|
||||
option_gui_disabled_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o = NULL;
|
||||
|
||||
|
@ -157,7 +157,7 @@ _focus_highlight_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_focus_highlight_create(Evas_Object *box)
|
||||
option_gui_focus_highlight_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o = NULL;
|
||||
o = elm_check_add(box);
|
||||
|
@ -179,7 +179,7 @@ _focus_highlight_animate_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_focus_highlight_animate_create(Evas_Object *box)
|
||||
option_gui_focus_highlight_animate_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o = NULL;
|
||||
o = elm_check_add(box);
|
||||
|
@ -208,7 +208,7 @@ _custom_color_mouse_up_cb(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_background_create(Evas_Object *box)
|
||||
option_gui_background_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o = NULL, *bx = NULL, *rdg = NULL;
|
||||
|
||||
|
@ -286,7 +286,7 @@ _finger_size_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_finger_size_create(Evas_Object *box)
|
||||
option_gui_finger_size_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
|
@ -326,11 +326,11 @@ _scale_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
gui_option_scale_create(Evas_Object *box)
|
||||
option_gui_scale_create(Evas_Object *box)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
god->option_scale_prev = option_scale_get();
|
||||
ogd->option_scale_prev = option_scale_get();
|
||||
|
||||
o = elm_label_add(box);
|
||||
elm_object_text_set(o, "Scale");
|
||||
|
@ -366,7 +366,7 @@ _option_separator_create(Evas_Object *parent)
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_gui_option_content_create(Evas_Object *parent)
|
||||
_option_gui_content_create(Evas_Object *parent)
|
||||
{
|
||||
Evas_Object *o = NULL, *frame = NULL, *sc = NULL, *box = NULL, *table = NULL;
|
||||
|
||||
|
@ -388,35 +388,35 @@ _gui_option_content_create(Evas_Object *parent)
|
|||
evas_object_show(o);
|
||||
|
||||
// finger size
|
||||
gui_option_finger_size_create(box);
|
||||
option_gui_finger_size_create(box);
|
||||
|
||||
elm_box_pack_end(box, _option_separator_create(box));
|
||||
|
||||
// scale
|
||||
gui_option_scale_create(box);
|
||||
option_gui_scale_create(box);
|
||||
|
||||
elm_box_pack_end(box, _option_separator_create(box));
|
||||
|
||||
// size
|
||||
gui_option_force_resize_create(box);
|
||||
gui_option_width_size_create(box);
|
||||
gui_option_height_size_create(box);
|
||||
option_gui_force_resize_create(box);
|
||||
option_gui_width_size_create(box);
|
||||
option_gui_height_size_create(box);
|
||||
|
||||
elm_box_pack_end(box, _option_separator_create(box));
|
||||
|
||||
// disabled set
|
||||
gui_option_disabled_create(box);
|
||||
option_gui_disabled_create(box);
|
||||
|
||||
// focus highlight enabled
|
||||
gui_option_focus_highlight_create(box);
|
||||
option_gui_focus_highlight_create(box);
|
||||
|
||||
// focus highlight animate
|
||||
gui_option_focus_highlight_animate_create(box);
|
||||
option_gui_focus_highlight_animate_create(box);
|
||||
|
||||
elm_box_pack_end(box, _option_separator_create(box));
|
||||
|
||||
// background change option
|
||||
gui_option_background_create(box);
|
||||
option_gui_background_create(box);
|
||||
|
||||
// padding
|
||||
o = elm_box_add(box);
|
||||
|
@ -463,30 +463,30 @@ _option_popup_cancel_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
|
|||
Evas_Object *popup = data;
|
||||
if (!popup) return;
|
||||
|
||||
option_scale_set(god->option_scale_prev);
|
||||
option_force_resize_set(god->option_force_resize_prev);
|
||||
option_size_set(god->option_size_width_prev, god->option_size_height_prev);
|
||||
option_scale_set(ogd->option_scale_prev);
|
||||
option_force_resize_set(ogd->option_force_resize_prev);
|
||||
option_size_set(ogd->option_size_width_prev, ogd->option_size_height_prev);
|
||||
|
||||
evas_object_del(popup);
|
||||
}
|
||||
|
||||
void
|
||||
gui_option_create(void)
|
||||
option_gui_create(void)
|
||||
{
|
||||
Evas_Object *popup = NULL, *btn = NULL, *content = NULL;
|
||||
|
||||
if (!god)
|
||||
if (!ogd)
|
||||
{
|
||||
god = calloc(1, sizeof(Gui_Option_Data));
|
||||
god->option_size_width_prev = WIDGET_DEFAULT_WIDTH;
|
||||
god->option_size_height_prev = WIDGET_DEFAULT_HEIGHT;
|
||||
god->option_scale_prev = 1.0;
|
||||
ogd = calloc(1, sizeof(Option_Gui_Data));
|
||||
ogd->option_size_width_prev = WIDGET_DEFAULT_WIDTH;
|
||||
ogd->option_size_height_prev = WIDGET_DEFAULT_HEIGHT;
|
||||
ogd->option_scale_prev = 1.0;
|
||||
}
|
||||
|
||||
popup = elm_popup_add(gd->win);
|
||||
elm_object_part_text_set(popup, "title,text", "Option");
|
||||
|
||||
content = _gui_option_content_create(popup);
|
||||
content = _option_gui_content_create(popup);
|
||||
elm_object_content_set(popup, content);
|
||||
|
||||
btn = elm_button_add(popup);
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef __INCLUDE_GUI_OPTION__
|
||||
#define __INCLUDE_GUI_OPTION__
|
||||
|
||||
typedef struct _Option_Gui_Data Option_Gui_Data;
|
||||
struct _Option_Gui_Data
|
||||
{
|
||||
Evas_Object *size_width_slider;
|
||||
Evas_Object *size_height_slider;
|
||||
Eina_Bool option_force_resize_prev;
|
||||
Evas_Coord option_size_width_prev;
|
||||
Evas_Coord option_size_height_prev;
|
||||
double option_scale_prev;
|
||||
};
|
||||
|
||||
void option_gui_finger_size_create(Evas_Object *box);
|
||||
void option_gui_scale_create(Evas_Object *box);
|
||||
void option_gui_force_resize_create(Evas_Object *box);
|
||||
void option_gui_width_size_create(Evas_Object *box);
|
||||
void option_gui_height_size_create(Evas_Object *box);
|
||||
void option_gui_create(void);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue