summaryrefslogtreecommitdiff
path: root/src/lib/efl
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-12-20 16:34:01 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-12-22 13:29:20 +0900
commit9db0ec554bf3f92c8e0c8e1733455955e2351e51 (patch)
treec9e7c9e848e918e75a051d6470a773502f9a52d2 /src/lib/efl
parent14d10e8b7baeaf282ed607d068f84a4d56004519 (diff)
interface: add Efl.Gfx.Color interface for color related APIs
This would eventually turn into mixin class later after adding more color related helper functions.
Diffstat (limited to 'src/lib/efl')
-rw-r--r--src/lib/efl/Efl.h1
-rw-r--r--src/lib/efl/interfaces/efl_gfx.eo40
-rw-r--r--src/lib/efl/interfaces/efl_gfx_blur.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_buffer.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_color.eo46
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c1
6 files changed, 50 insertions, 42 deletions
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index bb22f97..8505afa 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -115,6 +115,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
115 115
116/* Graphics */ 116/* Graphics */
117#include "interfaces/efl_gfx.eo.h" 117#include "interfaces/efl_gfx.eo.h"
118#include "interfaces/efl_gfx_color.eo.h"
118#include "interfaces/efl_gfx_buffer.eo.h" 119#include "interfaces/efl_gfx_buffer.eo.h"
119#include "interfaces/efl_gfx_stack.eo.h" 120#include "interfaces/efl_gfx_stack.eo.h"
120#include "interfaces/efl_gfx_fill.eo.h" 121#include "interfaces/efl_gfx_fill.eo.h"
diff --git a/src/lib/efl/interfaces/efl_gfx.eo b/src/lib/efl/interfaces/efl_gfx.eo
index 3d073c2..c0ab8b3 100644
--- a/src/lib/efl/interfaces/efl_gfx.eo
+++ b/src/lib/efl/interfaces/efl_gfx.eo
@@ -49,46 +49,6 @@ interface Efl.Gfx {
49 rect: Eina.Rect; [[The X,Y position and W,H size, in pixels.]] 49 rect: Eina.Rect; [[The X,Y position and W,H size, in pixels.]]
50 } 50 }
51 } 51 }
52 @property color {
53 set {
54 [[Sets the general/main color of the given Evas object to the given
55 one.
56
57 See also @.color.get (for an example)
58
59 These color values are expected to be premultiplied by alpha.
60 ]]
61 }
62 get {
63 [[Retrieves the general/main color of the given Evas object.
64
65 Retrieves the main color's RGB component (and alpha channel)
66 values, which range from 0 to 255. For the alpha channel,
67 which defines the object's transparency level, 0 means totally
68 transparent, while 255 means opaque. These color values are
69 premultiplied by the alpha value.
70
71 Usually youll use this attribute for text and rectangle objects,
72 where the main color is their unique one. If set for objects
73 which themselves have colors, like the images one, those colors
74 get modulated by this one.
75
76 All newly created Evas rectangles get the default color
77 values of 255 255 255 255 (opaque white).
78
79 Use null pointers on the components you're not interested
80 in: they'll be ignored by the function.
81
82 See the full \@ref Example_Evas_Object_Manipulation "example".
83 ]]
84 }
85 values {
86 r: int; [[The red component of the given color.]]
87 g: int; [[The green component of the given color.]]
88 b: int; [[The blue component of the given color.]]
89 a: int; [[The alpha component of the given color.]]
90 }
91 }
92 @property visible { 52 @property visible {
93 [[The visibility of a canvas object. 53 [[The visibility of a canvas object.
94 54
diff --git a/src/lib/efl/interfaces/efl_gfx_blur.eo b/src/lib/efl/interfaces/efl_gfx_blur.eo
index 7e35ee2..c69e787 100644
--- a/src/lib/efl/interfaces/efl_gfx_blur.eo
+++ b/src/lib/efl/interfaces/efl_gfx_blur.eo
@@ -3,7 +3,7 @@ interface Efl.Gfx.Blur
3 [[A simple API to apply blur effects. 3 [[A simple API to apply blur effects.
4 4
5 Those API's might use @Efl.Gfx.Filter internally. It might be necessary to 5 Those API's might use @Efl.Gfx.Filter internally. It might be necessary to
6 also specify the color of the blur with @Efl.Gfx.color. 6 also specify the color of the blur with @Efl.Gfx.Color.color.
7 ]] 7 ]]
8 methods { 8 methods {
9 @property radius { 9 @property radius {
diff --git a/src/lib/efl/interfaces/efl_gfx_buffer.eo b/src/lib/efl/interfaces/efl_gfx_buffer.eo
index 917b443..5df340b 100644
--- a/src/lib/efl/interfaces/efl_gfx_buffer.eo
+++ b/src/lib/efl/interfaces/efl_gfx_buffer.eo
@@ -61,7 +61,7 @@ interface Efl.Gfx.Buffer ()
61 whether or not to use alpha channel data. A value of $true 61 whether or not to use alpha channel data. A value of $true
62 makes it use alpha channel data, and $false makes it ignore 62 makes it use alpha channel data, and $false makes it ignore
63 that data. Note that this has nothing to do with an object's 63 that data. Note that this has nothing to do with an object's
64 color as manipulated by @Efl.Gfx.color.set. 64 color as manipulated by @Efl.Gfx.Color.color.set.
65 ]] 65 ]]
66 } 66 }
67 get { 67 get {
diff --git a/src/lib/efl/interfaces/efl_gfx_color.eo b/src/lib/efl/interfaces/efl_gfx_color.eo
new file mode 100644
index 0000000..d6e06f2
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_gfx_color.eo
@@ -0,0 +1,46 @@
1interface Efl.Gfx.Color
2{
3 [[Efl Gfx Color interface class]]
4 methods {
5 @property color @pure_virtual {
6 set {
7 [[Sets the general/main color of the given Evas object to the given
8 one.
9
10 See also @.color.get (for an example)
11
12 These color values are expected to be premultiplied by alpha.
13 ]]
14 }
15 get {
16 [[Retrieves the general/main color of the given Evas object.
17
18 Retrieves the main color's RGB component (and alpha channel)
19 values, which range from 0 to 255. For the alpha channel,
20 which defines the object's transparency level, 0 means totally
21 transparent, while 255 means opaque. These color values are
22 premultiplied by the alpha value.
23
24 Usually youll use this attribute for text and rectangle objects,
25 where the main color is their unique one. If set for objects
26 which themselves have colors, like the images one, those colors
27 get modulated by this one.
28
29 All newly created Evas rectangles get the default color
30 values of 255 255 255 255 (opaque white).
31
32 Use null pointers on the components you're not interested
33 in: they'll be ignored by the function.
34
35 See the full \@ref Example_Evas_Object_Manipulation "example".
36 ]]
37 }
38 values {
39 r: int;
40 g: int;
41 b: int;
42 a: int;
43 }
44 }
45 }
46}
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index af61237..4c45b95 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -26,6 +26,7 @@
26#include "interfaces/efl_text_markup.eo.c" 26#include "interfaces/efl_text_markup.eo.c"
27 27
28#include "interfaces/efl_gfx.eo.c" 28#include "interfaces/efl_gfx.eo.c"
29#include "interfaces/efl_gfx_color.eo.c"
29#include "interfaces/efl_gfx_buffer.eo.c" 30#include "interfaces/efl_gfx_buffer.eo.c"
30#include "interfaces/efl_gfx_stack.eo.c" 31#include "interfaces/efl_gfx_stack.eo.c"
31#include "interfaces/efl_gfx_fill.eo.c" 32#include "interfaces/efl_gfx_fill.eo.c"