summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry <larry.olj@gmail.com>2016-01-27 18:45:43 -0200
committerVitor Sousa <vitorsousasilva@gmail.com>2016-02-01 12:33:19 -0200
commitbb034b88d07587b71b4f364339220d118a790739 (patch)
treed33141e5f2a994289887ffd274258d2ec6829246
parent0679462259bba6548b7175f4c9b469572dd26f8a (diff)
elm_glview: move enums to eolian files
-rw-r--r--src/lib/elm_glview.eo84
-rw-r--r--src/lib/elm_glview_common.h77
2 files changed, 81 insertions, 80 deletions
diff --git a/src/lib/elm_glview.eo b/src/lib/elm_glview.eo
index fe44cf88e..16813d571 100644
--- a/src/lib/elm_glview.eo
+++ b/src/lib/elm_glview.eo
@@ -1,3 +1,81 @@
1enum Elm.GLView.Mode
2{
3 [[
4 Selects the target surface properties
5
6 An OR combination of Elm_GLView_Mode values should be passed to
7 elm_glview_mode_set when setting up a GL widget. These flags will
8 specify the properties of the rendering target surface; in particular,
9 the mode can request the surface to support alpha, depth and stencil buffers.
10
11 ELM_GLVIEW_CLIENT_SIDE_ROTATION is a special value that indicates
12 to EFL that the application will handle the view rotation when the
13 device is rotated. This is needed only when the application requests
14 direct rendering. Please refer to Evas_GL
15 for more information about direct rendering.
16
17 See @Elm.Glview.mode.set
18 See elm_opengl_page
19 ]]
20 legacy: elm_glview;
21 none = 0,
22 // 0x1 is reserved for future use
23 alpha = (1<<1), [[Alpha channel enabled rendering mode]]
24 depth = (1<<2), [[Depth buffer enabled rendering mode (24 bits by default)]]
25 stencil = (1<<3), [[Stencil buffer enabled rendering mode (8 bits by default)]]
26 direct = (1<<4), [[Request direct rendering, unless there must be a fallback]]
27 client_side_rotation = (1<<5), [[Client will handle GL view rotation if direct rendering is enabled]]
28 // Depth buffer sizes (3 bits)
29 depth_8 = Elm.GLView.Mode.depth | (1 << 6), [[Request min. 8 bits for the depth buffer]]
30 depth_16 = Elm.GLView.Mode.depth | (2 << 6), [[Request min. 16 bits for the depth buffer]]
31 depth_24 = Elm.GLView.Mode.depth | (3 << 6), [[Request min. 24 bits for the depth buffer (default)]]
32 depth_32 = Elm.GLView.Mode.depth | (4 << 6), [[Request min. 32 bits for the depth buffer]]
33 // Stencil buffer sizes (3 bits)
34 stencil_1 = Elm.GLView.Mode.stencil | (1 << 9), [[Request min. 1 bits for the stencil buffer]]
35 stencil_2 = Elm.GLView.Mode.stencil | (2 << 9), [[Request min. 2 bits for the stencil buffer]]
36 stencil_4 = Elm.GLView.Mode.stencil | (3 << 9), [[Request min. 4 bits for the stencil buffer]]
37 stencil_8 = Elm.GLView.Mode.stencil | (4 << 9), [[Request min. 8 bits for the stencil buffer (default)]]
38 stencil_16 = Elm.GLView.Mode.stencil | (5 << 9), [[Request min. 16 bits for the stencil buffer]]
39 // MSAA params (2 bits)
40 multisample_low = (1 << 12), [[MSAA with minimum number of samples]]
41 multisample_med = (2 << 12), [[MSAA with half the number of maximum samples]]
42 multisample_high = (3 << 12) [[MSAA with maximum number of samples]]
43
44}
45
46enum Elm.GLView.Resize.Policy
47{
48 [[
49 Defines a policy for the glview resizing.
50
51 The resizing policy tells glview what to do with the underlying
52 surface when resize happens. ELM_GLVIEW_RESIZE_POLICY_RECREATE
53 will destroy the current surface and recreate the surface to the
54 new size. ELM_GLVIEW_RESIZE_POLICY_SCALE will instead keep the
55 current surface but only display the result at the desired size scaled.
56
57 Default is @Elm.GLView.Resize.Policy.recreate
58 ]]
59 recreate = 1, [[Resize the internal surface along with the image]]
60 scale = 2 [[Only resize the internal image and not the surface]]
61}
62
63enum Elm.GLView.Render.Policy
64{
65 [[
66 Defines a policy for gl rendering.
67
68 The rendering policy tells glview where to run the gl rendering code.
69 ELM_GLVIEW_RENDER_POLICY_ON_DEMAND tells glview to call the rendering
70 calls on demand, which means that the rendering code gets called
71 only when it is visible.
72
73 Default is @Elm.GLView.Render.Policy.on_demand
74 ]]
75 on_demand = 1, [[Render only when there is a need for redrawing]]
76 always = 2 [[Render always even when it is not visible]]
77}
78
1class Elm.Glview (Elm.Widget) 79class Elm.Glview (Elm.Widget)
2{ 80{
3 eo_prefix: elm_obj_glview; 81 eo_prefix: elm_obj_glview;
@@ -41,7 +119,7 @@ class Elm.Glview (Elm.Widget)
41 return: bool; 119 return: bool;
42 } 120 }
43 values { 121 values {
44 policy: Elm_GLView_Resize_Policy; [[The scaling policy.]] 122 policy: Elm.GLView.Resize.Policy; [[The scaling policy.]]
45 } 123 }
46 } 124 }
47 @property changed { 125 @property changed {
@@ -106,7 +184,7 @@ class Elm.Glview (Elm.Widget)
106 return: bool; 184 return: bool;
107 } 185 }
108 values { 186 values {
109 policy: Elm_GLView_Render_Policy; [[The render policy.]] 187 policy: Elm.GLView.Render.Policy; [[The render policy.]]
110 } 188 }
111 } 189 }
112 @property mode { 190 @property mode {
@@ -121,7 +199,7 @@ class Elm.Glview (Elm.Widget)
121 return: bool; 199 return: bool;
122 } 200 }
123 values { 201 values {
124 mode: Elm_GLView_Mode; [[The mode Options OR'ed enabling Alpha, Depth, Stencil, Direct.]] 202 mode: Elm.GLView.Mode; [[The mode Options OR'ed enabling Alpha, Depth, Stencil, Direct.]]
125 } 203 }
126 } 204 }
127 @property render_func { 205 @property render_func {
diff --git a/src/lib/elm_glview_common.h b/src/lib/elm_glview_common.h
index 639cad94b..12c69ece9 100644
--- a/src/lib/elm_glview_common.h
+++ b/src/lib/elm_glview_common.h
@@ -7,82 +7,5 @@
7typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj); 7typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj);
8 8
9/** 9/**
10 * @brief Selects the target surface properties
11 *
12 * An OR combination of @c Elm_GLView_Mode values should be passed to
13 * @ref elm_glview_mode_set when setting up a GL widget. These flags will
14 * specify the properties of the rendering target surface; in particular,
15 * the mode can request the surface to support alpha, depth and stencil buffers.
16 *
17 * @note @c ELM_GLVIEW_CLIENT_SIDE_ROTATION is a special value that indicates
18 * to EFL that the application will handle the view rotation when the
19 * device is rotated. This is needed only when the application requests
20 * direct rendering. Please refer to @ref Evas_GL
21 * for more information about direct rendering.
22 *
23 * @see elm_glview_mode_set
24 * @see @ref elm_opengl_page
25 */
26typedef enum
27{
28 ELM_GLVIEW_NONE = 0,
29 // 0x1 is reserved for future use
30 ELM_GLVIEW_ALPHA = (1<<1), /**< Alpha channel enabled rendering mode */
31 ELM_GLVIEW_DEPTH = (1<<2), /**< Depth buffer enabled rendering mode (24 bits by default) */
32 ELM_GLVIEW_STENCIL = (1<<3), /**< Stencil buffer enabled rendering mode (8 bits by default) */
33 ELM_GLVIEW_DIRECT = (1<<4), /**< Request direct rendering, unless there must be a fallback */
34 ELM_GLVIEW_CLIENT_SIDE_ROTATION = (1<<5), /**< Client will handle GL view rotation if direct rendering is enabled */
35 // Depth buffer sizes (3 bits)
36 ELM_GLVIEW_DEPTH_8 = ELM_GLVIEW_DEPTH | (1 << 6), /**< Request min. 8 bits for the depth buffer */
37 ELM_GLVIEW_DEPTH_16 = ELM_GLVIEW_DEPTH | (2 << 6), /**< Request min. 16 bits for the depth buffer */
38 ELM_GLVIEW_DEPTH_24 = ELM_GLVIEW_DEPTH | (3 << 6), /**< Request min. 24 bits for the depth buffer (default) */
39 ELM_GLVIEW_DEPTH_32 = ELM_GLVIEW_DEPTH | (4 << 6), /**< Request min. 32 bits for the depth buffer */
40 // Stencil buffer sizes (3 bits)
41 ELM_GLVIEW_STENCIL_1 = ELM_GLVIEW_STENCIL | (1 << 9), /**< Request min. 1 bits for the stencil buffer */
42 ELM_GLVIEW_STENCIL_2 = ELM_GLVIEW_STENCIL | (2 << 9), /**< Request min. 2 bits for the stencil buffer */
43 ELM_GLVIEW_STENCIL_4 = ELM_GLVIEW_STENCIL | (3 << 9), /**< Request min. 4 bits for the stencil buffer */
44 ELM_GLVIEW_STENCIL_8 = ELM_GLVIEW_STENCIL | (4 << 9), /**< Request min. 8 bits for the stencil buffer (default) */
45 ELM_GLVIEW_STENCIL_16 = ELM_GLVIEW_STENCIL | (5 << 9), /**< Request min. 16 bits for the stencil buffer */
46 // MSAA params (2 bits)
47 ELM_GLVIEW_MULTISAMPLE_LOW = (1 << 12), /**< MSAA with minimum number of samples */
48 ELM_GLVIEW_MULTISAMPLE_MED = (2 << 12), /**< MSAA with half the number of maximum samples */
49 ELM_GLVIEW_MULTISAMPLE_HIGH = (3 << 12) /**< MSAA with maximum number of samples */
50} Elm_GLView_Mode;
51
52/**
53 * Defines a policy for the glview resizing.
54 *
55 * The resizing policy tells glview what to do with the underlying
56 * surface when resize happens. ELM_GLVIEW_RESIZE_POLICY_RECREATE
57 * will destroy the current surface and recreate the surface to the
58 * new size. ELM_GLVIEW_RESIZE_POLICY_SCALE will instead keep the
59 * current surface but only display the result at the desired size
60 * scaled.
61 *
62 * @note Default is ELM_GLVIEW_RESIZE_POLICY_RECREATE
63 */
64typedef enum
65{
66 ELM_GLVIEW_RESIZE_POLICY_RECREATE = 1, /**< Resize the internal surface along with the image */
67 ELM_GLVIEW_RESIZE_POLICY_SCALE = 2 /**< Only resize the internal image and not the surface */
68} Elm_GLView_Resize_Policy;
69
70/**
71 * Defines a policy for gl rendering.
72 *
73 * The rendering policy tells glview where to run the gl rendering code.
74 * ELM_GLVIEW_RENDER_POLICY_ON_DEMAND tells glview to call the rendering
75 * calls on demand, which means that the rendering code gets called
76 * only when it is visible.
77 *
78 * @note Default is ELM_GLVIEW_RENDER_POLICY_ON_DEMAND
79 */
80typedef enum
81{
82 ELM_GLVIEW_RENDER_POLICY_ON_DEMAND = 1, /**< Render only when there is a need for redrawing */
83 ELM_GLVIEW_RENDER_POLICY_ALWAYS = 2 /**< Render always even when it is not visible */
84} Elm_GLView_Render_Policy;
85
86/**
87 * @} 10 * @}
88 */ 11 */