forked from enlightenment/efl
[elm] Introducing a new widget, along with its infrastructure -- prefs.
The prefs widgets aims to aid with the implementation of preference/configuration windows/UI elements in Elementary-based applications (think of Enlightenment configuration dialogs, elementary_config, etc). Prefs is a widget that populates its view with widgets bound to data types (following the instructions of a ".epb" file that describes a set of items) and handles the storage/restoration of such data on a configuration file automatically. There's also the prefs_data handle, which is the one dealing with user saved data for a given epb defaults set. The documentation on the new widget is rich (we have examples and even an EPC reference) and there's a new test entry for it. I'm blogging about it soon, with screeshots and more details. Enjoy. ps.: This is a team work by Murilo Belluzzo, Ricardo de Almeida and me. SVN revision: 79909
This commit is contained in:
parent
4029295408
commit
87648e9ace
|
@ -69,3 +69,5 @@ Jiyoun Park <jy0703.park@samsung.com>
|
|||
KoziarekBeata <b.koziarek@samsung.com>
|
||||
Daniel Zaoui <daniel.zaoui@samsung.com>
|
||||
Yakov Goldberg <yakov.g@samsung.com>
|
||||
Murilo Belluzzo <murilo.belluzzo@profusion.mobi>
|
||||
Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>
|
||||
|
|
|
@ -31,7 +31,7 @@ group "Elm_Config" struct {
|
|||
value "finger_size" int: 40;
|
||||
value "fps" double: 60.0;
|
||||
value "theme" string: "default";
|
||||
value "modules" string: "access_output>access/api:datetime_input_ctxpopup>datetime/api";
|
||||
value "modules" string: "prefs>prefs_iface:access_output>access/api:datetime_input_ctxpopup>datetime/api";
|
||||
value "tooltip_delay" double: 1.0;
|
||||
value "cursor_engine_only" uchar: 1;
|
||||
value "focus_highlight_enable" uchar: 0;
|
||||
|
|
|
@ -31,7 +31,7 @@ group "Elm_Config" struct {
|
|||
value "finger_size" int: 40;
|
||||
value "fps" double: 60.0;
|
||||
value "theme" string: "default";
|
||||
value "modules" string: "access_output>access/api:datetime_input_ctxpopup>datetime/api";
|
||||
value "modules" string: "prefs>prefs_iface:access_output>access/api:datetime_input_ctxpopup>datetime/api";
|
||||
value "tooltip_delay" double: 1.0;
|
||||
value "cursor_engine_only" uchar: 1;
|
||||
value "focus_highlight_enable" uchar: 0;
|
||||
|
|
|
@ -31,7 +31,7 @@ group "Elm_Config" struct {
|
|||
value "finger_size" int: 5;
|
||||
value "fps" double: 60.0;
|
||||
value "theme" string: "default-desktop";
|
||||
value "modules" string: "access_output>access/api:datetime_input_ctxpopup>datetime/api";
|
||||
value "modules" string: "prefs>prefs_iface:access_output>access/api:datetime_input_ctxpopup>datetime/api";
|
||||
value "tooltip_delay" double: 1.0;
|
||||
value "cursor_engine_only" uchar: 1;
|
||||
value "focus_highlight_enable" uchar: 0;
|
||||
|
|
|
@ -705,11 +705,13 @@ AC_SUBST(requirement_elm)
|
|||
EFL_WITH_BIN([eet], [eet-eet], [eet])
|
||||
EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
|
||||
EFL_WITH_BIN([elementary], [elementary-codegen], [elementary_codegen])
|
||||
EFL_WITH_BIN([elementary], [elm-prefs-cc], [elm_prefs_cc])
|
||||
|
||||
EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
|
||||
|
||||
EFL_ENABLE_BIN([elementary-test])
|
||||
EFL_ENABLE_BIN([elementary-codegen])
|
||||
EFL_ENABLE_BIN([elm-prefs-cc])
|
||||
EFL_ENABLE_BIN([elementary-config])
|
||||
|
||||
m4_ifdef([AM_GNU_GETTEXT_VERSION], [
|
||||
|
@ -767,6 +769,7 @@ src/lib/Makefile
|
|||
src/lib/Elementary.h
|
||||
src/bin/Makefile
|
||||
src/modules/Makefile
|
||||
src/modules/prefs/Makefile
|
||||
src/modules/access_output/Makefile
|
||||
src/modules/datetime_input_ctxpopup/Makefile
|
||||
src/modules/test_entry/Makefile
|
||||
|
@ -826,6 +829,7 @@ echo " edje_cc..................: ${edje_cc}"
|
|||
echo
|
||||
echo " Build elementary_test....: ${have_elementary_test}"
|
||||
echo " Build elementary_codegen.: ${have_elementary_codegen}"
|
||||
echo " Build elm_prefs_cc.......: ${have_elm_prefs_cc}"
|
||||
echo " Examples.................: ${enable_build_examples}"
|
||||
echo " Examples installed.......: ${enable_install_examples}"
|
||||
echo " Build elementary_config..: ${have_elementary_config}"
|
||||
|
|
|
@ -9,11 +9,15 @@ EDJE_FLAGS = $(EDJE_FLAGS_$(V)) -id $(top_srcdir)/data/objects -fd $(top_srcdir)
|
|||
|
||||
filesdir = $(datadir)/elementary/objects
|
||||
|
||||
files_DATA = test.edj test_external.edj multip.edj cursors.edj font_preview.edj postit_ent.edj multibuttonentry.edj
|
||||
files_DATA = test.edj test_external.edj multip.edj cursors.edj font_preview.edj postit_ent.edj multibuttonentry.edj test_prefs.edj test_prefs.epb
|
||||
|
||||
ELM_PREFS_CC = @elm_prefs_cc@
|
||||
|
||||
EXTRA_DIST = \
|
||||
test.edc \
|
||||
test_external.edc \
|
||||
test_prefs.edc \
|
||||
test_prefs.epc \
|
||||
multip.edc \
|
||||
cursors.edc \
|
||||
font_preview.edc \
|
||||
|
@ -64,5 +68,15 @@ multibuttonentry.edj: Makefile $(EXTRA_DIST)
|
|||
$(top_srcdir)/data/objects/multibuttonentry.edc \
|
||||
$(top_builddir)/data/objects/multibuttonentry.edj
|
||||
|
||||
test_prefs.edj: Makefile test_prefs.edc
|
||||
$(EDJE_CC) $(EDJE_FLAGS) \
|
||||
$(top_srcdir)/data/objects/test_prefs.edc \
|
||||
$(top_builddir)/data/objects/test_prefs.edj
|
||||
|
||||
test_prefs.epb: Makefile test_prefs.epc
|
||||
$(ELM_PREFS_CC) $(ELM_PREFS_FLAGS) \
|
||||
$(top_srcdir)/data/objects/test_prefs.epc \
|
||||
$(top_builddir)/data/objects/test_prefs.epb
|
||||
|
||||
clean-local:
|
||||
rm -f *.edj
|
||||
|
|
|
@ -0,0 +1,150 @@
|
|||
#define MSG_ID_VEL (1)
|
||||
|
||||
collections {
|
||||
group {
|
||||
name: "prefs_edje";
|
||||
max: 450 450;
|
||||
min: 50 50;
|
||||
|
||||
parts {
|
||||
part {
|
||||
name: "bg";
|
||||
type: RECT;
|
||||
scale: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 450 450;
|
||||
max: 450 450;
|
||||
color: 255 255 255 0;
|
||||
align: 0.0 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "square1";
|
||||
type: RECT;
|
||||
scale: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 50 50;
|
||||
max: 50 50;
|
||||
color: 0 0 255 255;
|
||||
align: 0.0 0.5;
|
||||
}
|
||||
description {
|
||||
state: "invert" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 0 255 0 255;
|
||||
align: 1 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "square2";
|
||||
type: RECT;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 50 50;
|
||||
max: 50 50;
|
||||
color: 0 255 0 255;
|
||||
align: 0.5 0.0;
|
||||
}
|
||||
description {
|
||||
state: "invert" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 0 0 255 255;
|
||||
align: 0.5 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "animation_start";
|
||||
signal: "start";
|
||||
source: "animation";
|
||||
after: "animation,clear";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "call_animation,state1";
|
||||
script {
|
||||
cancel_anim(anim_id);
|
||||
set_int(anim_id, anim(get_float(global_speed), "animation_1", 0));
|
||||
set_int(anim_n, 1);
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "call_animation,state2";
|
||||
script {
|
||||
cancel_anim(anim_id);
|
||||
set_int(anim_id, anim(get_float(global_speed), "animation_2", 0));
|
||||
set_int(anim_n, 2);
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "animation,stop";
|
||||
signal: "stop";
|
||||
source: "animation";
|
||||
script {
|
||||
cancel_anim(get_int(anim_id));
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "animation,clear";
|
||||
script {
|
||||
cancel_anim(get_int(anim_id));
|
||||
if (get_int(anim_n) == 2)
|
||||
set_float(anim_pos, (get_float(anim_pos) - 1) * ( -1));
|
||||
}
|
||||
after: "call_animation,state1";
|
||||
}
|
||||
|
||||
script {
|
||||
public global_speed;
|
||||
public anim_id;
|
||||
public anim_pos;
|
||||
public anim_n;
|
||||
|
||||
public message(Msg_Type:type, id, ...) {
|
||||
if ((type == MSG_FLOAT) && (id == MSG_ID_VEL))
|
||||
set_float(global_speed, Float:getarg(2));
|
||||
}
|
||||
|
||||
public animation_1(val, Float:pos) {
|
||||
if (pos >= get_float(anim_pos) && get_int(anim_n) == 1)
|
||||
{
|
||||
set_tween_state(PART:"square1", pos, "default", 0.0,
|
||||
"invert", 0.0);
|
||||
set_tween_state(PART:"square2", pos, "default", 0.0,
|
||||
"invert", 0.0);
|
||||
set_float(anim_pos, pos);
|
||||
}
|
||||
if (pos >= 1)
|
||||
{
|
||||
run_program(PROGRAM:"call_animation,state2");
|
||||
set_float(anim_pos, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
public animation_2(val, Float:pos) {
|
||||
if (pos >= get_float(anim_pos) && get_int(anim_n) == 2)
|
||||
{
|
||||
set_tween_state(PART:"square1", pos, "invert", 0.0,
|
||||
"default", 0.0);
|
||||
set_tween_state(PART:"square2", pos, "invert", 0.0,
|
||||
"default", 0.0);
|
||||
set_float(anim_pos, pos);
|
||||
}
|
||||
if (pos >= 1)
|
||||
{
|
||||
run_program(PROGRAM:"call_animation,state1");
|
||||
set_float(anim_pos, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#undef MSG_ID_VEL
|
|
@ -0,0 +1,113 @@
|
|||
collection
|
||||
{
|
||||
page
|
||||
{
|
||||
name: "main";
|
||||
version: 1;
|
||||
title: "Preferences Widget";
|
||||
subtitle: "Prefs";
|
||||
widget: "elm/vertical_frame";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "universe";
|
||||
type: INT;
|
||||
label: "Ultimate Answer of Life, the Universe and Everything";
|
||||
editable: 1;
|
||||
|
||||
int {
|
||||
default: 42;
|
||||
min: 0;
|
||||
max: 150;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "label";
|
||||
type: LABEL;
|
||||
label: "Just a label...";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "text";
|
||||
type: TEXT;
|
||||
editable: 1;
|
||||
|
||||
text {
|
||||
placeholder: "This is a text field (:";
|
||||
default: "default str.";
|
||||
deny: "^[0-9]*$";
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "date";
|
||||
type: DATE;
|
||||
label: "First EFL Developer Day";
|
||||
|
||||
date {
|
||||
default: 2012 11 05;
|
||||
min: 1980 11 1;
|
||||
max: 2200 12 2;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "animation";
|
||||
type: BOOL;
|
||||
persistent: 1;
|
||||
label: "Animation";
|
||||
|
||||
bool {
|
||||
default: true;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "animation_time";
|
||||
type: FLOAT;
|
||||
persistent: 1;
|
||||
label: "Animation Time";
|
||||
|
||||
float {
|
||||
default: 0.6;
|
||||
min: 0.0;
|
||||
max: 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "sep";
|
||||
type: SEPARATOR;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "swal";
|
||||
type: SWALLOW;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "sep2";
|
||||
type: SEPARATOR;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "save";
|
||||
type: SAVE;
|
||||
label: "Save";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "reset";
|
||||
type: RESET;
|
||||
label: "Reset";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "action";
|
||||
type: ACTION;
|
||||
label: "Action!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
PROJECT_NAME = Elementary
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY = .
|
||||
INPUT = @srcdir@/examples.dox @top_srcdir@/src/lib @srcdir@/index.doxy
|
||||
INPUT = @srcdir@/examples.dox @top_srcdir@/src/lib @srcdir@/index.doxy @top_srcdir@/src/bin/elm_prefs_cc_handlers.c
|
||||
IMAGE_PATH = @srcdir@/img
|
||||
OUTPUT_LANGUAGE = English
|
||||
GENERATE_HTML = YES
|
||||
|
@ -49,7 +49,18 @@ GENERATE_TODOLIST = YES
|
|||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ALIASES =
|
||||
|
||||
# Aliases used by epcref
|
||||
ALIASES = block="<tr><td class=\"block\"><b>"
|
||||
ALIASES += context="</b></td><td class=\"context\" colspan=2>\code"
|
||||
ALIASES += description="\endcode</td></tr><tr><td> </td><td class=\"description\" colspan=2>"
|
||||
ALIASES += endblock="</td></tr>"
|
||||
ALIASES += property="<tr><td> </td><td><table class=\"edcref\" border=\"0\"><tr><td class=\"property\"><tt>"
|
||||
ALIASES += parameters="</tt></td><td class=\"parameters\"><tt>"
|
||||
ALIASES += effect="</tt></td></tr><tr><td> </td><td class=\"effect\">"
|
||||
ALIASES += endproperty="</td></tr></table></td></tr>"
|
||||
ALIASES += epcsection{2}="<tr class=\"section\"><td class=\"section\" colspan=\"2\">\anchor sec_\1 \ref sec_quickaccess \"\2\"</td></tr>"
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
|
|
|
@ -69,6 +69,8 @@ WGT_PREVIEW = \
|
|||
panes:preview-00.png:widget_preview_panes:200:100 \
|
||||
photocam:preview-00.png:widget_preview_photocam:243:162 \
|
||||
popup:preview-00.png:widget_preview_popup:480:400 \
|
||||
prefs:preview-00.png:widget_preview_prefs:200:160 \
|
||||
prefs:preview-00.png:widget_preview_prefs:280:250 \
|
||||
progressbar:preview-00.png:widget_preview_progressbar:150:50 \
|
||||
radio:preview-00.png:widget_preview_radio:60:20 \
|
||||
scroller:preview-00.png:widget_preview_scroller:100:30 \
|
||||
|
@ -137,6 +139,7 @@ WGT_TREE = \
|
|||
player \
|
||||
plug \
|
||||
popup \
|
||||
prefs \
|
||||
progressbar \
|
||||
radio \
|
||||
route \
|
||||
|
|
|
@ -112,6 +112,12 @@
|
|||
* @ref efl_thread_5
|
||||
*
|
||||
* @ref efl_thread_6
|
||||
*
|
||||
* @ref prefs_example_01
|
||||
*
|
||||
* @ref prefs_example_02
|
||||
*
|
||||
* @ref prefs_example_03
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -6177,6 +6183,369 @@
|
|||
* @include efl_thread_6.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_01 Prefs Example 01
|
||||
*
|
||||
* This example shows how to create a simple prefs widget with Elementary,
|
||||
* where the items values are "reset" on each timer tick. We do that
|
||||
* <b>programmatically</b>, to demonstrate that by touching a given prefs
|
||||
* widgets prefs data values, the changes reflect instantly on the UI.
|
||||
*
|
||||
* We'll create items on the .EPC file and after handle it on the .C file.
|
||||
*
|
||||
* @section prefs-epc-01 Creating items on EPC file
|
||||
* @dontinclude prefs_example_01.epc
|
||||
*
|
||||
* First we'll create prefs items on .EPC file that we'll use later on
|
||||
* the .C file. Note that the code is similar to .EDC (edje) files.
|
||||
*
|
||||
* @skip collection
|
||||
* @until subtitle: "Example 01";
|
||||
*
|
||||
* Here we define a page item. Pages are group of items grouped together,
|
||||
* on a given prefs widget.
|
||||
*
|
||||
* @skipline widget: "elm/vertical_box";
|
||||
*
|
||||
* In this part, we create a @c INT type item, that by default will
|
||||
* become a spinner widget in the UI, and default, min and max
|
||||
* parameters are optional as well as in @c FLOAT type.
|
||||
*
|
||||
* @skip items {
|
||||
* @until max: 150;
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
*
|
||||
* Other @c INT type widget implementations may exist, as is exemplifyed
|
||||
* on the item that follows.
|
||||
*
|
||||
* @skip item {
|
||||
* @until min: 0;
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
*
|
||||
* Now we create a LABEL type item and by default will become a read-only
|
||||
* label in UI.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
*
|
||||
* Now we create a TEXT type item and by default will become a single-line
|
||||
* text entry in UI. Note that we use a Regular Expression to deny only
|
||||
* entries with numbers.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
* @skipline }
|
||||
*
|
||||
* In this part we create a DATE type item, by default will become a datetime
|
||||
* in UI, and default, min and max parameters are optional.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
*
|
||||
* Here we create a SEPARATOR type item, it has no value bound,
|
||||
* serves only to divide and organize prefs items.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
*
|
||||
* In this part, we create a SAVE type item that will get all the values
|
||||
* bounded to items and save it on CFG file. Next time you execute the
|
||||
* application, all the values that you saved before will be loaded.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
*
|
||||
* Here we create a RESET type item that will return all the values bounded
|
||||
* to items as default declared on .EPC file.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
*
|
||||
* Pages and items have default implementation widgets, but, with the tag
|
||||
* 'widget', you can use different widgets for prefs items. To a list of
|
||||
* default widgets supported by each type, by default, refer to the Elementary
|
||||
* Prefs Collection reference sheet. One can also register, at run time,
|
||||
* custom item widget handlers too.
|
||||
*
|
||||
* @section prefs-c-01 Handling items on C File
|
||||
* @dontinclude prefs_example_01.c
|
||||
*
|
||||
* Now we're handling the .C file and first we'll create a prefs widget.
|
||||
*
|
||||
* @skip prefs = elm_prefs_add(win);
|
||||
* @until evas_object_show(prefs);
|
||||
*
|
||||
* Here we add some specific callbacks, for example "item,changed" that will
|
||||
* be called when any item that we created on EPC file changes.
|
||||
*
|
||||
* @skip evas_object_smart_callback_add
|
||||
* @until _item_changed_cb, win);
|
||||
*
|
||||
* Here we set the prefs to save its values back (on the user data file)
|
||||
* automatically on every UI element changes.
|
||||
*
|
||||
* @skipline elm_prefs_autosave_set(prefs, EINA_TRUE);
|
||||
*
|
||||
* In this part we create the prefs data handle and set the .EPB file
|
||||
* (.EPC compiled). This .EPB file contains all the default values from the
|
||||
* items that we created, this file will be loaded when the program starts or
|
||||
* when clicked on a RESET type item. There is another file created when
|
||||
* the values from prefs items are saved, the .CFG file, that contains all the
|
||||
* non-standard saved values from the prefs items, this file will be loaded
|
||||
* when program starts as well.
|
||||
*
|
||||
* @dontinclude prefs_example_01.c
|
||||
* @skipline Elm_Prefs_Data *prefs_data;
|
||||
*
|
||||
* @skip prefs_data = elm_prefs_data_new
|
||||
* @until elm_prefs_data_set(prefs, prefs_data);
|
||||
*
|
||||
* Here we just create a notify widget to appear when the values are reset.
|
||||
*
|
||||
* @skip label = elm_label_add(win);
|
||||
* @until evas_object_show(notify);
|
||||
*
|
||||
* Now we add a timer to reset the items values on each 5.0 seconds and
|
||||
* show the notify.
|
||||
*
|
||||
* @skipline evas_object_data_set(notify
|
||||
* @skipline timer = ecore_timer_add(5.0,
|
||||
*
|
||||
* @dontinclude prefs_example_01.c
|
||||
* @skip _elm_prefs_data_change(void *data)
|
||||
* @until return ECORE_CALLBACK_RENEW;
|
||||
* @skipline }
|
||||
*
|
||||
* Here we finish the example. The full source code can be found on
|
||||
* @ref prefs_example_01_c and
|
||||
* @ref prefs_example_01_epc
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_02 Prefs Example 02
|
||||
*
|
||||
* This example shows how to create a simple prefs widget with Elementary,
|
||||
* where some items properties are changed on each timer tick.
|
||||
*
|
||||
* We'll create items on the .EPC file and after handle it on the .C file.
|
||||
*
|
||||
* @section prefs-epc-02 Creating items on EPC file
|
||||
* @dontinclude prefs_example_02.epc
|
||||
*
|
||||
* First we'll create prefs items on .EPC file that we'll use later on
|
||||
* the .C file. Note that the code is similar to .EDC (edje) files.
|
||||
*
|
||||
* @skip collection
|
||||
* @until widget: "elm/vertical_frame";
|
||||
*
|
||||
* In this part, we create a @c TEXTAREA item and, by default, it will
|
||||
* become a multi-line text entry in the UI. Note that we use a
|
||||
* regular expression to accept only characters and whitespaces in it.
|
||||
*
|
||||
* @skip items {
|
||||
* @until }
|
||||
* @skipline }
|
||||
*
|
||||
* Now we create a FLOAT type item, by default will become a spinner in UI,
|
||||
* and default, min and max parameters are optional as well as in INT type.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
* @skipline }
|
||||
*
|
||||
* Here we create a BOOL type item, by default will become a checkbox in UI.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
* @skipline }
|
||||
*
|
||||
* Here we create two items, separator and save types, that we've already
|
||||
* covered in
|
||||
* @ref prefs_example_01
|
||||
*
|
||||
* @skip item {
|
||||
* @until label: "Save";
|
||||
* @skipline }
|
||||
*
|
||||
* In this part, we create a ACTION type item. when clicked, the
|
||||
* action item will emit a signal to .C file and call a smart callback.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
*
|
||||
* @section prefs-c-02 Handling items on C File
|
||||
* @dontinclude prefs_example_02.c
|
||||
*
|
||||
* Now we're handling the .C file and first we'll create a prefs widget.
|
||||
*
|
||||
* @skip prefs = elm_prefs_add(win);
|
||||
* @until evas_object_show(prefs);
|
||||
*
|
||||
* In this part we add the action smart callback, that will be called when
|
||||
* the action item be clicked.
|
||||
*
|
||||
* @skipline evas_object_smart_callback_add
|
||||
*
|
||||
* Here we add a simple action item callback that sets a text to another item.
|
||||
*
|
||||
* @dontinclude prefs_example_02.c
|
||||
* @skip _action_cb(void *data
|
||||
* @until }
|
||||
*
|
||||
* Now we set the prefs to save its values back (on the user data file)
|
||||
* automatically on every UI element changes.
|
||||
*
|
||||
* @skipline elm_prefs_autosave_set(prefs, EINA_TRUE);
|
||||
*
|
||||
* In this part we create the prefs data handle and set the .EPB file
|
||||
* (.EPC compiled).
|
||||
*
|
||||
* @dontinclude prefs_example_02.c
|
||||
* @skipline Elm_Prefs_Data *prefs_data;
|
||||
*
|
||||
* @skip prefs_data = elm_prefs_data_new
|
||||
* @until elm_prefs_data_set(prefs, prefs_data);
|
||||
*
|
||||
* Here we just create a notify widget to appear when the items properties
|
||||
* are changed.
|
||||
*
|
||||
* @skip label = elm_label_add(win);
|
||||
* @until evas_object_show(notify);
|
||||
*
|
||||
* Now we add a timer to change text editable, spinners visibility and checkbox
|
||||
* enable/disable properties on each 5.0 seconds and show the notify.
|
||||
*
|
||||
* @skip evas_object_data_set(notify
|
||||
* @until _elm_prefs_items_change, notify);
|
||||
*
|
||||
* @dontinclude prefs_example_02.c
|
||||
* @skip _elm_prefs_items_change(void *data)
|
||||
* @until return ECORE_CALLBACK_RENEW;
|
||||
* @skipline }
|
||||
*
|
||||
* Here we finish the example. The full source code can be found on
|
||||
* @ref prefs_example_02_c and
|
||||
* @ref prefs_example_02_epc
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_03 Prefs Example 03
|
||||
*
|
||||
* This example shows how to create a prefs widget with Elementary, where some
|
||||
* prefs item values are changed, some actions take place on an object
|
||||
* different than the prefs widget (an Edge object). With this new object,
|
||||
* we're also exemplifying the prefs SWALLOW item type, as the Edje object is
|
||||
* put inside the prefs widget's viewport.
|
||||
*
|
||||
* It also shows how subpages can be created using the prefs PAGE item type.
|
||||
*
|
||||
* Explain step by step the .EDC file is out of scope, the source code
|
||||
* can be found at
|
||||
* @ref prefs_example_03_edc
|
||||
*
|
||||
* @section prefs-epc-03 Creating items on EPC file
|
||||
* @dontinclude prefs_example_03.epc
|
||||
*
|
||||
* First we'll create prefs items on .EPC file that we'll use later on
|
||||
* the .C file.
|
||||
*
|
||||
* @skip collection
|
||||
* @until widget: "elm/vertical_frame";
|
||||
*
|
||||
* In the following part, we create an item of the PAGE type, that will create a
|
||||
* subpage inside the main page. The source parameter is used to set which page
|
||||
* will be used to fill the subpage, in this example, the page named
|
||||
* "configpage" will be used.
|
||||
*
|
||||
* @skip items {
|
||||
* @until type: SEPARATOR;
|
||||
* @skipline }
|
||||
*
|
||||
* Now we create a SWALLOW type item, that, as the name suggests, will
|
||||
* swallow an Evas_Object.
|
||||
*
|
||||
* @skip item {
|
||||
* @until }
|
||||
*
|
||||
* Now we create the page that will be used to fill the item "config" of the
|
||||
* main page. It has another two subpages and a SEPARATOR item arranged
|
||||
* horizontally so we could achieve the desired layout.
|
||||
*
|
||||
* @skip page
|
||||
* @until source: "buttonspage";
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
*
|
||||
* Then we create the pages used by the "configpage" page, whose items
|
||||
* were covered in @ref prefs_example_01 and @ref prefs_example_02.
|
||||
*
|
||||
* @skip page
|
||||
* @until label: "Reset";
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
* @skipline }
|
||||
*
|
||||
* @section prefs-c-03 Handling items on C File
|
||||
* @dontinclude prefs_example_03.c
|
||||
*
|
||||
* Now we're handling the .C file and first we'll create a layout setting the
|
||||
* edje file to after a prefs item swallows it.
|
||||
*
|
||||
* @skip layout = elm_layout_add(win);
|
||||
* @until "prefs_edje");
|
||||
*
|
||||
* Here we create the prefs widget, add smart callbacks and create the prefs
|
||||
* data handle.
|
||||
*
|
||||
* @skip prefs = elm_prefs_add(win);
|
||||
* @until elm_prefs_data_set(prefs, prefs_data);
|
||||
*
|
||||
* Now we "swallow" the layout into the SWALLOW item of the prefs widget.
|
||||
*
|
||||
* @skipline elm_prefs_item_swallow(prefs,
|
||||
*
|
||||
* Page loaded and item changed callbacks will call update functions.
|
||||
*
|
||||
* @dontinclude prefs_example_03.c
|
||||
* @skip _page_loaded_cb(void *data,
|
||||
* @until _update_animation(obj, layout);
|
||||
* @skipline }
|
||||
*
|
||||
* These update functions will be called in order to get the new value from
|
||||
* the items and pass it as signal to edje handle it and affects on animation.
|
||||
*
|
||||
* @dontinclude prefs_example_03.c
|
||||
* @skip _update(Evas_Object *prefs,
|
||||
* @until }
|
||||
*
|
||||
* In this function we'll get the checkbox (bool) value and start or stop
|
||||
* the animation on edje.
|
||||
*
|
||||
* @dontinclude prefs_example_03.c
|
||||
* @skip _update_animation(Evas_Object *prefs,
|
||||
* @until }
|
||||
*
|
||||
* In this function we'll get the slider (float item) value and send it as
|
||||
* animation time to edje.
|
||||
*
|
||||
* @skip _update_animation_time(Evas_Object *prefs,
|
||||
* @until }
|
||||
*
|
||||
* Here we finish the example. The full source code can be found on
|
||||
* @ref prefs_example_03_c,
|
||||
* @ref prefs_example_03_epc and
|
||||
* @ref prefs_example_03_edc
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page bg_example_01_c bg_example_01.c
|
||||
* @include bg_example_01.c
|
||||
|
@ -6385,3 +6754,45 @@
|
|||
* @include efl_thread_6.c
|
||||
* @example efl_thread_6.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_01_c prefs_example_01.c
|
||||
* @include prefs_example_01.c
|
||||
* @example prefs_example_01.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_01_epc prefs_example_01.epc
|
||||
* @include prefs_example_01.epc
|
||||
* @example prefs_example_01.epc
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_02_c prefs_example_02.c
|
||||
* @include prefs_example_02.c
|
||||
* @example prefs_example_02.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_02_epc prefs_example_02.epc
|
||||
* @include prefs_example_02.epc
|
||||
* @example prefs_example_02.epc
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_03_c prefs_example_03.c
|
||||
* @include prefs_example_03.c
|
||||
* @example prefs_example_03.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_03_epc prefs_example_03.epc
|
||||
* @include prefs_example_03.epc
|
||||
* @example prefs_example_03.epc
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page prefs_example_03_edc prefs_example_03.edc
|
||||
* @include prefs_example_03.edc
|
||||
* @example prefs_example_03.edc
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 372 KiB After Width: | Height: | Size: 371 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
|
@ -0,0 +1,637 @@
|
|||
%!PS-Adobe-3.0 EPSF-3.0
|
||||
%%Creator: (ImageMagick)
|
||||
%%Title: (../doc/img/prefs_inheritance_tree.eps)
|
||||
%%CreationDate: (2012-11-12T16:26:00-02:00)
|
||||
%%BoundingBox: -0 -0 83 155
|
||||
%%HiResBoundingBox: 0 0 83 155
|
||||
%%DocumentData: Clean7Bit
|
||||
%%LanguageLevel: 1
|
||||
%%Pages: 1
|
||||
%%EndComments
|
||||
|
||||
%%BeginDefaults
|
||||
%%EndDefaults
|
||||
|
||||
%%BeginProlog
|
||||
%
|
||||
% Display a color image. The image is displayed in color on
|
||||
% Postscript viewers or printers that support color, otherwise
|
||||
% it is displayed as grayscale.
|
||||
%
|
||||
/DirectClassPacket
|
||||
{
|
||||
%
|
||||
% Get a DirectClass packet.
|
||||
%
|
||||
% Parameters:
|
||||
% red.
|
||||
% green.
|
||||
% blue.
|
||||
% length: number of pixels minus one of this color (optional).
|
||||
%
|
||||
currentfile color_packet readhexstring pop pop
|
||||
compression 0 eq
|
||||
{
|
||||
/number_pixels 3 def
|
||||
}
|
||||
{
|
||||
currentfile byte readhexstring pop 0 get
|
||||
/number_pixels exch 1 add 3 mul def
|
||||
} ifelse
|
||||
0 3 number_pixels 1 sub
|
||||
{
|
||||
pixels exch color_packet putinterval
|
||||
} for
|
||||
pixels 0 number_pixels getinterval
|
||||
} bind def
|
||||
|
||||
/DirectClassImage
|
||||
{
|
||||
%
|
||||
% Display a DirectClass image.
|
||||
%
|
||||
systemdict /colorimage known
|
||||
{
|
||||
columns rows 8
|
||||
[
|
||||
columns 0 0
|
||||
rows neg 0 rows
|
||||
]
|
||||
{ DirectClassPacket } false 3 colorimage
|
||||
}
|
||||
{
|
||||
%
|
||||
% No colorimage operator; convert to grayscale.
|
||||
%
|
||||
columns rows 8
|
||||
[
|
||||
columns 0 0
|
||||
rows neg 0 rows
|
||||
]
|
||||
{ GrayDirectClassPacket } image
|
||||
} ifelse
|
||||
} bind def
|
||||
|
||||
/GrayDirectClassPacket
|
||||
{
|
||||
%
|
||||
% Get a DirectClass packet; convert to grayscale.
|
||||
%
|
||||
% Parameters:
|
||||
% red
|
||||
% green
|
||||
% blue
|
||||
% length: number of pixels minus one of this color (optional).
|
||||
%
|
||||
currentfile color_packet readhexstring pop pop
|
||||
color_packet 0 get 0.299 mul
|
||||
color_packet 1 get 0.587 mul add
|
||||
color_packet 2 get 0.114 mul add
|
||||
cvi
|
||||
/gray_packet exch def
|
||||
compression 0 eq
|
||||
{
|
||||
/number_pixels 1 def
|
||||
}
|
||||
{
|
||||
currentfile byte readhexstring pop 0 get
|
||||
/number_pixels exch 1 add def
|
||||
} ifelse
|
||||
0 1 number_pixels 1 sub
|
||||
{
|
||||
pixels exch gray_packet put
|
||||
} for
|
||||
pixels 0 number_pixels getinterval
|
||||
} bind def
|
||||
|
||||
/GrayPseudoClassPacket
|
||||
{
|
||||
%
|
||||
% Get a PseudoClass packet; convert to grayscale.
|
||||
%
|
||||
% Parameters:
|
||||
% index: index into the colormap.
|
||||
% length: number of pixels minus one of this color (optional).
|
||||
%
|
||||
currentfile byte readhexstring pop 0 get
|
||||
/offset exch 3 mul def
|
||||
/color_packet colormap offset 3 getinterval def
|
||||
color_packet 0 get 0.299 mul
|
||||
color_packet 1 get 0.587 mul add
|
||||
color_packet 2 get 0.114 mul add
|
||||
cvi
|
||||
/gray_packet exch def
|
||||
compression 0 eq
|
||||
{
|
||||
/number_pixels 1 def
|
||||
}
|
||||
{
|
||||
currentfile byte readhexstring pop 0 get
|
||||
/number_pixels exch 1 add def
|
||||
} ifelse
|
||||
0 1 number_pixels 1 sub
|
||||
{
|
||||
pixels exch gray_packet put
|
||||
} for
|
||||
pixels 0 number_pixels getinterval
|
||||
} bind def
|
||||
|
||||
/PseudoClassPacket
|
||||
{
|
||||
%
|
||||
% Get a PseudoClass packet.
|
||||
%
|
||||
% Parameters:
|
||||
% index: index into the colormap.
|
||||
% length: number of pixels minus one of this color (optional).
|
||||
%
|
||||
currentfile byte readhexstring pop 0 get
|
||||
/offset exch 3 mul def
|
||||
/color_packet colormap offset 3 getinterval def
|
||||
compression 0 eq
|
||||
{
|
||||
/number_pixels 3 def
|
||||
}
|
||||
{
|
||||
currentfile byte readhexstring pop 0 get
|
||||
/number_pixels exch 1 add 3 mul def
|
||||
} ifelse
|
||||
0 3 number_pixels 1 sub
|
||||
{
|
||||
pixels exch color_packet putinterval
|
||||
} for
|
||||
pixels 0 number_pixels getinterval
|
||||
} bind def
|
||||
|
||||
/PseudoClassImage
|
||||
{
|
||||
%
|
||||
% Display a PseudoClass image.
|
||||
%
|
||||
% Parameters:
|
||||
% class: 0-PseudoClass or 1-Grayscale.
|
||||
%
|
||||
currentfile buffer readline pop
|
||||
token pop /class exch def pop
|
||||
class 0 gt
|
||||
{
|
||||
currentfile buffer readline pop
|
||||
token pop /depth exch def pop
|
||||
/grays columns 8 add depth sub depth mul 8 idiv string def
|
||||
columns rows depth
|
||||
[
|
||||
columns 0 0
|
||||
rows neg 0 rows
|
||||
]
|
||||
{ currentfile grays readhexstring pop } image
|
||||
}
|
||||
{
|
||||
%
|
||||
% Parameters:
|
||||
% colors: number of colors in the colormap.
|
||||
% colormap: red, green, blue color packets.
|
||||
%
|
||||
currentfile buffer readline pop
|
||||
token pop /colors exch def pop
|
||||
/colors colors 3 mul def
|
||||
/colormap colors string def
|
||||
currentfile colormap readhexstring pop pop
|
||||
systemdict /colorimage known
|
||||
{
|
||||
columns rows 8
|
||||
[
|
||||
columns 0 0
|
||||
rows neg 0 rows
|
||||
]
|
||||
{ PseudoClassPacket } false 3 colorimage
|
||||
}
|
||||
{
|
||||
%
|
||||
% No colorimage operator; convert to grayscale.
|
||||
%
|
||||
columns rows 8
|
||||
[
|
||||
columns 0 0
|
||||
rows neg 0 rows
|
||||
]
|
||||
{ GrayPseudoClassPacket } image
|
||||
} ifelse
|
||||
} ifelse
|
||||
} bind def
|
||||
|
||||
/DisplayImage
|
||||
{
|
||||
%
|
||||
% Display a DirectClass or PseudoClass image.
|
||||
%
|
||||
% Parameters:
|
||||
% x & y translation.
|
||||
% x & y scale.
|
||||
% label pointsize.
|
||||
% image label.
|
||||
% image columns & rows.
|
||||
% class: 0-DirectClass or 1-PseudoClass.
|
||||
% compression: 0-none or 1-RunlengthEncoded.
|
||||
% hex color packets.
|
||||
%
|
||||
gsave
|
||||
/buffer 512 string def
|
||||
/byte 1 string def
|
||||
/color_packet 3 string def
|
||||
/pixels 768 string def
|
||||
|
||||
currentfile buffer readline pop
|
||||
token pop /x exch def
|
||||
token pop /y exch def pop
|
||||
x y translate
|
||||
currentfile buffer readline pop
|
||||
token pop /x exch def
|
||||
token pop /y exch def pop
|
||||
currentfile buffer readline pop
|
||||
token pop /pointsize exch def pop
|
||||
/Times-Roman findfont pointsize scalefont setfont
|
||||
x y scale
|
||||
currentfile buffer readline pop
|
||||
token pop /columns exch def
|
||||
token pop /rows exch def pop
|
||||
currentfile buffer readline pop
|
||||
token pop /class exch def pop
|
||||
currentfile buffer readline pop
|
||||
token pop /compression exch def pop
|
||||
class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
|
||||
} bind def
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%PageBoundingBox: 0 0 83 155
|
||||
userdict begin
|
||||
DisplayImage
|
||||
0 0
|
||||
83 155
|
||||
12
|
||||
83 155
|
||||
1
|
||||
1
|
||||
1
|
||||
8
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFBA199999999999999999999999999999999999999999999
|
||||
999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
99999999999999999999999999C0FFFFFFFFFFFFFFFFFFB0000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000007FFFFFFFFFFFFFFFFFFA900
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900
|
||||
FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2700FFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFE32A27FFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFF
|
||||
FFFFA900FFFFFFFFFFFFFFFFFFFFFFBD050BC1EF5B0040D3FFCD1898FCA95E3DFFFFF97C
|
||||
6A7A741C00FFFFFE8D586706000000FFF383603343D2FF83000F67FFFFFFFFFFFFFFFFFF
|
||||
FFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFF6907F0FFF6165AFFFF
|
||||
FB3DFEFFED0027FFFD435FFEFFDC0300FFFF9002ECFF950071FFFE5DD7FFFF4516F1FF00
|
||||
27FFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFF
|
||||
FFFFD50095FFFF4D0AF1FFB198FFFFFE0027FF9F00D1FFFFFF2500FFFF4701F9FFE90038
|
||||
FFC3000000000000B3FF0027FFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA9
|
||||
00FFFFFFFFFFFFFFFFFFFFFFFFFF412FFEDE4A0598FF54F4FFFFFF0027FF5300F5FFFFFF
|
||||
2700FFFF8100AEFFD8007DFF8E2AFFFFFFFFFFFFFF0027FFFFFFFFFFFFFFFFFFFFFFFFA9
|
||||
00FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFAD00C968D45733D473FFFF
|
||||
FFFF0027FF3200E6FFFFFF2700FFFFFE9B11745087FCFF8209F4FFFFFFFFFCFF0027FFFF
|
||||
FFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FB1C495DFFBF003FDDFFFFFFFF0027FF56009FFFFFFF2700FFFFFB6FD9FFFFFFFFFFAC00
|
||||
7DFFFFFFD590FF0023FFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF8301D3FFFE274CFFFFFFFFF2001BFFCA0315BAF6BD0D00DC
|
||||
FF81229CB7C5D8F9FFF9250062A47B45F1FF1909D0FFFFFFFFFFFFFFFFFFFFFFA900FFFF
|
||||
FFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFEB71FFFFFF9EC7FFFFFFF47800
|
||||
008FF1C13D0D1E813D67BCFCBA160000000011A4FFE24F111765EAFFFF9F117BFFFFFFFF
|
||||
FFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA38FFFFFFDE3A213FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8100EE
|
||||
FFFFFFFFDC36FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFF
|
||||
FFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF45007DF7FFFECA55D9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE86A21113C5298F9FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFF
|
||||
A90099999999999999999999999999999999999999999999999999999999999999999999
|
||||
999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
6600FFFFFFFFFFFFFFFFFFCB030000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000039FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5700ADFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40B0557
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBA199999999999999999999
|
||||
999999999999999999999999999999999999999999999999650099999999999999999999
|
||||
99999999999999999999999999999999999999999999999999C0FFFFFFFFFFFFFFFFFFB0
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
07FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF0A27FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEC6721F
|
||||
E14A0F35C1FCBF6F1FE53E1DEDF383603343D2FFB367000F6767F3D5457A7401F2FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFCB3080074C1A50C04D0C5080087BB63F25DD7FFFF4516F1FFFF0027FF
|
||||
FFFF2A12FEFF4FE9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFF
|
||||
A900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2500F9FFFF8F0065FF2500EDFFFFC300
|
||||
0000000000B3FFFF0027FFFFFF14008FFDD2F1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
A900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2700FFFFFF
|
||||
DD0038FF2700FFFFFF8E2AFFFFFFFFFFFFFFFF0027FFFFFFAB0B0033C7FFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF2700FFFFFFF70045FF2700FFFFFF8209F4FFFFFFFFFCFFFF0027FFFFFFFF
|
||||
DA4300039DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2700FFFFFFE40084FF2700FFFFFFAC007DFFFF
|
||||
FFD590FFFF0027FFFFFF84FFFFA6001AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FF
|
||||
FFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2700FCFFFFA028F6
|
||||
FF2000FBFFFFF9250062A47B45F1FFF90022FFFFFF13EAFFFD1039FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFF270098EBEB87F0F48200006ECEFFFFE24F111765EAFFD77C000192D5FF0020816C
|
||||
4FE1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFF2700FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFF
|
||||
FFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2700FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
1A00F9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFF37500005FC5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA900FFFFFFFFFFFFFFFF
|
||||
FFA900FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFA900FFFFFFFFFFFFFFFFFFA90099999999999999999999999999999999999999999999
|
||||
999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
9999999999999999999999996600FFFFFFFFFFFFFFFFFFCB030000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000039FFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
end
|
||||
%%PageTrailer
|
||||
%%Trailer
|
||||
%%EOF
|
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
|
@ -16,6 +16,7 @@
|
|||
* @li @ref General
|
||||
* @li @ref Elm_Gesture_Layer
|
||||
* @li @ref Password_last_show
|
||||
* @li @ref elm-prefs-data
|
||||
* @li @ref Start
|
||||
* @li @ref Scrolling
|
||||
* @li @ref Scrollhints
|
||||
|
@ -178,8 +179,13 @@
|
|||
* @image latex img/widget/photocam/preview-00.eps
|
||||
* @li @ref Popup
|
||||
*
|
||||
* @image html img/widget/popup/preview-00.png
|
||||
* @image latex img/widget/popup/preview-00.eps
|
||||
* @li @ref Prefs
|
||||
*
|
||||
* @image html img/widget/prefs/preview-00.png
|
||||
* @image latex img/widget/prefs/preview-00.eps
|
||||
* @image html img/prefs.png
|
||||
* @image latex img/prefs.eps
|
||||
*
|
||||
* @li @ref Progressbar
|
||||
*
|
||||
* @image html img/widget/progressbar/preview-00.png
|
||||
|
|
|
@ -9,6 +9,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/src/bin \
|
||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
-DDOCW_DIR=\"$(abs_top_builddir)/doc/widgets\" \
|
||||
@ELEMENTARY_CFLAGS@ \
|
||||
@ELEMENTARY_X_CFLAGS@ \
|
||||
@ELEMENTARY_FB_CFLAGS@ \
|
||||
|
@ -21,6 +22,15 @@ AM_CPPFLAGS = \
|
|||
@ELEMENTARY_EMAP_CFLAGS@ \
|
||||
@EIO_CFLAGS@
|
||||
|
||||
ELM_PREFS_CC = @elm_prefs_cc@
|
||||
|
||||
noinst_DATA = widget_preview_prefs.epb
|
||||
|
||||
widget_preview_prefs.epb: Makefile widget_preview_prefs.epc
|
||||
$(ELM_PREFS_CC) $(ELM_PREFS_FLAGS) \
|
||||
$(top_srcdir)/doc/widgets/widget_preview_prefs.epc \
|
||||
$(top_builddir)/doc/widgets/widget_preview_prefs.epb
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
widget_preview_actionslider \
|
||||
widget_preview_bg \
|
||||
|
@ -81,6 +91,7 @@ widget_preview_panel \
|
|||
widget_preview_panes \
|
||||
widget_preview_photocam \
|
||||
widget_preview_popup \
|
||||
widget_preview_prefs \
|
||||
widget_preview_progressbar \
|
||||
widget_preview_radio \
|
||||
widget_preview_scroller \
|
||||
|
@ -158,6 +169,8 @@ EXTRA_DIST = \
|
|||
widget_preview_genlist3.c \
|
||||
widget_preview_genlist4.c \
|
||||
widget_preview_genlist5.c \
|
||||
widget_preview_prefs.c \
|
||||
widget_preview_prefs.epc \
|
||||
widget_preview_progressbar.c \
|
||||
widget_preview_box.c \
|
||||
widget_preview_notify.c \
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#include "widget_preview_tmpl_head.c"
|
||||
|
||||
static const char LAYOUT_EPB[] = DOCW_DIR\
|
||||
"/widget_preview_prefs.epb";
|
||||
|
||||
static const char LAYOUT_CFG[] = DOCW_DIR\
|
||||
"/widget_preview_prefs.cfg";
|
||||
|
||||
Evas_Object *prefs;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
|
||||
prefs = elm_prefs_add(win);
|
||||
evas_object_size_hint_weight_set(prefs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, prefs);
|
||||
evas_object_show(prefs);
|
||||
|
||||
elm_prefs_autosave_set(prefs, EINA_TRUE);
|
||||
|
||||
prefs_data = elm_prefs_data_new(LAYOUT_CFG, NULL, EET_FILE_MODE_READ_WRITE);
|
||||
|
||||
elm_prefs_file_set(prefs, LAYOUT_EPB, NULL);
|
||||
elm_prefs_data_set(prefs, prefs_data);
|
||||
|
||||
#include "widget_preview_tmpl_foot.c"
|
|
@ -0,0 +1,60 @@
|
|||
collection
|
||||
{
|
||||
page
|
||||
{
|
||||
name: "main";
|
||||
version: 1;
|
||||
title: "Preferences Widget";
|
||||
subtitle: "Example 01";
|
||||
widget: "elm/vertical_box";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "universe";
|
||||
type: INT;
|
||||
label: "Ultimate Answer of Life, the Universe and Everything";
|
||||
editable: 1;
|
||||
|
||||
int {
|
||||
default: 42;
|
||||
min: 0;
|
||||
max: 150;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "label";
|
||||
type: LABEL;
|
||||
label: "Just a label...";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "text";
|
||||
type: TEXT;
|
||||
editable: 1;
|
||||
|
||||
text {
|
||||
placeholder: "This is a text field (:";
|
||||
default: "default str.";
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "sep";
|
||||
type: SEPARATOR;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "save";
|
||||
type: SAVE;
|
||||
label: "Save";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "reset";
|
||||
type: RESET;
|
||||
label: "Reset";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_builddir)/src/lib \
|
||||
-I$(top_srcdir)/src/bin \
|
||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
@ELEMENTARY_CFLAGS@ \
|
||||
@ELEMENTARY_X_CFLAGS@ \
|
||||
|
@ -28,12 +29,17 @@ AM_CPPFLAGS = \
|
|||
@EIO_CFLAGS@ \
|
||||
@EMOTION_CFLAGS@
|
||||
|
||||
bin_PROGRAMS = @ELEMENTARY_TEST_PRG@ @ELEMENTARY_CONFIG_PRG@ @ELEMENTARY_CODEGEN_PRG@
|
||||
bin_PROGRAMS = \
|
||||
@ELEMENTARY_TEST_PRG@ \
|
||||
@ELEMENTARY_CONFIG_PRG@ \
|
||||
@ELEMENTARY_CODEGEN_PRG@ \
|
||||
@ELM_PREFS_CC_PRG@
|
||||
|
||||
if BUILD_QUICKLAUNCH
|
||||
bin_PROGRAMS += elementary_quicklaunch elementary_run elementary_testql
|
||||
endif
|
||||
|
||||
EXTRA_PROGRAMS = elementary_test elementary_config elementary_codegen
|
||||
EXTRA_PROGRAMS = elementary_test elementary_config elementary_codegen elm_prefs_cc
|
||||
|
||||
elementary_test_SOURCES = \
|
||||
test.c \
|
||||
|
@ -102,6 +108,7 @@ test_panes.c \
|
|||
test_photo.c \
|
||||
test_photocam.c \
|
||||
test_popup.c \
|
||||
test_prefs.c \
|
||||
test_progressbar.c \
|
||||
test_radio.c \
|
||||
test_scaling.c \
|
||||
|
@ -170,6 +177,22 @@ elementary_codegen_LDADD = \
|
|||
@my_libs@
|
||||
elementary_codegen_LDFLAGS =
|
||||
|
||||
noinst_HEADERS = \
|
||||
elm_prefs_cc.h
|
||||
|
||||
elm_prefs_cc_SOURCES = \
|
||||
elm_prefs_cc.c \
|
||||
elm_prefs_cc_mem.c \
|
||||
elm_prefs_cc_out.c \
|
||||
elm_prefs_cc_parse.c \
|
||||
elm_prefs_cc_handlers.c
|
||||
|
||||
elm_prefs_cc_LDADD = \
|
||||
$(top_builddir)/src/lib/libelementary.la \
|
||||
@ELEMENTARY_LIBS@ \
|
||||
@EIO_LIBS@ \
|
||||
@my_libs@
|
||||
|
||||
if BUILD_QUICKLAUNCH
|
||||
elementary_quicklaunch_SOURCES = quicklaunch.c
|
||||
elementary_quicklaunch_LDADD = $(top_builddir)/src/lib/libelementary.la \
|
||||
|
|
|
@ -0,0 +1,201 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "elm_prefs_cc.h"
|
||||
|
||||
int _elm_prefs_cc_log_dom = -1;
|
||||
static void main_help(void);
|
||||
|
||||
Eina_Prefix *pfx = NULL;
|
||||
char *file_in = NULL;
|
||||
char *tmp_dir = NULL;
|
||||
char *file_out = NULL;
|
||||
|
||||
static const char *progname = NULL;
|
||||
|
||||
static void
|
||||
_elm_prefs_cc_log_cb(const Eina_Log_Domain *d,
|
||||
Eina_Log_Level level,
|
||||
const char *file,
|
||||
const char *fnc,
|
||||
int _line,
|
||||
const char *fmt,
|
||||
__UNUSED__ void *data,
|
||||
va_list args)
|
||||
{
|
||||
if ((d->name) && (d->namelen == sizeof("elm_prefs_cc") - 1) &&
|
||||
(memcmp(d->name, "elm_prefs_cc", sizeof("elm_prefs_cc") - 1) == 0))
|
||||
{
|
||||
const char *prefix;
|
||||
|
||||
eina_log_console_color_set(stderr, eina_log_level_color_get(level));
|
||||
switch (level)
|
||||
{
|
||||
case EINA_LOG_LEVEL_CRITICAL:
|
||||
prefix = "Critical. ";
|
||||
break;
|
||||
|
||||
case EINA_LOG_LEVEL_ERR:
|
||||
prefix = "Error. ";
|
||||
break;
|
||||
|
||||
case EINA_LOG_LEVEL_WARN:
|
||||
prefix = "Warning. ";
|
||||
break;
|
||||
|
||||
default:
|
||||
prefix = "";
|
||||
}
|
||||
fprintf(stderr, "%s: %s", progname, prefix);
|
||||
eina_log_console_color_set(stderr, EINA_COLOR_RESET);
|
||||
|
||||
vfprintf(stderr, fmt, args);
|
||||
putc('\n', stderr);
|
||||
}
|
||||
else
|
||||
eina_log_print_cb_stderr(d, level, file, fnc, _line, fmt, NULL, args);
|
||||
}
|
||||
|
||||
static void
|
||||
main_help(void)
|
||||
{
|
||||
printf
|
||||
("Usage:\n"
|
||||
"\t%s [OPTIONS] input_file.epc [output_file.epb]\n"
|
||||
"\n"
|
||||
"Where OPTIONS is one or more of:\n"
|
||||
"\n"
|
||||
"-v Verbose output\n"
|
||||
, progname);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
struct stat st;
|
||||
#ifdef HAVE_REALPATH
|
||||
char rpath[PATH_MAX], rpath2[PATH_MAX];
|
||||
#endif
|
||||
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
|
||||
if (!eina_init())
|
||||
return -1;
|
||||
|
||||
_elm_prefs_cc_log_dom = eina_log_domain_register
|
||||
("elm_prefs_cc", ELM_PREFS_CC_DEFAULT_LOG_COLOR);
|
||||
if (_elm_prefs_cc_log_dom < 0)
|
||||
{
|
||||
EINA_LOG_ERR("Unable to create a log domain.");
|
||||
exit(-1);
|
||||
}
|
||||
if (!eina_log_domain_level_check(_elm_prefs_cc_log_dom, EINA_LOG_LEVEL_WARN))
|
||||
eina_log_domain_level_set("elm_prefs_cc", EINA_LOG_LEVEL_WARN);
|
||||
|
||||
progname = ecore_file_file_get(argv[0]);
|
||||
eina_log_print_cb_set(_elm_prefs_cc_log_cb, NULL);
|
||||
|
||||
tmp_dir = getenv("TMPDIR");
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (!strcmp(argv[i], "-h"))
|
||||
{
|
||||
main_help();
|
||||
exit(0);
|
||||
}
|
||||
else if (!strcmp(argv[i], "-v"))
|
||||
{
|
||||
eina_log_domain_level_set("elm_prefs_cc", EINA_LOG_LEVEL_INFO);
|
||||
}
|
||||
else if (!file_in)
|
||||
file_in = argv[i];
|
||||
else if (!file_out)
|
||||
file_out = argv[i];
|
||||
}
|
||||
|
||||
if (!file_in)
|
||||
{
|
||||
ERR("no input file specified.");
|
||||
main_help();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
pfx = eina_prefix_new(argv[0], /* argv[0] value (optional) */
|
||||
main, /* an optional symbol to check path of */
|
||||
"ELM_PREFS", /* env var prefix to use (XXX_PREFIX, XXX_BIN_DIR etc. */
|
||||
"elementary", /* dir to add after "share" (PREFIX/share/DIRNAME) */
|
||||
"themes/default.edj", /* a magic file to check for in PREFIX/share/DIRNAME for success */
|
||||
PACKAGE_BIN_DIR, /* package bin dir @ compile time */
|
||||
PACKAGE_LIB_DIR, /* package lib dir @ compile time */
|
||||
PACKAGE_DATA_DIR, /* package data dir @ compile time */
|
||||
PACKAGE_DATA_DIR); /* if locale needed use LOCALE_DIR */
|
||||
|
||||
/* check whether file_in exists */
|
||||
#ifdef HAVE_REALPATH
|
||||
if (!realpath(file_in, rpath) || stat(rpath, &st) || !S_ISREG(st.st_mode))
|
||||
#else
|
||||
if (stat(file_in, &st) || !S_ISREG(st.st_mode))
|
||||
#endif
|
||||
{
|
||||
ERR("file not found: %s.", file_in);
|
||||
main_help();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (!file_out)
|
||||
{
|
||||
char *suffix;
|
||||
|
||||
if ((suffix = strstr(file_in, ".epc")) && (suffix[4] == 0))
|
||||
{
|
||||
file_out = strdup(file_in);
|
||||
if (file_out)
|
||||
{
|
||||
suffix = strstr(file_out, ".epc");
|
||||
strcpy(suffix, ".epb");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!file_out)
|
||||
{
|
||||
ERR("no output file specified.");
|
||||
main_help();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
#ifdef HAVE_REALPATH
|
||||
if (realpath(file_out, rpath2) && !strcmp(rpath, rpath2))
|
||||
#else
|
||||
if (!strcmp(file_in, file_out))
|
||||
#endif
|
||||
{
|
||||
ERR("input file equals output file.");
|
||||
main_help();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
elm_prefs_file = mem_alloc(SZ(Elm_Prefs_File));
|
||||
elm_prefs_file->compiler = strdup("elm_prefs_cc");
|
||||
|
||||
compile();
|
||||
|
||||
data_init();
|
||||
data_write();
|
||||
data_shutdown();
|
||||
|
||||
eina_prefix_free(pfx);
|
||||
pfx = NULL;
|
||||
|
||||
eina_log_domain_unregister(_elm_prefs_cc_log_dom);
|
||||
eina_shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
#ifndef ELM_PREFS_CC_H
|
||||
#define ELM_PREFS_CC_H
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
#define ELM_INTERNAL_API_ARGESFSDFEFC
|
||||
#include "elm_priv.h"
|
||||
#include "elm_widget_prefs.h"
|
||||
|
||||
extern Eina_Prefix *pfx;
|
||||
|
||||
/*
|
||||
* On Windows, if the file is not opened in binary mode,
|
||||
* read does not return the correct size, because of
|
||||
* CR / LF translation.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
# define O_BINARY 0
|
||||
#endif
|
||||
|
||||
/* logging variables */
|
||||
extern int _elm_prefs_cc_log_dom;
|
||||
#define ELM_PREFS_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
|
||||
|
||||
#ifdef ERR
|
||||
# undef ERR
|
||||
#endif
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_elm_prefs_cc_log_dom, __VA_ARGS__)
|
||||
#ifdef INF
|
||||
# undef INF
|
||||
#endif
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_elm_prefs_cc_log_dom, __VA_ARGS__)
|
||||
#ifdef WRN
|
||||
# undef WRN
|
||||
#endif
|
||||
#define WRN(...) EINA_LOG_DOM_WARN(_elm_prefs_cc_log_dom, __VA_ARGS__)
|
||||
#ifdef CRIT
|
||||
# undef CRIT
|
||||
#endif
|
||||
#define CRIT(...) EINA_LOG_DOM_CRIT(_elm_prefs_cc_log_dom, __VA_ARGS__)
|
||||
#ifdef DBG
|
||||
# undef DBG
|
||||
#endif
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_elm_prefs_cc_log_dom, __VA_ARGS__)
|
||||
|
||||
/* types */
|
||||
typedef struct _Elm_Prefs_File Elm_Prefs_File;
|
||||
typedef struct _New_Object_Handler New_Object_Handler;
|
||||
typedef struct _New_Statement_Handler New_Statement_Handler;
|
||||
|
||||
struct _Elm_Prefs_File
|
||||
{
|
||||
const char *compiler;
|
||||
|
||||
Eina_List *pages;
|
||||
};
|
||||
|
||||
struct _New_Object_Handler
|
||||
{
|
||||
const char *type;
|
||||
void (*func)(void);
|
||||
};
|
||||
|
||||
struct _New_Statement_Handler
|
||||
{
|
||||
const char *type;
|
||||
void (*func)(void);
|
||||
};
|
||||
|
||||
/* global fn calls */
|
||||
void compile(void);
|
||||
char *parse_str(int n);
|
||||
int parse_enum(int n, ...);
|
||||
int parse_int(int n);
|
||||
int parse_int_range(int n, int f, int t);
|
||||
int parse_bool(int n);
|
||||
double parse_float(int n);
|
||||
void check_arg_count(int n);
|
||||
void check_regex(const char *regex);
|
||||
void set_verbatim(char *s, int l1, int l2);
|
||||
|
||||
void data_init();
|
||||
void data_write();
|
||||
void data_shutdown();
|
||||
|
||||
int object_handler_num(void);
|
||||
int statement_handler_num(void);
|
||||
|
||||
void *mem_alloc(size_t size);
|
||||
char *mem_strdup(const char *s);
|
||||
#define SZ sizeof
|
||||
|
||||
/* global vars */
|
||||
extern char *file_in;
|
||||
extern char *tmp_dir;
|
||||
extern char *file_out;
|
||||
extern int line;
|
||||
extern Eina_List *stack;
|
||||
extern Eina_List *params;
|
||||
|
||||
extern Elm_Prefs_File *elm_prefs_file;
|
||||
|
||||
extern Eina_List *elm_prefs_pages;
|
||||
extern New_Object_Handler object_handlers[];
|
||||
extern New_Statement_Handler statement_handlers[];
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,35 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "elm_prefs_cc.h"
|
||||
|
||||
void *
|
||||
mem_alloc(size_t size)
|
||||
{
|
||||
void *mem;
|
||||
|
||||
mem = calloc(1, size);
|
||||
if (mem) return mem;
|
||||
ERR("%s:%i memory allocation of %zu bytes failed. %s",
|
||||
file_in, line, size, strerror(errno));
|
||||
exit(-1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
mem_strdup(const char *s)
|
||||
{
|
||||
void *str;
|
||||
|
||||
str = strdup(s);
|
||||
if (str) return str;
|
||||
ERR("%s:%i memory allocation of %zu bytes failed. %s. string "
|
||||
"being duplicated: \"%s\"",
|
||||
file_in, line, strlen(s) + 1, strerror(errno), s);
|
||||
exit(-1);
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include "elm_prefs_cc.h"
|
||||
#include "elm_prefs_edd.x"
|
||||
|
||||
Elm_Prefs_File *elm_prefs_file = NULL;
|
||||
|
||||
void
|
||||
data_init()
|
||||
{
|
||||
eet_init();
|
||||
_elm_prefs_descriptors_init();
|
||||
}
|
||||
|
||||
void
|
||||
data_shutdown()
|
||||
{
|
||||
_elm_prefs_descriptors_shutdown();
|
||||
eet_shutdown();
|
||||
}
|
||||
|
||||
void
|
||||
data_write()
|
||||
{
|
||||
Eina_List *l;
|
||||
Eet_File *ef;
|
||||
Elm_Prefs_Page_Node *page;
|
||||
|
||||
if (!elm_prefs_file || !elm_prefs_file->pages)
|
||||
{
|
||||
ERR("No data to put in \"%s\"", file_out);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
ef = eet_open(file_out, EET_FILE_MODE_WRITE);
|
||||
if (!ef)
|
||||
{
|
||||
ERR("Unable to open \"%s\" for writing output", file_out);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH (elm_prefs_file->pages, l, page)
|
||||
{
|
||||
if (!(eet_data_write
|
||||
(ef, _page_edd, page->name, page, EET_COMPRESSION_DEFAULT)))
|
||||
ERR("Failed to write page %s to file %s", page->name, file_out);
|
||||
}
|
||||
|
||||
eet_close(ef);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -126,6 +126,7 @@ void test_index2(void *data, Evas_Object *obj, void *event_info);
|
|||
void test_index_horizontal(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_photocam(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_photo(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_prefs(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_thumb(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_icon_desktops(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_icon_animated(void *data, Evas_Object *obj, void *event_info);
|
||||
|
@ -525,6 +526,9 @@ add_tests:
|
|||
//------------------------------//
|
||||
ADD_TEST(NULL, "Buttons", "Buttons", test_button);
|
||||
|
||||
//------------------------------//
|
||||
ADD_TEST(NULL, "Prefs", "Prefs", test_prefs);
|
||||
|
||||
//------------------------------//
|
||||
ADD_TEST(NULL, "Effects", "Transit", test_transit);
|
||||
ADD_TEST(NULL, "Effects", "Transit 2", test_transit2);
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
#include <Elementary.h>
|
||||
#ifndef ELM_LIB_QUICKLAUNCH
|
||||
|
||||
#define WIDTH (500)
|
||||
#define HEIGHT (1000)
|
||||
#define MSG_ID_VEL (1)
|
||||
|
||||
static void
|
||||
_update_animation(Evas_Object *prefs, Evas_Object *layout)
|
||||
{
|
||||
Eina_Value value;
|
||||
Eina_Bool animation;
|
||||
|
||||
elm_prefs_item_value_get(prefs, "main:animation", &value);
|
||||
eina_value_get(&value, &animation);
|
||||
if (animation)
|
||||
elm_layout_signal_emit(layout, "start", "animation");
|
||||
else
|
||||
elm_layout_signal_emit(layout, "stop", "animation");
|
||||
}
|
||||
|
||||
static void
|
||||
_update_animation_time(Evas_Object *prefs, Evas_Object *layout)
|
||||
{
|
||||
Eina_Value value;
|
||||
float animation_time;
|
||||
Edje_Message_Float msg;
|
||||
|
||||
elm_prefs_item_value_get(prefs, "main:animation_time", &value);
|
||||
eina_value_get(&value, &animation_time);
|
||||
msg.val = animation_time;
|
||||
edje_object_message_send(elm_layout_edje_get(layout), EDJE_MESSAGE_FLOAT,
|
||||
MSG_ID_VEL, &msg);
|
||||
}
|
||||
|
||||
static void
|
||||
_update(Evas_Object *prefs, Evas_Object *layout)
|
||||
{
|
||||
_update_animation(prefs, layout);
|
||||
_update_animation_time(prefs, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
_page_loaded_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Object *layout = data;
|
||||
|
||||
_update(obj, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
const char *item = event_info;
|
||||
Evas_Object *layout = data;
|
||||
|
||||
if (!strcmp(item, "main:animation_time"))
|
||||
_update_animation_time(obj, layout);
|
||||
else if (!strcmp(item, "main:animation"))
|
||||
_update_animation(obj, layout);
|
||||
}
|
||||
|
||||
void
|
||||
test_prefs(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Object *win, *bg, *prefs, *layout;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
win = elm_win_add(NULL, "Prefs", ELM_WIN_BASIC);
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_win_title_set(win, "Prefs");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
bg = elm_bg_add(win);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_size_hint_min_set(bg, WIDTH, HEIGHT);
|
||||
evas_object_size_hint_max_set(bg, WIDTH, HEIGHT);
|
||||
evas_object_show(bg);
|
||||
|
||||
layout = elm_layout_add(win);
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s/objects/test_prefs.edj", elm_app_data_dir_get());
|
||||
elm_layout_file_set(layout, buf, "prefs_edje");
|
||||
|
||||
prefs = elm_prefs_add(win);
|
||||
evas_object_size_hint_weight_set(prefs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_resize(prefs, WIDTH, HEIGHT);
|
||||
evas_object_show(prefs);
|
||||
|
||||
evas_object_smart_callback_add(prefs, "page,loaded", _page_loaded_cb,
|
||||
layout);
|
||||
evas_object_smart_callback_add(prefs, "item,changed", _item_changed_cb,
|
||||
layout);
|
||||
|
||||
elm_prefs_autosave_set(prefs, EINA_TRUE);
|
||||
|
||||
prefs_data =
|
||||
elm_prefs_data_new("./test_prefs.cfg", NULL, EET_FILE_MODE_READ_WRITE);
|
||||
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s/objects/test_prefs.epb", elm_app_data_dir_get());
|
||||
|
||||
elm_prefs_file_set(prefs, buf, NULL);
|
||||
elm_prefs_data_set(prefs, prefs_data);
|
||||
|
||||
elm_prefs_item_swallow(prefs, "main:swal", layout);
|
||||
|
||||
_update_animation_time(prefs, layout);
|
||||
_update_animation(prefs, layout);
|
||||
|
||||
evas_object_resize(win, WIDTH, HEIGHT);
|
||||
evas_object_show(win);
|
||||
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
}
|
||||
#endif
|
|
@ -35,6 +35,8 @@ EDJE_FLAGS_VERBOSE_0 =
|
|||
EDJE_FLAGS_VERBOSE_1 = -v
|
||||
EDJE_FLAGS = $(EDJE_FLAGS_$(V))
|
||||
|
||||
ELM_PREFS_CC = @elm_prefs_cc@
|
||||
|
||||
ELEMENTARY_CODEGEN = $(top_builddir)/src/bin/@ELEMENTARY_CODEGEN_PRG@
|
||||
ELEMENTARY_CODEGEN_FLAGS = --prefix=codegen_example
|
||||
|
||||
|
@ -113,6 +115,9 @@ notify_example_01.c \
|
|||
panes_example.c \
|
||||
panel_example_01.c \
|
||||
photocam_example_01.c \
|
||||
prefs_example_01.c \
|
||||
prefs_example_02.c \
|
||||
prefs_example_03.c \
|
||||
popup_example_01.c \
|
||||
popup_example_02.c \
|
||||
popup_example_03.c \
|
||||
|
@ -144,6 +149,9 @@ win_example.c
|
|||
.edc.edj:
|
||||
$(EDJE_CC) $(EDJE_FLAGS) $< $@
|
||||
|
||||
.epc.epb:
|
||||
$(ELM_PREFS_CC) $< $@
|
||||
|
||||
if EFL_INSTALL_EXAMPLES
|
||||
files_DATA += $(SRCS) \
|
||||
dict.txt
|
||||
|
@ -151,12 +159,16 @@ endif
|
|||
|
||||
if EFL_BUILD_EXAMPLES
|
||||
files_DATA += \
|
||||
prefs_example_01.epb \
|
||||
prefs_example_02.epb \
|
||||
prefs_example_03.epb \
|
||||
prefs_example_03.edj \
|
||||
theme_example.edj \
|
||||
layout_example.edj\
|
||||
codegen_example.edj
|
||||
|
||||
clean-local:
|
||||
rm -f *.edj
|
||||
rm -f *.edj *.epb *.cfg *.cfg.bkp
|
||||
|
||||
codegen_example_generated.c codegen_example_generated.h: codegen_example.edj
|
||||
$(ELEMENTARY_CODEGEN) $(ELEMENTARY_CODEGEN_FLAGS) codegen_example.edj \
|
||||
|
@ -240,6 +252,9 @@ notify_example_01 \
|
|||
panes_example \
|
||||
panel_example_01 \
|
||||
photocam_example_01 \
|
||||
prefs_example_01 \
|
||||
prefs_example_02 \
|
||||
prefs_example_03 \
|
||||
popup_example_01 \
|
||||
popup_example_02 \
|
||||
popup_example_03 \
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
//Compile with:
|
||||
//gcc -o prefs_data_example prefs_data_example.c -g `pkg-config --cflags --libs elementary`
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *cb_data,
|
||||
Elm_Prefs_Data_Event_Type type,
|
||||
Elm_Prefs_Data *data,
|
||||
void *event_info)
|
||||
{
|
||||
Elm_Prefs_Data_Event_Changed *evt = event_info;
|
||||
Eina_Bool ok;
|
||||
char *str = eina_value_to_string(evt->value);
|
||||
|
||||
printf("item %s had its value changed to %s\n", evt->key, str);
|
||||
free(str);
|
||||
|
||||
ok = elm_prefs_data_event_callback_del(data, type, _item_changed_cb, NULL);
|
||||
printf("elm_prefs_data_event_callback_del(): %s\n", ok ? "ok" : "fail");
|
||||
}
|
||||
|
||||
int
|
||||
elm_main(int argc, char **argv)
|
||||
{
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
Eina_Value value;
|
||||
Eina_Bool ok;
|
||||
int version;
|
||||
char *str;
|
||||
|
||||
prefs_data = elm_prefs_data_new("./test", NULL, EET_FILE_MODE_READ_WRITE);
|
||||
printf("elm_prefs_data_new(): %s\n", prefs_data ? "ok" : "fail");
|
||||
|
||||
elm_prefs_data_autosave_set(prefs_data, EINA_TRUE);
|
||||
|
||||
ok = elm_prefs_data_autosave_get(prefs_data);
|
||||
printf("elm_prefs_data_autosave_get() returns: %s\n", ok ? "yes" : "no");
|
||||
|
||||
eina_value_setup(&value, EINA_VALUE_TYPE_INT);
|
||||
eina_value_set(&value, 50);
|
||||
|
||||
ok = elm_prefs_data_value_set(prefs_data, "position", &value);
|
||||
printf("elm_prefs_data_value_set(): %s\n", ok ? "ok" : "fail");
|
||||
str = eina_value_to_string(&value);
|
||||
printf("value for \'position\' is now %s\n", str);
|
||||
free(str);
|
||||
|
||||
printf("elm_prefs_data_version_get() returns %d\n",
|
||||
version = elm_prefs_data_version_get(prefs_data));
|
||||
|
||||
elm_prefs_data_version_set(prefs_data, ++version);
|
||||
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
|
||||
prefs_data = elm_prefs_data_new("./test", NULL, EET_FILE_MODE_READ_WRITE);
|
||||
|
||||
ok = elm_prefs_data_value_get(prefs_data, "position", &value);
|
||||
printf("elm_prefs_data_value_get(): %s\n", ok ? "ok" : "fail");
|
||||
str = eina_value_to_string(&value);
|
||||
printf("value for \'position\' is %s\n", str);
|
||||
free(str);
|
||||
|
||||
eina_value_set(&value, 3000);
|
||||
|
||||
ok = elm_prefs_data_event_callback_add
|
||||
(prefs_data, ELM_PREFS_DATA_EVENT_ITEM_CHANGED, _item_changed_cb, NULL);
|
||||
printf("elm_prefs_data_event_callback_add(): %s\n", ok ? "ok" : "fail");
|
||||
|
||||
ok = elm_prefs_data_value_set(prefs_data, "position", &value);
|
||||
printf("elm_prefs_data_value_set(): %s\n", ok ? "ok" : "fail");
|
||||
str = eina_value_to_string(&value);
|
||||
printf("value for \'position\' is now %s\n", str);
|
||||
free(str);
|
||||
|
||||
ok = elm_prefs_data_save(prefs_data, NULL, NULL);
|
||||
printf("elm_prefs_data_save(): %s\n", ok ? "ok" : "fail");
|
||||
|
||||
elm_prefs_data_ref(prefs_data);
|
||||
elm_prefs_data_ref(prefs_data);
|
||||
|
||||
printf("elm_prefs_data_version_get() returns %d\n",
|
||||
version = elm_prefs_data_version_get(prefs_data));
|
||||
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
|
||||
elm_shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,113 @@
|
|||
//Compile with:
|
||||
//gcc -o prefs_example_01 prefs_example_01.c -g `pkg-config --cflags --libs elementary`
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
//testing ui reflection on prefs data changes
|
||||
static Eina_Bool
|
||||
_elm_prefs_data_change(void *data)
|
||||
{
|
||||
Evas_Object *notify = data;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
Elm_Prefs_Item_Type type;
|
||||
Eina_Value value;
|
||||
|
||||
prefs_data = evas_object_data_get(notify, "prefs_data");
|
||||
|
||||
if (elm_prefs_data_value_get(prefs_data, "main:universe", &type, &value))
|
||||
{
|
||||
eina_value_set(&value, 42);
|
||||
elm_prefs_data_value_set(prefs_data, "main:universe", type, &value);
|
||||
}
|
||||
|
||||
if (elm_prefs_data_value_get(prefs_data, "main:text", &type, &value))
|
||||
{
|
||||
eina_value_set(&value, "This is a text field (:");
|
||||
elm_prefs_data_value_set(prefs_data, "main:text", type, &value);
|
||||
}
|
||||
|
||||
evas_object_show(notify);
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
static void
|
||||
_page_saved_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
const char *page = event_info;
|
||||
|
||||
printf("page %s was saved!\n", page);
|
||||
}
|
||||
|
||||
static void
|
||||
_page_loaded_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
const char *page = event_info;
|
||||
|
||||
printf("page %s was loaded!\n", page);
|
||||
}
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
const char *item = event_info;
|
||||
|
||||
printf("item %s was changed!\n", item);
|
||||
}
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc, char **argv)
|
||||
{
|
||||
Ecore_Timer *timer;
|
||||
Evas_Object *win, *prefs, *notify, *label;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
|
||||
win = elm_win_util_standard_add("prefs", "Prefs Example 01");
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
prefs = elm_prefs_add(win);
|
||||
evas_object_size_hint_weight_set(prefs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, prefs);
|
||||
evas_object_show(prefs);
|
||||
|
||||
evas_object_smart_callback_add(prefs, "page,saved", _page_saved_cb, NULL);
|
||||
evas_object_smart_callback_add(prefs, "page,loaded", _page_loaded_cb, NULL);
|
||||
evas_object_smart_callback_add(prefs, "item,changed", _item_changed_cb, win);
|
||||
|
||||
elm_prefs_autosave_set(prefs, EINA_TRUE);
|
||||
|
||||
prefs_data = elm_prefs_data_new("./prefs_example_01.cfg", NULL,
|
||||
EET_FILE_MODE_READ_WRITE);
|
||||
|
||||
elm_prefs_file_set(prefs, "prefs_example_01.epb", NULL);
|
||||
elm_prefs_data_set(prefs, prefs_data);
|
||||
|
||||
label = elm_label_add(win);
|
||||
elm_object_text_set(label, "Setting Values Programmatically");
|
||||
evas_object_size_hint_align_set(label, 0.5, 0.5);
|
||||
|
||||
notify = elm_notify_add(win);
|
||||
elm_notify_align_set(notify, 0.5, 1);
|
||||
elm_notify_timeout_set(notify, 2);
|
||||
elm_object_content_set(notify, label);
|
||||
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(notify);
|
||||
|
||||
evas_object_data_set(notify, "prefs_data", prefs_data);
|
||||
|
||||
evas_object_resize(win, 320, 320);
|
||||
evas_object_show(win);
|
||||
|
||||
timer = ecore_timer_add(5.0, _elm_prefs_data_change, notify);
|
||||
|
||||
elm_run();
|
||||
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
|
||||
elm_shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,84 @@
|
|||
collection
|
||||
{
|
||||
page
|
||||
{
|
||||
name: "main";
|
||||
version: 1;
|
||||
title: "Preferences Widget";
|
||||
subtitle: "Example 01";
|
||||
widget: "elm/vertical_box";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "universe";
|
||||
type: INT;
|
||||
label: "Ultimate Answer of Life, the Universe and Everything";
|
||||
editable: 1;
|
||||
|
||||
int {
|
||||
default: 42;
|
||||
min: 0;
|
||||
max: 150;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "another int";
|
||||
type: INT;
|
||||
widget: "elm/spinner";
|
||||
|
||||
int {
|
||||
min: 0;
|
||||
max: 666;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "label";
|
||||
type: LABEL;
|
||||
label: "Just a label...";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "text";
|
||||
type: TEXT;
|
||||
editable: 1;
|
||||
|
||||
text {
|
||||
placeholder: "This is a text field (:";
|
||||
default: "default str.";
|
||||
deny: "^[0-9]*$";
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "date";
|
||||
type: DATE;
|
||||
label: "First EFL Developer Day";
|
||||
|
||||
date {
|
||||
default: 2012 11 05;
|
||||
min: 1980 11 1;
|
||||
max: 2200 12 2;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "sep";
|
||||
type: SEPARATOR;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "save";
|
||||
type: SAVE;
|
||||
label: "Save";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "reset";
|
||||
type: RESET;
|
||||
label: "Reset";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
//Compile with:
|
||||
//gcc -o prefs_example_02 prefs_example_02.c -g `pkg-config --cflags --libs elementary`
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
static Eina_Bool visible = EINA_TRUE;
|
||||
static Eina_Bool editable = EINA_TRUE;
|
||||
static Eina_Bool disabled = EINA_FALSE;
|
||||
|
||||
//testing ui reflection on prefs data changes
|
||||
static Eina_Bool
|
||||
_elm_prefs_items_change(void *data)
|
||||
{
|
||||
Evas_Object *prefs, *notify = data;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
Elm_Prefs_Item_Type type;
|
||||
Eina_Value value;
|
||||
|
||||
prefs = evas_object_data_get(notify, "prefs");
|
||||
prefs_data = evas_object_data_get(notify, "prefs_data");
|
||||
|
||||
visible = !visible;
|
||||
elm_prefs_item_visible_set(prefs, "main:floatsp", visible);
|
||||
|
||||
disabled = !disabled;
|
||||
elm_prefs_item_disabled_set(prefs, "main:checkb", disabled);
|
||||
|
||||
editable = !editable;
|
||||
elm_prefs_item_editable_set(prefs, "main:text", editable);
|
||||
if (elm_prefs_data_value_get(prefs_data, "main:text", &type, &value))
|
||||
{
|
||||
eina_value_set(&value, editable ? "This is a editable text entry" :
|
||||
"This is a non-editable text entry");
|
||||
elm_prefs_data_value_set(prefs_data, "main:text", type, &value);
|
||||
}
|
||||
|
||||
evas_object_show(notify);
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
static void
|
||||
_action_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *prefs, *notify = data;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
Elm_Prefs_Item_Type type;
|
||||
Eina_Value value;
|
||||
|
||||
prefs = evas_object_data_get(notify, "prefs");
|
||||
prefs_data = evas_object_data_get(notify, "prefs_data");
|
||||
|
||||
if (elm_prefs_data_value_get(prefs_data, "main:text", &type, &value))
|
||||
{
|
||||
eina_value_set(&value, "Action!");
|
||||
elm_prefs_data_value_set(prefs_data, "main:text", type, &value);
|
||||
}
|
||||
}
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc, char **argv)
|
||||
{
|
||||
Ecore_Timer *timer;
|
||||
Evas_Object *win, *prefs, *notify, *label;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
|
||||
win = elm_win_util_standard_add("prefs", "Prefs Example 02");
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
prefs = elm_prefs_add(win);
|
||||
evas_object_size_hint_weight_set(prefs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, prefs);
|
||||
evas_object_show(prefs);
|
||||
|
||||
elm_prefs_autosave_set(prefs, EINA_TRUE);
|
||||
|
||||
prefs_data = elm_prefs_data_new("./prefs_example_02.cfg", NULL,
|
||||
EET_FILE_MODE_READ_WRITE);
|
||||
|
||||
elm_prefs_file_set(prefs, "prefs_example_02.epb", NULL);
|
||||
elm_prefs_data_set(prefs, prefs_data);
|
||||
|
||||
label = elm_label_add(win);
|
||||
elm_object_text_set(label, "Editable, Visible and Disable! Just Saying...");
|
||||
evas_object_size_hint_weight_set(label, 0.0, 0.0);
|
||||
evas_object_size_hint_align_set(label, 0.5, 0.5);
|
||||
|
||||
notify = elm_notify_add(win);
|
||||
elm_notify_align_set(notify, 0.5, 1);
|
||||
elm_notify_timeout_set(notify, 2);
|
||||
elm_object_content_set(notify, label);
|
||||
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(notify);
|
||||
|
||||
evas_object_data_set(notify, "prefs", prefs);
|
||||
evas_object_data_set(notify, "prefs_data", prefs_data);
|
||||
|
||||
evas_object_smart_callback_add(prefs, "action", _action_cb, notify);
|
||||
|
||||
evas_object_resize(win, 320, 320);
|
||||
evas_object_show(win);
|
||||
|
||||
timer = ecore_timer_add(5.0, _elm_prefs_items_change, notify);
|
||||
|
||||
elm_run();
|
||||
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
|
||||
elm_shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,65 @@
|
|||
collection
|
||||
{
|
||||
page
|
||||
{
|
||||
name: "main";
|
||||
version: 1;
|
||||
title: "Preferences Widget";
|
||||
subtitle: "Example 02";
|
||||
widget: "elm/vertical_frame";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "text";
|
||||
type: TEXTAREA;
|
||||
editable: 1;
|
||||
|
||||
textarea {
|
||||
placeholder: "This is a editable text entry";
|
||||
default: "This is DEFAULT!";
|
||||
accept: "^[a-zA-Z ]*$";
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "floatsp";
|
||||
type: FLOAT;
|
||||
editable: 1;
|
||||
label: "Floating...";
|
||||
|
||||
float {
|
||||
default: 0.7;
|
||||
min: 0;
|
||||
max: 1;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "checkb";
|
||||
type: BOOL;
|
||||
label: "Checkbox";
|
||||
|
||||
bool {
|
||||
default: true;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "sep";
|
||||
type: SEPARATOR;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "save";
|
||||
type: SAVE;
|
||||
label: "Save";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "action";
|
||||
type: ACTION;
|
||||
label: "Action!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
//Compile with:
|
||||
//gcc -o prefs_example_03 prefs_example_03.c -g `pkg-config --cflags --libs elementary`
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
#define WIDTH (500)
|
||||
#define HEIGHT (700)
|
||||
#define MSG_ID_VEL (1)
|
||||
|
||||
static void
|
||||
_update_animation(Evas_Object *prefs, Evas_Object *layout)
|
||||
{
|
||||
Eina_Value value;
|
||||
Eina_Bool animation;
|
||||
|
||||
elm_prefs_item_value_get(prefs, "main:config:options:animation", &value);
|
||||
eina_value_get(&value, &animation);
|
||||
if (animation)
|
||||
elm_layout_signal_emit(layout, "start", "animation");
|
||||
else
|
||||
elm_layout_signal_emit(layout, "stop", "animation");
|
||||
}
|
||||
|
||||
static void
|
||||
_update_animation_time(Evas_Object *prefs, Evas_Object *layout)
|
||||
{
|
||||
Eina_Value value;
|
||||
float animation_time;
|
||||
Edje_Message_Float msg;
|
||||
|
||||
elm_prefs_item_value_get(prefs, "main:config:options:animation_time", &value);
|
||||
eina_value_get(&value, &animation_time);
|
||||
msg.val = animation_time;
|
||||
edje_object_message_send(elm_layout_edje_get(layout), EDJE_MESSAGE_FLOAT,
|
||||
MSG_ID_VEL, &msg);
|
||||
}
|
||||
|
||||
static void
|
||||
_update(Evas_Object *prefs, Evas_Object *layout)
|
||||
{
|
||||
_update_animation(prefs, layout);
|
||||
_update_animation_time(prefs, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
_page_loaded_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *layout = data;
|
||||
|
||||
_update(obj, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
const char *item = event_info;
|
||||
Evas_Object *layout = data;
|
||||
|
||||
if (!strcmp(item, "main:config:options:animation_time"))
|
||||
_update_animation_time(obj, layout);
|
||||
else if (!strcmp(item, "main:config:options:animation"))
|
||||
_update_animation(obj, layout);
|
||||
}
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc, char **argv)
|
||||
{
|
||||
Evas_Object *win, *bg, *prefs, *layout;
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
|
||||
win = elm_win_add(NULL, "Prefs", ELM_WIN_BASIC);
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_win_title_set(win, "Prefs Example 03");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
bg = elm_bg_add(win);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_size_hint_min_set(bg, WIDTH, HEIGHT);
|
||||
evas_object_size_hint_max_set(bg, WIDTH, HEIGHT);
|
||||
evas_object_show(bg);
|
||||
|
||||
layout = elm_layout_add(win);
|
||||
elm_layout_file_set(layout, "prefs_example_03.edj", "prefs_edje");
|
||||
|
||||
prefs = elm_prefs_add(win);
|
||||
evas_object_size_hint_weight_set(prefs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_resize(prefs, WIDTH, HEIGHT);
|
||||
evas_object_show(prefs);
|
||||
|
||||
evas_object_smart_callback_add(prefs, "page,loaded", _page_loaded_cb,
|
||||
layout);
|
||||
evas_object_smart_callback_add(prefs, "item,changed", _item_changed_cb,
|
||||
layout);
|
||||
|
||||
elm_prefs_autosave_set(prefs, EINA_TRUE);
|
||||
|
||||
prefs_data =
|
||||
elm_prefs_data_new("./prefs_example_03.cfg", NULL, EET_FILE_MODE_READ_WRITE);
|
||||
|
||||
elm_prefs_file_set(prefs, "prefs_example_03.epb", NULL);
|
||||
elm_prefs_data_set(prefs, prefs_data);
|
||||
|
||||
elm_prefs_item_swallow(prefs, "main:swal", layout);
|
||||
|
||||
_update_animation_time(prefs, layout);
|
||||
_update_animation(prefs, layout);
|
||||
|
||||
evas_object_resize(win, WIDTH, HEIGHT);
|
||||
evas_object_show(win);
|
||||
|
||||
elm_run();
|
||||
|
||||
elm_prefs_data_unref(prefs_data);
|
||||
|
||||
elm_shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,150 @@
|
|||
#define MSG_ID_VEL (1)
|
||||
|
||||
collections {
|
||||
group {
|
||||
name: "prefs_edje";
|
||||
max: 450 450;
|
||||
min: 50 50;
|
||||
|
||||
parts {
|
||||
part {
|
||||
name: "bg";
|
||||
type: RECT;
|
||||
scale: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 450 450;
|
||||
max: 450 450;
|
||||
color: 255 255 255 0;
|
||||
align: 0.0 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "square1";
|
||||
type: RECT;
|
||||
scale: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 50 50;
|
||||
max: 50 50;
|
||||
color: 0 0 255 255;
|
||||
align: 0.0 0.5;
|
||||
}
|
||||
description {
|
||||
state: "invert" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 0 255 0 255;
|
||||
align: 1 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "square2";
|
||||
type: RECT;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 50 50;
|
||||
max: 50 50;
|
||||
color: 0 255 0 255;
|
||||
align: 0.5 0.0;
|
||||
}
|
||||
description {
|
||||
state: "invert" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 0 0 255 255;
|
||||
align: 0.5 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "animation_start";
|
||||
signal: "start";
|
||||
source: "animation";
|
||||
after: "animation,clear";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "call_animation,state1";
|
||||
script {
|
||||
cancel_anim(anim_id);
|
||||
set_int(anim_id, anim(get_float(global_speed), "animation_1", 0));
|
||||
set_int(anim_n, 1);
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "call_animation,state2";
|
||||
script {
|
||||
cancel_anim(anim_id);
|
||||
set_int(anim_id, anim(get_float(global_speed), "animation_2", 0));
|
||||
set_int(anim_n, 2);
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "animation,stop";
|
||||
signal: "stop";
|
||||
source: "animation";
|
||||
script {
|
||||
cancel_anim(get_int(anim_id));
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "animation,clear";
|
||||
script {
|
||||
cancel_anim(get_int(anim_id));
|
||||
if (get_int(anim_n) == 2)
|
||||
set_float(anim_pos, (get_float(anim_pos) - 1) * ( -1));
|
||||
}
|
||||
after: "call_animation,state1";
|
||||
}
|
||||
|
||||
script {
|
||||
public global_speed;
|
||||
public anim_id;
|
||||
public anim_pos;
|
||||
public anim_n;
|
||||
|
||||
public message(Msg_Type:type, id, ...) {
|
||||
if ((type == MSG_FLOAT) && (id == MSG_ID_VEL))
|
||||
set_float(global_speed, Float:getarg(2));
|
||||
}
|
||||
|
||||
public animation_1(val, Float:pos) {
|
||||
if (pos >= get_float(anim_pos) && get_int(anim_n) == 1)
|
||||
{
|
||||
set_tween_state(PART:"square1", pos, "default", 0.0,
|
||||
"invert", 0.0);
|
||||
set_tween_state(PART:"square2", pos, "default", 0.0,
|
||||
"invert", 0.0);
|
||||
set_float(anim_pos, pos);
|
||||
}
|
||||
if (pos >= 1)
|
||||
{
|
||||
run_program(PROGRAM:"call_animation,state2");
|
||||
set_float(anim_pos, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
public animation_2(val, Float:pos) {
|
||||
if (pos >= get_float(anim_pos) && get_int(anim_n) == 2)
|
||||
{
|
||||
set_tween_state(PART:"square1", pos, "invert", 0.0,
|
||||
"default", 0.0);
|
||||
set_tween_state(PART:"square2", pos, "invert", 0.0,
|
||||
"default", 0.0);
|
||||
set_float(anim_pos, pos);
|
||||
}
|
||||
if (pos >= 1)
|
||||
{
|
||||
run_program(PROGRAM:"call_animation,state1");
|
||||
set_float(anim_pos, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#undef MSG_ID_VEL
|
|
@ -0,0 +1,112 @@
|
|||
collection
|
||||
{
|
||||
page
|
||||
{
|
||||
name: "main";
|
||||
version: 1;
|
||||
title: "Preferences Widget";
|
||||
subtitle: "Example 03";
|
||||
widget: "elm/vertical_frame";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "config";
|
||||
type: PAGE;
|
||||
source: "configpage";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "sep";
|
||||
type: SEPARATOR;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "swal";
|
||||
type: SWALLOW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page
|
||||
{
|
||||
name: "configpage";
|
||||
version: 1;
|
||||
title: "Preferences";
|
||||
widget: "elm/horizontal_box";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "options";
|
||||
type: PAGE;
|
||||
source: "optionspage";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "sep2";
|
||||
type: SEPARATOR;
|
||||
}
|
||||
|
||||
item {
|
||||
name: "buttons";
|
||||
type: PAGE;
|
||||
source: "buttonspage";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page
|
||||
{
|
||||
name: "optionspage";
|
||||
version: 1;
|
||||
title: "Options";
|
||||
widget: "elm/vertical_box";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "animation";
|
||||
type: BOOL;
|
||||
persistent: 1;
|
||||
label: "Animation";
|
||||
|
||||
bool {
|
||||
default: true;
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
name: "animation_time";
|
||||
type: FLOAT;
|
||||
persistent: 1;
|
||||
label: "Animation Time";
|
||||
|
||||
float {
|
||||
default: 0.6;
|
||||
min: 0.0;
|
||||
max: 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page
|
||||
{
|
||||
name: "buttonspage";
|
||||
version: 1;
|
||||
title: "Actions";
|
||||
widget: "elm/vertical_box";
|
||||
|
||||
items {
|
||||
item {
|
||||
name: "save";
|
||||
type: SAVE;
|
||||
label: "Save";
|
||||
}
|
||||
|
||||
item {
|
||||
name: "reset";
|
||||
type: RESET;
|
||||
label: "Reset";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -152,6 +152,9 @@ EAPI extern Elm_Version *elm_version;
|
|||
#include <elm_tooltip.h>
|
||||
#include <elm_object_item.h>
|
||||
|
||||
#include <elm_prefs_data.h>
|
||||
#include <elm_prefs.h>
|
||||
|
||||
/* special widgets - types used elsewhere */
|
||||
#include <elm_icon.h>
|
||||
#include <elm_scroller.h>
|
||||
|
|
|
@ -93,6 +93,7 @@ elm_widget_photocam.h \
|
|||
elm_widget_player.h \
|
||||
elm_widget_plug.h \
|
||||
elm_widget_popup.h \
|
||||
elm_widget_prefs.h \
|
||||
elm_widget_progressbar.h \
|
||||
elm_widget_radio.h \
|
||||
elm_widget_route.h \
|
||||
|
@ -111,10 +112,9 @@ includesunstabledir = $(includedir)/elementary-@VMAJ@
|
|||
|
||||
includesub_HEADERS = \
|
||||
elc_ctxpopup.h \
|
||||
elm_dayselector.h \
|
||||
elc_fileselector.h \
|
||||
elc_fileselector_button.h \
|
||||
elc_fileselector_entry.h \
|
||||
elc_fileselector.h \
|
||||
elc_hoversel.h \
|
||||
elc_multibuttonentry.h \
|
||||
elc_naviframe.h \
|
||||
|
@ -136,6 +136,7 @@ elm_config.h \
|
|||
elm_conform.h \
|
||||
elm_cursor.h \
|
||||
elm_datetime.h \
|
||||
elm_dayselector.h \
|
||||
elm_debug.h \
|
||||
elm_deprecated.h \
|
||||
elm_diskselector.h \
|
||||
|
@ -157,16 +158,15 @@ elm_grid.h \
|
|||
elm_hover.h \
|
||||
elm_icon.h \
|
||||
elm_image.h \
|
||||
elm_inwin.h \
|
||||
elm_plug.h \
|
||||
elm_index.h \
|
||||
elm_intro.h \
|
||||
elm_inwin.h \
|
||||
elm_label.h \
|
||||
elm_layout.h \
|
||||
elm_list.h \
|
||||
elm_macros.h \
|
||||
elm_mapbuf.h \
|
||||
elm_map.h \
|
||||
elm_mapbuf.h \
|
||||
elm_menu.h \
|
||||
elm_mirroring.h \
|
||||
elm_need.h \
|
||||
|
@ -175,14 +175,17 @@ elm_object.h \
|
|||
elm_object_item.h \
|
||||
elm_panel.h \
|
||||
elm_panes.h \
|
||||
elm_photocam.h \
|
||||
elm_photo.h \
|
||||
elm_photocam.h \
|
||||
elm_plug.h \
|
||||
elm_prefs.h \
|
||||
elm_prefs_data.h \
|
||||
elm_progressbar.h \
|
||||
elm_radio.h \
|
||||
elm_route.h \
|
||||
elm_scale.h \
|
||||
elm_scroller.h \
|
||||
elm_scroll.h \
|
||||
elm_scroller.h \
|
||||
elm_segment_control.h \
|
||||
elm_separator.h \
|
||||
elm_slider.h \
|
||||
|
@ -263,6 +266,9 @@ elm_panes.c \
|
|||
elm_photo.c \
|
||||
elm_photocam.c \
|
||||
elm_plug.c \
|
||||
elm_prefs.c \
|
||||
elm_prefs_data.c \
|
||||
elm_prefs_edd.x \
|
||||
elm_progressbar.c \
|
||||
elm_radio.c \
|
||||
elm_route.c \
|
||||
|
|
|
@ -478,6 +478,7 @@ elm_quicklaunch_sub_init(int argc,
|
|||
ecore_con_init();
|
||||
ecore_con_url_init();
|
||||
#endif
|
||||
_elm_prefs_init();
|
||||
_elm_ews_wm_init();
|
||||
}
|
||||
return _elm_sub_init_count;
|
||||
|
@ -498,6 +499,7 @@ elm_quicklaunch_sub_shutdown(void)
|
|||
{
|
||||
_elm_win_shutdown();
|
||||
_elm_module_shutdown();
|
||||
_elm_prefs_shutdown();
|
||||
_elm_ews_wm_shutdown();
|
||||
#ifdef HAVE_ELEMENTARY_ECORE_CON
|
||||
ecore_con_url_shutdown();
|
||||
|
|
|
@ -130,18 +130,26 @@ _elm_module_load(Elm_Module *m)
|
|||
home = getenv("HOME");
|
||||
if (home)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/modules/%s/%s/module" EFL_SHARED_EXTENSION, home, m->name, MODULE_ARCH);
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s/"ELEMENTARY_BASE_DIR "/modules/%s/%s/module"
|
||||
EFL_SHARED_EXTENSION, home, m->name, MODULE_ARCH);
|
||||
m->module = eina_module_new(buf);
|
||||
if (m->module && eina_module_load (m->module) == EINA_TRUE)
|
||||
if ((m->module) && (eina_module_load(m->module) == EINA_TRUE))
|
||||
{
|
||||
m->init_func = eina_module_symbol_get(m->module, "elm_modapi_init");
|
||||
m->init_func =
|
||||
eina_module_symbol_get(m->module, "elm_modapi_init");
|
||||
if (m->init_func)
|
||||
{
|
||||
m->shutdown_func = eina_module_symbol_get(m->module, "elm_modapi_shutdown");
|
||||
m->shutdown_func =
|
||||
eina_module_symbol_get(m->module, "elm_modapi_shutdown");
|
||||
m->so_path = eina_stringshare_add(buf);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/modules/%s/%s", home, m->name, MODULE_ARCH);
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s/"ELEMENTARY_BASE_DIR "/modules/%s/%s",
|
||||
home, m->name, MODULE_ARCH);
|
||||
m->bin_dir = eina_stringshare_add(buf);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/modules/%s", home, m->name);
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s/"ELEMENTARY_BASE_DIR "/modules/%s",
|
||||
home, m->name);
|
||||
m->data_dir = eina_stringshare_add(buf);
|
||||
}
|
||||
else
|
||||
|
@ -162,20 +170,25 @@ _elm_module_load(Elm_Module *m)
|
|||
}
|
||||
}
|
||||
|
||||
if (!m->module)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s/module" EFL_SHARED_EXTENSION, _elm_lib_dir, m->name, MODULE_ARCH);
|
||||
if (m->module) return EINA_TRUE;
|
||||
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s/elementary/modules/%s/%s/module"EFL_SHARED_EXTENSION,
|
||||
_elm_lib_dir, m->name, MODULE_ARCH);
|
||||
m->module = eina_module_new(buf);
|
||||
if (m->module && eina_module_load (m->module) == EINA_TRUE)
|
||||
if ((m->module) && (eina_module_load(m->module) == EINA_TRUE))
|
||||
{
|
||||
m->init_func = eina_module_symbol_get(m->module, "elm_modapi_init");
|
||||
if (m->init_func)
|
||||
{
|
||||
m->shutdown_func = eina_module_symbol_get(m->module, "elm_modapi_shutdown");
|
||||
m->shutdown_func =
|
||||
eina_module_symbol_get(m->module, "elm_modapi_shutdown");
|
||||
m->so_path = eina_stringshare_add(buf);
|
||||
snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s", _elm_lib_dir, m->name, MODULE_ARCH);
|
||||
snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s",
|
||||
_elm_lib_dir, m->name, MODULE_ARCH);
|
||||
m->bin_dir = eina_stringshare_add(buf);
|
||||
snprintf(buf, sizeof(buf), "%s/elementary/modules/%s", _elm_lib_dir, m->name);
|
||||
snprintf(buf, sizeof(buf), "%s/elementary/modules/%s",
|
||||
_elm_lib_dir, m->name);
|
||||
m->data_dir = eina_stringshare_add(buf);
|
||||
}
|
||||
else
|
||||
|
@ -189,7 +202,6 @@ _elm_module_load(Elm_Module *m)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m->module)
|
||||
{
|
||||
eina_module_free(m->module);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,300 @@
|
|||
/**
|
||||
* @defgroup Elm_Prefs Elementary Prefs
|
||||
* @ingroup Elementary
|
||||
*
|
||||
* Elementary provides a prefs (for "preferences") infrastructure, which
|
||||
* consists of two sets of APIs:
|
||||
* - prefs data and
|
||||
* - prefs view.
|
||||
*
|
||||
* @section elm-prefs-data Prefs Data
|
||||
*
|
||||
* Prefs data are simple key/value storage handles. One is able to
|
||||
* set/get their values, which are @c Eina_Value blobs
|
||||
* (i.e. dynamically typed). You may also control the version of this
|
||||
* data set, for updating purposes. Finally, you may register
|
||||
* callbacks on changes on these data.
|
||||
*
|
||||
* The main user of prefs data is the prefs @b widget. After its
|
||||
* creation, it's bound to a given prefs data handle (if not, if gets
|
||||
* its values from its definition file, which may have defaults). An
|
||||
* elm prefs widget has its visuals defined by an @c .epb file, which
|
||||
* is a compiled form of a @c .edc counterpart -- a textual definition
|
||||
* much like Edje @c .edc files. On these files, one defines the
|
||||
* values (items) a prefs widget hold, which translate to other
|
||||
* Elementary widgets. In other words, it does the mapping between UI
|
||||
* widgets into prefs data values, and it keeps the synchrony between
|
||||
* its child widgets' states and their corresponding prefs data
|
||||
* values.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Types of events a given prefs data handle may issue.
|
||||
*
|
||||
* @see elm_prefs_data_event_callback_add()
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
typedef enum {
|
||||
ELM_PREFS_DATA_EVENT_GROUP_AUTOSAVED, /** The group of values has been automatically saved (event info is the group's name (key)) */
|
||||
ELM_PREFS_DATA_EVENT_ITEM_CHANGED, /** A given item (prefs data value) has been changed (event info is an #Elm_Prefs_Data_Event_Changed pointer) */
|
||||
ELM_PREFS_DATA_EVENT_LAST /** sentinel value, don't use it */
|
||||
} Elm_Prefs_Data_Event_Type;
|
||||
|
||||
/**
|
||||
* @typedef Elm_Prefs_Data
|
||||
*
|
||||
* An Elm Prefs Data handle.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
typedef struct _Elm_Prefs_Data Elm_Prefs_Data;
|
||||
|
||||
typedef void (*Elm_Prefs_Data_Event_Cb)(void *cb_data,
|
||||
Elm_Prefs_Data_Event_Type type,
|
||||
Elm_Prefs_Data *prefs_data,
|
||||
void *event_info);
|
||||
|
||||
/**
|
||||
* @typedef Elm_Prefs_Data_Event_Changed
|
||||
*
|
||||
* An Elm Prefs #ELM_PREFS_DATA_EVENT_ITEM_CHANGED event info data
|
||||
* blob.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
typedef struct _Elm_Prefs_Data_Event_Changed
|
||||
{
|
||||
const char *key; /** key of the data value which changed */
|
||||
const Eina_Value *value; /** the value, itself, to be used as a @b read-only Eina_Value (it can be @c NULL, if the data was deleted) */
|
||||
} Elm_Prefs_Data_Event_Changed;
|
||||
|
||||
/**
|
||||
* Create a new prefs data handle.
|
||||
*
|
||||
* @param data_file The (user) file where to read data from
|
||||
* @param key The key where the data is stored under
|
||||
* @param mode The mode of access to the given file
|
||||
* @return A new prefs data handle
|
||||
*
|
||||
* If @a data_file is @c NULL,
|
||||
* efreet_config_home_get()/<appname>/preferences.cfg will be used, by
|
||||
* default. If @a key is @c NULL, it is considered a default key --
|
||||
* "main".
|
||||
*
|
||||
* If @a mode is @c EET_FILE_MODE_READ, autosave will be always false
|
||||
* for this elm_prefs_data handle. If @a mode is
|
||||
* @c EET_FILE_MODE_WRITE, than @a data_file @b won't be read, but just
|
||||
* written to.
|
||||
*
|
||||
* @note An elm prefs data handle starts with a reference count of @b
|
||||
* 1 (see elm_prefs_data_ref()). Use elm_prefs_data_unref() to delete
|
||||
* it.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Elm_Prefs_Data *elm_prefs_data_new(const char *data_file,
|
||||
const char *key,
|
||||
Eet_File_Mode mode);
|
||||
|
||||
/**
|
||||
* Set the version field of a given prefs data handle.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @param version The version number
|
||||
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
|
||||
*
|
||||
* @see elm_prefs_data_version_get()
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Eina_Bool elm_prefs_data_version_set(Elm_Prefs_Data *prefs_data,
|
||||
unsigned int version);
|
||||
|
||||
/**
|
||||
* Retrieve the version field of a given prefs data handle.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @return The version of @a prefs_data or -1, on errors.
|
||||
*
|
||||
* @see elm_prefs_data_version_set()
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI unsigned int elm_prefs_data_version_get(Elm_Prefs_Data *prefs_data);
|
||||
|
||||
/**
|
||||
* Increment reference count on a given prefs data handle.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @return The same prefs data handle, @a prefs_data
|
||||
*
|
||||
* This increments the reference count of @a by 1. Use this to pass
|
||||
* the handle safely to contexts other than the creation one, for
|
||||
* example. Only when the reference count on a prefs data handle
|
||||
* reaches @b 0 (see elm_prefs_data_unref()) will it be deleted.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Elm_Prefs_Data *elm_prefs_data_ref(Elm_Prefs_Data *prefs_data);
|
||||
|
||||
/**
|
||||
* Decrement reference count on a given prefs data handle.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
*
|
||||
* This decrements the reference count of @a by 1. When the reference
|
||||
* count on @a reach @b 0, it will it be deleted.
|
||||
*
|
||||
* @see elm_prefs_data_ref() for more details.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI void elm_prefs_data_unref(Elm_Prefs_Data *prefs_data);
|
||||
|
||||
/**
|
||||
* Set (or delete) one value of a given prefs data handle.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @param name The (unique) name (key) of the given value
|
||||
* @param type The item type to which the value is to be associated
|
||||
* @param value The value, itself. It must be a valid @c Eina_Value
|
||||
* handle, bound to a given type and value or @c NULL. On
|
||||
* the second case, the call will actually @b delete the
|
||||
* given key from @a prefs_data.
|
||||
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
|
||||
*
|
||||
* A prefs data handle holds a list of key/value entries. This will
|
||||
* set one of @a's values, by name. The value itself may be any valid
|
||||
* and filled up @c Eina_Value handle.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
typedef enum _Elm_Prefs_Item_Type Elm_Prefs_Item_Type;
|
||||
|
||||
EAPI Eina_Bool elm_prefs_data_value_set(Elm_Prefs_Data *prefs_data,
|
||||
const char *path,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Eina_Value *value);
|
||||
|
||||
/**
|
||||
* Retrieve one value of a given prefs data handle (by key).
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @param name The (unique) name (key) of the given value
|
||||
* @param type The item type associated with the value
|
||||
* @param value A valid @c Eina_Value handle, where to store the
|
||||
* value, itself.
|
||||
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
|
||||
*
|
||||
* This will retrieve one of @a's values, by name. The value itself
|
||||
* will be written to @a value, which will be overriden.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Eina_Bool elm_prefs_data_value_get(const Elm_Prefs_Data *prefs_data,
|
||||
const char *path,
|
||||
Elm_Prefs_Item_Type *type,
|
||||
Eina_Value *value);
|
||||
|
||||
/**
|
||||
* Register a callback for one of the prefs data events.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @param type The type of event to register to
|
||||
* @param cb The callback function to issue on this event
|
||||
* @param cb_data The data pointer to pass to @a cb on this event
|
||||
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
|
||||
*
|
||||
* @see #Elm_Prefs_Data_Event_Type for more details on the events.
|
||||
* @see elm_prefs_data_event_callback_del()
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Eina_Bool elm_prefs_data_event_callback_add(Elm_Prefs_Data *prefs_data,
|
||||
Elm_Prefs_Data_Event_Type type,
|
||||
Elm_Prefs_Data_Event_Cb cb,
|
||||
const void *cb_data);
|
||||
/**
|
||||
* Unregister a callback for one of the prefs data events.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @param type The type of event to unregister
|
||||
* @param cb The callback function being used to this event
|
||||
* @param cb_data The data pointer being passed to @a cb on this event
|
||||
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
|
||||
*
|
||||
* @see #Elm_Prefs_Data_Event_Type for more details on the events.
|
||||
* @see elm_prefs_data_event_callback_add()
|
||||
*
|
||||
* @note If a same event callback (with matching type, callback
|
||||
* function and data pointers) was added more than once on
|
||||
* @a prefs_data, them same number of matching calls of this type have to
|
||||
* issued to delete all them.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Eina_Bool elm_prefs_data_event_callback_del(Elm_Prefs_Data *prefs_data,
|
||||
Elm_Prefs_Data_Event_Type t,
|
||||
Elm_Prefs_Data_Event_Cb cb,
|
||||
const void *cb_data);
|
||||
|
||||
/**
|
||||
* Set whether a given elm prefs data handle should save its values
|
||||
* back automatically on changes.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @param autosave @c EINA_TRUE to save automatically, @c EINA_FALSE otherwise.
|
||||
*
|
||||
* If @a autosave is @c EINA_TRUE, every call to
|
||||
* elm_prefs_data_value_set() will implicitly issue elm_prefs_data_save() too.
|
||||
*
|
||||
* @warning This call will do nothing if @a prefs_data was created
|
||||
* with mode EET_FILE_MODE_READ -- auto saving will be always disabled
|
||||
* in this mode, as it can't write back.
|
||||
*
|
||||
* @see elm_prefs_data_autosave_get()
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI void elm_prefs_data_autosave_set(Elm_Prefs_Data *prefs_data,
|
||||
Eina_Bool autosave);
|
||||
|
||||
/**
|
||||
* Get whether a given elm prefs data handle is saving its values
|
||||
* back automatically on changes.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @return @c EINA_TRUE if @a prefs_data is saving automatically,
|
||||
* @c EINA_FALSE otherwise.
|
||||
*
|
||||
* @see elm_prefs_data_autosave_set()
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Eina_Bool elm_prefs_data_autosave_get(const Elm_Prefs_Data *prefs_data);
|
||||
|
||||
/**
|
||||
* Save, manually, a given elm prefs data handle data back, on the given
|
||||
* file and key.
|
||||
*
|
||||
* @param prefs_data A valid prefs data handle
|
||||
* @param file The file (path) to save to (@c NULL means same file as
|
||||
* it was opened with)
|
||||
* @param key The under which to save values (@c NULL means the same
|
||||
* key as it was opened with)
|
||||
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
|
||||
*
|
||||
* @see elm_prefs_data_autosave_set()
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Eina_Bool elm_prefs_data_save(const Elm_Prefs_Data *prefs_data,
|
||||
const char *file,
|
||||
const char *key);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
|
@ -0,0 +1,326 @@
|
|||
#ifndef ELM_PREFS_EDD_H
|
||||
#define ELM_PREFS_EDD_H
|
||||
|
||||
#include "elm_prefs.h"
|
||||
|
||||
static struct
|
||||
{
|
||||
Elm_Prefs_Item_Type t;
|
||||
const char *name;
|
||||
} eet_mapping[] = {
|
||||
{ ELM_PREFS_TYPE_ACTION, "action" },
|
||||
{ ELM_PREFS_TYPE_BOOL, "boolean" },
|
||||
{ ELM_PREFS_TYPE_INT, "integer" },
|
||||
{ ELM_PREFS_TYPE_FLOAT, "float" },
|
||||
{ ELM_PREFS_TYPE_LABEL, "label" },
|
||||
{ ELM_PREFS_TYPE_DATE, "date" },
|
||||
{ ELM_PREFS_TYPE_PAGE, "page" },
|
||||
{ ELM_PREFS_TYPE_TEXT, "text" },
|
||||
{ ELM_PREFS_TYPE_TEXTAREA, "textarea" },
|
||||
{ ELM_PREFS_TYPE_RESET, "reset" },
|
||||
{ ELM_PREFS_TYPE_SAVE, "save" },
|
||||
{ ELM_PREFS_TYPE_SEPARATOR, "separator" },
|
||||
{ ELM_PREFS_TYPE_SWALLOW, "swallow" },
|
||||
{ ELM_PREFS_TYPE_UNKNOWN, NULL }
|
||||
};
|
||||
|
||||
static Eet_Data_Descriptor *_bool_spec_edd; /* ELM_PREFS_TYPE_BOOL */
|
||||
static Eet_Data_Descriptor *_int_spec_edd; /* ELM_PREFS_TYPE_INT */
|
||||
static Eet_Data_Descriptor *_float_spec_edd; /* ELM_PREFS_TYPE_FLOAT */
|
||||
static Eet_Data_Descriptor *_page_spec_edd; /* ELM_PREFS_TYPE_PAGE */
|
||||
static Eet_Data_Descriptor *_str_spec_edd; /* ELM_PREFS_TYPE_TEXT and
|
||||
* ELM_PREFS_TYPE_TEXTAREA, */
|
||||
static Eet_Data_Descriptor *_date_spec_edd; /* ELM_PREFS_TYPE_DATE */
|
||||
static Eet_Data_Descriptor *_void_spec_edd; /* ELM_PREFS_TYPE_ACTION,
|
||||
* ELM_PREFS_TYPE_LABEL,
|
||||
* ELM_PREFS_TYPE_RESET,
|
||||
* ELM_PREFS_TYPE_SAVE and
|
||||
* ELM_PREFS_TYPE_SEPARATOR
|
||||
* ELM_PREFS_TYPE_SWALLOW */
|
||||
|
||||
static Eet_Data_Descriptor *_item_edd;
|
||||
static Eet_Data_Descriptor *_item_unified_edd;
|
||||
|
||||
static Eet_Data_Descriptor *_page_edd;
|
||||
|
||||
|
||||
static const char *
|
||||
_union_type_get(const void *data,
|
||||
Eina_Bool *unknow)
|
||||
{
|
||||
const Elm_Prefs_Item_Type *t = data;
|
||||
int i;
|
||||
|
||||
if (unknow)
|
||||
*unknow = EINA_FALSE;
|
||||
|
||||
for (i = 0; eet_mapping[i].name != NULL; ++i)
|
||||
if (*t == eet_mapping[i].t)
|
||||
return eet_mapping[i].name;
|
||||
|
||||
if (unknow)
|
||||
*unknow = EINA_TRUE;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_union_type_set(const char *type,
|
||||
void *data,
|
||||
Eina_Bool unknow)
|
||||
{
|
||||
Elm_Prefs_Item_Type *t = data;
|
||||
int i;
|
||||
|
||||
if (unknow)
|
||||
return EINA_FALSE;
|
||||
|
||||
for (i = 0; eet_mapping[i].name != NULL; ++i)
|
||||
if (strcmp(eet_mapping[i].name, type) == 0)
|
||||
{
|
||||
*t = eet_mapping[i].t;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
#define DESC_NEW(_type, _desc) \
|
||||
EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, _type); \
|
||||
_desc = eet_data_descriptor_stream_new(&eddc)
|
||||
|
||||
static Eet_Data_Descriptor *
|
||||
_bool_spec_desc_new(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *ret;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Spec_Bool, ret);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Bool, "def", def, EET_T_UCHAR);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eet_Data_Descriptor *
|
||||
_int_spec_desc_new(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *ret;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Spec_Int, ret);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Int, "def", def, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Int, "min", min, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Int, "max", max, EET_T_INT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eet_Data_Descriptor *
|
||||
_float_spec_desc_new(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *ret;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Spec_Float, ret);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Float, "def", def, EET_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Float, "min", min, EET_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Float, "max", max, EET_T_FLOAT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eet_Data_Descriptor *
|
||||
_page_spec_desc_new(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *ret;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Spec_Page, ret);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Page, "source", source, EET_T_STRING);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eet_Data_Descriptor *
|
||||
_str_spec_desc_new(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *ret;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Spec_String, ret);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_String, "def", def, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_String, "placeholder", placeholder,
|
||||
EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_String, "accept", accept, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_String, "deny", deny, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_String, "min", length.min, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_String, "max", length.max, EET_T_INT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eet_Data_Descriptor *
|
||||
_date_spec_desc_new(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *ret;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Spec_Date, ret);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "def.d", def.d, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "def.m", def.m, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "def.y", def.y, EET_T_USHORT);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "min.d", min.d, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "min.m", min.m, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "min.y", min.y, EET_T_USHORT);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "max.d", max.d, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "max.m", max.m, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(ret, Elm_Prefs_Item_Spec_Date, "max.y", max.y, EET_T_USHORT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eet_Data_Descriptor *
|
||||
_void_spec_desc_new(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *ret;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Spec_Void, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_prefs_descriptors_init(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
|
||||
DESC_NEW(Elm_Prefs_Page_Node, _page_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "version", version, EET_T_UINT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "name", name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "title", title, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "sub_title", sub_title, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "widget", widget, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "style", style, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "icon", icon, EET_T_STRING);
|
||||
|
||||
DESC_NEW(Elm_Prefs_Item_Node, _item_edd);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "name", name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "label", label, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "icon", icon, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "style", style, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "widget", widget, EET_T_STRING);
|
||||
|
||||
eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
|
||||
eddc.func.type_get = _union_type_get;
|
||||
eddc.func.type_set = _union_type_set;
|
||||
_item_unified_edd = eet_data_descriptor_stream_new(&eddc);
|
||||
|
||||
_bool_spec_edd = _bool_spec_desc_new();
|
||||
_int_spec_edd = _int_spec_desc_new();
|
||||
_float_spec_edd = _float_spec_desc_new();
|
||||
_page_spec_edd = _page_spec_desc_new();
|
||||
_str_spec_edd = _str_spec_desc_new();
|
||||
_date_spec_edd = _date_spec_desc_new();
|
||||
_void_spec_edd = _void_spec_desc_new();
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "action", _void_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "boolean", _bool_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "integer", _int_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "float", _float_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "label", _void_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "page", _page_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "text", _str_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "textarea", _str_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "date", _date_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "reset", _void_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "save", _void_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "separator", _void_spec_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING
|
||||
(_item_unified_edd, "swallow", _void_spec_edd);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_UNION(
|
||||
_item_edd, Elm_Prefs_Item_Node, "spec", spec, type, _item_unified_edd);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "persistent", persistent, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "editable", editable, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_item_edd, Elm_Prefs_Item_Node, "visible", visible, EET_T_UCHAR);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST
|
||||
(_page_edd, Elm_Prefs_Page_Node, "items", items, _item_edd);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(_page_edd, Elm_Prefs_Page_Node, "autosave", autosave, EET_T_UCHAR);
|
||||
}
|
||||
|
||||
#undef DESC_NEW
|
||||
|
||||
static void
|
||||
_elm_prefs_descriptors_shutdown(void)
|
||||
{
|
||||
eet_data_descriptor_free(_bool_spec_edd);
|
||||
eet_data_descriptor_free(_int_spec_edd);
|
||||
eet_data_descriptor_free(_float_spec_edd);
|
||||
eet_data_descriptor_free(_page_spec_edd);
|
||||
eet_data_descriptor_free(_str_spec_edd);
|
||||
eet_data_descriptor_free(_date_spec_edd);
|
||||
eet_data_descriptor_free(_void_spec_edd);
|
||||
eet_data_descriptor_free(_page_edd);
|
||||
eet_data_descriptor_free(_item_edd);
|
||||
eet_data_descriptor_free(_item_unified_edd);
|
||||
}
|
||||
|
||||
#endif
|
|
@ -267,6 +267,13 @@ struct _Elm_Datetime_Module_Data
|
|||
Elm_Datetime_Field_Type field_type);
|
||||
};
|
||||
|
||||
void _elm_prefs_init(void);
|
||||
void _elm_prefs_shutdown(void);
|
||||
|
||||
/* these already issued by the two above, respectively */
|
||||
void _elm_prefs_data_init(void);
|
||||
void _elm_prefs_data_shutdown(void);
|
||||
|
||||
void _elm_emotion_init(void);
|
||||
void _elm_emotion_shutdown(void);
|
||||
|
||||
|
|
|
@ -523,6 +523,8 @@ EAPI void _elm_access_activate_callback_set(Elm_Access_Info *ac, Elm
|
|||
EAPI void _elm_access_highlight_object_activate(Evas_Object *obj, Elm_Activate act);
|
||||
EAPI void _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir);
|
||||
|
||||
#define ELM_PREFS_DATA_MAGIC 0xe1f5da7a
|
||||
|
||||
/**< put this as the first member in your widget item struct */
|
||||
#define ELM_WIDGET_ITEM Elm_Widget_Item base
|
||||
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
#ifndef ELM_WIDGET_PREFS_H
|
||||
#define ELM_WIDGET_PREFS_H
|
||||
|
||||
#include "Elementary.h"
|
||||
|
||||
/**
|
||||
* @addtogroup Widget
|
||||
* @{
|
||||
*
|
||||
* @section elm-prefs-class The Elementary Prefs Class
|
||||
*
|
||||
* Elementary, besides having the @ref Prefs widget, exposes its
|
||||
* foundation -- the Elementary Prefs Class -- in order to create
|
||||
* other widgets which are a prefs with some more logic on top.
|
||||
*/
|
||||
|
||||
typedef struct _Elm_Prefs_Page_Node
|
||||
{
|
||||
unsigned int version;
|
||||
|
||||
/* not to be serialized */
|
||||
Evas_Object *prefs;
|
||||
Evas_Object *parent;
|
||||
Evas_Object *w_obj;
|
||||
const Elm_Prefs_Page_Iface *w_impl;
|
||||
|
||||
const char *name;
|
||||
const char *title;
|
||||
const char *sub_title;
|
||||
const char *widget;
|
||||
const char *style;
|
||||
const char *icon;
|
||||
|
||||
Eina_List *items;
|
||||
|
||||
Eina_Bool autosave;
|
||||
} Elm_Prefs_Page_Node;
|
||||
|
||||
typedef struct _Elm_Prefs_Item_Node
|
||||
{
|
||||
Elm_Prefs_Item_Type type;
|
||||
|
||||
/* not to be serialized */
|
||||
Evas_Object *prefs;
|
||||
Elm_Prefs_Page_Node *page;
|
||||
Elm_Prefs_Page_Node *subpage; /* page item type only */
|
||||
Evas_Object *w_obj;
|
||||
const Elm_Prefs_Item_Iface *w_impl;
|
||||
Eina_Bool available;
|
||||
|
||||
const char *name;
|
||||
const char *label;
|
||||
const char *icon;
|
||||
const char *style;
|
||||
const char *widget;
|
||||
|
||||
Elm_Prefs_Item_Spec spec;
|
||||
|
||||
Eina_Bool persistent;
|
||||
Eina_Bool editable;
|
||||
Eina_Bool visible;
|
||||
} Elm_Prefs_Item_Node;
|
||||
|
||||
/**
|
||||
* Base widget smart data extended with prefs instance data.
|
||||
*/
|
||||
typedef struct _Elm_Prefs_Smart_Data Elm_Prefs_Smart_Data;
|
||||
struct _Elm_Prefs_Smart_Data
|
||||
{
|
||||
Elm_Prefs_Page_Node *root;
|
||||
|
||||
Elm_Prefs_Data *prefs_data;
|
||||
const char *file;
|
||||
const char *page;
|
||||
|
||||
Ecore_Poller *saving_poller;
|
||||
|
||||
Eina_Bool changing_from_ui : 1;
|
||||
Eina_Bool values_fetching : 1;
|
||||
Eina_Bool on_deletion : 1;
|
||||
Eina_Bool autosave : 1;
|
||||
Eina_Bool dirty : 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
extern const Eina_Hash *elm_prefs_item_widgets_map;
|
||||
extern const Eina_Hash *elm_prefs_item_type_widgets_map;
|
||||
extern const Elm_Prefs_Item_Iface *elm_prefs_item_default_widget;
|
||||
|
||||
#define ELM_PREFS_DATA_GET(o, sd) \
|
||||
Elm_Prefs_Smart_Data * sd = eo_data_get(o, ELM_OBJ_PREFS_CLASS)
|
||||
|
||||
#define ELM_PREFS_ENTRY(o, sd) \
|
||||
if (!sd->data_file || !sd->page) \
|
||||
{ \
|
||||
CRITICAL("You must issue elm_prefs_file_set() on this widget before" \
|
||||
" you make this call"); \
|
||||
} \
|
||||
return
|
||||
|
||||
#define ELM_PREFS_DATA_GET_OR_RETURN(o, ptr) \
|
||||
ELM_PREFS_DATA_GET(o, ptr); \
|
||||
if (!ptr) \
|
||||
{ \
|
||||
CRITICAL("No widget data for object %p (%s)", \
|
||||
o, evas_object_type_get(o)); \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define ELM_PREFS_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
||||
ELM_PREFS_DATA_GET(o, ptr); \
|
||||
if (!ptr) \
|
||||
{ \
|
||||
CRITICAL("No widget data for object %p (%s)", \
|
||||
o, evas_object_type_get(o)); \
|
||||
return val; \
|
||||
}
|
||||
|
||||
#define ELM_PREFS_CHECK(obj) \
|
||||
if (!eo_isa((obj), ELM_OBJ_PREFS_CLASS)) \
|
||||
return
|
||||
|
||||
#endif
|
|
@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS = 1.4 foreign
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
SUBDIRS = \
|
||||
prefs \
|
||||
test_entry \
|
||||
test_map \
|
||||
access_output \
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
EDJE_CC = @edje_cc@
|
||||
EDJE_FLAGS_VERBOSE_ =
|
||||
EDJE_FLAGS_VERBOSE_0 =
|
||||
EDJE_FLAGS_VERBOSE_1 = -v
|
||||
EDJE_FLAGS = $(EDJE_FLAGS_$(V))
|
||||
|
||||
EXTRA_DIST = \
|
||||
elm_prefs_swallow.edc
|
||||
|
||||
filesdir = $(libdir)/elementary/modules/prefs/$(MODULE_ARCH)
|
||||
files_DATA = elm_prefs_swallow.edj
|
||||
|
||||
elm_prefs_swallow.edj: Makefile elm_prefs_swallow.edc
|
||||
$(EDJE_CC) $(EDJE_FLAGS) \
|
||||
$(top_srcdir)/src/modules/prefs/elm_prefs_swallow.edc \
|
||||
$(top_builddir)/src/modules/prefs/elm_prefs_swallow.edj
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_builddir)/src/lib \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
-DLOCALE_DIR=\"@LOCALE_DIR@\" \
|
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
@ELEMENTARY_CFLAGS@ \
|
||||
@ELEMENTARY_X_CFLAGS@ \
|
||||
@ELEMENTARY_FB_CFLAGS@ \
|
||||
@ELEMENTARY_SDL_CFLAGS@ \
|
||||
@ELEMENTARY_WIN32_CFLAGS@ \
|
||||
@ELEMENTARY_WINCE_CFLAGS@ \
|
||||
@ELEMENTARY_EDBUS_CFLAGS@ \
|
||||
@ELEMENTARY_EFREET_CFLAGS@ \
|
||||
@ELEMENTARY_ETHUMB_CFLAGS@ \
|
||||
@ELEMENTARY_WEB_CFLAGS@ \
|
||||
@ELEMENTARY_EMAP_CFLAGS@ \
|
||||
@ELEMENTARY_ECORE_CON_CFLAGS@ \
|
||||
@ELEMENTARY_ECORE_IMF_CFLAGS@ \
|
||||
@ELEMENTARY_WAYLAND_CFLAGS@ \
|
||||
@EVIL_CFLAGS@ \
|
||||
@EIO_CFLAGS@ \
|
||||
@EMOTION_CFLAGS@
|
||||
|
||||
if ELEMENTARY_WINDOWS_BUILD
|
||||
AM_CPPFLAGS += -DELEMENTARY_BUILD
|
||||
endif
|
||||
|
||||
pkgdir = $(libdir)/elementary/modules/prefs/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
|
||||
module_la_SOURCES = \
|
||||
private.h \
|
||||
item_widgets.inc \
|
||||
page_widgets.inc \
|
||||
prefs_iface.c \
|
||||
elm_button.c \
|
||||
elm_check.c \
|
||||
elm_datetime.c \
|
||||
elm_entry.c \
|
||||
elm_label.c \
|
||||
elm_separator.c \
|
||||
elm_slider.c \
|
||||
elm_spinner.c \
|
||||
elm_swallow.c \
|
||||
elm_vertical_box.c \
|
||||
elm_horizontal_box.c \
|
||||
elm_vertical_frame.c \
|
||||
elm_horizontal_frame.c
|
||||
|
||||
module_la_LIBADD = @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la
|
||||
module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
|
||||
module_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
|
||||
clean-local:
|
||||
rm -f *.edj
|
|
@ -0,0 +1,72 @@
|
|||
#include "private.h"
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_ACTION,
|
||||
ELM_PREFS_TYPE_RESET,
|
||||
ELM_PREFS_TYPE_SAVE,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
|
||||
|
||||
prefs_it_changed_cb(obj);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_button_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type __UNUSED__,
|
||||
const Elm_Prefs_Item_Spec spec __UNUSED__,
|
||||
Elm_Prefs_Item_Changed_Cb cb)
|
||||
{
|
||||
Evas_Object *obj = elm_button_add(prefs);
|
||||
|
||||
evas_object_smart_callback_add(obj, "clicked", _item_changed_cb, cb);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_button_label_set(Evas_Object *obj,
|
||||
const char *label)
|
||||
{
|
||||
return elm_layout_text_set(obj, NULL, label);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_button_icon_set(Evas_Object *obj,
|
||||
const char *icon)
|
||||
{
|
||||
Evas_Object *ic = elm_icon_add(obj);
|
||||
Eina_Bool ret;
|
||||
|
||||
if (!elm_icon_standard_set(ic, icon)) goto err;
|
||||
|
||||
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
|
||||
|
||||
ret = elm_layout_content_set(obj, "icon", ic);
|
||||
if (!ret) goto err;
|
||||
|
||||
return ret;
|
||||
|
||||
err:
|
||||
evas_object_del(ic);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(button,
|
||||
supported_types,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
elm_prefs_button_label_set,
|
||||
elm_prefs_button_icon_set,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,100 @@
|
|||
#include "private.h"
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_BOOL,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
|
||||
|
||||
prefs_it_changed_cb(obj);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_check_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type __UNUSED__,
|
||||
const Elm_Prefs_Item_Spec spec,
|
||||
Elm_Prefs_Item_Changed_Cb cb)
|
||||
{
|
||||
Evas_Object *obj = elm_check_add(prefs);
|
||||
|
||||
evas_object_smart_callback_add(obj, "changed", _item_changed_cb, cb);
|
||||
|
||||
elm_check_state_set(obj, spec.b.def);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_check_value_set(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
Eina_Bool val;
|
||||
|
||||
if (eina_value_type_get(value) != EINA_VALUE_TYPE_UCHAR) return EINA_FALSE;
|
||||
|
||||
eina_value_get(value, &val);
|
||||
elm_check_state_set(obj, val);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_check_value_get(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
Eina_Bool val;
|
||||
|
||||
val = elm_check_state_get(obj);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_UCHAR)) return EINA_FALSE;
|
||||
if (!eina_value_set(value, val)) return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_check_label_set(Evas_Object *obj,
|
||||
const char *label)
|
||||
{
|
||||
return elm_layout_text_set(obj, NULL, label);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_check_icon_set(Evas_Object *obj,
|
||||
const char *icon)
|
||||
{
|
||||
Evas_Object *ic = elm_icon_add(obj);
|
||||
Eina_Bool ret;
|
||||
|
||||
if (!elm_icon_standard_set(ic, icon)) goto err;
|
||||
|
||||
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
|
||||
|
||||
ret = elm_layout_content_set(obj, "icon", ic);
|
||||
if (!ret) goto err;
|
||||
|
||||
return ret;
|
||||
|
||||
err:
|
||||
evas_object_del(ic);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(check,
|
||||
supported_types,
|
||||
elm_prefs_check_value_set,
|
||||
elm_prefs_check_value_get,
|
||||
NULL,
|
||||
elm_prefs_check_label_set,
|
||||
elm_prefs_check_icon_set,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,95 @@
|
|||
#include "private.h"
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_DATE,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
|
||||
|
||||
prefs_it_changed_cb(obj);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_datetime_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type __UNUSED__,
|
||||
const Elm_Prefs_Item_Spec spec,
|
||||
Elm_Prefs_Item_Changed_Cb cb)
|
||||
{
|
||||
Evas_Object *obj = elm_datetime_add(prefs);
|
||||
struct tm time = {0};
|
||||
|
||||
elm_datetime_field_visible_set(obj, ELM_DATETIME_HOUR, EINA_FALSE);
|
||||
elm_datetime_field_visible_set(obj, ELM_DATETIME_MINUTE, EINA_FALSE);
|
||||
elm_datetime_field_visible_set(obj, ELM_DATETIME_AMPM, EINA_FALSE);
|
||||
|
||||
evas_object_smart_callback_add(obj, "changed", _item_changed_cb, cb);
|
||||
|
||||
time.tm_year = spec.d.min.y - 1900;
|
||||
time.tm_mon = spec.d.min.m - 1;
|
||||
time.tm_mday = spec.d.min.d;
|
||||
|
||||
elm_datetime_value_min_set(obj, &time);
|
||||
|
||||
time.tm_year = spec.d.max.y - 1900;
|
||||
time.tm_mon = spec.d.max.m - 1;
|
||||
time.tm_mday = spec.d.max.d;
|
||||
|
||||
elm_datetime_value_max_set(obj, &time);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_datetime_value_set(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
struct timeval val;
|
||||
struct tm *time;
|
||||
|
||||
if (eina_value_type_get(value) != EINA_VALUE_TYPE_TIMEVAL)
|
||||
return EINA_FALSE;
|
||||
|
||||
eina_value_get(value, &val);
|
||||
|
||||
time = gmtime(&(val.tv_sec));
|
||||
|
||||
if (elm_datetime_value_set(obj, time)) return EINA_TRUE;
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_datetime_value_get(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
struct timeval val = {0};
|
||||
struct tm time;
|
||||
|
||||
if (!elm_datetime_value_get(obj, &time)) return EINA_FALSE;
|
||||
|
||||
val.tv_sec = mktime(&time);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_TIMEVAL)) return EINA_FALSE;
|
||||
if (!eina_value_set(value, val)) return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(datetime,
|
||||
supported_types,
|
||||
elm_prefs_datetime_value_set,
|
||||
elm_prefs_datetime_value_get,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,280 @@
|
|||
#include "private.h"
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
|
||||
#define BLINK_INTERVAL 0.1
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_TEXT,
|
||||
ELM_PREFS_TYPE_TEXTAREA,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static Eina_Bool
|
||||
_color_change_do(void *data)
|
||||
{
|
||||
Evas_Object *obj = data;
|
||||
int color;
|
||||
|
||||
color = (int)(long)evas_object_data_get(obj, "current_color");
|
||||
switch (color)
|
||||
{
|
||||
case 0:
|
||||
evas_object_data_set(obj, "current_color", (void *)1);
|
||||
evas_object_color_set(obj, 255, 0, 0, 255); /* 1st red */
|
||||
goto renew;
|
||||
|
||||
case 1:
|
||||
evas_object_data_set(obj, "current_color", (void *)2);
|
||||
evas_object_color_set(obj, 255, 255, 255, 255); /* 2nd white */
|
||||
goto renew;
|
||||
|
||||
case 2:
|
||||
evas_object_data_set(obj, "current_color", (void *)3);
|
||||
evas_object_color_set(obj, 255, 0, 0, 255); /* 2nd red */
|
||||
goto renew;
|
||||
|
||||
case 3:
|
||||
default:
|
||||
evas_object_data_set(obj, "current_color", (void *)0);
|
||||
evas_object_color_set(obj, 255, 255, 255, 255); /* back to white */
|
||||
goto end;
|
||||
}
|
||||
|
||||
renew:
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
|
||||
end:
|
||||
evas_object_data_del(obj, "timer");
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_entry_value_validate(Evas_Object *obj)
|
||||
{
|
||||
Ecore_Timer *timer;
|
||||
const char *val;
|
||||
regex_t *regex;
|
||||
size_t min;
|
||||
|
||||
val = elm_entry_entry_get(obj);
|
||||
|
||||
regex = evas_object_data_get(obj, "accept_regex");
|
||||
if (regex)
|
||||
{
|
||||
if (regexec(regex, val, 0, NULL, 0)) goto mismatch;
|
||||
}
|
||||
|
||||
regex = evas_object_data_get(obj, "deny_regex");
|
||||
if (regex)
|
||||
{
|
||||
/* we want tokens *out* of the deny language */
|
||||
if (!regexec(regex, val, 0, NULL, 0)) goto mismatch;
|
||||
}
|
||||
|
||||
min = (size_t) evas_object_data_get(obj, "min_size");
|
||||
if (min)
|
||||
{
|
||||
if (strlen(val) < min) goto mismatch;
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
|
||||
mismatch:
|
||||
evas_object_color_set(obj, 255, 0, 0, 255);
|
||||
|
||||
timer = evas_object_data_get(obj, "timer");
|
||||
if (timer) ecore_timer_del(timer);
|
||||
|
||||
evas_object_data_set
|
||||
(obj, "timer", ecore_timer_add(BLINK_INTERVAL, _color_change_do, obj));
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
|
||||
|
||||
prefs_it_changed_cb(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_entry_del_cb(void *data __UNUSED__,
|
||||
Evas *evas __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
regex_t *regex;
|
||||
Ecore_Timer *timer;
|
||||
|
||||
regex = evas_object_data_del(obj, "accept_regex");
|
||||
if (regex) regfree(regex);
|
||||
|
||||
regex = evas_object_data_del(obj, "deny_regex");
|
||||
if (regex) regfree(regex);
|
||||
|
||||
timer = evas_object_data_del(obj, "timer");
|
||||
if (timer) ecore_timer_del(timer);
|
||||
|
||||
evas_object_data_del(obj, "min_size");
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_entry_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Spec spec,
|
||||
Elm_Prefs_Item_Changed_Cb cb)
|
||||
{
|
||||
Evas_Object *obj = elm_entry_add(prefs);
|
||||
regex_t *regex = NULL;
|
||||
char buf[256];
|
||||
|
||||
Elm_Entry_Filter_Limit_Size limit = {
|
||||
.max_char_count = spec.s.length.max
|
||||
};
|
||||
|
||||
evas_object_data_set(obj, "prefs_type", (void *)type);
|
||||
|
||||
/* FIXME: have this warning animation on the theme, later */
|
||||
|
||||
/* 0: orig. white; 1: 1st red; 2: 2nd white; 3: 2o red */
|
||||
evas_object_data_set(obj, "current_color", 0);
|
||||
|
||||
/* FIXME: is it worth to ERR with the item's name, too, here? */
|
||||
|
||||
evas_object_smart_callback_add(obj, "activated", _item_changed_cb, cb);
|
||||
evas_object_smart_callback_add(obj, "unfocused", _item_changed_cb, cb);
|
||||
|
||||
if (spec.s.accept)
|
||||
{
|
||||
int ret;
|
||||
|
||||
regex = calloc(1, sizeof(regex_t));
|
||||
ret = regcomp(regex, spec.s.accept, REG_EXTENDED | REG_NOSUB);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
regerror(ret, regex, buf, sizeof(buf));
|
||||
regfree(regex);
|
||||
ERR("bad regular expression (%s) on item's 'accept' tag (%s)."
|
||||
" Because of that, the 'accept' tag will be dropped for the "
|
||||
"item.", spec.s.accept, buf);
|
||||
}
|
||||
else
|
||||
evas_object_data_set(obj, "accept_regex", regex);
|
||||
}
|
||||
|
||||
if (spec.s.deny)
|
||||
{
|
||||
int ret;
|
||||
|
||||
regex = calloc(1, sizeof(regex_t));
|
||||
ret = regcomp(regex, spec.s.deny, REG_EXTENDED | REG_NOSUB);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
regerror(ret, regex, buf, sizeof(buf));
|
||||
regfree(regex);
|
||||
ERR("bad regular expression (%s) on item's 'deny' tag (%s)."
|
||||
" Because of that, the 'deny' tag will be dropped for the "
|
||||
"item.", spec.s.deny, buf);
|
||||
}
|
||||
else
|
||||
evas_object_data_set(obj, "deny_regex", regex);
|
||||
}
|
||||
|
||||
if (spec.s.length.min) /* zero makes no sense */
|
||||
{
|
||||
size_t min = (size_t) spec.s.length.min;
|
||||
evas_object_data_set(obj, "min_size", (void *) min);
|
||||
}
|
||||
|
||||
evas_object_event_callback_add
|
||||
(obj, EVAS_CALLBACK_DEL, _entry_del_cb, NULL);
|
||||
|
||||
elm_entry_scrollable_set(obj, EINA_TRUE);
|
||||
|
||||
if (type == ELM_PREFS_TYPE_TEXT)
|
||||
elm_entry_single_line_set(obj, EINA_TRUE);
|
||||
|
||||
elm_entry_markup_filter_append(obj, elm_entry_filter_limit_size, &limit);
|
||||
elm_layout_text_set(obj, NULL, spec.s.placeholder);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* already expects an EINA_VALUE_TYPE_STRINGSHARE one */
|
||||
static Eina_Bool
|
||||
elm_prefs_entry_value_set(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
const char *val;
|
||||
|
||||
eina_value_get(value, &val);
|
||||
|
||||
return elm_layout_text_set(obj, NULL, val);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_entry_value_get(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
const char *val;
|
||||
|
||||
val = elm_layout_text_get(obj, NULL);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_STRINGSHARE))
|
||||
return EINA_FALSE;
|
||||
if (!eina_value_set(value, val)) return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_entry_icon_set(Evas_Object *obj,
|
||||
const char *icon)
|
||||
{
|
||||
Evas_Object *ic = elm_icon_add(obj);
|
||||
|
||||
elm_icon_standard_set(ic, icon);
|
||||
|
||||
return elm_layout_content_set(obj, "icon", ic);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_entry_editable_set(Evas_Object *obj,
|
||||
Eina_Bool editable)
|
||||
{
|
||||
elm_entry_editable_set(obj, editable);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_entry_editable_get(Evas_Object *obj)
|
||||
{
|
||||
return elm_entry_editable_get(obj);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_entry_expand_want(Evas_Object *obj __UNUSED__)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(entry,
|
||||
supported_types,
|
||||
elm_prefs_entry_value_set,
|
||||
elm_prefs_entry_value_get,
|
||||
elm_prefs_entry_value_validate,
|
||||
NULL,
|
||||
elm_prefs_entry_icon_set,
|
||||
elm_prefs_entry_editable_set,
|
||||
elm_prefs_entry_editable_get,
|
||||
elm_prefs_entry_expand_want);
|
|
@ -0,0 +1,99 @@
|
|||
#include "private.h"
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_horizontal_box_add(const Elm_Prefs_Page_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs)
|
||||
{
|
||||
Evas_Object *obj = elm_box_add(prefs);
|
||||
|
||||
elm_box_horizontal_set(obj, EINA_TRUE);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_box_item_pack(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l;
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_FALSE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 1.0, 0.5);
|
||||
|
||||
elm_prefs_horizontal_page_common_pack(it, obj, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_box_item_unpack(Evas_Object *obj,
|
||||
Evas_Object *it)
|
||||
{
|
||||
/* back to defaults */
|
||||
evas_object_size_hint_align_set(it, 0.5, 0.5);
|
||||
evas_object_size_hint_weight_set(it, 0.0, 0.0);
|
||||
|
||||
elm_prefs_page_common_unpack(it, obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_box_item_pack_before(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_before,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l;
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_FALSE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 1.0, 0.5);
|
||||
|
||||
elm_prefs_horizontal_page_common_pack_before(it, it_before, obj, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_box_item_pack_after(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_after,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l;
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_FALSE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 1.0, 0.5);
|
||||
|
||||
elm_prefs_horizontal_page_common_pack_after(it, it_after, obj, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_PAGE_WIDGET_ADD(horizontal_box,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
elm_prefs_horizontal_box_item_pack,
|
||||
elm_prefs_horizontal_box_item_unpack,
|
||||
elm_prefs_horizontal_box_item_pack_before,
|
||||
elm_prefs_horizontal_box_item_pack_after);
|
|
@ -0,0 +1,118 @@
|
|||
#include "private.h"
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_horizontal_frame_add(const Elm_Prefs_Page_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs)
|
||||
{
|
||||
Evas_Object *bx, *obj = elm_frame_add(prefs);
|
||||
|
||||
bx = elm_box_add(obj);
|
||||
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
||||
elm_box_horizontal_set(bx, EINA_TRUE);
|
||||
|
||||
elm_layout_content_set(obj, NULL, bx);
|
||||
|
||||
evas_object_data_set(obj, "bx_container", bx);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_frame_title_set(Evas_Object *obj,
|
||||
const char *title)
|
||||
{
|
||||
elm_layout_text_set(obj, NULL, title);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_frame_item_pack(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_FALSE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 1.0, 0.5);
|
||||
|
||||
elm_prefs_horizontal_page_common_pack(it, bx, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_frame_item_unpack(Evas_Object *obj,
|
||||
Evas_Object *it)
|
||||
{
|
||||
Evas_Object *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
/* back to defaults */
|
||||
evas_object_size_hint_align_set(it, 0.5, 0.5);
|
||||
evas_object_size_hint_weight_set(it, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
||||
elm_prefs_page_common_unpack(it, bx);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_frame_item_pack_before(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_before,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_FALSE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 1.0, 0.5);
|
||||
|
||||
elm_prefs_horizontal_page_common_pack_before(it, it_before, bx, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_horizontal_frame_item_pack_after(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_after,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_FALSE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 1.0, 0.5);
|
||||
|
||||
elm_prefs_horizontal_page_common_pack_after(it, it_after, bx, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_PAGE_WIDGET_ADD(horizontal_frame,
|
||||
elm_prefs_horizontal_frame_title_set,
|
||||
NULL,
|
||||
NULL,
|
||||
elm_prefs_horizontal_frame_item_pack,
|
||||
elm_prefs_horizontal_frame_item_unpack,
|
||||
elm_prefs_horizontal_frame_item_pack_before,
|
||||
elm_prefs_horizontal_frame_item_pack_after);
|
|
@ -0,0 +1,37 @@
|
|||
#include "private.h"
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_LABEL,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_label_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type __UNUSED__,
|
||||
const Elm_Prefs_Item_Spec spec __UNUSED__,
|
||||
Elm_Prefs_Item_Changed_Cb it_changed_cb __UNUSED__)
|
||||
{
|
||||
Evas_Object *obj = elm_label_add(prefs);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_label_label_set(Evas_Object *obj,
|
||||
const char *label)
|
||||
{
|
||||
return elm_layout_text_set(obj, NULL, label);
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(label,
|
||||
supported_types,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
elm_prefs_label_label_set,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,15 @@
|
|||
collections {
|
||||
group {
|
||||
name: "elm_prefs_swallow";
|
||||
|
||||
parts {
|
||||
part {
|
||||
name: "content";
|
||||
type: SWALLOW;
|
||||
|
||||
description {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
#include "private.h"
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_SEPARATOR,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_separator_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type __UNUSED__,
|
||||
const Elm_Prefs_Item_Spec spec __UNUSED__,
|
||||
Elm_Prefs_Item_Changed_Cb cb __UNUSED__)
|
||||
{
|
||||
Evas_Object *obj = elm_separator_add(prefs);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_separator_value_set(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
Eina_Bool val;
|
||||
|
||||
if (eina_value_type_get(value) != EINA_VALUE_TYPE_UCHAR)
|
||||
return EINA_FALSE;
|
||||
|
||||
eina_value_get(value, &val);
|
||||
elm_separator_horizontal_set(obj, val);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_separator_value_get(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
Eina_Bool val = elm_separator_horizontal_get(obj);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_UCHAR))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (!eina_value_set(value, val)) return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(separator,
|
||||
supported_types,
|
||||
elm_prefs_separator_value_set,
|
||||
elm_prefs_separator_value_get,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,125 @@
|
|||
#include "private.h"
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_INT,
|
||||
ELM_PREFS_TYPE_FLOAT,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
|
||||
|
||||
prefs_it_changed_cb(obj);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_slider_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Spec spec,
|
||||
Elm_Prefs_Item_Changed_Cb cb)
|
||||
{
|
||||
Evas_Object *obj = elm_slider_add(prefs);
|
||||
|
||||
evas_object_data_set(obj, "prefs_type", (void *)type);
|
||||
|
||||
evas_object_smart_callback_add(obj, "changed", _item_changed_cb, cb);
|
||||
|
||||
if (type == ELM_PREFS_TYPE_INT)
|
||||
{
|
||||
elm_slider_unit_format_set(obj, "%1.0f");
|
||||
elm_slider_indicator_format_set(obj, "%1.0f");
|
||||
elm_slider_min_max_set(obj, spec.i.min, spec.i.max);
|
||||
elm_slider_value_set(obj, spec.i.def);
|
||||
}
|
||||
else if (type == ELM_PREFS_TYPE_FLOAT)
|
||||
{
|
||||
elm_slider_unit_format_set(obj, "%1.2f");
|
||||
elm_slider_indicator_format_set(obj, "%1.2f");
|
||||
elm_slider_min_max_set(obj, spec.f.min, spec.f.max);
|
||||
elm_slider_value_set(obj, spec.f.def);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_slider_value_set(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
union
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
} val;
|
||||
|
||||
Elm_Prefs_Item_Type pt =
|
||||
(Elm_Prefs_Item_Type)evas_object_data_get(obj, "prefs_type");
|
||||
|
||||
const Eina_Value_Type *vt = eina_value_type_get(value);
|
||||
if (!vt) return EINA_FALSE;
|
||||
|
||||
if ((pt == ELM_PREFS_TYPE_INT) && (vt == EINA_VALUE_TYPE_INT))
|
||||
{
|
||||
eina_value_get(value, &(val.i));
|
||||
elm_slider_value_set(obj, val.i);
|
||||
}
|
||||
else if ((pt == ELM_PREFS_TYPE_FLOAT) && (vt == EINA_VALUE_TYPE_FLOAT))
|
||||
{
|
||||
eina_value_get(value, &(val.f));
|
||||
elm_slider_value_set(obj, val.f);
|
||||
}
|
||||
else
|
||||
return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_slider_value_get(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
union
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
} val;
|
||||
|
||||
Elm_Prefs_Item_Type pt =
|
||||
(Elm_Prefs_Item_Type)evas_object_data_get(obj, "prefs_type");
|
||||
|
||||
if (pt == ELM_PREFS_TYPE_INT)
|
||||
{
|
||||
val.i = elm_slider_value_get(obj);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_INT)) return EINA_FALSE;
|
||||
if (!eina_value_set(value, val.i)) return EINA_FALSE;
|
||||
}
|
||||
else if (pt == ELM_PREFS_TYPE_FLOAT)
|
||||
{
|
||||
val.f = elm_slider_value_get(obj);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_FLOAT)) return EINA_FALSE;
|
||||
if (!eina_value_set(value, val.f)) return EINA_FALSE;
|
||||
}
|
||||
else
|
||||
return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(slider,
|
||||
supported_types,
|
||||
elm_prefs_slider_value_set,
|
||||
elm_prefs_slider_value_get,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,124 @@
|
|||
#include "private.h"
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_INT,
|
||||
ELM_PREFS_TYPE_FLOAT,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
|
||||
|
||||
prefs_it_changed_cb(obj);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_spinner_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Spec spec,
|
||||
Elm_Prefs_Item_Changed_Cb cb)
|
||||
{
|
||||
Evas_Object *obj = elm_spinner_add(prefs);
|
||||
|
||||
evas_object_data_set(obj, "prefs_type", (void *)type);
|
||||
|
||||
evas_object_smart_callback_add(obj, "changed", _item_changed_cb, cb);
|
||||
|
||||
if (type == ELM_PREFS_TYPE_INT)
|
||||
{
|
||||
elm_spinner_step_set(obj, 1.0);
|
||||
elm_spinner_min_max_set(obj, spec.i.min, spec.i.max);
|
||||
elm_spinner_value_set(obj, spec.i.def);
|
||||
}
|
||||
else if (type == ELM_PREFS_TYPE_FLOAT)
|
||||
{
|
||||
elm_spinner_label_format_set(obj, "%1.2f");
|
||||
elm_spinner_step_set(obj, 0.1);
|
||||
elm_spinner_min_max_set(obj, spec.f.min, spec.f.max);
|
||||
elm_spinner_value_set(obj, spec.f.def);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_spinner_value_set(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
union
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
} val;
|
||||
|
||||
Elm_Prefs_Item_Type pt =
|
||||
(Elm_Prefs_Item_Type) evas_object_data_get(obj, "prefs_type");
|
||||
|
||||
const Eina_Value_Type *vt = eina_value_type_get(value);
|
||||
if (!vt) return EINA_FALSE;
|
||||
|
||||
if ((pt == ELM_PREFS_TYPE_INT) && (vt == EINA_VALUE_TYPE_INT))
|
||||
{
|
||||
eina_value_get(value, &(val.i));
|
||||
elm_spinner_value_set(obj, val.i);
|
||||
}
|
||||
else if ((pt == ELM_PREFS_TYPE_FLOAT) && (vt == EINA_VALUE_TYPE_FLOAT))
|
||||
{
|
||||
eina_value_get(value, &(val.f));
|
||||
elm_spinner_value_set(obj, val.f);
|
||||
}
|
||||
else
|
||||
return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_spinner_value_get(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
union
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
} val;
|
||||
|
||||
Elm_Prefs_Item_Type pt =
|
||||
(Elm_Prefs_Item_Type) evas_object_data_get(obj, "prefs_type");
|
||||
|
||||
if (pt == ELM_PREFS_TYPE_INT)
|
||||
{
|
||||
val.i = elm_spinner_value_get(obj);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_INT)) return EINA_FALSE;
|
||||
if (!eina_value_set(value, val.i)) return EINA_FALSE;
|
||||
}
|
||||
else if (pt == ELM_PREFS_TYPE_FLOAT)
|
||||
{
|
||||
val.f = elm_spinner_value_get(obj);
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_FLOAT)) return EINA_FALSE;
|
||||
if (!eina_value_set(value, val.f)) return EINA_FALSE;
|
||||
}
|
||||
else
|
||||
return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(spinner,
|
||||
supported_types,
|
||||
elm_prefs_spinner_value_set,
|
||||
elm_prefs_spinner_value_get,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,65 @@
|
|||
#include "private.h"
|
||||
|
||||
static const char LAYOUT_EDJ[] = PACKAGE_LIB_DIR\
|
||||
"/elementary/modules/prefs/"\
|
||||
MODULE_ARCH\
|
||||
"/elm_prefs_swallow.edj";
|
||||
|
||||
static Elm_Prefs_Item_Type supported_types[] =
|
||||
{
|
||||
ELM_PREFS_TYPE_SWALLOW,
|
||||
ELM_PREFS_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_swallow_add(const Elm_Prefs_Item_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs,
|
||||
const Elm_Prefs_Item_Type type __UNUSED__,
|
||||
const Elm_Prefs_Item_Spec spec __UNUSED__,
|
||||
Elm_Prefs_Item_Changed_Cb cb __UNUSED__)
|
||||
{
|
||||
Evas_Object *obj = elm_layout_add(prefs);
|
||||
|
||||
elm_layout_file_set(obj, LAYOUT_EDJ, "elm_prefs_swallow");
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_swallow_swallow(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
Evas_Object *subobj;
|
||||
|
||||
if (eina_value_type_get(value) != EINA_VALUE_TYPE_UINT64 ||
|
||||
!eina_value_get(value, &subobj))
|
||||
return EINA_FALSE;
|
||||
|
||||
elm_layout_content_set(obj, "content", subobj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_swallow_unswallow(Evas_Object *obj,
|
||||
Eina_Value *value)
|
||||
{
|
||||
Evas_Object *subobj = elm_layout_content_unset(obj, "content");
|
||||
|
||||
if (!eina_value_setup(value, EINA_VALUE_TYPE_UINT64) ||
|
||||
!eina_value_set(value, subobj))
|
||||
return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_ITEM_WIDGET_ADD(swallow,
|
||||
supported_types,
|
||||
elm_prefs_swallow_swallow,
|
||||
elm_prefs_swallow_unswallow,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
|
@ -0,0 +1,99 @@
|
|||
#include "private.h"
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_vertical_box_add(const Elm_Prefs_Page_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs)
|
||||
{
|
||||
Evas_Object *obj = elm_box_add(prefs);
|
||||
|
||||
elm_box_horizontal_set(obj, EINA_FALSE);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_box_item_pack(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l;
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_TRUE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 0.0, 1.0);
|
||||
|
||||
elm_prefs_vertical_page_common_pack(it, obj, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_box_item_unpack(Evas_Object *obj,
|
||||
Evas_Object *it)
|
||||
{
|
||||
/* back to defaults */
|
||||
evas_object_size_hint_align_set(it, 0.5, 0.5);
|
||||
evas_object_size_hint_weight_set(it, 0.0, 0.0);
|
||||
|
||||
elm_prefs_page_common_unpack(it, obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_box_item_pack_before(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_before,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l;
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_TRUE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 0.0, 1.0);
|
||||
|
||||
elm_prefs_vertical_page_common_pack_before(it, it_before, obj, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_box_item_pack_after(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_after,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l;
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_TRUE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 0.0, 1.0);
|
||||
|
||||
elm_prefs_vertical_page_common_pack_after(it, it_after, obj, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_PAGE_WIDGET_ADD(vertical_box,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
elm_prefs_vertical_box_item_pack,
|
||||
elm_prefs_vertical_box_item_unpack,
|
||||
elm_prefs_vertical_box_item_pack_before,
|
||||
elm_prefs_vertical_box_item_pack_after);
|
|
@ -0,0 +1,117 @@
|
|||
#include "private.h"
|
||||
|
||||
static Evas_Object *
|
||||
elm_prefs_vertical_frame_add(const Elm_Prefs_Page_Iface *iface __UNUSED__,
|
||||
Evas_Object *prefs)
|
||||
{
|
||||
Evas_Object *bx, *obj = elm_frame_add(prefs);
|
||||
|
||||
bx = elm_box_add(obj);
|
||||
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
||||
elm_layout_content_set(obj, NULL, bx);
|
||||
|
||||
evas_object_data_set(obj, "bx_container", bx);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_frame_title_set(Evas_Object *obj,
|
||||
const char *title)
|
||||
{
|
||||
elm_layout_text_set(obj, NULL, title);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_frame_item_pack(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_TRUE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 0.0, 1.0);
|
||||
|
||||
elm_prefs_vertical_page_common_pack(it, bx, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_frame_item_unpack(Evas_Object *obj,
|
||||
Evas_Object *it)
|
||||
{
|
||||
Evas_Object *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
/* back to defaults */
|
||||
evas_object_size_hint_align_set(it, 0.5, 0.5);
|
||||
evas_object_size_hint_weight_set(it, 0.0, 0.0);
|
||||
|
||||
elm_prefs_page_common_unpack(it, bx);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_frame_item_pack_before(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_before,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_TRUE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 0.0, 1.0);
|
||||
|
||||
elm_prefs_vertical_page_common_pack_before(it, it_before, bx, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
elm_prefs_vertical_frame_item_pack_after(Evas_Object *obj,
|
||||
Evas_Object *it,
|
||||
Evas_Object *it_after,
|
||||
const Elm_Prefs_Item_Type type,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *bx = evas_object_data_get(obj, "bx_container");
|
||||
|
||||
if ((type == ELM_PREFS_TYPE_SEPARATOR) &&
|
||||
(!elm_prefs_page_item_value_set(it, iface, EINA_TRUE)))
|
||||
return EINA_FALSE;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l)
|
||||
evas_object_size_hint_align_set(l, 0.0, 1.0);
|
||||
|
||||
elm_prefs_vertical_page_common_pack_after(it, it_after, bx, iface);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
PREFS_PAGE_WIDGET_ADD(vertical_frame,
|
||||
elm_prefs_vertical_frame_title_set,
|
||||
NULL,
|
||||
NULL,
|
||||
elm_prefs_vertical_frame_item_pack,
|
||||
elm_prefs_vertical_frame_item_unpack,
|
||||
elm_prefs_vertical_frame_item_pack_before,
|
||||
elm_prefs_vertical_frame_item_pack_after);
|
|
@ -0,0 +1,9 @@
|
|||
PREFS_ADD(button)
|
||||
PREFS_ADD(check)
|
||||
PREFS_ADD(datetime)
|
||||
PREFS_ADD(entry)
|
||||
PREFS_ADD(label)
|
||||
PREFS_ADD(separator)
|
||||
PREFS_ADD(slider)
|
||||
PREFS_ADD(spinner)
|
||||
PREFS_ADD(swallow)
|
|
@ -0,0 +1,4 @@
|
|||
PREFS_ADD(vertical_box)
|
||||
PREFS_ADD(horizontal_box)
|
||||
PREFS_ADD(vertical_frame)
|
||||
PREFS_ADD(horizontal_frame)
|
|
@ -0,0 +1,283 @@
|
|||
#include "Elementary.h"
|
||||
#include "private.h"
|
||||
|
||||
/* including declaration of each prefs item implementation iface struct */
|
||||
#define PREFS_ADD(w_name) \
|
||||
extern const Elm_Prefs_Item_Iface prefs_##w_name##_impl;
|
||||
|
||||
#include "item_widgets.inc"
|
||||
|
||||
#undef PREFS_ADD
|
||||
|
||||
int _elm_prefs_log_dom = -1;
|
||||
|
||||
/* now building on array of those, to be put on a hash for lookup */
|
||||
static Elm_Prefs_Item_Iface_Info _elm_prefs_item_widgets[] =
|
||||
{
|
||||
#define PREFS_ADD(w_name) \
|
||||
{"elm/" #w_name, &prefs_##w_name##_impl},
|
||||
|
||||
#include "item_widgets.inc"
|
||||
|
||||
#undef PREFS_ADD
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
/* including declaration of each prefs page implementation iface struct */
|
||||
#define PREFS_ADD(w_name) \
|
||||
extern const Elm_Prefs_Page_Iface prefs_##w_name##_impl;
|
||||
|
||||
#include "page_widgets.inc"
|
||||
|
||||
#undef PREFS_ADD
|
||||
|
||||
/* now building on array of those, to be put on a hash for lookup */
|
||||
static Elm_Prefs_Page_Iface_Info _elm_prefs_page_widgets[] =
|
||||
{
|
||||
#define PREFS_ADD(w_name) \
|
||||
{"elm/" #w_name, &prefs_##w_name##_impl},
|
||||
|
||||
#include "page_widgets.inc"
|
||||
|
||||
#undef PREFS_ADD
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
Eina_Bool
|
||||
elm_prefs_page_item_value_set(Evas_Object *it,
|
||||
const Elm_Prefs_Item_Iface *iface,
|
||||
Eina_Bool val)
|
||||
{
|
||||
Eina_Value value;
|
||||
|
||||
if (!iface->value_set) return EINA_FALSE;
|
||||
|
||||
if ((!eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR)) ||
|
||||
(!eina_value_set(&value, val)))
|
||||
return EINA_FALSE;
|
||||
|
||||
return iface->value_set(it, &value);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_elm_prefs_page_box_add(Evas_Object *obj,
|
||||
Evas_Object *it)
|
||||
{
|
||||
Evas_Object *sbx;
|
||||
double align_x, align_y;
|
||||
|
||||
evas_object_size_hint_align_get(it, &align_x, &align_y);
|
||||
|
||||
sbx = elm_box_add(obj);
|
||||
elm_box_horizontal_set(sbx, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(sbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(sbx, align_x, align_y);
|
||||
evas_object_data_set(obj, "sub_box", sbx);
|
||||
evas_object_show(sbx);
|
||||
|
||||
return sbx;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_prefs_page_item_hints_set(Evas_Object *it,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
if (iface && iface->expand_want && iface->expand_want(it))
|
||||
evas_object_size_hint_align_set(it, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
|
||||
evas_object_size_hint_weight_set(it, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_prefs_page_pack_setup(Evas_Object *it,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *i, *sbx;
|
||||
|
||||
_elm_prefs_page_item_hints_set(it, iface);
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
i = evas_object_data_get(it, "icon_widget");
|
||||
if (i)
|
||||
{
|
||||
sbx = _elm_prefs_page_box_add(obj, it);
|
||||
elm_box_pack_end(obj, sbx);
|
||||
|
||||
evas_object_size_hint_align_set(it, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_align_set(i, 0.0, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(sbx, i);
|
||||
elm_box_pack_end(sbx, it);
|
||||
|
||||
if (l) elm_box_pack_before(obj, l, sbx);
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_box_pack_end(obj, it);
|
||||
if (l) elm_box_pack_before(obj, l, it);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_prefs_page_pack_before_setup(Evas_Object *it,
|
||||
Evas_Object *it_before,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *i, *sbx;
|
||||
|
||||
_elm_prefs_page_item_hints_set(it, iface);
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
i = evas_object_data_get(it, "icon_widget");
|
||||
if (i)
|
||||
{
|
||||
sbx = _elm_prefs_page_box_add(obj, it);
|
||||
elm_box_pack_before(obj, sbx, it_before);
|
||||
|
||||
evas_object_size_hint_align_set(i, EVAS_HINT_FILL, 0.5);
|
||||
elm_box_pack_end(sbx, i);
|
||||
elm_box_pack_end(sbx, it);
|
||||
|
||||
if (l) elm_box_pack_before(obj, l, sbx);
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_box_pack_before(obj, it, it_before);
|
||||
if (l) elm_box_pack_before(obj, l, it);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_prefs_page_pack_after_setup(Evas_Object *it,
|
||||
Evas_Object *it_after,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
Evas_Object *l, *i, *sbx;
|
||||
|
||||
_elm_prefs_page_item_hints_set(it, iface);
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
i = evas_object_data_get(it, "icon_widget");
|
||||
if (i)
|
||||
{
|
||||
sbx = _elm_prefs_page_box_add(obj, it);
|
||||
elm_box_pack_after(obj, sbx, it_after);
|
||||
|
||||
evas_object_size_hint_align_set(i, EVAS_HINT_FILL, 0.5);
|
||||
elm_box_pack_end(sbx, i);
|
||||
elm_box_pack_end(sbx, it);
|
||||
|
||||
if (l) elm_box_pack_before(obj, l, sbx);
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_box_pack_after(obj, it, it_after);
|
||||
if (l) elm_box_pack_before(obj, l, it);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
elm_prefs_horizontal_page_common_pack(Evas_Object *it,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
evas_object_size_hint_align_set(it, 0.5, EVAS_HINT_FILL);
|
||||
_elm_prefs_page_pack_setup(it, obj, iface);
|
||||
}
|
||||
|
||||
void
|
||||
elm_prefs_horizontal_page_common_pack_before(Evas_Object *it,
|
||||
Evas_Object *it_before,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
evas_object_size_hint_align_set(it, 0.5, EVAS_HINT_FILL);
|
||||
_elm_prefs_page_pack_before_setup(it, it_before, obj, iface);
|
||||
}
|
||||
|
||||
void
|
||||
elm_prefs_horizontal_page_common_pack_after(Evas_Object *it,
|
||||
Evas_Object *it_after,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
evas_object_size_hint_align_set(it, 0.5, EVAS_HINT_FILL);
|
||||
_elm_prefs_page_pack_after_setup(it, it_after, obj, iface);
|
||||
}
|
||||
|
||||
void
|
||||
elm_prefs_vertical_page_common_pack(Evas_Object *it,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
evas_object_size_hint_align_set(it, EVAS_HINT_FILL, 0.5);
|
||||
_elm_prefs_page_pack_setup(it, obj, iface);
|
||||
}
|
||||
|
||||
void
|
||||
elm_prefs_vertical_page_common_pack_before(Evas_Object *it,
|
||||
Evas_Object *it_before,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
evas_object_size_hint_align_set(it, EVAS_HINT_FILL, 0.5);
|
||||
_elm_prefs_page_pack_before_setup(it, it_before, obj, iface);
|
||||
}
|
||||
|
||||
void
|
||||
elm_prefs_vertical_page_common_pack_after(Evas_Object *it,
|
||||
Evas_Object *it_after,
|
||||
Evas_Object *obj,
|
||||
const Elm_Prefs_Item_Iface *iface)
|
||||
{
|
||||
evas_object_size_hint_align_set(it, EVAS_HINT_FILL, 0.5);
|
||||
_elm_prefs_page_pack_after_setup(it, it_after, obj, iface);
|
||||
}
|
||||
|
||||
void
|
||||
elm_prefs_page_common_unpack(Evas_Object *it,
|
||||
Evas_Object *obj)
|
||||
{
|
||||
Evas_Object *l, *i, *sbx;
|
||||
|
||||
l = evas_object_data_get(it, "label_widget");
|
||||
if (l) elm_box_unpack(obj, l);
|
||||
|
||||
sbx = evas_object_data_get(it, "sub_box");
|
||||
i = evas_object_data_get(it, "icon_widget");
|
||||
|
||||
if (i && sbx)
|
||||
{
|
||||
elm_box_unpack_all(sbx);
|
||||
elm_box_unpack(obj, sbx);
|
||||
evas_object_del(sbx);
|
||||
}
|
||||
else
|
||||
elm_box_unpack(obj, it);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_modapi_init(void *m __UNUSED__)
|
||||
{
|
||||
_elm_prefs_log_dom = eina_log_domain_register
|
||||
("elm-prefs", EINA_COLOR_YELLOW);
|
||||
|
||||
elm_prefs_item_iface_register(_elm_prefs_item_widgets);
|
||||
elm_prefs_page_iface_register(_elm_prefs_page_widgets);
|
||||
|
||||
return 1; // succeed always
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_modapi_shutdown(void *m __UNUSED__)
|
||||
{
|
||||
elm_prefs_item_iface_unregister(_elm_prefs_item_widgets);
|
||||
elm_prefs_page_iface_unregister(_elm_prefs_page_widgets);
|
||||
|
||||
if (_elm_prefs_log_dom >= 0) eina_log_domain_unregister(_elm_prefs_log_dom);
|
||||
_elm_prefs_log_dom = -1;
|
||||
|
||||
return 1; // succeed always
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
#include "Elementary.h"
|
||||
|
||||
#undef CRITICAL
|
||||
#undef ERR
|
||||
#undef WRN
|
||||
#undef INF
|
||||
#undef DBG
|
||||
|
||||
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_prefs_log_dom, __VA_ARGS__)
|
||||
#define ERR(...) EINA_LOG_DOM_ERR (_elm_prefs_log_dom, __VA_ARGS__)
|
||||
#define WRN(...) EINA_LOG_DOM_WARN(_elm_prefs_log_dom, __VA_ARGS__)
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_elm_prefs_log_dom, __VA_ARGS__)
|
||||
#define DBG(...) EINA_LOG_DOM_DBG (_elm_prefs_log_dom, __VA_ARGS__)
|
||||
|
||||
extern int _elm_prefs_log_dom;
|
||||
|
||||
#define PREFS_ITEM_WIDGET_ADD(_w_name, \
|
||||
_types, \
|
||||
_value_set_fn, \
|
||||
_value_get_fn, \
|
||||
_value_validate_fn, \
|
||||
_label_set_fn, \
|
||||
_icon_set_fn, \
|
||||
_editable_set_fn, \
|
||||
_editable_get_fn, \
|
||||
_expand_want_fn) \
|
||||
static Evas_Object * \
|
||||
_prefs_##_w_name##_add(const Elm_Prefs_Item_Iface * iface, \
|
||||
Evas_Object * prefs, \
|
||||
const Elm_Prefs_Item_Type type, \
|
||||
const Elm_Prefs_Item_Spec spec, \
|
||||
Elm_Prefs_Item_Changed_Cb it_changed_cb) \
|
||||
{ \
|
||||
Evas_Object *obj = \
|
||||
elm_prefs_##_w_name##_add(iface, prefs, type, spec, it_changed_cb); \
|
||||
if (!obj) return NULL; \
|
||||
if (!elm_prefs_item_widget_common_add(prefs, obj)) \
|
||||
{ \
|
||||
evas_object_del(obj); \
|
||||
return NULL; \
|
||||
} \
|
||||
\
|
||||
return obj; \
|
||||
} \
|
||||
\
|
||||
const Elm_Prefs_Item_Iface prefs_##_w_name##_impl = \
|
||||
{ \
|
||||
.abi_version = ELM_PREFS_ITEM_IFACE_ABI_VERSION, \
|
||||
.add = _prefs_##_w_name##_add, \
|
||||
.types = _types, \
|
||||
.value_set = _value_set_fn, \
|
||||
.value_get = _value_get_fn, \
|
||||
.value_validate = _value_validate_fn, \
|
||||
.label_set = _label_set_fn, \
|
||||
.icon_set = _icon_set_fn, \
|
||||
.editable_set = _editable_set_fn, \
|
||||
.editable_get = _editable_get_fn, \
|
||||
.expand_want = _expand_want_fn \
|
||||
}
|
||||
|
||||
#define PREFS_PAGE_WIDGET_ADD(_w_name, \
|
||||
_title_set_fn, \
|
||||
_sub_title_set_fn, \
|
||||
_icon_set_fn, \
|
||||
_item_pack_fn, \
|
||||
_item_unpack_fn, \
|
||||
_item_pack_before_fn, \
|
||||
_item_pack_after_fn) \
|
||||
static Evas_Object * \
|
||||
_prefs_##_w_name##_add(const Elm_Prefs_Page_Iface * iface, \
|
||||
Evas_Object * prefs) \
|
||||
{ \
|
||||
Evas_Object *obj = \
|
||||
elm_prefs_##_w_name##_add(iface, prefs); \
|
||||
if (!obj) return NULL; \
|
||||
if (!elm_prefs_page_widget_common_add(prefs, obj)) \
|
||||
{ \
|
||||
evas_object_del(obj); \
|
||||
return NULL; \
|
||||
} \
|
||||
\
|
||||
return obj; \
|
||||
} \
|
||||
\
|
||||
const Elm_Prefs_Page_Iface prefs_##_w_name##_impl = \
|
||||
{ \
|
||||
.abi_version = ELM_PREFS_PAGE_IFACE_ABI_VERSION, \
|
||||
.add = _prefs_##_w_name##_add, \
|
||||
.title_set = _title_set_fn, \
|
||||
.sub_title_set = _sub_title_set_fn, \
|
||||
.icon_set = _icon_set_fn, \
|
||||
.item_pack = _item_pack_fn, \
|
||||
.item_unpack = _item_unpack_fn, \
|
||||
.item_pack_before = _item_pack_before_fn, \
|
||||
.item_pack_after = _item_pack_after_fn \
|
||||
}
|
||||
|
||||
Eina_Bool elm_prefs_page_item_value_set(Evas_Object *it,
|
||||
const Elm_Prefs_Item_Iface *iface,
|
||||
Eina_Bool val);
|
||||
void elm_prefs_horizontal_page_common_pack(Evas_Object *,
|
||||
Evas_Object *,
|
||||
const Elm_Prefs_Item_Iface *);
|
||||
void elm_prefs_horizontal_page_common_pack_before(Evas_Object *,
|
||||
Evas_Object *,
|
||||
Evas_Object *,
|
||||
const Elm_Prefs_Item_Iface *);
|
||||
void elm_prefs_horizontal_page_common_pack_after(Evas_Object *,
|
||||
Evas_Object *,
|
||||
Evas_Object *,
|
||||
const Elm_Prefs_Item_Iface *);
|
||||
void elm_prefs_vertical_page_common_pack(Evas_Object *,
|
||||
Evas_Object *,
|
||||
const Elm_Prefs_Item_Iface *);
|
||||
void elm_prefs_vertical_page_common_pack_before(Evas_Object *,
|
||||
Evas_Object *,
|
||||
Evas_Object *,
|
||||
const Elm_Prefs_Item_Iface *);
|
||||
void elm_prefs_vertical_page_common_pack_after(Evas_Object *,
|
||||
Evas_Object *,
|
||||
Evas_Object *,
|
||||
const Elm_Prefs_Item_Iface *);
|
||||
void elm_prefs_page_common_unpack(Evas_Object *,
|
||||
Evas_Object *);
|
Loading…
Reference in New Issue