summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Efl.am12
-rw-r--r--src/lib/efl/Efl.h137
-rw-r--r--src/lib/efl/interfaces/efl_gfx_base.eo27
-rw-r--r--src/lib/efl/interfaces/efl_gfx_types.eot135
4 files changed, 153 insertions, 158 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index c055257cfe..4b6f6c0c61 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -23,7 +23,12 @@ efl_eolian_files = \
23 $(efl_eolian_legacy_files) \ 23 $(efl_eolian_legacy_files) \
24 $(NULL) 24 $(NULL)
25 25
26efl_eolian_files_h = $(efl_eolian_files:%.eo=%.eo.h) 26efl_eolian_type_files = \
27 lib/efl/interfaces/efl_gfx_types.eot \
28 $(NULL)
29
30efl_eolian_files_h = $(efl_eolian_files:%.eo=%.eo.h) \
31 $(efl_eolian_type_files:%.eot=%.eot.h)
27efl_eolian_files_c = $(efl_eolian_files:%.eo=%.eo.c) 32efl_eolian_files_c = $(efl_eolian_files:%.eo=%.eo.c)
28efl_eolian_legacy_files_h = $(efl_eolian_legacy_files:%.eo=%.eo.legacy.h) 33efl_eolian_legacy_files_h = $(efl_eolian_legacy_files:%.eo=%.eo.legacy.h)
29 34
@@ -40,10 +45,11 @@ CLEANFILES += \
40EXTRA_DIST += \ 45EXTRA_DIST += \
41 lib/efl/Efl_Config.h \ 46 lib/efl/Efl_Config.h \
42 lib/efl/Efl.h \ 47 lib/efl/Efl.h \
43 $(efl_eolian_files) 48 $(efl_eolian_files) \
49 $(efl_eolian_type_files)
44 50
45efleolianfilesdir = $(datadir)/eolian/include/efl-@VMAJ@ 51efleolianfilesdir = $(datadir)/eolian/include/efl-@VMAJ@
46efleolianfiles_DATA = $(efl_eolian_files) 52efleolianfiles_DATA = $(efl_eolian_files) $(efl_eolian_type_files)
47 53
48lib_LTLIBRARIES += lib/efl/libefl.la 54lib_LTLIBRARIES += lib/efl/libefl.la
49 55
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index b8bc51dab2..b45b791a13 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -33,140 +33,16 @@ extern "C" {
33# endif 33# endif
34#endif /* ! _WIN32 */ 34#endif /* ! _WIN32 */
35 35
36/** 36
37 * These values determine how the points are interpreted in a stream of points.
38 *
39 * @since 1.14
40 */
41typedef enum _Efl_Gfx_Path_Command
42{
43 EFL_GFX_PATH_COMMAND_TYPE_END = 0, /**< The end of stream , no more points to process. */
44 EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO, /**< The next point is the start point of a sub path */
45 EFL_GFX_PATH_COMMAND_TYPE_LINE_TO, /**< The next point is used to draw a line from current point */
46 EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO, /**< The next three point is used to draw a cubic bezier curve from current point */
47 EFL_GFX_PATH_COMMAND_TYPE_CLOSE, /**< Close the curent subpath by drawing a line between current point and the first point of current subpath */
48 EFL_GFX_PATH_COMMAND_TYPE_LAST, /**< Not a valid command, but last one according to this version header */
49} Efl_Gfx_Path_Command;
50
51/**
52 * Type describing dash
53 *
54 * @see efl_gfx_shape_stroke_dash_set()
55 *
56 * @since 1.14
57 */
58typedef struct _Efl_Gfx_Dash Efl_Gfx_Dash;
59struct _Efl_Gfx_Dash
60{
61 double length; /**< dash drawing length */
62 double gap; /**< distance bettwen two dashes */
63};
64
65/**
66 * These values determine how the end of opened sub-paths are rendered in a
67 * stroke.
68 *
69 * @see efl_gfx_shape_stroke_cap_set()
70 *
71 * @since 1.14
72 */
73typedef enum _Efl_Gfx_Cap
74{
75 EFL_GFX_CAP_BUTT = 0, /**< The end of lines is rendered as a full stop on the last point itself */
76 EFL_GFX_CAP_ROUND, /**< The end of lines is rendered as a half-circle around the last point */
77 EFL_GFX_CAP_SQUARE, /**< The end of lines is rendered as a square around the last point */
78 EFL_GFX_CAP_LAST /**< End of enum value */
79} Efl_Gfx_Cap;
80
81/**
82 * These values determine how two joining lines are rendered in a stroker.
83 *
84 * @see efl_gfx_shape_stroke_join_set()
85 *
86 * @since 1.14
87 */
88typedef enum _Efl_Gfx_Join
89{
90 EFL_GFX_JOIN_MITER = 0, /**< Used to render rounded line joins. Circular arcs are used to join two lines smoothly. */
91 EFL_GFX_JOIN_ROUND, /**< Used to render beveled line joins. The outer corner of the joined lines is filled by enclosing the triangular region of the corner with a straight line between the outer corners of each stroke. */
92 EFL_GFX_JOIN_BEVEL, /**< Used to render mitered line joins. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created. */
93 EFL_GFX_JOIN_LAST /**< End of enum value */
94} Efl_Gfx_Join;
95
96/**
97 * Type defining gradient stop.
98 * @note Describe the location and color of a transition point in a gradient.
99 * @since 1.14
100 */
101typedef struct _Efl_Gfx_Gradient_Stop Efl_Gfx_Gradient_Stop;
102struct _Efl_Gfx_Gradient_Stop
103{
104 double offset; /**< The location of the gradient stop within the gradient vector*/
105 int r; /**< The component R color of the gradient stop */
106 int g; /**< The component G color of the gradient stop */
107 int b; /**< The component B color of the graident stop */
108 int a; /**< The component A color of the graident stop */
109};
110
111/**
112 * Specifies how the area outside the gradient area should be filled.
113 *
114 * @see efl_gfx_gradient_spread_set()
115 *
116 * @since 1.14
117 */
118typedef enum _Efl_Gfx_Gradient_Spread
119{
120 EFL_GFX_GRADIENT_SPREAD_PAD, /**< The area is filled with the closest stop color. This is the default. */
121 EFL_GFX_GRADIENT_SPREAD_REFLECT, /**< The gradient is reflected outside the gradient area. */
122 EFL_GFX_GRADIENT_SPREAD_REPEAT, /**< The gradient is repeated outside the gradient area. */
123 EFL_GFX_GRADIENT_SPREAD_LAST /**< End of enum value */
124} Efl_Gfx_Gradient_Spread;
125
126
127/**
128 * Type defining how an image content get filled.
129 * @since 1.14
130 */
131typedef enum _Efl_Gfx_Fill_Rule
132{
133 EFL_GFX_FILL_RULE_WINDING = 0, /**< Draw a horizontal line from the point to a location outside the shape. Determine whether the direction of the line at each intersection point is up or down. The winding number is determined by summing the direction of each intersection. If the number is non zero, the point is inside the shape. This mode is the default */
134 EFL_GFX_FILL_RULE_ODD_EVEN = 1, /**< Draw a horizontal line from the point to a location outside the shape, and count the number of intersections. If the number of intersections is an odd number, the point is inside the shape. */
135} Efl_Gfx_Fill_Rule;
136
137/**
138 * Type defining stroke information.
139 * @note Describe the properties to define the path stroke.
140 * @since 1.14
141 */
142typedef struct _Efl_Gfx_Stroke Efl_Gfx_Stroke;
143struct _Efl_Gfx_Stroke
144{
145 double scale;
146 double width;
147 double centered;
148
149 struct {
150 int r, g, b, a;
151 } color;
152
153 Efl_Gfx_Dash *dash;
154 unsigned int dash_length;
155
156 Efl_Gfx_Cap cap;
157 Efl_Gfx_Join join;
158};
159
160typedef struct _Efl_Gfx_Shape_Public Efl_Gfx_Shape_Public;
161struct _Efl_Gfx_Shape_Public
162{
163 Efl_Gfx_Stroke stroke;
164};
165 37
166#ifdef EFL_BETA_API_SUPPORT 38#ifdef EFL_BETA_API_SUPPORT
167 39
168#include <Efl_Model_Common.h> 40#include <Efl_Model_Common.h>
169 41
42/* Data types */
43#include "interfaces/efl_gfx_types.eot.h"
44typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
45
170/* Interfaces */ 46/* Interfaces */
171#include "interfaces/efl_control.eo.h" 47#include "interfaces/efl_control.eo.h"
172#include "interfaces/efl_file.eo.h" 48#include "interfaces/efl_file.eo.h"
@@ -210,10 +86,13 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color *color,
210#else 86#else
211 87
212#ifndef EFL_NOLEGACY_API_SUPPORT 88#ifndef EFL_NOLEGACY_API_SUPPORT
89#include "interfaces/efl_gfx_types.eot.h"
213#include "interfaces/efl_gfx_fill.eo.legacy.h" 90#include "interfaces/efl_gfx_fill.eo.legacy.h"
214#include "interfaces/efl_gfx_base.eo.legacy.h" 91#include "interfaces/efl_gfx_base.eo.legacy.h"
215#endif 92#endif
216 93
94typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
95
217#endif 96#endif
218 97
219#if defined ( __cplusplus ) 98#if defined ( __cplusplus )
diff --git a/src/lib/efl/interfaces/efl_gfx_base.eo b/src/lib/efl/interfaces/efl_gfx_base.eo
index 4c351d647e..2b757cf46c 100644
--- a/src/lib/efl/interfaces/efl_gfx_base.eo
+++ b/src/lib/efl/interfaces/efl_gfx_base.eo
@@ -1,29 +1,4 @@
1enum Efl.Gfx.Colorspace { 1import efl_gfx_types;
2 argb8888 = 0, [[ARGB 32 bits per pixel, high-byte is Alpha, accessed one 32-bit word at a time]]
3 gry8 = 4, [[8-bit gray image, or alpha only]]
4}
5
6enum Efl.Gfx.Render_Op {
7 blend = 0, [[Alpha blending onto destination (default); d = d*(1-sa) + s]]
8 copy = 1, [[Copy source to destination; d = s]]
9 last
10}
11
12enum Efl.Gfx.Color_Type {
13 bits8, [[Color is encoded in the top 8 bits of the unsigned short as a unsigned char.]]
14 bits16, [[Color is encoded in the 16 bits as an unsigned char.]]
15 last
16}
17
18struct Efl.Gfx.Color {
19 [[Define an RGBA color.]]
20 r: ushort; [[The red component.]]
21 g: ushort; [[The green component.]]
22 b: ushort; [[The blue component.]]
23 a: ushort; [[The alpha component.]]
24
25 type: Efl.Gfx.Color_Type;
26}
27 2
28interface Efl.Gfx.Base { 3interface Efl.Gfx.Base {
29 legacy_prefix: null; 4 legacy_prefix: null;
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot
new file mode 100644
index 0000000000..99d86c18e2
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -0,0 +1,135 @@
1enum Efl.Gfx.Colorspace {
2 argb8888 = 0, [[ARGB 32 bits per pixel, high-byte is Alpha, accessed one 32-bit word at a time.]]
3 gry8 = 4, [[8-bit gray image, or alpha only.]]
4}
5
6enum Efl.Gfx.Render_Op {
7 blend = 0, [[Alpha blending onto destination (default); d = d*(1-sa) + s.]]
8 copy = 1, [[Copy source to destination; d = s.]]
9 last
10}
11
12enum Efl.Gfx.Color_Type {
13 bits8, [[Color is encoded in the top 8 bits of the unsigned short as a unsigned char.]]
14 bits16, [[Color is encoded in the 16 bits as an unsigned short.]]
15 last
16}
17
18struct Efl.Gfx.Color {
19 [[Define an RGBA color.]]
20 r: ushort; [[The red component.]]
21 g: ushort; [[The green component.]]
22 b: ushort; [[The blue component.]]
23 a: ushort; [[The alpha component.]]
24
25 type: Efl.Gfx.Color_Type; [[Defines whether the color is 8-bit or 16-bit encoded.]]
26}
27
28enum Efl.Gfx.Path.Command_Type {
29 [[These values determine how the points are interpreted in a stream of points.
30 @since 1.14
31 ]]
32 end = 0, [[The end of stream , no more points to process.]]
33 move_to, [[The next point is the start point of a sub path.]]
34 line_to, [[The next point is used to draw a line from current point.]]
35 cubic_to, [[The next three point is used to draw a cubic bezier curve from current point.]]
36 close, [[Close the curent subpath by drawing a line between current point and the first point of current subpath.]]
37 last [[Not a valid command, but last one according to this version header.]]
38}
39
40enum Efl.Gfx.Cap {
41 [[These values determine how the end of opened sub-paths are rendered in a
42 stroke.
43 $ref efl_gfx_shape_stroke_cap_set()
44 @since 1.14
45 ]]
46 butt = 0, [[The end of lines is rendered as a full stop on the last point itself.]]
47 round, [[The end of lines is rendered as a half-circle around the last point.]]
48 square, [[The end of lines is rendered as a square around the last point.]]
49 last [[End of enum value.]]
50}
51
52enum Efl.Gfx.Join
53{
54 [[These values determine how two joining lines are rendered in a stroker.
55 $ref efl_gfx_shape_stroke_join_set()
56 @since 1.14
57 ]]
58 miter = 0, [[Used to render rounded line joins. Circular arcs are used to join two lines smoothly.]]
59 round, [[Used to render beveled line joins. The outer corner of the joined lines is filled by enclosing the triangular region of the corner with a straight line between the outer corners of each stroke.]]
60 bevel, [[Used to render mitered line joins. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created.]]
61 last [[End of enum value]]
62}
63
64enum Efl.Gfx.Gradient.Spread
65{
66 [[Specifies how the area outside the gradient area should be filled.
67 $ref efl_gfx_gradient_spread_set()
68 @since 1.14
69 ]]
70 pad, [[The area is filled with the closest stop color. This is the default.]]
71 reflect, [[The gradient is reflected outside the gradient area.]]
72 repeat, [[The gradient is repeated outside the gradient area.]]
73 last [[End of enum value]]
74}
75
76enum Efl.Gfx.Fill.Rule
77{
78 [[Type defining how an image content get filled.
79 @since 1.14
80 ]]
81 winding = 0, [[Draw a horizontal line from the point to a location outside the shape. Determine whether the direction of the line at each intersection point is up or down. The winding number is determined by summing the direction of each intersection. If the number is non zero, the point is inside the shape. This mode is the default]]
82 odd_even = 1, [[Draw a horizontal line from the point to a location outside the shape, and count the number of intersections. If the number of intersections is an odd number, the point is inside the shape.]]
83}
84
85struct Efl.Gfx.Dash {
86 [[Type describing dash.
87 $ref efl_gfx_shape_stroke_dash_set()
88 @since 1.14
89 ]]
90 length: double; [[Dash drawing length.]]
91 gap: double; [[Distance bettwen two dashes.]]
92}
93
94struct Efl.Gfx.Gradient.Stop
95{
96 [[Type defining gradient stops.
97 Describes the location and color of a transition point in a gradient.
98 @since 1.14
99 ]]
100 offset: double; [[The location of the gradient stop within the gradient vector]]
101 r: int; [[The component R color of the gradient stop]]
102 g: int; [[The component G color of the gradient stop]]
103 b: int; [[The component B color of the graident stop]]
104 a: int; [[The component A color of the graident stop]]
105}
106
107struct Efl.Gfx.Stroke_Color
108{
109 [[Internal structure for @ref Efl.Gfx.Stroke.]]
110 r: int;
111 g: int;
112 b: int;
113 a: int;
114}
115
116struct Efl.Gfx.Stroke
117{
118 [[Type defining stroke information.
119 Describes the properties to define the path stroke.
120 @since 1.14
121 ]]
122 scale: double;
123 width: double;
124 centered: double;
125 color: Efl.Gfx.Stroke_Color;
126 dash: Efl.Gfx.Dash*;
127 dash_length: uint;
128 cap: Efl.Gfx.Cap;
129 join: Efl.Gfx.Join;
130}
131
132struct Efl.Gfx.Shape.Public
133{
134 stroke: Efl.Gfx.Stroke;
135}