diff options
author | Jee-Yong Um <jc9.um@samsung.com> | 2016-12-01 18:19:28 +0900 |
---|---|---|
committer | Jee-Yong Um <jc9.um@samsung.com> | 2016-12-15 14:34:34 +0900 |
commit | 7c6cac6007a0233f59f2f36ab47720d6bb83371a (patch) | |
tree | ca623a53886c673f4778b3834377f499e7e71e40 | |
parent | c6dcf3dda448c422bd556834b336f7fdb9296097 (diff) | |
download | efl-7c6cac6007a0233f59f2f36ab47720d6bb83371a.tar.gz |
Efl: add class interfaces (color/text/size)
-rw-r--r-- | src/Makefile_Efl.am | 3 | ||||
-rw-r--r-- | src/lib/efl/Efl.h | 3 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_color_class.eo | 85 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_size_class.eo | 49 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_text_class.eo | 43 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_types.eot | 8 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_interfaces_main.c | 4 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_text_properties.eo | 4 |
8 files changed, 197 insertions, 2 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index 79f46611d0..98a902c10c 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -55,6 +55,9 @@ efl_eolian_files = \ lib/efl/interfaces/efl_observable.eo \ lib/efl/interfaces/efl_ui_item.eo \ lib/efl/interfaces/efl_ui_menu.eo \ + lib/efl/interfaces/efl_gfx_color_class.eo \ + lib/efl/interfaces/efl_gfx_text_class.eo \ + lib/efl/interfaces/efl_gfx_size_class.eo \ $(efl_eolian_legacy_files) \ $(NULL) diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 0aac8377e5..a97b270cdb 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -117,6 +117,9 @@ EAPI extern const Efl_Event_Description _EFL_GFX_PATH_CHANGED; #include "interfaces/efl_gfx_gradient_radial.eo.h" #include "interfaces/efl_gfx_filter.eo.h" #include "interfaces/efl_gfx_size_hint.eo.h" +#include "interfaces/efl_gfx_color_class.eo.h" +#include "interfaces/efl_gfx_text_class.eo.h" +#include "interfaces/efl_gfx_size_class.eo.h" #include "interfaces/efl_canvas.eo.h" diff --git a/src/lib/efl/interfaces/efl_gfx_color_class.eo b/src/lib/efl/interfaces/efl_gfx_color_class.eo new file mode 100644 index 0000000000..0f9b89badc --- /dev/null +++ b/src/lib/efl/interfaces/efl_gfx_color_class.eo @@ -0,0 +1,85 @@ +import efl_gfx_types; + +interface Efl.Gfx.Color_Class +{ + methods { + @property color_class { + set { + [[Set the color of color class. + + This function sets the color values for a color class. This will + cause all edje parts in the specified object that have the specified + color class to have their colors multiplied by these values. + + The first color is the object, the second is the text outline, and + the third is the text shadow. (Note that the second two only apply + to text parts). + + Setting color emits a signal "color_class,set" with source being + the given color. + + Note: These color values are expected to be premultiplied by \@p a.]] + return: bool; + } + get { + [[Get the color of color class. + + This function gets the color values for a color class. If no explicit + object color is set, then global values will be used. + + The first color is the object, the second is the text outline, and + the third is the text shadow. (Note that the second two only apply + to text parts). + + Note: These color values are expected to be premultiplied by \@p a.]] + return: bool; + } + keys { + color_class: string; [[The name of color class]] + layer: Efl.Gfx.Color_Class.Layer @optional; [[The layer to set the color]] + } + values { + r: int; [[The intensity of the red color]] + g: int; [[The intensity of the green color]] + b: int; [[The intensity of the blue color]] + a: int; [[The alpha value]] + } + } + @property color_class_description { + get { + [[Get the description of a color class. + + This function gets the description of a color class in use by an object.]] + } + keys { + color_class: string; [[The name of color class]] + } + values { + description: string; [[The description of the target color class or $null if not found]] + } + } + color_class_del { + [[Delete the color class. + + This function deletes any values for the specified color class. + + Deleting the color class will revert it to the values defined + by @.color_class.set() or the color class defined in the theme file. + + Deleting the color class will emit the signal "color_class,del" + for the given Edje object.]] + params { + @in color_class: string; [[The name of color_class]] + } + } + color_class_clear { + [[Delete all color classes defined in object level. + + This function deletes any color classes defined in object level. + Clearing color classes will revert the color of all edje parts to + the values defined in global level or theme file. + + @since 1.17.0]] + } + } +} diff --git a/src/lib/efl/interfaces/efl_gfx_size_class.eo b/src/lib/efl/interfaces/efl_gfx_size_class.eo new file mode 100644 index 0000000000..1fa3dad5da --- /dev/null +++ b/src/lib/efl/interfaces/efl_gfx_size_class.eo @@ -0,0 +1,49 @@ +interface Efl.Gfx.Size_Class +{ + methods { + @property size_class { + set { + [[Set width and height of size class. + + This function sets width and height for a size class. + This will make all edje parts in the specified object that have + the specified size class update their size with given values. + + @since 1.17]] + return: bool; [[$true, on success or $false, on error]] + } + get { + [[Get width and height of size class. + + This function gets width and height for a size class. + These values will only be valid until the size class is changed + or the edje object is deleted. + + @since 1.17]] + return: bool; [[$true, on success or $false, on error]] + } + keys { + size_class: string; [[The name of size class]] + } + values { + minw: int; [[minimum width]] + minh: int; [[minimum height]] + maxw: int; [[maximum width]] + maxh: int; [[maximum height]] + } + } + size_class_del { + [[Delete the size class. + + This function deletes any values for the specified size class. + + Deleting the size class will revert it to the values defined + by @.size_class.set() or the size class defined in the theme file. + + @since 1.17]] + params { + @in size_class: string; [[The size class to be deleted.]] + } + } + } +} diff --git a/src/lib/efl/interfaces/efl_gfx_text_class.eo b/src/lib/efl/interfaces/efl_gfx_text_class.eo new file mode 100644 index 0000000000..481202403d --- /dev/null +++ b/src/lib/efl/interfaces/efl_gfx_text_class.eo @@ -0,0 +1,43 @@ +import efl_gfx_types; + +interface Efl.Gfx.Text_Class +{ + methods { + @property text_class { + set { + [[Set Edje text class. + + This function sets the text class for the Edje.]] + return: bool; [[$true, on success or $false, on error]] + } + get { + [[Get font and font size from edje text class. + + This function gets the font and the font size from text class. + The font string will only be valid until the text class is changed + or the edje object is deleted.]] + return: bool; [[$true, on success or $false, on error]] + } + keys { + text_class: string; [[The text class name]] + } + values { + font: string; [[Font name]] + size: Efl.Font.Size; [[Font Size]] + } + } + text_class_del { + [[Delete the text class. + + This function deletes any values for the specified text class. + + Deleting the text class will revert it to the values defined + by @.text_class.set() or the text class defined in the theme file. + + @since 1.17]] + params { + @in text_class: string; [[The text class to be deleted.]] + } + } + } +} diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot index 05f3db31e9..a9d3f2d2f3 100644 --- a/src/lib/efl/interfaces/efl_gfx_types.eot +++ b/src/lib/efl/interfaces/efl_gfx_types.eot @@ -203,3 +203,11 @@ enum Efl.Gfx.Size.Hint.Mode { dont_change = 3 [[Use this mode when an object should not change its display mode]] } + +enum Efl.Gfx.Color_Class.Layer { + normal = 0, [[Default color]] + outline, [[Outline color]] + shadow [[Shadow color]] +} + +type Efl.Font.Size: int; [[Efl font size type]] diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 4251ea3fe5..c2e8fae06c 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -21,6 +21,10 @@ #include "interfaces/efl_gfx_fill.eo.c" #include "interfaces/efl_gfx_view.eo.c" +#include "interfaces/efl_gfx_color_class.eo.c" +#include "interfaces/efl_gfx_text_class.eo.c" +#include "interfaces/efl_gfx_size_class.eo.c" + #include "interfaces/efl_gfx_gradient.eo.c" #include "interfaces/efl_gfx_gradient_linear.eo.c" #include "interfaces/efl_gfx_gradient_radial.eo.c" diff --git a/src/lib/efl/interfaces/efl_text_properties.eo b/src/lib/efl/interfaces/efl_text_properties.eo index 3383fa444f..1d755761ed 100644 --- a/src/lib/efl/interfaces/efl_text_properties.eo +++ b/src/lib/efl/interfaces/efl_text_properties.eo @@ -1,4 +1,4 @@ -type Efl_Font_Size: int; [[Efl font size type]] +import efl_gfx_types; interface Efl.Text.Properties { @@ -31,7 +31,7 @@ interface Efl.Text.Properties } values { font: string; [[The font family name or filename.]] - size: Efl_Font_Size; [[The font size, in points.]] + size: Efl.Font.Size; [[The font size, in points.]] } } @property font_source { |