Tizen Native API
|
Functions | |
int | evas_render_method_lookup (const char *name) |
Looks up a numeric ID from a string name of a rendering engine. | |
Eina_List * | evas_render_method_list (void) |
Lists all the rendering engines compiled into the copy of the Evas library. | |
void | evas_render_method_list_free (Eina_List *list) |
Frees the list of engine names. | |
void | evas_output_method_set (Evas *e, int render_method) |
Sets the output engine for the given evas. | |
int | evas_output_method_get (const Evas *e) |
Gets the number of the output engines used for the given evas. | |
Evas_Engine_Info * | evas_engine_info_get (const Evas *e) |
Gets the current render engine info struct from the given evas. | |
Eina_Bool | evas_engine_info_set (Evas *e, Evas_Engine_Info *info) |
Applies the engine settings for the given evas from the given Evas_Engine_Info structure. |
This goup provides functions that are used to set the render engine for a given function, and then get that engine working.
Evas *evas; Evas_Engine_Info_Software_X11 *einfo; extern Display *display; extern Window win; evas_init(); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_x11")); evas_output_size_set(evas, 640, 480); evas_output_viewport_set(evas, 0, 0, 640, 480); einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas); einfo->info.display = display; einfo->info.visual = DefaultVisual(display, DefaultScreen(display)); einfo->info.colormap = DefaultColormap(display, DefaultScreen(display)); einfo->info.drawable = win; einfo->info.depth = DefaultDepth(display, DefaultScreen(display)); evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
Evas_Engine_Info* evas_engine_info_get | ( | const Evas * | e | ) |
Gets the current render engine info struct from the given evas.
[in] | e | The given evas |
NULL
is returned if an engine has not yet been assigned. Eina_Bool evas_engine_info_set | ( | Evas * | e, |
Evas_Engine_Info * | info | ||
) |
Applies the engine settings for the given evas from the given Evas_Engine_Info
structure.
@
Evas_Engine_Info
structure in any other way.[in] | e | The pointer to the Evas canvas |
[in] | info | The pointer to the Engine Info to use |
int evas_output_method_get | ( | const Evas * | e | ) |
Gets the number of the output engines used for the given evas.
[in] | e | The given evas |
0
is returned if there is an error. void evas_output_method_set | ( | Evas * | e, |
int | render_method | ||
) |
Sets the output engine for the given evas.
[in] | e | The given evas |
[in] | render_method | The numeric engine value to use |
Eina_List* evas_render_method_list | ( | void | ) |
Lists all the rendering engines compiled into the copy of the Evas library.
NULL
is returned.Eina_List *engine_list, *l; char *engine_name; engine_list = evas_render_method_list(); if (!engine_list) { fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); exit(-1); } printf("Available Evas Engines:\n"); EINA_LIST_FOREACH(engine_list, l, engine_name) printf("%s\n", engine_name); evas_render_method_list_free(engine_list);
void evas_render_method_list_free | ( | Eina_List * | list | ) |
Frees the list of engine names.
Example:
Eina_List *engine_list, *l; char *engine_name; engine_list = evas_render_method_list(); if (!engine_list) { fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); exit(-1); } printf("Available Evas Engines:\n"); EINA_LIST_FOREACH(engine_list, l, engine_name) printf("%s\n", engine_name); evas_render_method_list_free(engine_list);
[in] | list | The Eina_List base pointer for the engine list to be freed |
int evas_render_method_lookup | ( | const char * | name | ) |
Looks up a numeric ID from a string name of a rendering engine.
This function looks up a numeric return value for the named engine in the string name. This is a normal C string, NULL byte terminated. The name is case sensitive. If the rendering engine is available, a numeric ID for that engine is returned that is not 0
. If the engine is not available, 0
is returned, indicating an invalid engine.
int engine_id; Evas *evas; evas_init(); evas = evas_new(); if (!evas) { fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n"); exit(-1); } engine_id = evas_render_method_lookup("software_x11"); if (!engine_id) { fprintf(stderr, "ERROR: Requested rendering engine is absent.\n"); exit(-1); } evas_output_method_set(evas, engine_id);
[in] | name | The name string of an engine |