summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2017-11-08 19:04:26 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-08 19:17:59 +0900
commit2f838acd4ef0f3f914bb5d03081aef2fd1f412b5 (patch)
tree09798675bf1d50eca0498e4213f0eae47527fe7d /src/lib/efl/interfaces
parentd5dbcdabd14c1ddf01f22b4865487ecce272c055 (diff)
Efl: add class interfaces (color/text/size)
Summary: implement Efl.Gfx.Class interface Reviewers: jpeg, cedric Subscribers: taxi2se, herdsman Differential Revision: https://phab.enlightenment.org/D4403
Diffstat (limited to 'src/lib/efl/interfaces')
-rw-r--r--src/lib/efl/interfaces/efl_gfx_color_class.eo85
-rw-r--r--src/lib/efl/interfaces/efl_gfx_size_class.eo49
-rw-r--r--src/lib/efl/interfaces/efl_gfx_text_class.eo43
-rw-r--r--src/lib/efl/interfaces/efl_gfx_types.eot8
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c4
-rw-r--r--src/lib/efl/interfaces/efl_text_properties.eo4
6 files changed, 191 insertions, 2 deletions
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 @@
1import efl_gfx_types;
2
3interface Efl.Gfx.Color_Class
4{
5 methods {
6 @property color_class {
7 set {
8 [[Set the color of color class.
9
10 This function sets the color values for a color class. This will
11 cause all edje parts in the specified object that have the specified
12 color class to have their colors multiplied by these values.
13
14 The first color is the object, the second is the text outline, and
15 the third is the text shadow. (Note that the second two only apply
16 to text parts).
17
18 Setting color emits a signal "color_class,set" with source being
19 the given color.
20
21 Note: These color values are expected to be premultiplied by \@p a.]]
22 return: bool;
23 }
24 get {
25 [[Get the color of color class.
26
27 This function gets the color values for a color class. If no explicit
28 object color is set, then global values will be used.
29
30 The first color is the object, the second is the text outline, and
31 the third is the text shadow. (Note that the second two only apply
32 to text parts).
33
34 Note: These color values are expected to be premultiplied by \@p a.]]
35 return: bool;
36 }
37 keys {
38 color_class: string; [[The name of color class]]
39 layer: Efl.Gfx.Color_Class.Layer @optional; [[The layer to set the color]]
40 }
41 values {
42 r: int; [[The intensity of the red color]]
43 g: int; [[The intensity of the green color]]
44 b: int; [[The intensity of the blue color]]
45 a: int; [[The alpha value]]
46 }
47 }
48 @property color_class_description {
49 get {
50 [[Get the description of a color class.
51
52 This function gets the description of a color class in use by an object.]]
53 }
54 keys {
55 color_class: string; [[The name of color class]]
56 }
57 values {
58 description: string; [[The description of the target color class or $null if not found]]
59 }
60 }
61 color_class_del {
62 [[Delete the color class.
63
64 This function deletes any values for the specified color class.
65
66 Deleting the color class will revert it to the values defined
67 by @.color_class.set() or the color class defined in the theme file.
68
69 Deleting the color class will emit the signal "color_class,del"
70 for the given Edje object.]]
71 params {
72 @in color_class: string; [[The name of color_class]]
73 }
74 }
75 color_class_clear {
76 [[Delete all color classes defined in object level.
77
78 This function deletes any color classes defined in object level.
79 Clearing color classes will revert the color of all edje parts to
80 the values defined in global level or theme file.
81
82 @since 1.17.0]]
83 }
84 }
85}
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 @@
1interface Efl.Gfx.Size_Class
2{
3 methods {
4 @property size_class {
5 set {
6 [[Set width and height of size class.
7
8 This function sets width and height for a size class.
9 This will make all edje parts in the specified object that have
10 the specified size class update their size with given values.
11
12 @since 1.17]]
13 return: bool; [[$true, on success or $false, on error]]
14 }
15 get {
16 [[Get width and height of size class.
17
18 This function gets width and height for a size class.
19 These values will only be valid until the size class is changed
20 or the edje object is deleted.
21
22 @since 1.17]]
23 return: bool; [[$true, on success or $false, on error]]
24 }
25 keys {
26 size_class: string; [[The name of size class]]
27 }
28 values {
29 minw: int; [[minimum width]]
30 minh: int; [[minimum height]]
31 maxw: int; [[maximum width]]
32 maxh: int; [[maximum height]]
33 }
34 }
35 size_class_del {
36 [[Delete the size class.
37
38 This function deletes any values for the specified size class.
39
40 Deleting the size class will revert it to the values defined
41 by @.size_class.set() or the size class defined in the theme file.
42
43 @since 1.17]]
44 params {
45 @in size_class: string; [[The size class to be deleted.]]
46 }
47 }
48 }
49}
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 @@
1import efl_gfx_types;
2
3interface Efl.Gfx.Text_Class
4{
5 methods {
6 @property text_class {
7 set {
8 [[Set Edje text class.
9
10 This function sets the text class for the Edje.]]
11 return: bool; [[$true, on success or $false, on error]]
12 }
13 get {
14 [[Get font and font size from edje text class.
15
16 This function gets the font and the font size from text class.
17 The font string will only be valid until the text class is changed
18 or the edje object is deleted.]]
19 return: bool; [[$true, on success or $false, on error]]
20 }
21 keys {
22 text_class: string; [[The text class name]]
23 }
24 values {
25 font: string; [[Font name]]
26 size: Efl.Font.Size; [[Font Size]]
27 }
28 }
29 text_class_del {
30 [[Delete the text class.
31
32 This function deletes any values for the specified text class.
33
34 Deleting the text class will revert it to the values defined
35 by @.text_class.set() or the text class defined in the theme file.
36
37 @since 1.17]]
38 params {
39 @in text_class: string; [[The text class to be deleted.]]
40 }
41 }
42 }
43}
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot
index 1250d43130..58ccdfca49 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -196,3 +196,11 @@ enum Efl.Image.Load.Error
196 unknown_collection = 9, [[(Edje only) The group/collection set to load from was not found in the file]] 196 unknown_collection = 9, [[(Edje only) The group/collection set to load from was not found in the file]]
197 recursive_reference = 10 [[(Edje only) The group/collection set to load from had recursive references on its components]] 197 recursive_reference = 10 [[(Edje only) The group/collection set to load from had recursive references on its components]]
198} 198}
199
200enum Efl.Gfx.Color_Class.Layer {
201 normal = 0, [[Default color]]
202 outline, [[Outline color]]
203 shadow [[Shadow color]]
204}
205
206type 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 778108e699..30769e6433 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -26,6 +26,10 @@
26#include "interfaces/efl_gfx_fill.eo.c" 26#include "interfaces/efl_gfx_fill.eo.c"
27#include "interfaces/efl_gfx_view.eo.c" 27#include "interfaces/efl_gfx_view.eo.c"
28 28
29#include "interfaces/efl_gfx_color_class.eo.c"
30#include "interfaces/efl_gfx_text_class.eo.c"
31#include "interfaces/efl_gfx_size_class.eo.c"
32
29#include "interfaces/efl_gfx_gradient.eo.c" 33#include "interfaces/efl_gfx_gradient.eo.c"
30#include "interfaces/efl_gfx_gradient_linear.eo.c" 34#include "interfaces/efl_gfx_gradient_linear.eo.c"
31#include "interfaces/efl_gfx_gradient_radial.eo.c" 35#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 @@
1type Efl_Font_Size: int; [[Efl font size type]] 1import efl_gfx_types;
2 2
3interface Efl.Text.Properties 3interface Efl.Text.Properties
4{ 4{
@@ -31,7 +31,7 @@ interface Efl.Text.Properties
31 } 31 }
32 values { 32 values {
33 font: string; [[The font family name or filename.]] 33 font: string; [[The font family name or filename.]]
34 size: Efl_Font_Size; [[The font size, in points.]] 34 size: Efl.Font.Size; [[The font size, in points.]]
35 } 35 }
36 } 36 }
37 @property font_source { 37 @property font_source {