Tizen Native API
5.0
|
A GLView widget allows for simple GL rendering in elementary environment. GLView hides all the complicated evas_gl details so that the user only has to deal with registering a few callback functions for rendering to a surface using OpenGL APIs.
This widget emits the following signals, besides the ones sent from GLView:
"focused"
- when glview has received focus."unfocused"
- when glview has lost focus."language,changed"
- the program's language changed
Below is an illustrative example of how to use GLView and and OpenGL to render in elementary environment. glview_example_01_page
Functions | |
Evas_Object * | elm_glview_add (Evas_Object *parent) |
void | elm_glview_changed_set (Evas_Object *obj) |
void | elm_glview_size_get (const Evas_Object *obj, int *w, int *h) |
void | elm_glview_size_set (Evas_Object *obj, int w, int h) |
void | elm_glview_del_func_set (Evas_Object *obj, Elm_GLView_Func_Cb func) |
void | elm_glview_resize_func_set (Evas_Object *obj, Elm_GLView_Func_Cb func) |
void | elm_glview_render_func_set (Evas_Object *obj, Elm_GLView_Func_Cb func) |
Enumeration Type Documentation
enum Elm_GLView_Mode |
Selects the target surface properties.
An OR combination of Elm_GLView_Mode values should be passed to elm_glview_mode_set when setting up a GL widget. These flags will specify the properties of the rendering target surface; in particular, the mode can request the surface to support alpha, depth and stencil buffers.
ELM_GLVIEW_CLIENT_SIDE_ROTATION is a special value that indicates to EFL that the application will handle the view rotation when the device is rotated. This is needed only when the application requests direct rendering. Please refer to Evas_GL for more information about direct rendering.
See elm_glview_mode_set See elm_opengl_page
- Enumerator:
Function Documentation
Evas_Object* elm_glview_add | ( | Evas_Object * | parent | ) |
Add a new glview to the parent
- Parameters:
-
parent The parent object
- Returns:
- The new object or NULL if it cannot be created
- Since :
- 2.3
- Examples:
- glview_example_01.c.
void elm_glview_changed_set | ( | Evas_Object * | obj | ) |
Notifies that there has been changes in the GLView.
- Parameters:
-
obj The GLView object
- Since :
- 2.3
- Examples:
- glview_example_01.c.
void elm_glview_del_func_set | ( | Evas_Object * | obj, |
Elm_GLView_Func_Cb | func | ||
) |
Set the delete function that runs in the main loop.
- Parameters:
-
obj The GLView object func The callback function
- Since :
- 2.3
- Examples:
- glview_example_01.c.
void elm_glview_render_func_set | ( | Evas_Object * | obj, |
Elm_GLView_Func_Cb | func | ||
) |
Set the render function that runs in the main loop.
- Parameters:
-
obj The GLView object func The callback function
- Since :
- 2.3
- Examples:
- glview_example_01.c.
void elm_glview_resize_func_set | ( | Evas_Object * | obj, |
Elm_GLView_Func_Cb | func | ||
) |
Set the resize function that gets called when resize happens.
- Parameters:
-
obj The GLView object func The callback function
- Since :
- 2.3
- Examples:
- glview_example_01.c.
void elm_glview_size_get | ( | const Evas_Object * | obj, |
int * | w, | ||
int * | h | ||
) |
Gets the size of the GLView.
- Parameters:
-
obj The GLView object w pointer of int width h pointer of int height
- Since :
- 2.3
- Examples:
- glview_example_01.c.
void elm_glview_size_set | ( | Evas_Object * | obj, |
int | w, | ||
int | h | ||
) |
Sets the size of the GLView.
- Parameters:
-
obj The GLView object w width of GLView h height of GLView
- Since :
- 2.3