forked from enlightenment/efl
Icons for available externals, how exciting.
SVN revision: 45449
This commit is contained in:
parent
419472ac52
commit
507a2cde73
|
@ -303,6 +303,7 @@ data/themes/Makefile
|
||||||
data/images/Makefile
|
data/images/Makefile
|
||||||
data/objects/Makefile
|
data/objects/Makefile
|
||||||
data/desktop/Makefile
|
data/desktop/Makefile
|
||||||
|
data/edje_externals/Makefile
|
||||||
config/Makefile
|
config/Makefile
|
||||||
config/default/Makefile
|
config/default/Makefile
|
||||||
config/standard/Makefile
|
config/standard/Makefile
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
SUBDIRS = themes images objects desktop
|
SUBDIRS = themes images objects desktop edje_externals
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
|
EDJE_CC = @edje_cc@
|
||||||
|
EDJE_FLAGS = -v -id $(top_srcdir)/data/edje_externals -fd $(top_srcdir)/data/edje_externals
|
||||||
|
|
||||||
|
filesdir = $(datadir)/elementary/edje_externals
|
||||||
|
files_DATA = icons.edj
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
icons.edc \
|
||||||
|
ico_button.png \
|
||||||
|
ico_check.png \
|
||||||
|
ico_radio.png \
|
||||||
|
ico_scrolled_entry.png \
|
||||||
|
ico_slider.png \
|
||||||
|
ico_toggle.png
|
||||||
|
|
||||||
|
icons.edj: Makefile $(EXTRA_DIST)
|
||||||
|
$(EDJE_CC) $(EDJE_FLAGS) \
|
||||||
|
$(top_srcdir)/data/edje_externals/icons.edc \
|
||||||
|
$(top_builddir)/data/edje_externals/icons.edj
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -f *.edj
|
Binary file not shown.
After Width: | Height: | Size: 181 B |
Binary file not shown.
After Width: | Height: | Size: 179 B |
Binary file not shown.
After Width: | Height: | Size: 257 B |
Binary file not shown.
After Width: | Height: | Size: 125 B |
Binary file not shown.
After Width: | Height: | Size: 172 B |
Binary file not shown.
After Width: | Height: | Size: 200 B |
|
@ -0,0 +1,18 @@
|
||||||
|
#define ICON(_name) \
|
||||||
|
images { image: "ico_"_name".png" COMP; } \
|
||||||
|
collections { group { name: "ico_"_name; \
|
||||||
|
parts { part { name: "icon"; \
|
||||||
|
type: IMAGE; mouse_events: 0; \
|
||||||
|
description { state: "default" 0.0; \
|
||||||
|
align: 0.5 0.5; \
|
||||||
|
aspect: 1.0 1.0; \
|
||||||
|
aspect_preference: VERTICAL; \
|
||||||
|
image.normal: "ico_"_name".png"; \
|
||||||
|
}}}}}
|
||||||
|
|
||||||
|
ICON("button")
|
||||||
|
ICON("check")
|
||||||
|
ICON("radio")
|
||||||
|
ICON("scrolled_entry")
|
||||||
|
ICON("slider")
|
||||||
|
ICON("toggle")
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
|
|
|
@ -40,7 +40,7 @@ external_button_params_parse(void *data, Evas_Object *obj, const Eina_List *para
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
external_button_params_free(void *params)
|
external_button_params_free(void *params)
|
||||||
{
|
{
|
||||||
Elm_Params_Button *mem = params;
|
Elm_Params_Button *mem = params;
|
||||||
|
@ -56,4 +56,5 @@ static Edje_External_Param_Info external_button_params[] = {
|
||||||
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DEFINE_EXTERNAL_ICON_ADD(button, "button");
|
||||||
DEFINE_EXTERNAL_TYPE_SIMPLE(button, "Button");
|
DEFINE_EXTERNAL_TYPE_SIMPLE(button, "Button");
|
||||||
|
|
|
@ -64,4 +64,5 @@ static Edje_External_Param_Info external_check_params[] = {
|
||||||
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DEFINE_EXTERNAL_ICON_ADD(check, "check")
|
||||||
DEFINE_EXTERNAL_TYPE_SIMPLE(check, "Check")
|
DEFINE_EXTERNAL_TYPE_SIMPLE(check, "Check")
|
||||||
|
|
|
@ -86,4 +86,5 @@ static Edje_External_Param_Info external_radio_params[] = {
|
||||||
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DEFINE_EXTERNAL_ICON_ADD(radio, "radio")
|
||||||
DEFINE_EXTERNAL_TYPE_SIMPLE(radio, "Radio")
|
DEFINE_EXTERNAL_TYPE_SIMPLE(radio, "Radio")
|
||||||
|
|
|
@ -68,4 +68,5 @@ static Edje_External_Param_Info external_scrolled_entry_params[] = {
|
||||||
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DEFINE_EXTERNAL_ICON_ADD(scrolled_entry, "scrolled_entry")
|
||||||
DEFINE_EXTERNAL_TYPE_SIMPLE(scrolled_entry, "Entry");
|
DEFINE_EXTERNAL_TYPE_SIMPLE(scrolled_entry, "Entry");
|
||||||
|
|
|
@ -106,4 +106,5 @@ static Edje_External_Param_Info external_slider_params[] = {
|
||||||
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DEFINE_EXTERNAL_ICON_ADD(slider, "slider")
|
||||||
DEFINE_EXTERNAL_TYPE_SIMPLE(slider, "Slider")
|
DEFINE_EXTERNAL_TYPE_SIMPLE(slider, "Slider")
|
||||||
|
|
|
@ -82,4 +82,5 @@ static Edje_External_Param_Info external_toggle_params[] = {
|
||||||
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DEFINE_EXTERNAL_ICON_ADD(toggle, "toggle")
|
||||||
DEFINE_EXTERNAL_TYPE_SIMPLE(toggle, "Toggle")
|
DEFINE_EXTERNAL_TYPE_SIMPLE(toggle, "Toggle")
|
||||||
|
|
|
@ -54,7 +54,7 @@ const Edje_External_Type external_##type_name##_type = {\
|
||||||
.state_set = external_##type_name##_state_set, \
|
.state_set = external_##type_name##_state_set, \
|
||||||
.params_parse = external_##type_name##_params_parse,\
|
.params_parse = external_##type_name##_params_parse,\
|
||||||
.params_free = external_##type_name##_params_free, \
|
.params_free = external_##type_name##_params_free, \
|
||||||
.icon_add = NULL, \
|
.icon_add = external_##type_name##_icon_add, \
|
||||||
.label_get = external_##type_name##_label_get, \
|
.label_get = external_##type_name##_label_get, \
|
||||||
.parameters_info = external_##type_name##_params, \
|
.parameters_info = external_##type_name##_params, \
|
||||||
.data = NULL \
|
.data = NULL \
|
||||||
|
@ -69,6 +69,18 @@ external_##type_name##_add(void *data, Evas *evas, Evas_Object *parent, const Ei
|
||||||
\
|
\
|
||||||
DEFINE_EXTERNAL_TYPE(type_name, name)
|
DEFINE_EXTERNAL_TYPE(type_name, name)
|
||||||
|
|
||||||
|
#define DEFINE_EXTERNAL_ICON_ADD(type_name, name) \
|
||||||
|
Evas_Object * \
|
||||||
|
external_##type_name##_icon_add(void *data, Evas *e) { \
|
||||||
|
Evas_Object *ic; \
|
||||||
|
int w = 20, h = 10; \
|
||||||
|
\
|
||||||
|
ic = edje_object_add(e); \
|
||||||
|
edje_object_file_set(ic, PACKAGE_DATA_DIR"/edje_externals/icons.edj", "ico_"name);\
|
||||||
|
evas_object_size_hint_min_set(ic, w, h); \
|
||||||
|
\
|
||||||
|
return ic; \
|
||||||
|
}
|
||||||
|
|
||||||
#define DEFINE_EXTERNAL_COMMON_PARAMS \
|
#define DEFINE_EXTERNAL_COMMON_PARAMS \
|
||||||
EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("label", "label goes here")
|
EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("label", "label goes here")
|
||||||
|
|
Loading…
Reference in New Issue