summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS8
-rw-r--r--src/Makefile_Ector.am14
-rw-r--r--src/lib/ector/Ector.h53
-rw-r--r--src/lib/ector/ector_renderer.eo114
-rw-r--r--src/lib/ector/ector_renderer.h6
-rw-r--r--src/lib/ector/ector_surface.eo40
-rw-r--r--src/lib/ector/ector_surface.h6
7 files changed, 241 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 8db85383b2..b283554660 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -77,6 +77,14 @@ Eo
77-- 77--
78 78
79Tom Hacohen <tom@stosb.com> 79Tom Hacohen <tom@stosb.com>
80Cedric Bail <cedric.bail@free.fr>
81
82Ector
83-----
84
85Cedric Bail <cedric.bail@free.fr>
86Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
87Jose O Gonzalez <jose_ogp@juno.com>
80 88
81Evas 89Evas
82---- 90----
diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am
index 25893793f1..00f89a4acd 100644
--- a/src/Makefile_Ector.am
+++ b/src/Makefile_Ector.am
@@ -1,5 +1,19 @@
1 1
2### Library 2### Library
3ector_eolian_files = \
4 lib/ector/ector_surface.eo \
5 lib/ector/ector_renderer.eo
6
7ector_eolian_c = $(ector_eolian_files:%.eo=%.eo.c)
8ector_eolian_h = $(ector_eolian_files:%.eo=%.eo.h)
9
10BUILT_SOURCES += \
11 $(ector_eolian_c) \
12 $(ector_eolian_h)
13
14CLEANFILES += \
15 $(ector_eolian_c) \
16 $(ector_eolian_h)
3 17
4lib_LTLIBRARIES += lib/ector/libector.la 18lib_LTLIBRARIES += lib/ector/libector.la
5 19
diff --git a/src/lib/ector/Ector.h b/src/lib/ector/Ector.h
index 833f113959..a47d2f109f 100644
--- a/src/lib/ector/Ector.h
+++ b/src/lib/ector/Ector.h
@@ -3,6 +3,7 @@
3 3
4#include <Eina.h> 4#include <Eina.h>
5#include <Eo.h> 5#include <Eo.h>
6#include <Evas.h>
6 7
7#ifdef EAPI 8#ifdef EAPI
8# undef EAPI 9# undef EAPI
@@ -103,6 +104,55 @@ typedef Eo Ector_Surface;
103 */ 104 */
104typedef Eo Ector_Renderer; 105typedef Eo Ector_Renderer;
105 106
107/**
108 * @typedef Ector_Colorspace
109 * The definiton of colorspace.
110 */
111typedef Evas_Colorspace Ector_Colorspace;
112
113/**
114 * Raster operations at pixel level
115 */
116typedef enum _Ector_Rop
117{
118 ECTOR_ROP_BLEND, /**< D = S + D(1 - Sa) */
119 ECTOR_ROP_COPY, /**< D = S */
120 ECTOR_ROP_LAST
121} Ector_Rop;
122
123/**
124 * Quality values
125 */
126typedef enum _Ector_Quality
127{
128 ECTOR_QUALITY_BEST, /**< Best quality */
129 ECTOR_QUALITY_GOOD, /**< Good quality */
130 ECTOR_QUALITY_FAST, /**< Lower quality, fastest */
131 ECTOR_QUALITY_LAST
132} Ector_Quality;
133
134/**
135 * Priorities
136 */
137typedef enum _Ector_Priority
138{
139 ECTOR_PRIORITY_NONE = 0,
140 ECTOR_PRIORITY_MARGINAL = 64,
141 ECTOR_PRIORITY_SECONDARY = 128,
142 ECTOR_PRIORITY_PRIMARY = 256,
143} Ector_Priority;
144
145/**
146 * What kind of update is being pushed
147 */
148typedef enum _Ector_Update_Type
149{
150 ECTOR_UPDATE_BACKGROUND = 1, /* All the previous state in that area is reset to the new updated profile */
151 ECTOR_UPDATE_EMPTY = 2, /* Pushing empty area (no visible pixels at all, no need to read this surface to render it) */
152 ECTOR_UPDATE_ALPHA = 4, /* Pushing some transparent pixels (this impact the under layer and will require to read back the surface where this surface is blitted) */
153 ECTOR_UPDATE_OPAQUE = 8 /* Pushing some opaque pixels (this means that their is no need to read the under layer when blitting this surface) */
154} Ector_Update_Type;
155
106#ifdef EFL_BETA_API_SUPPORT 156#ifdef EFL_BETA_API_SUPPORT
107 157
108/** 158/**
@@ -121,6 +171,9 @@ EAPI int ector_init(void);
121 */ 171 */
122EAPI int ector_shutdown(void); 172EAPI int ector_shutdown(void);
123 173
174#include "ector_surface.h"
175#include "ector_renderer.h"
176
124#endif 177#endif
125 178
126/** 179/**
diff --git a/src/lib/ector/ector_renderer.eo b/src/lib/ector/ector_renderer.eo
new file mode 100644
index 0000000000..9073bcb3f8
--- /dev/null
+++ b/src/lib/ector/ector_renderer.eo
@@ -0,0 +1,114 @@
1abstract Ector.Renderer (Eo.Base)
2{
3 eo_prefix: ector_renderer;
4 legacy_prefix: null;
5 properties {
6 transformation {
7 set {
8 }
9 get {
10 }
11 values {
12 Eina_Matrix3 m;
13 }
14 }
15 origin {
16 set {
17 }
18 get {
19 }
20 values {
21 double x;
22 double y;
23 }
24 }
25 visibility {
26 set {
27 /*@ Makes the given Ector renderer visible or invisible. */
28 }
29 get {
30 /*@ Retrieves whether or not the given Ector renderer is visible. */
31 }
32 values {
33 bool v; /*@ @c EINA_TRUE if to make the object visible, @c EINA_FALSE otherwise */
34 }
35 }
36 color {
37 set {
38 /*@
39 Sets the general/main color of the given Ector renderer to the given
40 one.
41
42 @note These color values are expected to be premultiplied by @p a.
43
44 @ingroup Ector_Renderer_Group_Basic */
45 }
46 get {
47 /*@
48 Retrieves the general/main color of the given Ector renderer.
49
50 Retrieves the “main” color's RGB component (and alpha channel)
51 values, <b>which range from 0 to 255</b>. For the alpha channel,
52 which defines the object's transparency level, 0 means totally
53 transparent, while 255 means opaque. These color values are
54 premultiplied by the alpha value.
55
56 @note Use @c NULL pointers on the components you're not interested
57 in: they'll be ignored by the function.
58
59 @ingroup Ector_Renderer_Group_Basic */
60 }
61 values {
62 int r; /*@ The red component of the given color. */
63 int g; /*@ The green component of the given color. */
64 int b; /*@ The blue component of the given color. */
65 int a; /*@ The alpha component of the given color. */
66 }
67 }
68 mask {
69 set {
70 }
71 get {
72 }
73 values {
74 Ector_Renderer *r;
75 }
76 }
77 quality {
78 set {
79 }
80 get {
81 }
82 values {
83 Ector_Quality q;
84 }
85 }
86 }
87 methods {
88 bounds_get {
89 return: bool @warn_unused;
90 params {
91 @out Eina_Rectangle *r;
92 }
93 }
94 draw {
95 return: bool @warn_unused;
96 params {
97 @in Ector_Surface *s;
98 @in Ector_Rop op;
99 @in array<Eina_Rectangle *> *clips; /*@ array of Eina_Rectangle clip */
100 @in int x;
101 @in int y;
102 }
103 }
104 prepare {
105 return: bool @warn_unused;
106 params {
107 @in Ector_Surface *s;
108 }
109 }
110 done {
111 return: bool @warn_unused;
112 }
113 }
114}
diff --git a/src/lib/ector/ector_renderer.h b/src/lib/ector/ector_renderer.h
new file mode 100644
index 0000000000..effb3f59ea
--- /dev/null
+++ b/src/lib/ector/ector_renderer.h
@@ -0,0 +1,6 @@
1#ifndef ECTOR_RENDERER_H
2#define ECTOR_RENDERER_H
3
4#include "ector_renderer.eo.h"
5
6#endif
diff --git a/src/lib/ector/ector_surface.eo b/src/lib/ector/ector_surface.eo
new file mode 100644
index 0000000000..36dd9981a2
--- /dev/null
+++ b/src/lib/ector/ector_surface.eo
@@ -0,0 +1,40 @@
1abstract Ector.Surface (Eo.Base)
2{
3 eo_prefix: ector_surface;
4 properties {
5 size {
6 set {
7 /*@ Changes the size of the given Evas object. */
8 }
9 get {
10 /*@ Retrieves the (rectangular) size of the given Evas object. */
11 }
12 values {
13 int w; /*@ in */
14 int h; /*@ in */
15 }
16 }
17 }
18 methods {
19 renderer_factory_new {
20 return: Ector_Renderer *;
21 params {
22 @in const(Eo_Class) * type @nonull;
23 }
24 }
25 update_push {
26 return: bool;
27 params {
28 @in const(Eina_Rectangle) * r @nonull;
29 @in Ector_Update_Type type;
30 }
31 }
32 update_reset {
33 return: bool;
34 }
35 }
36 implements {
37 @virtual .size.set;
38 @virtual .size.get;
39 }
40}
diff --git a/src/lib/ector/ector_surface.h b/src/lib/ector/ector_surface.h
new file mode 100644
index 0000000000..a1096bd714
--- /dev/null
+++ b/src/lib/ector/ector_surface.h
@@ -0,0 +1,6 @@
1#ifndef ECTOR_SURFACE_H
2#define ECTOR_SURFACE_H
3
4#include "ector_surface.eo.h"
5
6#endif