diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/Makefile.am | 1 | ||||
-rw-r--r-- | data/coding_convention.txt | 77 | ||||
-rw-r--r-- | data/edc/Makefile.am | 14 | ||||
-rw-r--r-- | data/edc/button.edc | 319 | ||||
-rwxr-xr-x | data/edc/layout.edc | 221 | ||||
-rw-r--r-- | data/fonts/VAGRounded_BT.ttf | bin | 0 -> 42192 bytes | |||
-rw-r--r-- | data/images/Makefile.am | 3 | ||||
-rw-r--r-- | data/images/background.png | bin | 0 -> 61893 bytes | |||
-rw-r--r-- | data/images/glow_line.png | bin | 0 -> 4833 bytes | |||
-rw-r--r-- | data/images/glow_line2.png | bin | 0 -> 3961 bytes | |||
-rw-r--r-- | data/images/ico_arrow_down.png | bin | 0 -> 18261 bytes | |||
-rw-r--r-- | data/images/ico_arrow_up.png | bin | 0 -> 18239 bytes | |||
-rw-r--r-- | data/images/ico_dropdown_menu_check.png | bin | 0 -> 17850 bytes | |||
-rw-r--r-- | data/images/ico_dropdown_menu_open_arrow.png | bin | 0 -> 17789 bytes | |||
-rw-r--r-- | data/images/ico_lock_nor.png | bin | 0 -> 18014 bytes | |||
-rw-r--r-- | data/images/ico_search.png | bin | 0 -> 18347 bytes | |||
-rw-r--r-- | data/images/sky.jpg | bin | 0 -> 73364 bytes | |||
-rw-r--r-- | data/images/title_1.png | bin | 0 -> 33812 bytes |
18 files changed, 635 insertions, 0 deletions
diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..e992271 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = images edc diff --git a/data/coding_convention.txt b/data/coding_convention.txt new file mode 100644 index 0000000..8e21781 --- /dev/null +++ b/data/coding_convention.txt @@ -0,0 +1,77 @@ +- if statement +if (a == NULL) +{ + +} + +- for statement +for (i = 0; i < 10; ++i) +{ +} + +- function local variables and return statement +int fun() +{ + int ret = 0; + int k = 0; + Evas_Object *win = NULL; + //Add one new line after the function local variable declaration. + .... + .... //your code + .... + //Add one new line before the return statement. + return ret; +} + +- gap between two function definitions. +int func1() +{ +} +//add a new line between two function definitions. +int func2() +{ +} + +- spacing after , +elm_object_content_set(sc, box); + +- indentation +4 spaces + +- function declaration +static void _on_click(void *data, Evas_Object *obj, void *event) + +- null check +if (abc == NULL) +if (abc != NULL) + +- variable declaration +declare variable when it's needed. + +- string compare +if (strcmp(a, "hello")) +if (!strcmp(a, "bye")) + +- plugin code position +Put get_plugin() right after header file include. +Put unload_plugin() at the end of file. +#include "xxxx.h" + +static elm_plugin *_ep; +elm_plugin *get_plugin() +{ + _ep = allocate_plugin("Button", "0.1"); + + return _ep; +} + +{sample code here} + +void unload_plugin() +{ + deallocate_plugin(_ep); +} + +- function and variable names +use lowercases. +split words by _ diff --git a/data/edc/Makefile.am b/data/edc/Makefile.am new file mode 100644 index 0000000..c1a85b2 --- /dev/null +++ b/data/edc/Makefile.am @@ -0,0 +1,14 @@ +EDJE_FLAGS = \ +-id $(top_srcdir)/data/images/ \ +-fd $(top_srcdir)/data/fonts/ +TARGET = layout.edj button.edj +all: $(TARGET) +$(TARGET): + edje_cc layout.edc $(EDJE_FLAGS) + edje_cc button.edc $(EDJE_FLAGS) +install: + mkdir -p $(DESTDIR)$(prefix)/data/edc + $(INSTALL) $(TARGET) $(DESTDIR)$(prefix)/data/edc +clean: + rm -rf *.edj + diff --git a/data/edc/button.edc b/data/edc/button.edc new file mode 100644 index 0000000..31eb6b4 --- /dev/null +++ b/data/edc/button.edc @@ -0,0 +1,319 @@ +collections { +group { name: "elm/button/base/simple_button"; + data.item: "focus_highlight" "on"; + + parts { + part { name: "click_rect"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + align: 0.5 0.5; + } + } + } + programs { + program { name: "button_click"; + signal: "mouse,down,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,press" ""; + } + program { name: "focus_on"; + signal: "elm,action,focus"; + source: "elm"; + action: SIGNAL_EMIT "elm,action,press" ""; + } + program { name: "button_unclick"; + signal: "mouse,up,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + } + program { name: "focus_out"; + signal: "elm,action,unfocus"; + source: "elm"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + } + program { name: "button_unclick3"; + signal: "mouse,clicked,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + } +} + +group { name: "elm/button/base/menu_button"; + data.item: "focus_highlight" "on"; + inherit: "elm/button/base/simple_button"; + images { + image: "glow_line.png" COMP; + image: "glow_line2.png" COMP; + } + parts { + + part { name: "elm.padding.left"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.0; + min: 50 10; + max: 50 10; + fixed: 1 0; + } + } + part { name: "elm.padding.center"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + align: 0.7 0.0; + min: 10 10; + max: 10 10; + fixed: 1 0; + } + } + part { name: "elm.padding.right"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + align: 1.0 0.0; + min: 40 10; + max: 40 10; + fixed: 1 0; + } + } + part{ name: "line"; + description { state: "default" 0.0; + rel1 { relative: 0.0 0.9; offset: 0 -10; } + rel2 { relative: 1.0 1.0; offset: 0 -10; } + align: 0.5 1; + image.normal: "glow_line2.png"; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + rel1 { relative: 0.0 0.85; offset: 0 -5; } + rel2 { relative: 1.0 1.0; offset: 0 -5; } + image.normal: "glow_line.png"; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + align: 0.0 0.5; + rel1.offset: 0 6; + rel2.relative: 0.2 1.0; + rel2.offset: 0 6; + } + } + part { name: "elm.text"; + type: TEXT; + effect: SOFT_SHADOW; + mouse_events: 0; + description { state: "default" 0.0; + rel1.to_x: "elm.padding.left"; + rel1.relative: 1.0 0.0; + rel2.to_x: "elm.padding.center"; + rel2.relative: 0.0 1.0; + color: 224 224 224 255; + color2: 235 248 248 200; + color3: 100 100 100 200; + text { + size: 30; + font: "VAGRounded_BT"; + min: 1 1; + align: 0.0 0.5; + text_class: "button"; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + text.min: 1 1; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + } + description { state: "disabled_visible" 0.0; + inherit: "default" 0.0; + color: 0 0 0 128; + color3: 0 0 0 0; + text.min: 1 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + color3: 0 83 166 200; + text.size: 35; + } + } + part { name: "end"; + type: TEXT; + effect : SOFT_SHADOW; + description { state: "default" 0.0; + rel1.to_x: "elm.padding.center"; + rel1.relative: 1.0 0.0; + rel2.to_x: "elm.padding.right"; + rel2.relative: 0.0 1.0; + color: 255 255 255 255; + color2: 0 83 166 200; + color3: 100 100 100 200; + min:80 80; + text { + size: 30; + font: "VAGRounded_BT"; + text: ""; + align: 0.5 0.5; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + } + description { state: "disabled_visible" 0.0; + inherit: "default" 0.0; + color: 0 0 0 128; + color3: 0 0 0 0; + text.min: 1 1; + } + } + } + programs { + program { name: "button_click"; + signal: "mouse,down,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { name: "focus_on"; + signal: "elm,action,focus"; + source: "elm"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { name: "button_click_anim"; + action: STATE_SET "clicked" 0.0; + target: "line"; + target: "elm.text"; + transition: SIN 0.2; + } + program { name: "button_unclick"; + signal: "mouse,up,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + after: "button_unclick_anim"; + } + program { name: "focus_out"; + signal: "elm,action,unfocus"; + source: "elm"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + after: "button_unclick_anim"; + } + program { name: "button_unclick_anim"; + action: STATE_SET "default" 0.0; + target: "line"; + target: "elm.text"; + } + program { name: "button_unclick3"; + signal: "mouse,clicked,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible") || !strcmp(st, "disabled_visible")) + set_state(PART:"elm.text", "disabled_visible", 0.0); + else + set_state(PART:"elm.text", "disabled", 0.0); + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + script { + new st[31]; + new Float:vl; + set_state(PART:"elm.swallow.content", "visible", 0.0); + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible") || !strcmp(st, "disabled_visible")) + set_state(PART:"elm.text", "visible", 0.0); + else + set_state(PART:"elm.text", "default", 0.0); + } + } + } +} + +group { name: "elm/button/base/arrow_button"; + inherit: "elm/button/base/simple_button"; + + data.item: "focus_highlight" "on"; + + parts { + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + rel1.relative: 0.1 0.1; + rel2.relative: 0.9 0.9; + } + description { state: "clicked" 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + } + programs { + program { name: "button_click"; + signal: "mouse,down,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { name: "focus_on"; + signal: "elm,action,focus"; + source: "elm"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { name: "button_click_anim"; + action: STATE_SET "clicked" 0.0; + target: "elm.swallow.content"; + transition: SIN 0.3; + after: "after_button_click_anim"; + } + program { name: "after_button_click_anim"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + transition: SIN 0.3; + after: "button_click_anim"; + } + program { name: "button_unclick"; + signal: "mouse,up,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + after: "button_unclick_anim"; + } + program { name: "focus_out"; + signal: "elm,action,unfocus"; + source: "elm"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + after: "button_unclick_anim"; + } + program { name: "button_unclick_anim"; + action: ACTION_STOP; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + } + program { name: "button_unclick3"; + signal: "mouse,clicked,1"; + source: "click_rect"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + } +} diff --git a/data/edc/layout.edc b/data/edc/layout.edc new file mode 100755 index 0000000..d966589 --- /dev/null +++ b/data/edc/layout.edc @@ -0,0 +1,221 @@ +#define COLOR 2 61 132 255 + +collections { + group { name: "elm_demo/main"; + parts { + part { name: "bg"; type: RECT; + scale: 1; + description { state: "default" 0.0; + color: 100 100 100 100; + } + } + part { name: "widget.style.text.pad"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel2.relative: 0.0 0.0; + align: 0.0 0.0; + min: 50 30; + } + } + part { name: "widget.style.text"; type: TEXT; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 1.0 1.0; + to: "widget.style.text.pad"; + } + rel2 { + relative: 1.0 1.0; + to: "widget.style.text.pad"; + } + align: 0.0 0.0; + text { + size: 30; + font: "SVD_Medium"; + min: 1 1; + text: "Widget Style"; + } + color: COLOR; + } + } + part { name: "widget.style.pad"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 1.0 0.0; + to: "widget.style.text"; + } + rel2 { + relative: 1.0 1.0; + to: "widget.style.text"; + } + align: 0.0 0.0; + min: 30 0; + } + } + part { name: "widget.style"; type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 1.0 0.0; + to: "widget.style.pad"; + } + rel2 { + relative: 1.0 1.0; + to: "widget.style.pad"; + } + align: 0.0 0.5; + min: 360 50; + } + } + part { name: "item.style.text.pad"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 0.0 1.0; + to_y: "widget.style"; + } + rel2 { + relative: 0.0 1.0; + to_y: "widget.style"; + } + align: 0.0 0.0; + min: 50 30; + } + } + part { name: "item.style.text"; type: TEXT; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 1.0 1.0; + to: "item.style.text.pad"; + } + rel2 { + relative: 1.0 1.0; + to: "item.style.text.pad"; + } + align: 0.0 0.0; + text { + size: 30; + font: "SVD_Medium"; + min: 1 1; + text: "Item Style"; + } + color: COLOR; + visible: 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "item.style.pad"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 1.0 0.0; + to: "item.style.text"; + } + rel2 { + relative: 1.0 1.0; + to_x: "widget.style.pad"; + to_y: "item.style.text"; + } + align: 0.0 0.5; + min: 30 0; + } + } + part { name: "item.style"; type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 1.0 0.0; + to: "item.style.pad"; + } + rel2 { + relative: 1.0 1.0; + to: "item.style.pad"; + } + align: 0.0 0.5; + min: 360 50; + visible: 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "option"; type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + to_y: "widget.style"; + } + rel2 { + relative: 1.0 1.0; + to_y: "widget.style"; + } + align: 0.5 0.0; + min: 0 120; + fixed: 1 1; + visible: 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.to_y: "item.style"; + rel2.to_y: "item.style"; + } + } + part { name: "widget.pad"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + to_y: "widget.style"; + } + rel2 { + relative: 1.0 1.0; + to_y: "widget.style"; + } + align: 0.5 0.0; + min: 0 30; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.to_y: "item.style"; + rel2.to_y: "item.style"; + } + } + part { name: "widget"; type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + to_y: "widget.pad"; + //to_y: "option"; + } + } + } + } + programs { + program { name: "item.style.show"; + signal: "item,style,show"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "item.style.text"; + target: "item.style"; + target: "option"; + target: "widget.pad"; + } + } + } +} diff --git a/data/fonts/VAGRounded_BT.ttf b/data/fonts/VAGRounded_BT.ttf Binary files differnew file mode 100644 index 0000000..29d6531 --- /dev/null +++ b/data/fonts/VAGRounded_BT.ttf diff --git a/data/images/Makefile.am b/data/images/Makefile.am new file mode 100644 index 0000000..f6b6d2a --- /dev/null +++ b/data/images/Makefile.am @@ -0,0 +1,3 @@ +imagedir = $(prefix)/data/images/ +image_DATA = background.png ico_arrow_down.png ico_arrow_up.png ico_dropdown_menu_check.png\ + ico_dropdown_menu_open_arrow.png ico_lock_nor.png sky.jpg diff --git a/data/images/background.png b/data/images/background.png Binary files differnew file mode 100644 index 0000000..989e97d --- /dev/null +++ b/data/images/background.png diff --git a/data/images/glow_line.png b/data/images/glow_line.png Binary files differnew file mode 100644 index 0000000..f9974d8 --- /dev/null +++ b/data/images/glow_line.png diff --git a/data/images/glow_line2.png b/data/images/glow_line2.png Binary files differnew file mode 100644 index 0000000..2c48efd --- /dev/null +++ b/data/images/glow_line2.png diff --git a/data/images/ico_arrow_down.png b/data/images/ico_arrow_down.png Binary files differnew file mode 100644 index 0000000..f170229 --- /dev/null +++ b/data/images/ico_arrow_down.png diff --git a/data/images/ico_arrow_up.png b/data/images/ico_arrow_up.png Binary files differnew file mode 100644 index 0000000..1970c85 --- /dev/null +++ b/data/images/ico_arrow_up.png diff --git a/data/images/ico_dropdown_menu_check.png b/data/images/ico_dropdown_menu_check.png Binary files differnew file mode 100644 index 0000000..9e7d114 --- /dev/null +++ b/data/images/ico_dropdown_menu_check.png diff --git a/data/images/ico_dropdown_menu_open_arrow.png b/data/images/ico_dropdown_menu_open_arrow.png Binary files differnew file mode 100644 index 0000000..7395e32 --- /dev/null +++ b/data/images/ico_dropdown_menu_open_arrow.png diff --git a/data/images/ico_lock_nor.png b/data/images/ico_lock_nor.png Binary files differnew file mode 100644 index 0000000..7de539d --- /dev/null +++ b/data/images/ico_lock_nor.png diff --git a/data/images/ico_search.png b/data/images/ico_search.png Binary files differnew file mode 100644 index 0000000..b770442 --- /dev/null +++ b/data/images/ico_search.png diff --git a/data/images/sky.jpg b/data/images/sky.jpg Binary files differnew file mode 100644 index 0000000..cbad02a --- /dev/null +++ b/data/images/sky.jpg diff --git a/data/images/title_1.png b/data/images/title_1.png Binary files differnew file mode 100644 index 0000000..0d6a2ce --- /dev/null +++ b/data/images/title_1.png |