summaryrefslogtreecommitdiff
path: root/src/bin/edje/edje_cc_handlers.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-06-29 19:52:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-06-30 10:12:13 +0900
commit4e6e7def006605666213c49089e09654bab691e7 (patch)
treeb37411efa34abc11baad5170862dfab7f2c7075b /src/bin/edje/edje_cc_handlers.c
parentd4de36a43ab4fdd5ab16fca246ed4b93495846c8 (diff)
doc: Fixup EDC documentation about filters & examples
Diffstat (limited to '')
-rw-r--r--src/bin/edje/edje_cc_handlers.c92
1 files changed, 52 insertions, 40 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 762b7139c9..18701a21b3 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -65,7 +65,7 @@
65 * <li>@ref sec_toplevel_data "Data"</li> 65 * <li>@ref sec_toplevel_data "Data"</li>
66 * <li>@ref sec_toplevel_color_classes "Color Classes"</li> 66 * <li>@ref sec_toplevel_color_classes "Color Classes"</li>
67 * <li>@ref sec_toplevel_styles "Styles"</li> 67 * <li>@ref sec_toplevel_styles "Styles"</li>
68 * <li>@ref sec_collections_group_filter "Filters"</li> <!-- dup --> 68 * <li>@ref sec_collections_group_filters "Filters"</li>
69 * </ul> 69 * </ul>
70 * <li>@ref sec_collections "Collections"</li> 70 * <li>@ref sec_collections "Collections"</li>
71 * <ul> 71 * <ul>
@@ -73,7 +73,7 @@
73 * <ul> 73 * <ul>
74 * <li>@ref sec_collections_sounds_sample "Sample"</li> 74 * <li>@ref sec_collections_sounds_sample "Sample"</li>
75 * </ul> 75 * </ul>
76 * <li>@ref sec_collections_group_filter "Filters"</li> 76 * <li>@ref sec_collections_group_filters "Filters"</li>
77 * <li>@ref sec_collections_vibrations "Vibrations"</li> 77 * <li>@ref sec_collections_vibrations "Vibrations"</li>
78 * <ul> 78 * <ul>
79 * <li>@ref sec_collections_vibrations_sample "Sample"</li> 79 * <li>@ref sec_collections_vibrations_sample "Sample"</li>
@@ -83,7 +83,7 @@
83 * <li>@ref sec_collections_group_script "Script"</li> 83 * <li>@ref sec_collections_group_script "Script"</li>
84 * <li>@ref sec_collections_group_limits "Limits"</li> 84 * <li>@ref sec_collections_group_limits "Limits"</li>
85 * <li>@ref sec_collections_group_data "Data"</li> 85 * <li>@ref sec_collections_group_data "Data"</li>
86 * <li>@ref sec_collections_group_filter "Filters"</li> 86 * <li>@ref sec_collections_group_filters "Filters"</li>
87 * <li>@ref sec_collections_group_parts "Parts"</li> 87 * <li>@ref sec_collections_group_parts "Parts"</li>
88 * <ul> 88 * <ul>
89 * <li>@ref sec_collections_group_parts_part "Part"</li> 89 * <li>@ref sec_collections_group_parts_part "Part"</li>
@@ -119,6 +119,7 @@
119 * <li>@ref sec_collections_group_parts_description_perspective "Perspective"</li> 119 * <li>@ref sec_collections_group_parts_description_perspective "Perspective"</li>
120 * <li>@ref sec_collections_group_parts_descriptions_params "Params"</li> 120 * <li>@ref sec_collections_group_parts_descriptions_params "Params"</li>
121 * <li>@ref sec_collections_group_parts_description_links "Links"</li> 121 * <li>@ref sec_collections_group_parts_description_links "Links"</li>
122 * <li>@ref sec_collections_group_parts_description_filter "Filter"</li>
122 * </ul> 123 * </ul>
123 * </ul> 124 * </ul>
124 * </ul> 125 * </ul>
@@ -4298,25 +4299,26 @@ st_collections_group_data_item(void)
4298 eina_hash_direct_add(pc->data, key, es); 4299 eina_hash_direct_add(pc->data, key, es);
4299} 4300}
4300 4301
4301/** @edcsubsection{collections_group_filter, 4302/** @edcsubsection{collections_group_filters,
4302 * Group.Filter} */ 4303 * Group.Filters} */
4303 4304
4304/** 4305/**
4305 @page edcref 4306 @page edcref
4306 @block 4307 @block
4307 filters 4308 filters
4308 @context 4309 @context
4310 // (toplevel)
4311 // collections
4312 // collections.group
4309 filters { 4313 filters {
4310 filter { 4314 filter.inline: "key" "Lua script here";
4311 inline: "key" "Lua script here"; 4315 filter.file: "other" "filename.lua";
4312 file: "key" "Lua script filename"; 4316 ..
4313 ..
4314 }
4315 } 4317 }
4316 @description 4318 @description
4317 The "filter" block lets you embed filter scripts into an EDC group, 4319 The "filter" block lets you embed filter scripts into an EDC group,
4318 that can then be referred to in a @ref sec_collections_group_parts_description_filter "Text.Filter" 4320 that can then be referred to in the @ref sec_collections_group_parts_description_filter "Text.Filter"
4319 or @ref collections_group_parts_description_filter "Image.Filter" statement. 4321 or @ref sec_collections_group_parts_description_filter "Image.Filter" statements.
4320 4322
4321 In a similar way to the toplevel @ref sec_toplevel_data "Data" section, 4323 In a similar way to the toplevel @ref sec_toplevel_data "Data" section,
4322 it is possible to embed filters from a external file inside the final EDJ. 4324 it is possible to embed filters from a external file inside the final EDJ.
@@ -11714,43 +11716,52 @@ st_collections_group_parts_part_description_perspective_focal(void)
11714 current_desc->persp.focal = parse_int_range(0, 1, 0x7fffffff); 11716 current_desc->persp.focal = parse_int_range(0, 1, 0x7fffffff);
11715} 11717}
11716 11718
11719
11717/** @edcsubsection{collections_group_parts_description_filter, 11720/** @edcsubsection{collections_group_parts_description_filter,
11718 * Group.Parts.Part.Description.Filter} */ 11721 * Group.Parts.Part.Description.Filter} */
11719 11722
11720/** 11723/**
11721 @page edcref 11724 @page edcref
11722 11725 @block
11726 filter
11723 @context 11727 @context
11724 part { 11728 part {
11725 type: [TEXT or IMAGE]; 11729 type: [IMAGE or TEXT];
11730 ..
11726 description { 11731 description {
11727 .. 11732 ..
11728 filter { 11733 filter {
11729 code: "blend {} -- ..." 11734 code: "blend {}";
11730 // or: 11735 // or:
11731 code: "data name"; 11736 code: "filter_name";
11732 source: "part1" "buf"; 11737 source: "part1" "buf";
11733 source: "part2" "otherbuf"; 11738 source: "part2" "otherbuf";
11734 source: "part3"; 11739 source: "part3";
11740 ..
11741 data: "the_answer" "42";
11742 data: "something" "anything";
11743 data: "mycc" "color_class('my_color_class')";
11744 ..
11735 } 11745 }
11736 // or, for TEXT only (legacy): 11746 // or:
11737 text.filter: "blend {} -- ..." 11747 text.filter: "blend {} -- ...";
11738 .. 11748 ..
11739 } 11749 }
11740 } 11750 }
11751 @description
11752 Applies a series of image filters to a TEXT or IMAGE part.
11753 For more information, please refer to the page
11754 @ref evasfiltersref "Evas filters reference".
11755 @endblock
11756
11741 @property 11757 @property
11742 filter.code 11758 filter.code
11743 @parameters 11759 @parameters
11744 [filter program] OR [data name] 11760 [filter script or filter name]
11745 @effect 11761 @effect
11746 Applies a series of image filters to a TEXT or IMAGE part. The argument 11762 The argument to this field is the source code of a Lua script as defined
11747 to this field is the source code of a Lua program invoking various 11763 @ref evasfiltersref "here" or a filter name defined in the
11748 filter operations. For more information, please refer to the page 11764 @ref sec_collections_group_filters "Filters" section.
11749 "Evas filters reference".
11750 The parameter can also be a parameter name as specified in the
11751 data section (item or file property). This means external filter files
11752 can be easily embedded in an edje file.
11753 @see evasfiltersref
11754 @endproperty 11765 @endproperty
11755*/ 11766*/
11756static void 11767static void
@@ -11786,8 +11797,6 @@ st_collections_group_parts_part_description_filter_code(void)
11786 Binds another part as an image source (like a proxy source) for a 11797 Binds another part as an image source (like a proxy source) for a
11787 text or image filter operation. Optionally, a buffer name may be 11798 text or image filter operation. Optionally, a buffer name may be
11788 specified, so the same filter code can be used with different sources. 11799 specified, so the same filter code can be used with different sources.
11789 For more information, please refer to the page "Evas filters reference".
11790 @see evasfiltersref
11791 @endproperty 11800 @endproperty
11792*/ 11801*/
11793static void 11802static void
@@ -11876,13 +11885,16 @@ st_collections_group_parts_part_description_filter_source(void)
11876 @parameters 11885 @parameters
11877 [name] [content] 11886 [name] [content]
11878 @effect 11887 @effect
11879 Pass extra data to the Lua filter program. This can be used to pass 11888 Pass extra data to the Lua filter program. All data passed will
11880 extra colors from a color_class using the following syntax: 11889 be strings, except for the special case of color classes:
11881 filter.data: "mycc" "color_class('my_color_class')"; 11890 @code
11882 If not a color class, the data will simply be set as a string attached 11891 filter.data: "mycc" "color_class('my_color_class')";
11883 to the global variable 'name' in the Lua program. 11892 @endcode
11884 For more information, please refer to the page "Evas filters reference". 11893 Those will appear to Lua as a table of the following structure:
11885 @see evasfiltersref 11894 @code
11895 -- Lua code
11896 mycc = { r = 255, g = 0, b, a, r2, g2, b2, a2, r3, g3, b3, a3 }
11897 @endcode
11886 @endproperty 11898 @endproperty
11887*/ 11899*/
11888static void 11900static void