From 103e89a04a2e50930a3d84839fe8564cf8ebcee7 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Wed, 12 Mar 2014 08:53:00 +0200 Subject: [PATCH] Eolian: Integration of Evas --- src/Makefile_Evas.am | 10 +- src/lib/evas/Evas_Eo.h | 5 + src/lib/evas/canvas/evas.eo | 1740 +++++++++++++++++++++++++++++++ src/lib/evas/canvas/evas_events.c | 512 +-------- src/lib/evas/canvas/evas_focus.c | 20 +- src/lib/evas/canvas/evas_font_dir.c | 184 +--- src/lib/evas/canvas/evas_key.c | 197 +--- src/lib/evas/canvas/evas_main.c | 733 ++----------- src/lib/evas/canvas/evas_name.c | 22 +- src/lib/evas/canvas/evas_object_image.c | 83 +- src/lib/evas/canvas/evas_object_main.c | 111 +- src/lib/evas/canvas/evas_object_smart.c | 29 +- src/lib/evas/canvas/evas_render.c | 169 +-- src/lib/evas/canvas/evas_stack.c | 57 +- src/lib/evas/canvas/evas_touch_point.c | 86 +- 15 files changed, 2029 insertions(+), 1929 deletions(-) create mode 100644 src/lib/evas/canvas/evas.eo diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 2dd389a..5723530 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -25,7 +25,9 @@ BUILT_SOURCES += \ lib/evas/canvas/evas_common_interface.eo.c \ lib/evas/canvas/evas_common_interface.eo.h \ lib/evas/canvas/evas_object.eo.c \ - lib/evas/canvas/evas_object.eo.h + lib/evas/canvas/evas_object.eo.h \ + lib/evas/canvas/evas.eo.c \ + lib/evas/canvas/evas.eo.h EXTRA_DIST += \ lib/evas/canvas/evas_object.eo \ @@ -39,7 +41,8 @@ EXTRA_DIST += \ lib/evas/canvas/evas_smart.eo \ lib/evas/canvas/evas_smart_clipped.eo \ lib/evas/canvas/evas_table.eo \ - lib/evas/canvas/evas_common_interface.eo + lib/evas/canvas/evas_common_interface.eo \ + lib/evas/canvas/evas.eo lib_LTLIBRARIES += lib/evas/libevas.la noinst_LTLIBRARIES = @@ -66,7 +69,8 @@ nodist_installed_evascanvasheaders_DATA = \ lib/evas/canvas/evas_smart_clipped.eo.h \ lib/evas/canvas/evas_table.eo.h \ lib/evas/canvas/evas_common_interface.eo.h \ - lib/evas/canvas/evas_object.eo.h + lib/evas/canvas/evas_object.eo.h \ + lib/evas/canvas/evas.eo.h noinst_HEADERS = \ lib/evas/include/evas_inline.x \ diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index d7496b7..6d383e7 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -154,6 +154,10 @@ const Eo_Class *evas_smart_draggable_interface_get(void) EINA_CONST; #define EVAS_SMART_SELECTABLE_INTERFACE evas_smart_selectable_interface_get() #define EVAS_SMART_DRAGGABLE_INTERFACE evas_smart_draggable_interface_get() +#include "canvas/evas.eo.h" +#define EVAS_CLASS EVAS_CANVAS_CLASS + +#if 0 #define EVAS_CLASS evas_class_get() const Eo_Class *evas_class_get(void) EINA_CONST; @@ -1781,6 +1785,7 @@ enum * @} */ +#endif /** * @ingroup Evas_Object_Rectangle * diff --git a/src/lib/evas/canvas/evas.eo b/src/lib/evas/canvas/evas.eo new file mode 100644 index 0000000..d6367c9 --- /dev/null +++ b/src/lib/evas/canvas/evas.eo @@ -0,0 +1,1740 @@ +class Evas (Eo_Base, Evas_Common_Interface) +{ + eo_prefix: evas_canvas; + data: Evas_Public_Data; + properties { + output_framespace { + set { + /*@ + Sets the output framespace size of the render engine of the given evas. + + The framespace size is used in the Wayland engines to denote space where + the output is not drawn. This is mainly used in ecore_evas to draw borders + + The units used for @p w and @p h depend on the engine used by the + evas. + + @ingroup Evas_Output_Size + @since 1.1 */ + } + get { + /*@ + Get the render engine's output framespace co-ordinates in canvas units. + + @ingroup Evas_Output_Size + @since 1.1 */ + } + values { + Evas_Coord x; /*@ The left coordinate in output units, usually pixels. */ + Evas_Coord y; /*@ The top coordinate in output units, usually pixels. */ + Evas_Coord w; /*@ The width in output units, usually pixels. */ + Evas_Coord h; /*@ The height in output units, usually pixels. */ + } + } + output_viewport { + set { + /*@ + Sets the output viewport of the given evas in evas units. + + The output viewport is the area of the evas that will be visible to + the viewer. The viewport will be stretched to fit the output + target of the evas when rendering is performed. + + @note The coordinate values do not have to map 1-to-1 with the output + target. However, it is generally advised that it is done for ease + of use. + + @ingroup Evas_Output_Size */ + } + get { + /*@ + Get the render engine's output viewport co-ordinates in canvas units. + Calling this function writes the current canvas output viewport + size and location values into the variables pointed to by @p x, @p + y, @p w and @p h. On success the variables have the output + location and size values written to them in canvas units. Any of @p + x, @p y, @p w or @p h that are @c NULL will not be written to. If @p e + is invalid, the results are undefined. + + Example: + @code + extern Evas *evas; + Evas_Coord x, y, width, height; + + evas_output_viewport_get(evas, &x, &y, &w, &h); + @endcode */ + } + values { + Evas_Coord x; /*@ The top-left corner x value of the viewport. */ + Evas_Coord y; /*@ The top-left corner y value of the viewport. */ + Evas_Coord w; /*@ The width of the viewport. Must be greater than 0. */ + Evas_Coord h; /*@ The height of the viewport. Must be greater than 0. */ + } + } + image_cache { + set { + /*@ + Set the image cache. + + This function sets the image cache of canvas in bytes. */ + } + get { + /*@ + Get the image cache + + This function returns the image cache size of canvas in bytes. */ + } + values { + int size; /*@ The cache size. */ + } + } + event_default_flags { + set { + /*@ + Set the default set of flags an event begins with + + Events in evas can have an event_flags member. This starts out with + and initial value (no flags). This lets you set the default flags that + an event begins with to be @p flags + + @since 1.2 */ + } + get { + /*@ + Get the default set of flags an event begins with + + @return The default event flags for that canvas + + This gets the default event flags events are produced with when fed in. + + @see evas_event_default_flags_set() + @since 1.2 */ + } + values { + Evas_Event_Flags flags; /*@ The default flags to use */ + } + } + output_method { + set { + /*@ + Sets the output engine for the given evas. + + Once the output engine for an evas is set, any attempt to change it + will be ignored. The value for @p render_method can be found using + @ref evas_render_method_lookup . + + @attention it is mandatory that one calls evas_init() before + setting the output method. + + @ingroup Evas_Output_Method */ + } + get { + /*@ + Retrieves the number of the output engine used for the given evas. + @return The ID number of the output engine being used. @c 0 is + returned if there is an error. + @ingroup Evas_Output_Method */ + } + values { + int render_method; /*@ The numeric engine value to use. */ + } + } + font_cache { + set { + /*@ + Changes the size of font cache of the given evas. + + @ingroup Evas_Font_Group */ + } + get { + /*@ + Changes the size of font cache of the given evas. + + @return The size, in bytes. + + @ingroup Evas_Font_Group */ + } + values { + int size; /*@ The size, in bytes. */ + } + } + output_size { + set { + /*@ + Sets the output size of the render engine of the given evas. + + The evas will render to a rectangle of the given size once this + function is called. The output size is independent of the viewport + size. The viewport will be stretched to fill the given rectangle. + + The units used for @p w and @p h depend on the engine used by the + evas. + + @ingroup Evas_Output_Size */ + } + get { + /*@ + Retrieve the output size of the render engine of the given evas. + + The output size is given in whatever the output units are for the + engine. + + If either @p w or @p h is @c NULL, then it is ignored. If @p e is + invalid, the returned results are undefined. + + @ingroup Evas_Output_Size */ + } + values { + int w; /*@ The width in output units, usually pixels. */ + int h; /*@ The height in output units, usually pixels. */ + } + } + data_attach { + set { + /*@ + Attaches a specific pointer to the evas for fetching later + + @ingroup Evas_Canvas */ + } + get { + /*@ + Returns the pointer attached by evas_data_attach_set() + + @return The pointer attached + @ingroup Evas_Canvas */ + } + values { + void *data; /*@ The pointer to attach */ + } + } + font_hinting { + set { + /*@ + Changes the font hinting for the given evas. + + #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + @ingroup Evas_Font_Group */ + } + get { + /*@ + Retrieves the font hinting used by the given evas. + + @return The hinting in use, one of #EVAS_FONT_HINTING_NONE, + #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + @ingroup Evas_Font_Group */ + } + values { + Evas_Font_Hinting_Flags hinting; /*@ The hinting to use, one of #EVAS_FONT_HINTING_NONE, */ + } + } + engine_info { + set { + /*@ + Applies the engine settings for the given evas from the given @c + Evas_Engine_Info structure. + + To get the Evas_Engine_Info structure to use, call @ref + evas_engine_info_get . Do not try to obtain a pointer to an + @c Evas_Engine_Info structure in any other way. + + You will need to call this function at least once before you can + create objects on an evas or render that evas. Some engines allow + their settings to be changed more than once. + + Once called, the @p info pointer should be considered invalid. + + @return @c EINA_TRUE if no error occurred, @c EINA_FALSE otherwise. + @ingroup Evas_Output_Method */ + return Eina_Bool; + } + get { + /*@ + Retrieves the current render engine info struct from the given evas. + + The returned structure is publicly modifiable. The contents are + valid until either @ref evas_engine_info_set or @ref evas_render + are called. + + This structure does not need to be freed by the caller. + + @return A pointer to the Engine Info structure. @c NULL is returned if + an engine has not yet been assigned. + @ingroup Evas_Output_Method */ + } + values { + Evas_Engine_Info *info; /*@ The pointer to the Engine Info to use */ + } + } + focus { + get { + /*@ + Retrieve the object that currently has focus. + + @return The object that has focus or @c NULL if there is not one. + + Evas can have (at most) one of its objects focused at a time. + Focused objects will be the ones having key events delivered + to, which the programmer can act upon by means of + evas_object_event_callback_add() usage. + + @note Most users wouldn't be dealing directly with Evas' focused + objects. Instead, they would be using a higher level library for + that (like a toolkit, as Elementary) to handle focus and who's + receiving input for them. + + This call returns the object that currently has focus on the canvas + @p e or @c NULL, if none. + + @see evas_object_focus_set + @see evas_object_focus_get + @see evas_object_key_grab + @see evas_object_key_ungrab + + Example: + @dontinclude evas-events.c + @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + @until evas_object_focus_set(d.bg, EINA_TRUE); + @dontinclude evas-events.c + @skip called when our rectangle gets focus + @until } + + In this example the @c event_info is exactly a pointer to that + focused rectangle. See the full @ref Example_Evas_Events "example". + + @ingroup Evas_Object_Group_Find */ + return Evas_Object * @warn_unused; + } + } + object_top { + get { + /*@ + Get the highest (stacked) Evas object on the canvas @p e. + + @return a pointer to the highest object on it, if any, or @c NULL, + otherwise + + This function will take all populated layers in the canvas into + account, getting the highest object for the highest layer, + naturally. + + @see evas_object_layer_get() + @see evas_object_layer_set() + @see evas_object_below_get() + @see evas_object_above_get() + + @warning This function will @b skip objects parented by smart + objects, acting only on the ones at the "top level", with regard to + object parenting. */ + return Evas_Object * @warn_unused; + } + } + key_lock { + get { + /*@ + Returns a handle to the list of lock keys registered in the canvas + @p e. This is required to check for which locks are set at a given + time with the evas_key_lock_is_set() function. + + @see evas_key_lock_add + @see evas_key_lock_del + @see evas_key_lock_on + @see evas_key_lock_off + @see evas_key_lock_is_set + + @return An ::Evas_Lock handle to query Evas' keys subsystem with + evas_key_lock_is_set(), or @c NULL on error. */ + return const Evas_Lock * @warn_unused; + } + } + pointer_canvas_xy { + get { + /*@ + This function returns the current known pointer co-ordinates + + This function returns the current known canvas unit co-ordinates of + the mouse pointer and sets the contents of the Evas_Coords pointed + to by @p x and @p y to contain these co-ordinates. If @p e is not a + valid canvas the results of this function are undefined. + + Example: + @code + extern Evas *evas; + Evas_Coord mouse_x, mouse_y; + + evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); + printf("Mouse is at canvas position %d, %d\n", mouse_x, mouse_y); + @endcode */ + } + values { + Evas_Coord x; /*@ The pointer to a Evas_Coord to be filled in */ + Evas_Coord y; /*@ The pointer to a Evas_Coord to be filled in + @ingroup Evas_Pointer_Group */ + } + } + event_down_count { + get { + /*@ + Get the number of mouse or multi presses currently active + + @p e The given canvas pointer. + @return The number of presses (0 if none active). + + @since 1.2 */ + return int; + } + } + smart_objects_calculate_count { + get { + /*@ + This gets the internal counter that counts the number of smart calculations + + Whenever evas performs smart object calculations on the whole canvas + it increments a counter by 1. This is the smart object calculate counter + that this function returns the value of. It starts at the value of 0 and + will increase (and eventually wrap around to negative values and so on) by + 1 every time objects are calculated. You can use this counter to ensure + you don't re-do calculations withint the same calculation generation/run + if the calculations maybe cause self-feeding effects. + + @ingroup Evas_Smart_Object_Group + @since 1.1 */ + return int; + } + } + focus_state { + get { + /*@ + Get the focus state known by the given evas + + @return @c EINA_TRUE if it got the focus, @c EINA_FALSE otherwise. + @ingroup Evas_Canvas */ + return Eina_Bool; + } + } + pointer_output_xy { + get { + /*@ + This function returns the current known pointer co-ordinates + + This function returns the current known screen/output co-ordinates + of the mouse pointer and sets the contents of the integers pointed + to by @p x and @p y to contain these co-ordinates. If @p e is not a + valid canvas the results of this function are undefined. + + Example: + @code + extern Evas *evas; + int mouse_x, mouse_y; + + evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); + printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y); + @endcode */ + } + values { + int x; /*@ The pointer to an integer to be filled in */ + int y; /*@ The pointer to an integer to be filled in + @ingroup Evas_Pointer_Group */ + } + } + pointer_inside { + get { + /*@ + Returns whether the mouse pointer is logically inside the canvas + + @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise + @ingroup Evas_Pointer_Group + + When this function is called it will return a value of either 0 or + 1, depending on if evas_event_feed_mouse_in(), + evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(), + evas_event_feed_mouse_out_data() have been called to feed in a + mouse enter event into the canvas. + + A return value of 1 indicates the mouse is logically inside the + canvas, and 0 implies it is logically outside the canvas. + + A canvas begins with the mouse being assumed outside (0). + + If @p e is not a valid canvas, the return value is undefined. + + Example: + @code + extern Evas *evas; + + if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n"); + else printf("Mouse is out!\n"); + @endcode */ + return Eina_Bool @warn_unused; + } + } + image_max_size { + get { + /*@ + Get the maximum image size evas can possibly handle + + This function returns the larges image or surface size that evas can handle + in pixels, and if there is one, returns @c EINA_TRUE. It returns + @c EINA_FALSE if no extra constraint on maximum image size exists. You still + should check the return values of @p maxw and @p maxh as there may still be + a limit, just a much higher one. + + @since 1.1 */ + return Eina_Bool; + } + values { + int maxw; /*@ Pointer to hold the return value in pixels of the maximum width */ + int maxh; /*@ Pointer to hold the return value in pixels of the maximum height */ + } + } + object_bottom { + get { + /*@ + Get the lowest (stacked) Evas object on the canvas @p e. + + @return a pointer to the lowest object on it, if any, or @c NULL, + otherwise + + This function will take all populated layers in the canvas into + account, getting the lowest object for the lowest layer, naturally. + + @see evas_object_layer_get() + @see evas_object_layer_set() + @see evas_object_below_get() + @see evas_object_above_get() + + @warning This function will @b skip objects parented by smart + objects, acting only on the ones at the "top level", with regard to + object parenting. */ + return Evas_Object * @warn_unused; + } + } + key_modifier { + get { + /*@ + Returns a handle to the list of modifier keys registered in the + canvas @p e. This is required to check for which modifiers are set + at a given time with the evas_key_modifier_is_set() function. + + @see evas_key_modifier_add + @see evas_key_modifier_del + @see evas_key_modifier_on + @see evas_key_modifier_off + @see evas_key_modifier_is_set + + @return An ::Evas_Modifier handle to query Evas' keys subsystem + with evas_key_modifier_is_set(), or @c NULL on error. */ + return const Evas_Modifier * @warn_unused; + } + } + pointer_button_down_mask { + get { + /*@ + Returns a bitmask with the mouse buttons currently pressed, set to 1 + + @return A bitmask of the currently depressed buttons on the canvas + @ingroup Evas_Pointer_Group + + Calling this function will return a 32-bit integer with the + appropriate bits set to 1 that correspond to a mouse button being + depressed. This limits Evas to a mouse devices with a maximum of 32 + buttons, but that is generally in excess of any host system's + pointing device abilities. + + A canvas by default begins with no mouse buttons being pressed and + only calls to evas_event_feed_mouse_down(), + evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and + evas_event_feed_mouse_up_data() will alter that. + + The least significant bit corresponds to the first mouse button + (button 1) and the most significant bit corresponds to the last + mouse button (button 32). + + If @p e is not a valid canvas, the return value is undefined. + + Example: + @code + extern Evas *evas; + int button_mask, i; + + button_mask = evas_pointer_button_down_mask_get(evas); + printf("Buttons currently pressed:\n"); + for (i = 0; i < 32; i++) + { + if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1); + } + @endcode */ + return int @warn_unused; + } + } + } + methods { + tree_objects_at_xy_get { + /*@ + Retrieve a list of Evas objects lying over a given position in + a canvas. + + This function will traverse all the layers of the given canvas, + from top to bottom, querying for objects with areas covering the + given position. It will enter the smart objects. + It will not append to the list pass events as hidden objects. + Call eina_list_free on the returned list after usage. */ + + return Eina_List * @warn_unused; + params { + @in Evas_Object *stop; /*@ An Evas Object where to stop searching. */ + @in int x; /*@ The horizontal coordinate of the position. */ + @in int y; /*@ The vertical coordinate of the position. */ + } + } + event_feed_mouse_wheel { + /*@ + Mouse wheel event feed. + + This function will set some evas properties that is necessary when + the mouse wheel is scrolled up or down. It prepares information to + be treated by the callback function. */ + + params { + @in int direction; /*@ The wheel mouse direction. */ + @in int z; /*@ How much mouse wheel was scrolled up or down. */ + @in unsigned int timestamp; /*@ The timestamp of the mouse up event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + key_lock_on { + /*@ + Enables or turns on programmatically the lock key with name @p + keyname. + + The effect will be as if the key was put on its active state after + this call. + + @see evas_key_lock_get + @see evas_key_lock_add + @see evas_key_lock_del + @see evas_key_lock_off */ + + params { + @in const char *keyname @nonull; /*@ The name of the lock to enable. */ + } + } + event_feed_key_down { + /*@ + Key down event feed + + This function will set some evas properties that is necessary when + a key is pressed. It prepares information to be treated by the + callback function. */ + + params { + @in const char *keyname; /*@ Name of the key */ + @in const char *key; /*@ The key pressed. */ + @in const char *string; /*@ A String */ + @in const char *compose; /*@ The compose string */ + @in unsigned int timestamp; /*@ Timestamp of the mouse up event */ + @in const void *data; /*@ Data for canvas. */ + } + } + key_modifier_mask_get { + /*@ + Creates a bit mask from the @p keyname @b modifier key. Values + returned from different calls to it may be ORed together, + naturally. + + @returns the bit mask or 0 if the @p keyname key wasn't registered as a + modifier for canvas @p e. + + This function is meant to be using in conjunction with + evas_object_key_grab()/evas_object_key_ungrab(). Go check their + documentation for more information. + + @see evas_key_modifier_add + @see evas_key_modifier_get + @see evas_key_modifier_on + @see evas_key_modifier_off + @see evas_key_modifier_is_set + @see evas_object_key_grab + @see evas_object_key_ungrab */ + + const; + return Evas_Modifier_Mask @warn_unused; + params { + @in const char *keyname @nonull; /*@ The name of the modifier key to create the mask for. */ + } + } + key_modifier_add { + /*@ + Adds the @p keyname key to the current list of modifier keys. + + Modifiers are keys like shift, alt and ctrl, i.e., keys which are + meant to be pressed together with others, altering the behavior of + the secondly pressed keys somehow. Evas is so that these keys can + be user defined. + + This call allows custom modifiers to be added to the Evas system at + run time. It is then possible to set and unset modifier keys + programmatically for other parts of the program to check and act + on. Programmers using Evas would check for modifier keys on key + event callbacks using evas_key_modifier_is_set(). + + @see evas_key_modifier_del + @see evas_key_modifier_get + @see evas_key_modifier_on + @see evas_key_modifier_off + @see evas_key_modifier_is_set + + @note If the programmer instantiates the canvas by means of the + ecore_evas_new() family of helper functions, Ecore will take + care of registering on it all standard modifiers: "Shift", + "Control", "Alt", "Meta", "Hyper", "Super". */ + + params { + @in const char *keyname @nonull; /*@ The name of the modifier key to add to the list of + Evas modifiers. */ + } + } + key_modifier_off { + /*@ + Disables or turns off programmatically the modifier key with name + @p keyname. + + @see evas_key_modifier_add + @see evas_key_modifier_get + @see evas_key_modifier_on + @see evas_key_modifier_is_set */ + + params { + @in const char *keyname @nonull; /*@ The name of the modifier to disable. */ + } + } + event_feed_hold { + /*@ + Hold event feed + + This function makes the object to stop sending events. */ + + params { + @in int hold; /*@ The hold. */ + @in unsigned int timestamp; /*@ The timestamp of the mouse up event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + event_feed_mouse_move { + /*@ + Mouse move event feed. + + This function will set some evas properties that is necessary when + the mouse is moved from its last position. It prepares information + to be treated by the callback function. */ + + params { + @in int x; /*@ The horizontal position of the mouse pointer. */ + @in int y; /*@ The vertical position of the mouse pointer. */ + @in unsigned int timestamp; /*@ The timestamp of the mouse up event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + event_feed_key_up { + /*@ + Key up event feed + + This function will set some evas properties that is necessary when + a key is released. It prepares information to be treated by the + callback function. */ + + params { + @in const char *keyname; /*@ Name of the key */ + @in const char *key; /*@ The key released. */ + @in const char *string; /*@ string */ + @in const char *compose; /*@ compose */ + @in unsigned int timestamp; /*@ Timestamp of the mouse up event */ + @in const void *data; /*@ Data for canvas. */ + } + } + event_feed_mouse_out { + /*@ + Mouse out event feed. + + This function will set some evas properties that is necessary when + the mouse out event happens. It prepares information to be treated + by the callback function. */ + + params { + @in unsigned int timestamp; /*@ Timestamp of the mouse up event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + event_input_multi_move { + /*@ No description supplied by the EAPI. */ + params { + @in int d; + @in int x; + @in int y; + @in double rad; + @in double radx; + @in double rady; + @in double pres; + @in double ang; + @in double fx; + @in double fy; + @in unsigned int timestamp; + @in const void *data; + } + } + objects_at_xy_get { + /*@ + Retrieve a list of Evas objects lying over a given position in + a canvas + + @return The list of Evas objects that are over the given position + in @p e + + This function will traverse all the layers of the given canvas, + from top to bottom, querying for objects with areas covering the + given position. The user can remove from query + objects which are hidden and/or which are set to pass events. + + @warning This function will @b skip objects parented by smart + objects, acting only on the ones at the "top level", with regard to + object parenting. */ + + const; + return Eina_List * @warn_unused; + params { + @in Evas_Coord x; /*@ The horizontal coordinate of the position */ + @in Evas_Coord y; /*@ The vertical coordinate of the position */ + @in Eina_Bool include_pass_events_objects; /*@ Boolean flag to include or not + objects which pass events in this calculation */ + @in Eina_Bool include_hidden_objects; /*@ Boolean flag to include or not hidden + objects in this calculation */ + } + } + event_input_multi_up { + /*@ No description supplied by the EAPI. */ + params { + @in int d; + @in int x; + @in int y; + @in double rad; + @in double radx; + @in double rady; + @in double pres; + @in double ang; + @in double fx; + @in double fy; + @in Evas_Button_Flags flags; + @in unsigned int timestamp; + @in const void *data; + } + } + event_feed_multi_down { + /*@ No description supplied by the EAPI. */ + params { + @in int d; + @in int x; + @in int y; + @in double rad; + @in double radx; + @in double rady; + @in double pres; + @in double ang; + @in double fx; + @in double fy; + @in Evas_Button_Flags flags; + @in unsigned int timestamp; + @in const void *data; + } + } + render_async { + /*@ + Render the given Evas canvas asynchronously. + + @return EINA_TRUE if the canvas will render, EINA_FALSE otherwise. + + This function only returns EINA_TRUE when a frame will be rendered. If the + previous frame is still rendering, EINA_FALSE will be returned so the users + know not to wait for the updates callback and just return to their main + loop. + + If a @p func callback is given, a list of updated areas will be generated + and the function will be called from the main thread after the rendered + frame is flushed to the screen. The resulting list should be freed with + @f evas_render_updates_free(). + The list is given in the @p event_info parameter of the callback function. + + @ingroup Evas_Canvas + @since 1.8 */ + + return Eina_Bool; + } + focus_out { + /*@ + Inform to the evas that it lost the focus. + + @ingroup Evas_Canvas */ + + } + event_input_mouse_move { + /*@ + Mouse move event feed from input. + + Similar to the evas_event_feed_mouse_move(), this function will inform Evas + about mouse move events which were received by the input system, relative to + the 0,0 of the window, not to the canvas 0,0. It will take care of doing any + special transformation like adding the framespace offset to the mouse event. + + @since 1.8 + @see evas_event_feed_mouse_move */ + + params { + @in int x; /*@ The horizontal position of the mouse pointer relative to the 0,0 of + the window/surface. */ + @in int y; /*@ The vertical position of the mouse pointer relative to the 0,0 of + the window/surface. */ + @in unsigned int timestamp; /*@ The timestamp of the mouse move event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + norender { + /*@ + Update the canvas internal objects but not triggering immediate + renderization. + + This function updates the canvas internal objects not triggering + renderization. To force renderization function evas_render() should + be used. + + @see evas_render. + + @ingroup Evas_Canvas */ + + } + touch_point_list_count { + /*@ + Get the number of touched point in the evas. + + @return The number of touched point on the evas. + + New touched point is added to the list whenever touching the evas + and point is removed whenever removing touched point from the evas. + + Example: + @code + extern Evas *evas; + int count; + + count = evas_touch_point_list_count(evas); + printf("The count of touch points: %i\n", count); + @endcode + + @see evas_touch_point_list_nth_xy_get() + @see evas_touch_point_list_nth_id_get() + @see evas_touch_point_list_nth_state_get() */ + + return unsigned int; + } + event_input_multi_down { + /*@ No description supplied by the EAPI. */ + params { + @in int d; + @in int x; + @in int y; + @in double rad; + @in double radx; + @in double rady; + @in double pres; + @in double ang; + @in double fx; + @in double fy; + @in Evas_Button_Flags flags; + @in unsigned int timestamp; + @in const void *data; + } + } + nochange_pop { + /*@ + Pop the nochange flag down 1 + + This tells evas, that while the nochange flag is greater than 0, do not + mark objects as "changed" when making changes. + + @ingroup Evas_Canvas */ + + } + key_lock_off { + /*@ + Disables or turns off programmatically the lock key with name @p + keyname. + + The effect will be as if the key was put on its inactive state + after this call. + + @see evas_key_lock_get + @see evas_key_lock_add + @see evas_key_lock_del + @see evas_key_lock_on */ + + params { + @in const char *keyname @nonull; /*@ The name of the lock to disable. */ + } + } + nochange_push { + /*@ + Push the nochange flag up 1 + + This tells evas, that while the nochange flag is greater than 0, do not + mark objects as "changed" when making changes. + + @ingroup Evas_Canvas */ + + } + font_cache_flush { + /*@ + Force the given evas and associated engine to flush its font cache. + + @ingroup Evas_Font_Group */ + + } + font_hinting_can_hint { + /*@ + Checks if the font hinting is supported by the given evas. + + #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise. + @ingroup Evas_Font_Group */ + + const; + return Eina_Bool @warn_unused; + params { + @in Evas_Font_Hinting_Flags hinting; /*@ The hinting to use, one of #EVAS_FONT_HINTING_NONE, */ + } + } + object_top_at_xy_get { + /*@ + Retrieve the Evas object stacked at the top of a given position in + a canvas + + @return The Evas object that is over all other objects at the given + position. + + This function will traverse all the layers of the given canvas, + from top to bottom, querying for objects with areas covering the + given position. The user can remove from the query + objects which are hidden and/or which are set to pass events. + + @warning This function will @b skip objects parented by smart + objects, acting only on the ones at the "top level", with regard to + object parenting. */ + + const; + return Evas_Object * @warn_unused; + params { + @in Evas_Coord x; /*@ The horizontal coordinate of the position */ + @in Evas_Coord y; /*@ The vertical coordinate of the position */ + @in Eina_Bool include_pass_events_objects; /*@ Boolean flag to include or not + objects which pass events in this calculation */ + @in Eina_Bool include_hidden_objects; /*@ Boolean flag to include or not hidden + objects in this calculation */ + } + } + key_modifier_on { + /*@ + Enables or turns on programmatically the modifier key with name @p + keyname. + + The effect will be as if the key was pressed for the whole time + between this call and a matching evas_key_modifier_off(). + + @see evas_key_modifier_add + @see evas_key_modifier_get + @see evas_key_modifier_off + @see evas_key_modifier_is_set */ + + params { + @in const char *keyname @nonull; /*@ The name of the modifier to enable. */ + } + } + event_feed_mouse_up { + /*@ + Mouse up event feed. + + This function will set some evas properties that is necessary when + the mouse button is released. It prepares information to be treated + by the callback function. */ + + params { + @in int b; /*@ The button number. */ + @in Evas_Button_Flags flags; /*@ evas button flags. */ + @in unsigned int timestamp; /*@ The timestamp of the mouse up event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + event_feed_mouse_down { + /*@ + Mouse down event feed. + + This function will set some evas properties that is necessary when + the mouse button is pressed. It prepares information to be treated + by the callback function. */ + + params { + @in int b; /*@ The button number. */ + @in Evas_Button_Flags flags; /*@ The evas button flags. */ + @in unsigned int timestamp; /*@ The timestamp of the mouse down event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + event_refeed_event { + /*@ + Re feed event. + + This function re-feeds the event pointed by event_copy + + This function call evas_event_feed_* functions, so it can + cause havoc if not used wisely. Please use it responsibly. */ + + params { + @in void *event_copy; /*@ the event to refeed */ + @in Evas_Callback_Type event_type; /*@ Event type */ + } + } + font_available_list { + /*@ + List of available font descriptions known or found by this evas. + + The list depends on Evas compile time configuration, such as + fontconfig support, and the paths provided at runtime as explained + in @ref Evas_Font_Path_Group. + + @return a newly allocated list of strings. Do not change the + strings. Be sure to call evas_font_available_list_free() + after you're done. + + @ingroup Evas_Font_Group */ + + const; + return Eina_List * @warn_unused; + } + objects_in_rectangle_get { + const; + return Eina_List * @warn_unused; + params { + @in Evas_Coord x; + @in Evas_Coord y; + @in Evas_Coord w; + @in Evas_Coord h; + @in Eina_Bool include_pass_events_objects; + @in Eina_Bool include_hidden_objects; + } + } + object_name_find { + /*@ + Retrieves the object on the given evas with the given name. + @return If successful, the Evas object with the given name. Otherwise, + @c NULL. + + This looks for the evas object given a name by evas_object_name_set(). If + the name is not unique canvas-wide, then which one of the many objects + with that name is returned is undefined, so only use this if you can ensure + the object name is unique. + + @ingroup Evas_Object_Group_Find */ + + const; + return Evas_Object * @warn_unused; + params { + @in const char *name; /*@ The given name. */ + } + } + font_path_append { + /*@ + Appends a font path to the list of font paths used by the given evas. + @ingroup Evas_Font_Path_Group */ + + params { + @in const char *path @nonull; /*@ The new font path. */ + } + } + touch_point_list_nth_id_get { + /*@ + This function returns the @p id of nth touch point. + + @return id of nth touch point, if the call succeeded, -1 otherwise. + + The point which comes from Mouse Event has @p id 0 and The point + which comes from Multi Event has @p id that is same as Multi + Event's device id. + + Example: + @code + extern Evas *evas; + int id; + + if (evas_touch_point_list_count(evas)) + { + id = evas_touch_point_nth_id_get(evas, 0); + printf("The first touch point's id: %i\n", id); + } + @endcode + + @see evas_touch_point_list_count() + @see evas_touch_point_list_nth_xy_get() + @see evas_touch_point_list_nth_state_get() */ + + return int; + params { + @in unsigned int n; /*@ The number of the touched point (0 being the first). */ + } + } + font_path_clear { + /*@ + Removes all font paths loaded into memory for the given evas. + @ingroup Evas_Font_Path_Group */ + + } + smart_objects_calculate { + /*@ + Call user-provided @c calculate() smart functions and unset the + flag signalling that the object needs to get recalculated to @b all + smart objects in the canvas. + + @see evas_object_smart_need_recalculate_set() + + @ingroup Evas_Smart_Object_Group */ + + } + touch_point_list_nth_xy_get { + /*@ + This function returns the nth touch point's co-ordinates. + + Touch point's co-ordinates is updated whenever moving that point + on the canvas. + + Example: + @code + extern Evas *evas; + Evas_Coord x, y; + + if (evas_touch_point_list_count(evas)) + { + evas_touch_point_nth_xy_get(evas, 0, &x, &y); + printf("The first touch point's co-ordinate: (%i, %i)\n", x, y); + } + @endcode + + @see evas_touch_point_list_count() + @see evas_touch_point_list_nth_id_get() + @see evas_touch_point_list_nth_state_get() */ + + params { + @in unsigned int n; /*@ The number of the touched point (0 being the first). */ + @out Evas_Coord x; /*@ The pointer to a Evas_Coord to be filled in. */ + @out Evas_Coord y; /*@ The pointer to a Evas_Coord to be filled in. */ + } + } + key_lock_del { + /*@ + Removes the @p keyname key from the current list of lock keys on + canvas @p e. + + @see evas_key_lock_get + @see evas_key_lock_add + @see evas_key_lock_on + @see evas_key_lock_off */ + + params { + @in const char *keyname @nonull; /*@ The name of the key to remove from the locks list. */ + } + } + damage_rectangle_add { + /*@ + Add a damage rectangle. + + This is the function by which one tells evas that a part of the + canvas has to be repainted. + + @note All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white). + + @ingroup Evas_Canvas */ + + params { + @in int x; /*@ The rectangle's left position. */ + @in int y; /*@ The rectangle's top position. */ + @in int w; /*@ The rectangle's width. */ + @in int h; /*@ The rectangle's height. */ + } + } + sync { + /*@ No description supplied by the EAPI. */ + } + font_path_list { + /*@ + Retrieves the list of font paths used by the given evas. + @return The list of font paths used. + @ingroup Evas_Font_Path_Group */ + + const; + return const Eina_List * @warn_unused; + } + image_cache_reload { + /*@ + Reload the image cache + + This function reloads the image cache of canvas. */ + + } + coord_world_x_to_screen { + /*@ + Convert/scale a canvas co-ordinate into output screen co-ordinates + + @return The output/screen co-ordinate translated to output co-ordinates + @ingroup Evas_Coord_Mapping_Group + + This function takes in a horizontal co-ordinate as the @p x + parameter and converts it into output units, accounting for output + size, viewport size and location, returning it as the function + return value. If @p e is invalid, the results are undefined. + + Example: + @code + extern Evas *evas; + int screen_x; + extern Evas_Coord canvas_x; + + screen_x = evas_coord_world_x_to_screen(evas, canvas_x); + @endcode */ + + const; + return int @warn_unused; + params { + @in Evas_Coord x; /*@ The canvas x co-ordinate */ + } + } + event_feed_multi_move { + /*@ No description supplied by the EAPI. */ + params { + @in int d; + @in int x; + @in int y; + @in double rad; + @in double radx; + @in double rady; + @in double pres; + @in double ang; + @in double fx; + @in double fy; + @in unsigned int timestamp; + @in const void *data; + } + } + render_updates { + /*@ + Force immediate renderization of the given Evas canvas. + + @return A newly allocated list of updated rectangles of the canvas + (@c Eina_Rectangle structs). Free this list with + evas_render_updates_free(). + + This function forces an immediate renderization update of the given + canvas @p e. + + @note This is a very low level function, which most of + Evas' users wouldn't care about. One would use it, for example, to + grab an Evas' canvas update regions and paint them back, using the + canvas' pixmap, on a displaying system working below Evas. + + @note Evas is a stateful canvas. If no operations changing its + state took place since the last rendering action, you won't see no + changes and this call will be a no-op. + + Example code follows. + @dontinclude evas-events.c + @skip add an obscured + @until d.obscured = !d.obscured; + + See the full @ref Example_Evas_Events "example". + + @ingroup Evas_Canvas */ + + return Eina_List * @warn_unused; + } + image_cache_flush { + /*@ + Flush the image cache of the canvas. + + This function flushes image cache of canvas. */ + + } + coord_screen_y_to_world { + /*@ + Convert/scale an output screen co-ordinate into canvas co-ordinates + + @return The screen co-ordinate translated to canvas unit co-ordinates + @ingroup Evas_Coord_Mapping_Group + + This function takes in a vertical co-ordinate as the @p y parameter + and converts it into canvas units, accounting for output size, + viewport size and location, returning it as the function return + value. If @p e is invalid, the results are undefined. + + Example: + @code + extern Evas *evas; + extern int screen_y; + Evas_Coord canvas_y; + + canvas_y = evas_coord_screen_y_to_world(evas, screen_y); + @endcode */ + + const; + return Evas_Coord @warn_unused; + params { + @in int y; /*@ The screen/output y co-ordinate */ + } + } + key_modifier_del { + /*@ + Removes the @p keyname key from the current list of modifier keys + on canvas @p e. + + @see evas_key_modifier_add + @see evas_key_modifier_get + @see evas_key_modifier_on + @see evas_key_modifier_off + @see evas_key_modifier_is_set */ + + params { + @in const char *keyname @nonull; /*@ The name of the key to remove from the modifiers list. */ + } + } + touch_point_list_nth_state_get { + /*@ + This function returns the @p state of nth touch point. + + @return @p state of nth touch point, if the call succeeded, + EVAS_TOUCH_POINT_CANCEL otherwise. + + The point's @p state is EVAS_TOUCH_POINT_DOWN when pressed, + EVAS_TOUCH_POINT_STILL when the point is not moved after pressed, + EVAS_TOUCH_POINT_MOVE when moved at least once after pressed and + EVAS_TOUCH_POINT_UP when released. + + Example: + @code + extern Evas *evas; + Evas_Touch_Point_State state; + + if (evas_touch_point_list_count(evas)) + { + state = evas_touch_point_nth_state_get(evas, 0); + printf("The first touch point's state: %i\n", state); + } + @endcode + + @see evas_touch_point_list_count() + @see evas_touch_point_list_nth_xy_get() + @see evas_touch_point_list_nth_id_get() */ + + return Evas_Touch_Point_State; + params { + @in unsigned int n; /*@ The number of the touched point (0 being the first). */ + } + } + focus_in { + /*@ + Inform to the evas that it got the focus. + + @ingroup Evas_Canvas */ + + } + obscured_rectangle_add { + /*@ + Add an "obscured region" to an Evas canvas. + + This is the function by which one tells an Evas canvas that a part + of it must not be repainted. The region must be + rectangular and its coordinates inside the canvas viewport are + passed in the call. After this call, the region specified won't + participate in any form in Evas' calculations and actions during + its rendering updates, having its displaying content frozen as it + was just after this function took place. + + We call it "obscured region" because the most common use case for + this rendering (partial) freeze is something else (most probably + other canvas) being on top of the specified rectangular region, + thus shading it completely from the user's final scene in a + display. To avoid unnecessary processing, one should indicate to the + obscured canvas not to bother about the non-important area. + + The majority of users won't have to worry about this function, as + they'll be using just one canvas in their applications, with + nothing inset or on top of it in any form. + + To make this region one that @b has to be repainted again, call the + function evas_obscured_clear(). + + @note This is a very low level function, which most of + Evas' users wouldn't care about. + + @note This function does @b not flag the canvas as having its state + changed. If you want to re-render it afterwards expecting new + contents, you have to add "damage" regions yourself (see + evas_damage_rectangle_add()). + + @see evas_obscured_clear() + @see evas_render_updates() + + Example code follows. + @dontinclude evas-events.c + @skip add an obscured + @until evas_obscured_clear(evas); + + In that example, pressing the "Ctrl" and "o" keys will impose or + remove an obscured region in the middle of the canvas. You'll get + the same contents at the time the key was pressed, if toggling it + on, until you toggle it off again (make sure the animation is + running on to get the idea better). See the full @ref + Example_Evas_Events "example". + + @ingroup Evas_Canvas */ + + params { + @in int x; /*@ The rectangle's top left corner's horizontal coordinate. */ + @in int y; /*@ The rectangle's top left corner's vertical coordinate */ + @in int w; /*@ The rectangle's width. */ + @in int h; /*@ The rectangle's height. */ + } + } + render_dump { + /*@ + Make the canvas discard as much data as possible used by the engine at + runtime. + + This function will unload images, delete textures and much more, where + possible. You may also want to call evas_render_idle_flush() immediately + prior to this to perhaps discard a little more, though evas_render_dump() + should implicitly delete most of what evas_render_idle_flush() might + discard too. + + @ingroup Evas_Canvas */ + + } + event_feed_mouse_in { + /*@ + Mouse in event feed. + + This function will set some evas properties that is necessary when + the mouse in event happens. It prepares information to be treated + by the callback function. */ + + params { + @in unsigned int timestamp; /*@ The timestamp of the mouse up event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + object_top_in_rectangle_get { + /*@ + Retrieve the Evas object stacked at the top of a given rectangular + region in a canvas + + @return The Evas object that is over all other objects at the given + rectangular region. + + This function will traverse all the layers of the given canvas, + from top to bottom, querying for objects with areas overlapping + with the given rectangular region inside @p e. The user can remove + from the query objects which are hidden and/or which are set to + pass events. + + @warning This function will @b skip objects parented by smart + objects, acting only on the ones at the "top level", with regard to + object parenting. */ + + const; + return Evas_Object * @warn_unused; + params { + @in Evas_Coord x; /*@ The top left corner's horizontal coordinate for the + rectangular region */ + @in Evas_Coord y; /*@ The top left corner's vertical coordinate for the + rectangular region */ + @in Evas_Coord w; /*@ The width of the rectangular region */ + @in Evas_Coord h; /*@ The height of the rectangular region */ + @in Eina_Bool include_pass_events_objects; /*@ Boolean flag to include or not + objects which pass events in this calculation */ + @in Eina_Bool include_hidden_objects; /*@ Boolean flag to include or not hidden + objects in this calculation */ + } + } + render { + /*@ + Force renderization of the given canvas. + + @ingroup Evas_Canvas */ + + } + event_feed_multi_up { + /*@ No description supplied by the EAPI. */ + params { + @in int d; + @in int x; + @in int y; + @in double rad; + @in double radx; + @in double rady; + @in double pres; + @in double ang; + @in double fx; + @in double fy; + @in Evas_Button_Flags flags; + @in unsigned int timestamp; + @in const void *data; + } + } + font_path_prepend { + /*@ + Prepends a font path to the list of font paths used by the given evas. + @ingroup Evas_Font_Path_Group */ + + params { + @in const char *path @nonull; /*@ The new font path. */ + } + } + obscured_clear { + /*@ + Remove all "obscured regions" from an Evas canvas. + + This function removes all the rectangles from the obscured regions + list of the canvas @p e. It takes obscured areas added with + evas_obscured_rectangle_add() and make them again a regions that @b + have to be repainted on rendering updates. + + @note This is a very low level function, which most of + Evas' users wouldn't care about. + + @note This function does @b not flag the canvas as having its state + changed. If you want to re-render it afterwards expecting new + contents, you have to add "damage" regions yourself (see + evas_damage_rectangle_add()). + + @see evas_obscured_rectangle_add() for an example + @see evas_render_updates() + + @ingroup Evas_Canvas */ + + } + event_feed_mouse_cancel { + /*@ + Mouse cancel event feed. + + This function will call evas_event_feed_mouse_up() when a + mouse cancel event happens. */ + + params { + @in unsigned int timestamp; /*@ The timestamp of the mouse up event. */ + @in const void *data; /*@ The data for canvas. */ + } + } + coord_screen_x_to_world { + /*@ + Convert/scale an output screen co-ordinate into canvas co-ordinates + + @return The screen co-ordinate translated to canvas unit co-ordinates + @ingroup Evas_Coord_Mapping_Group + + This function takes in a horizontal co-ordinate as the @p x + parameter and converts it into canvas units, accounting for output + size, viewport size and location, returning it as the function + return value. If @p e is invalid, the results are undefined. + + Example: + @code + extern Evas *evas; + extern int screen_x; + Evas_Coord canvas_x; + + canvas_x = evas_coord_screen_x_to_world(evas, screen_x); + @endcode */ + + const; + return Evas_Coord @warn_unused; + params { + @in int x; /*@ The screen/output x co-ordinate */ + } + } + key_lock_add { + /*@ + Adds the @p keyname key to the current list of lock keys. + + Locks are keys like caps lock, num lock or scroll lock, i.e., keys + which are meant to be pressed once -- toggling a binary state which + is bound to it -- and thus altering the behavior of all + subsequently pressed keys somehow, depending on its state. Evas is + so that these keys can be defined by the user. + + This allows custom locks to be added to the evas system at run + time. It is then possible to set and unset lock keys + programmatically for other parts of the program to check and act + on. Programmers using Evas would check for lock keys on key event + callbacks using evas_key_lock_is_set(). + + @see evas_key_lock_get + @see evas_key_lock_del + @see evas_key_lock_on + @see evas_key_lock_off + @see evas_key_lock_is_set + + @note If the programmer instantiates the canvas by means of the + ecore_evas_new() family of helper functions, Ecore will take + care of registering on it all standard lock keys: "Caps_Lock", + "Num_Lock", "Scroll_Lock". */ + + params { + @in const char *keyname @nonull; /*@ The name of the key to add to the locks list. */ + } + } + render_idle_flush { + /*@ + Make the canvas discard internally cached data used for rendering. + + This function flushes the arrays of delete, active and render objects. + Other things it may also discard are: shared memory segments, + temporary scratch buffers, cached data to avoid re-compute of that data etc. + + @ingroup Evas_Canvas */ + + } + coord_world_y_to_screen { + /*@ + Convert/scale a canvas co-ordinate into output screen co-ordinates + + @return The output/screen co-ordinate translated to output co-ordinates + @ingroup Evas_Coord_Mapping_Group + + This function takes in a vertical co-ordinate as the @p x parameter + and converts it into output units, accounting for output size, + viewport size and location, returning it as the function return + value. If @p e is invalid, the results are undefined. + + Example: + @code + extern Evas *evas; + int screen_y; + extern Evas_Coord canvas_y; + + screen_y = evas_coord_world_y_to_screen(evas, canvas_y); + @endcode */ + + const; + return int @warn_unused; + params { + @in Evas_Coord y; /*@ The canvas y co-ordinate */ + } + } + } + implements { + Eo_Base::constructor; + Eo_Base::destructor; + Evas_Common_Interface::evas::get; + } + +} diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index bd2285e..3308da2 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -881,26 +881,10 @@ _evas_event_objects_event_list_no_frozen_check(Evas *eo_e, Evas_Object *stop, in return in; } -EAPI Eina_List * -evas_tree_objects_at_xy_get(Evas *eo_e, Evas_Object *stop, int x, int y) +EOLIAN Eina_List* +_evas_tree_objects_at_xy_get(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED, Evas_Object *stop, int x, int y) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Eina_List *list = NULL; - eo_do(eo_e, evas_canvas_tree_objects_at_xy_get(stop, x, y, &list)); - return list; -} - -void -_canvas_tree_objects_at_xy_get(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list) -{ - Evas_Object *stop = va_arg(*list, Evas_Object *); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - Eina_List **in = va_arg(*list, Eina_List **); - - *in = _evas_event_objects_event_list_no_frozen_check(eo_e, stop, x, y); + return _evas_event_objects_event_list_no_frozen_check(eo_e, stop, x, y); } Eina_List * @@ -924,40 +908,16 @@ evas_event_list_copy(Eina_List *list) } /* public functions */ -EAPI void -evas_event_default_flags_set(Evas *eo_e, Evas_Event_Flags flags) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_event_default_flags_set(flags)); -} - -void -_canvas_event_default_flags_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_event_default_flags_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Event_Flags flags) { - Evas_Event_Flags flags = va_arg(*list, Evas_Event_Flags); - Evas_Public_Data *e = _pd; e->default_event_flags = flags; } -EAPI Evas_Event_Flags -evas_event_default_flags_get(const Evas *eo_e) +EOLIAN Evas_Event_Flags +_evas_event_default_flags_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return EVAS_EVENT_FLAG_ON_HOLD; - MAGIC_CHECK_END(); - Evas_Event_Flags flags = EVAS_EVENT_FLAG_ON_HOLD; - eo_do((Eo *)eo_e, evas_canvas_event_default_flags_get(&flags)); - return flags; -} - -void -_canvas_event_default_flags_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Event_Flags *ret = va_arg(*list, Evas_Event_Flags *); - const Evas_Public_Data *e = _pd; - *ret = e->default_event_flags; + return e->default_event_flags; } static inline void @@ -1045,24 +1005,9 @@ evas_event_thaw_eval(Evas *eo_e) } } -EAPI void -evas_event_feed_mouse_down(Evas *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_event_feed_mouse_down(b, flags, timestamp, data)); -} - -void -_canvas_event_feed_mouse_down(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_mouse_down(Eo *eo_e, Evas_Public_Data *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { - int b = va_arg(*list, int); - Evas_Button_Flags flags = va_arg(*list, Evas_Button_Flags); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - Evas_Public_Data *e = _pd; Eina_List *l, *copy; Evas_Event_Mouse_Down ev; Evas_Object *eo_obj; @@ -1282,25 +1227,9 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data) return post_called; } -EAPI void -evas_event_feed_mouse_up(Evas *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_mouse_up(b, flags, timestamp, data)); -} - -void -_canvas_event_feed_mouse_up(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_mouse_up(Eo *eo_e, Evas_Public_Data *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { - int b = va_arg(*list, int); - Evas_Button_Flags flags = va_arg(*list, Evas_Button_Flags); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - Evas_Public_Data *e = _pd; Eina_List *l, *copy; INF("ButtonEvent:up time=%u x=%d y=%d button=%d downs=%d", timestamp, e->pointer.x, e->pointer.y, b, e->pointer.downs); @@ -1395,23 +1324,9 @@ _canvas_event_feed_mouse_up(Eo *eo_e, void *_pd, va_list *list) _evas_unwalk(e); } -EAPI void -evas_event_feed_mouse_cancel(Evas *eo_e, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_mouse_cancel(timestamp, data)); -} - -void -_canvas_event_feed_mouse_cancel(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_mouse_cancel(Eo *eo_e, Evas_Public_Data *e, unsigned int timestamp, const void *data) { - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - Evas_Public_Data *e = _pd; Evas_Coord_Touch_Point *point; Eina_List *l, *ll; int i; @@ -1434,25 +1349,9 @@ _canvas_event_feed_mouse_cancel(Eo *eo_e, void *_pd, va_list *list) _evas_unwalk(e); } -EAPI void -evas_event_feed_mouse_wheel(Evas *eo_e, int direction, int z, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_mouse_wheel(direction, z, timestamp, data)); -} - -void -_canvas_event_feed_mouse_wheel(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_mouse_wheel(Eo *eo_e, Evas_Public_Data *e, int direction, int z, unsigned int timestamp, const void *data) { - int direction = va_arg(*list, int); - int z = va_arg(*list, int); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - Evas_Public_Data *e = _pd; Eina_List *l, *copy; Evas_Event_Mouse_Wheel ev; Evas_Object *eo_obj; @@ -2000,66 +1899,22 @@ nogrep: _evas_unwalk(e); } -EAPI void -evas_event_input_mouse_move(Evas *eo_e, int x, int y, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_input_mouse_move(x, y, timestamp, data)); -} - -void -_canvas_event_input_mouse_move(Eo *eo_e, void *_pd, va_list *list) -{ - int x = va_arg(*list, int); - int y = va_arg(*list, int); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; - - _canvas_event_feed_mouse_move_internal(eo_e, _pd, x - e->framespace.x, y - e->framespace.y, timestamp, data); -} - -EAPI void -evas_event_feed_mouse_move(Evas *eo_e, int x, int y, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_mouse_move(x, y, timestamp, data)); -} - -void -_canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_input_mouse_move(Eo *eo_e, Evas_Public_Data *e, int x, int y, unsigned int timestamp, const void *data) { - int x = va_arg(*list, int); - int y = va_arg(*list, int); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - _canvas_event_feed_mouse_move_internal(eo_e, _pd, x, y, timestamp, data); + _canvas_event_feed_mouse_move_internal(eo_e, e, x - e->framespace.x, y - e->framespace.y, timestamp, data); } -EAPI void -evas_event_feed_mouse_in(Evas *eo_e, unsigned int timestamp, const void *data) +EOLIAN void +_evas_event_feed_mouse_move(Eo *eo_e, Evas_Public_Data *e, int x, int y, unsigned int timestamp, const void *data) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_mouse_in(timestamp, data)); + _canvas_event_feed_mouse_move_internal(eo_e, e, x, y, timestamp, data); } -void -_canvas_event_feed_mouse_in(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_mouse_in(Eo *eo_e, Evas_Public_Data *e, unsigned int timestamp, const void *data) { - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; Eina_List *ins; Eina_List *l; Evas_Event_Mouse_In ev; @@ -2121,23 +1976,10 @@ _canvas_event_feed_mouse_in(Eo *eo_e, void *_pd, va_list *list) _evas_unwalk(e); } -EAPI void -evas_event_feed_mouse_out(Evas *eo_e, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_mouse_out(timestamp, data)); -} - -void -_canvas_event_feed_mouse_out(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_mouse_out(Eo *eo_e, Evas_Public_Data *e, unsigned int timestamp, const void *data) { - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; Evas_Event_Mouse_Out ev; int event_id = 0; @@ -2289,83 +2131,22 @@ _canvas_event_feed_multi_down_internal(Evas *eo_e, void *_pd, _evas_unwalk(e); } -EAPI void -evas_event_input_multi_down(Evas *eo_e, - int d, int x, int y, - double rad, double radx, double rady, - double pres, double ang, - double fx, double fy, - Evas_Button_Flags flags, unsigned int timestamp, - const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_input_multi_down(d, x, y, rad, radx, rady, - pres, ang, fx, fy, flags, - timestamp, data)); -} - -void -_canvas_event_input_multi_down(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_input_multi_down(Eo *eo_e, Evas_Public_Data *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { - int d = va_arg(*list, int); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - double rad = va_arg(*list, double); - double radx = va_arg(*list, double); - double rady = va_arg(*list, double); - double pres = va_arg(*list, double); - double ang = va_arg(*list, double); - double fx = va_arg(*list, double); - double fy = va_arg(*list, double); - Evas_Button_Flags flags = va_arg(*list, Evas_Button_Flags); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; - _canvas_event_feed_multi_down_internal(eo_e, _pd, d, + _canvas_event_feed_multi_down_internal(eo_e, e, d, x - e->framespace.x, y - e->framespace.y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data); } -EAPI void -evas_event_feed_multi_down(Evas *eo_e, - int d, int x, int y, - double rad, double radx, double rady, - double pres, double ang, - double fx, double fy, - Evas_Button_Flags flags, unsigned int timestamp, - const void *data) +EOLIAN void +_evas_event_feed_multi_down(Eo *eo_e, Evas_Public_Data *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_multi_down(d, x, y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data)); -} -void -_canvas_event_feed_multi_down(Eo *eo_e, void *_pd, va_list *list) -{ - int d = va_arg(*list, int); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - double rad = va_arg(*list, double); - double radx = va_arg(*list, double); - double rady = va_arg(*list, double); - double pres = va_arg(*list, double); - double ang = va_arg(*list, double); - double fx = va_arg(*list, double); - double fy = va_arg(*list, double); - Evas_Button_Flags flags = va_arg(*list, Evas_Button_Flags); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - _canvas_event_feed_multi_down_internal(eo_e, _pd, + _canvas_event_feed_multi_down_internal(eo_e, e, d, x, y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data); } @@ -2453,43 +2234,11 @@ _canvas_event_feed_multi_up_internal(Evas *eo_e, void *_pd, _evas_unwalk(e); } -EAPI void -evas_event_input_multi_up(Evas *eo_e, - int d, int x, int y, - double rad, double radx, double rady, - double pres, double ang, - double fx, double fy, - Evas_Button_Flags flags, unsigned int timestamp, - const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_input_multi_up(d, x, y, rad, radx, rady, pres, - ang, fx, fy, flags, timestamp, - data)); -} - -void -_canvas_event_input_multi_up(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_input_multi_up(Eo *eo_e, Evas_Public_Data *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { - int d = va_arg(*list, int); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - double rad = va_arg(*list, double); - double radx = va_arg(*list, double); - double rady = va_arg(*list, double); - double pres = va_arg(*list, double); - double ang = va_arg(*list, double); - double fx = va_arg(*list, double); - double fy = va_arg(*list, double); - Evas_Button_Flags flags = va_arg(*list, Evas_Button_Flags); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; - _canvas_event_feed_multi_up_internal(eo_e, _pd, d, + _canvas_event_feed_multi_up_internal(eo_e, e, d, x - e->framespace.x, y - e->framespace.y, rad, radx, rady, @@ -2497,40 +2246,11 @@ _canvas_event_input_multi_up(Eo *eo_e, void *_pd, va_list *list) data); } -EAPI void -evas_event_feed_multi_up(Evas *eo_e, - int d, int x, int y, - double rad, double radx, double rady, - double pres, double ang, - double fx, double fy, - Evas_Button_Flags flags, unsigned int timestamp, - const void *data) +EOLIAN void +_evas_event_feed_multi_up(Eo *eo_e, Evas_Public_Data *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_multi_up(d, x, y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data)); -} -void -_canvas_event_feed_multi_up(Eo *eo_e, void *_pd, va_list *list) -{ - int d = va_arg(*list, int); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - double rad = va_arg(*list, double); - double radx = va_arg(*list, double); - double rady = va_arg(*list, double); - double pres = va_arg(*list, double); - double ang = va_arg(*list, double); - double fx = va_arg(*list, double); - double fy = va_arg(*list, double); - Evas_Button_Flags flags = va_arg(*list, Evas_Button_Flags); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - _canvas_event_feed_multi_up_internal(eo_e, _pd, d, x, y, rad, radx, rady, + _canvas_event_feed_multi_up_internal(eo_e, e, d, x, y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data); } @@ -2706,104 +2426,29 @@ _canvas_event_feed_multi_move_internal(Eo *eo_e, void *_pd, int d, int x, _evas_unwalk(e); } -EAPI void -evas_event_input_multi_move(Evas *eo_e, - int d, int x, int y, - double rad, double radx, double rady, - double pres, double ang, - double fx, double fy, - unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_input_multi_move(d, x, y, rad, radx, rady, - pres, ang, fx, fy, timestamp, - data)); -} - -void -_canvas_event_input_multi_move(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_input_multi_move(Eo *eo_e, Evas_Public_Data *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data) { - int d = va_arg(*list, int); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - double rad = va_arg(*list, double); - double radx = va_arg(*list, double); - double rady = va_arg(*list, double); - double pres = va_arg(*list, double); - double ang = va_arg(*list, double); - double fx = va_arg(*list, double); - double fy = va_arg(*list, double); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; - _canvas_event_feed_multi_move_internal(eo_e, _pd, d, + _canvas_event_feed_multi_move_internal(eo_e, e, d, x - e->framespace.x, y - e->framespace.y, rad, radx, rady, pres, ang, fx, fy, timestamp, data); } -EAPI void -evas_event_feed_multi_move(Evas *eo_e, - int d, int x, int y, - double rad, double radx, double rady, - double pres, double ang, - double fx, double fy, - unsigned int timestamp, const void *data) +EOLIAN void +_evas_event_feed_multi_move(Eo *eo_e, Evas_Public_Data *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_event_feed_multi_move(d, x, y, rad, radx, rady, - pres, ang, fx, fy, timestamp, - data)); -} - -void -_canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list) -{ - int d = va_arg(*list, int); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - double rad = va_arg(*list, double); - double radx = va_arg(*list, double); - double rady = va_arg(*list, double); - double pres = va_arg(*list, double); - double ang = va_arg(*list, double); - double fx = va_arg(*list, double); - double fy = va_arg(*list, double); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - - _canvas_event_feed_multi_move_internal(eo_e, _pd, d, x, y, rad, radx, rady, + _canvas_event_feed_multi_move_internal(eo_e, e, d, x, y, rad, radx, rady, pres, ang, fx, fy, timestamp, data); } -EAPI void -evas_event_feed_key_down(Evas *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_event_feed_key_down(keyname, key, string, compose, timestamp, data)); -} - -void -_canvas_event_feed_key_down(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_key_down(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { - const char *keyname = va_arg(*list, const char *); - const char *key = va_arg(*list, const char *); - const char *string = va_arg(*list, const char *); - const char *compose = va_arg(*list, const char *); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); int event_id = 0; - Evas_Public_Data *e = _pd; if (!keyname) return; if (e->is_frozen) return; @@ -2896,27 +2541,11 @@ _canvas_event_feed_key_down(Eo *eo_e, void *_pd, va_list *list) _evas_unwalk(e); } -EAPI void -evas_event_feed_key_up(Evas *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_event_feed_key_up(keyname, key, string, compose, timestamp, data)); -} - -void -_canvas_event_feed_key_up(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_key_up(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { - const char *keyname = va_arg(*list, const char *); - const char *key = va_arg(*list, const char *); - const char *string = va_arg(*list, const char *); - const char *compose = va_arg(*list, const char *); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); int event_id = 0; - Evas_Public_Data *e = _pd; if (!keyname) return; if (e->is_frozen) return; e->last_timestamp = timestamp; @@ -3009,20 +2638,10 @@ _canvas_event_feed_key_up(Eo *eo_e, void *_pd, va_list *list) _evas_unwalk(e); } -EAPI void -evas_event_feed_hold(Evas *eo_e, int hold, unsigned int timestamp, const void *data) -{ - eo_do(eo_e, evas_canvas_event_feed_hold(hold, timestamp, data)); -} - -void -_canvas_event_feed_hold(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_event_feed_hold(Eo *eo_e, Evas_Public_Data *e, int hold, unsigned int timestamp, const void *data) { - int hold = va_arg(*list, int); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; Eina_List *l, *copy; Evas_Event_Hold ev; Evas_Object *eo_obj; @@ -3153,17 +2772,9 @@ _evas_object_pointer_mode_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data return obj->pointer_mode; } -EAPI void -evas_event_refeed_event(Evas *eo_e, void *event_copy, Evas_Callback_Type event_type) -{ - eo_do(eo_e, evas_canvas_event_refeed_event(event_copy, event_type)); -} - -void -_canvas_event_refeed_event(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list) +EOLIAN void +_evas_event_refeed_event(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED, void *event_copy, Evas_Callback_Type event_type) { - void *event_copy = va_arg(*list, void *); - Evas_Callback_Type event_type = va_arg(*list, Evas_Callback_Type); if (!event_copy) return; @@ -3240,22 +2851,9 @@ _canvas_event_refeed_event(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list) } } -EAPI int -evas_event_down_count_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - int ret = 0; - eo_do((Eo *)eo_e, evas_canvas_event_down_count_get(&ret)); - return ret; -} - -void -_canvas_event_down_count_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN int +_evas_event_down_count_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - int *ret = va_arg(*list, int *); - const Evas_Public_Data *e = _pd; - *ret = e->pointer.downs; + return e->pointer.downs; } diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c index 2ea81b7..4f529b3 100644 --- a/src/lib/evas/canvas/evas_focus.c +++ b/src/lib/evas/canvas/evas_focus.c @@ -52,22 +52,8 @@ _evas_object_focus_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) return obj->focused; } -EAPI Evas_Object * -evas_focus_get(const Evas *e) +EOLIAN Evas_Object* +_evas_focus_get(Eo *eo_obj EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Evas_Object *ret = NULL; - eo_do((Eo *)e, evas_canvas_focus_get(&ret)); - return ret; + return e->focused; } - -void -_canvas_focus_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Object **ret = va_arg(*list, Evas_Object **); - const Evas_Public_Data *e = _pd; - *ret = e->focused; -} - diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c index 33d3eed..a4d59bc 100644 --- a/src/lib/evas/canvas/evas_font_dir.c +++ b/src/lib/evas/canvas/evas_font_dir.c @@ -1317,19 +1317,9 @@ evas_object_text_font_string_parse(char *buffer, char dest[14][256]) return n; } -EAPI void -evas_font_path_clear(Evas *eo_e) +EOLIAN void +_evas_font_path_clear(Eo *eo_e EINA_UNUSED, Evas_Public_Data *evas) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_font_path_clear()); -} - -void -_canvas_font_path_clear(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Public_Data *evas = _pd; while (evas->font_path) { eina_stringshare_del(evas->font_path->data); @@ -1337,63 +1327,28 @@ _canvas_font_path_clear(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUS } } -EAPI void -evas_font_path_append(Evas *eo_e, const char *path) +EOLIAN void +_evas_font_path_append(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *path) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_font_path_append(path)); -} - -void -_canvas_font_path_append(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - const char *path = va_arg(*list, const char *); - Evas_Public_Data *e = _pd; if (!path) return; e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path)); evas_font_init(); } -EAPI void -evas_font_path_prepend(Evas *eo_e, const char *path) +EOLIAN void +_evas_font_path_prepend(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *path) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_font_path_prepend(path)); -} - -void -_canvas_font_path_prepend(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - const char *path = va_arg(*list, const char *); - Evas_Public_Data *e = _pd; if (!path) return; e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path)); evas_font_init(); } -EAPI const Eina_List * -evas_font_path_list(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - const Eina_List *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_font_path_list(&ret)); - return ret; -} - -void -_canvas_font_path_list(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN const Eina_List* +_evas_font_path_list(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - const Eina_List **ret = va_arg(*list, const Eina_List **); - const Evas_Public_Data *e = _pd; - *ret = e->font_path; + return e->font_path; } EAPI void @@ -1456,22 +1411,11 @@ evas_font_object_rehint(Evas_Object *eo_obj) } } -EAPI void -evas_font_hinting_set(Evas *eo_e, Evas_Font_Hinting_Flags hinting) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_font_hinting_set(hinting)); -} - -void -_canvas_font_hinting_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_font_hinting_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Font_Hinting_Flags hinting) { - Evas_Font_Hinting_Flags hinting = va_arg(*list, Evas_Font_Hinting_Flags); Evas_Layer *lay; - Evas_Public_Data *e = _pd; if (e->hinting == hinting) return; e->hinting = hinting; @@ -1484,119 +1428,47 @@ _canvas_font_hinting_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) } } -EAPI Evas_Font_Hinting_Flags -evas_font_hinting_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return EVAS_FONT_HINTING_BYTECODE; - MAGIC_CHECK_END(); - Evas_Font_Hinting_Flags ret = EVAS_FONT_HINTING_BYTECODE; - eo_do((Eo *)eo_e, evas_canvas_font_hinting_get(&ret)); - return ret; -} - -void -_canvas_font_hinting_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN Evas_Font_Hinting_Flags +_evas_font_hinting_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - Evas_Font_Hinting_Flags *ret = va_arg(*list, Evas_Font_Hinting_Flags *); - const Evas_Public_Data *e = _pd; - *ret = e->hinting; + return e->hinting; } -EAPI Eina_Bool -evas_font_hinting_can_hint(const Evas *eo_e, Evas_Font_Hinting_Flags hinting) +EOLIAN Eina_Bool +_evas_font_hinting_can_hint(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Font_Hinting_Flags hinting) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Eina_Bool ret = 0; - eo_do((Eo *)eo_e, evas_canvas_font_hinting_can_hint(hinting, &ret)); - return ret; -} - -void -_canvas_font_hinting_can_hint(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Font_Hinting_Flags hinting = va_arg(*list, Evas_Font_Hinting_Flags); - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - const Evas_Public_Data *e = _pd; if (e->engine.func->font_hinting_can_hint) - *ret = e->engine.func->font_hinting_can_hint(e->engine.data.output, + return e->engine.func->font_hinting_can_hint(e->engine.data.output, hinting); - else *ret = EINA_FALSE; -} - -EAPI void -evas_font_cache_flush(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_font_cache_flush()); + else return EINA_FALSE; } -void -_canvas_font_cache_flush(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) +EOLIAN void +_evas_font_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - Evas_Public_Data *e = _pd; evas_render_rendering_wait(e); e->engine.func->font_cache_flush(e->engine.data.output); } -EAPI void -evas_font_cache_set(Evas *eo_e, int size) +EOLIAN void +_evas_font_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_font_cache_set(size)); -} - -void -_canvas_font_cache_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - int size = va_arg(*list, int); - Evas_Public_Data *e = _pd; if (size < 0) size = 0; evas_render_rendering_wait(e); e->engine.func->font_cache_set(e->engine.data.output, size); } -EAPI int -evas_font_cache_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - int ret = 0; - eo_do((Eo *)eo_e, evas_canvas_font_cache_get(&ret)); - return ret; -} - -void -_canvas_font_cache_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN int +_evas_font_cache_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - int *ret = va_arg(*list, int *); - const Evas_Public_Data *e = _pd; - *ret = e->engine.func->font_cache_get(e->engine.data.output); -} + return e->engine.func->font_cache_get(e->engine.data.output); -EAPI Eina_List * -evas_font_available_list(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Eina_List *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_font_available_list(&ret)); - return ret; } -void -_canvas_font_available_list(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list) +EOLIAN Eina_List* +_evas_font_available_list(Eo *eo_e, Evas_Public_Data *_pd EINA_UNUSED) { - Eina_List **ret = va_arg(*list, Eina_List **); - *ret = evas_font_dir_available_list(eo_e); + return evas_font_dir_available_list(eo_e); } EAPI void diff --git a/src/lib/evas/canvas/evas_key.c b/src/lib/evas/canvas/evas_key.c index e48bbfe..22c9f2e 100644 --- a/src/lib/evas/canvas/evas_key.c +++ b/src/lib/evas/canvas/evas_key.c @@ -31,42 +31,16 @@ evas_key_lock_number(const Evas_Lock *l, const char *keyname) /* public calls */ -EAPI const Evas_Modifier * -evas_key_modifier_get(const Evas *eo_e) +EOLIAN const Evas_Modifier* +_evas_key_modifier_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - const Evas_Modifier *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_key_modifier_get(&ret)); - return ret; + return &(e->modifiers); } -void -_canvas_key_modifier_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN const Evas_Lock* +_evas_key_lock_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - const Evas_Modifier **ret = va_arg(*list, const Evas_Modifier **); - const Evas_Public_Data *e = _pd; - *ret = &(e->modifiers); -} - -EAPI const Evas_Lock * -evas_key_lock_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - const Evas_Lock *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_key_lock_get(&ret)); - return ret; -} - -void -_canvas_key_lock_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - const Evas_Lock **ret = va_arg(*list, const Evas_Lock **); - const Evas_Public_Data *e = _pd; - *ret = &(e->locks); + return &(e->locks); } EAPI Eina_Bool @@ -101,21 +75,9 @@ evas_key_lock_is_set(const Evas_Lock *l, const char *keyname) return 0; } -EAPI void -evas_key_modifier_add(Evas *eo_e, const char *keyname) +EOLIAN void +_evas_key_modifier_add(Eo *eo_e, Evas_Public_Data *e, const char *keyname) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_modifier_add(keyname)); -} - -void -_canvas_key_modifier_add(Eo *eo_e, void *_pd, va_list *list) -{ - const char *keyname = va_arg(*list, const char *); - - Evas_Public_Data *e = _pd; if (!keyname) return; if (e->modifiers.mod.count >= 64) return; evas_key_modifier_del(eo_e, keyname); @@ -125,22 +87,9 @@ _canvas_key_modifier_add(Eo *eo_e, void *_pd, va_list *list) e->modifiers.mask = 0; } -EAPI void -evas_key_modifier_del(Evas *eo_e, const char *keyname) -{ - if (!eo_e) return; - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_modifier_del(keyname)); -} - -void -_canvas_key_modifier_del(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_key_modifier_del(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *keyname) { - const char *keyname = va_arg(*list, const char *); - - Evas_Public_Data *e = _pd; int i; if (!keyname) return; @@ -160,22 +109,10 @@ _canvas_key_modifier_del(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) } } -EAPI void -evas_key_lock_add(Evas *eo_e, const char *keyname) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_lock_add(keyname)); -} - -void -_canvas_key_lock_add(Eo *eo_e, void *_pd, va_list *list) +EOLIAN void +_evas_key_lock_add(Eo *eo_e, Evas_Public_Data *e, const char *keyname) { - const char *keyname = va_arg(*list, const char *); - if (!keyname) return; - Evas_Public_Data *e = _pd; if (e->locks.lock.count >= 64) return; evas_key_lock_del(eo_e, keyname); e->locks.lock.count++; @@ -184,22 +121,10 @@ _canvas_key_lock_add(Eo *eo_e, void *_pd, va_list *list) e->locks.mask = 0; } -EAPI void -evas_key_lock_del(Evas *eo_e, const char *keyname) +EOLIAN void +_evas_key_lock_del(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *keyname) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_lock_del(keyname)); -} - -void -_canvas_key_lock_del(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - const char *keyname = va_arg(*list, const char *); - int i; - Evas_Public_Data *e = _pd; if (!keyname) return; e->locks.mask = 0; for (i = 0; i < e->locks.lock.count; i++) @@ -218,24 +143,12 @@ _canvas_key_lock_del(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) } } -EAPI void -evas_key_modifier_on(Evas *eo_e, const char *keyname) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_modifier_on(keyname)); -} - -void -_canvas_key_modifier_on(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_key_modifier_on(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *keyname) { - const char *keyname = va_arg(*list, const char *); - Evas_Modifier_Mask num; int n; - Evas_Public_Data *e = _pd; n = (Evas_Modifier_Mask)evas_key_modifier_number(&(e->modifiers), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; @@ -243,24 +156,12 @@ _canvas_key_modifier_on(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) e->modifiers.mask |= num; } -EAPI void -evas_key_modifier_off(Evas *eo_e, const char *keyname) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_modifier_off(keyname)); -} - -void -_canvas_key_modifier_off(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_key_modifier_off(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *keyname) { - const char *keyname = va_arg(*list, const char *); - Evas_Modifier_Mask num; int n; - Evas_Public_Data *e = _pd; n = evas_key_modifier_number(&(e->modifiers), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; @@ -268,24 +169,12 @@ _canvas_key_modifier_off(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) e->modifiers.mask &= ~num; } -EAPI void -evas_key_lock_on(Evas *eo_e, const char *keyname) +EOLIAN void +_evas_key_lock_on(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *keyname) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_lock_on(keyname)); -} - -void -_canvas_key_lock_on(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - const char *keyname = va_arg(*list, const char *); - Evas_Modifier_Mask num; int n; - Evas_Public_Data *e = _pd; n = evas_key_lock_number(&(e->locks), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; @@ -293,24 +182,12 @@ _canvas_key_lock_on(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) e->locks.mask |= num; } -EAPI void -evas_key_lock_off(Evas *eo_e, const char *keyname) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_key_lock_off(keyname)); -} - -void -_canvas_key_lock_off(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_key_lock_off(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *keyname) { - const char *keyname = va_arg(*list, const char *); - Evas_Modifier_Mask num; int n; - Evas_Public_Data *e = _pd; n = evas_key_lock_number(&(e->locks), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; @@ -320,35 +197,17 @@ _canvas_key_lock_off(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) /* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */ -EAPI Evas_Modifier_Mask -evas_key_modifier_mask_get(const Evas *eo_e, const char *keyname) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Evas_Modifier_Mask ret = 0; - eo_do((Eo *)eo_e, evas_canvas_key_modifier_mask_get(keyname, &ret)); - return ret; -} - -void -_canvas_key_modifier_mask_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN Evas_Modifier_Mask +_evas_key_modifier_mask_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *keyname) { - const char *keyname = va_arg(*list, const char *); - Evas_Modifier_Mask *ret = va_arg(*list, Evas_Modifier_Mask *); Evas_Modifier_Mask num; int n; - *ret = 0; - if (!keyname) return; - const Evas_Public_Data *e = _pd; + if (!keyname) return 0; n = evas_key_modifier_number(&(e->modifiers), keyname); - if (n < 0) - { - *ret = 0; - return; - } + if (n < 0) return 0; num = (Evas_Modifier_Mask)n; - *ret = 1 << num; + return 1 << num; } + diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 07a5f19..ef270e2 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -5,8 +5,6 @@ #include "evas_cs2_private.h" #endif -EAPI Eo_Op EVAS_CANVAS_BASE_ID = EO_NOOP; - #define MY_CLASS EVAS_CLASS #ifdef LKDEBUG @@ -151,12 +149,11 @@ evas_new(void) return eo_obj; } -static void -_constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_constructor(Eo *eo_obj, Evas_Public_Data *e) { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Public_Data *e = class_data; e->evas = eo_obj; e->output.render_method = RENDER_METHOD_INVALID; e->viewport.w = 1; @@ -201,10 +198,9 @@ evas_free(Evas *eo_e) eo_unref(eo_e); } -static void -_destructor(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_destructor(Eo *eo_e, Evas_Public_Data *e) { - Evas_Public_Data *e = _pd; Eina_Rectangle *r; Evas_Coord_Touch_Point *touch_point; Evas_Layer *lay; @@ -310,22 +306,10 @@ _destructor(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) eo_do_super(eo_e, MY_CLASS, eo_destructor()); } -EAPI void -evas_output_method_set(Evas *eo_e, int render_method) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_output_method_set(render_method)); -} - -static void -_canvas_output_method_set(Eo *eo_e, void *_pd, va_list *list) +EOLIAN static void +_evas_output_method_set(Eo *eo_e, Evas_Public_Data *e, int render_method) { - int render_method = va_arg(*list, int); - Evas_Module *em; - Evas_Public_Data *e = _pd; /* if our engine to set it to is invalid - abort */ if (render_method == RENDER_METHOD_INVALID) return; @@ -349,99 +333,38 @@ _canvas_output_method_set(Eo *eo_e, void *_pd, va_list *list) return; } -EAPI int -evas_output_method_get(const Evas *eo_e) +EOLIAN static int +_evas_output_method_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return RENDER_METHOD_INVALID; - MAGIC_CHECK_END(); - int ret = RENDER_METHOD_INVALID; - eo_do((Eo *)eo_e, evas_canvas_output_method_get(&ret)); - return ret; + return e->output.render_method; } -static void -_canvas_output_method_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Evas_Engine_Info* +_evas_engine_info_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - int *ret = va_arg(*list, int *); - const Evas_Public_Data *e = _pd; - *ret = e->output.render_method; -} - -EAPI Evas_Engine_Info * -evas_engine_info_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Evas_Engine_Info *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_engine_info_get(&ret)); - return ret; -} - -static void -_canvas_engine_info_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Engine_Info **ret = va_arg(*list, Evas_Engine_Info **); - Evas_Engine_Info *info; - const Evas_Public_Data *e = _pd; - if (!e->engine.info) - { - *ret = NULL; - return; - } + if (!e->engine.info) return NULL; info = e->engine.info; ((Evas_Public_Data *)e)->engine.info_magic = info->magic; - *ret = info; + return info; } -EAPI Eina_Bool -evas_engine_info_set(Evas *eo_e, Evas_Engine_Info *info) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return EINA_FALSE; - MAGIC_CHECK_END(); - Eina_Bool ret = EINA_FALSE; - eo_do(eo_e, evas_canvas_engine_info_set(info, &ret)); - return ret; -} - -static void -_canvas_engine_info_set(Eo *eo_e, void *_pd, va_list *list) +EOLIAN static Eina_Bool +_evas_engine_info_set(Eo *eo_e, Evas_Public_Data *e, Evas_Engine_Info *info) { - Evas_Engine_Info *info = va_arg(*list, Evas_Engine_Info *); - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - if (ret) *ret = EINA_FALSE; - Evas_Public_Data *e = _pd; - if (!info) return; - if (info != e->engine.info) return; - if (info->magic != e->engine.info_magic) return; - - Eina_Bool int_ret = (Eina_Bool)e->engine.func->setup(eo_e, info); - if (ret) *ret = int_ret; -} + if (!info) return EINA_FALSE; + if (info != e->engine.info) return EINA_FALSE; + if (info->magic != e->engine.info_magic) return EINA_FALSE; -EAPI void -evas_output_size_set(Evas *eo_e, int w, int h) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_output_size_set(w, h)); + return (Eina_Bool)e->engine.func->setup(eo_e, info); } -static void -_canvas_output_size_set(Eo *eo_e, void *_pd, va_list *list) +EOLIAN static void +_evas_output_size_set(Eo *eo_e, Evas_Public_Data *e, int w, int h) { - int w = va_arg(*list, int); - int h = va_arg(*list, int); - - Evas_Public_Data *e = _pd; - if ((w == e->output.w) && (h == e->output.h)) return; if (w < 1) w = 1; if (h < 1) h = 1; @@ -454,48 +377,16 @@ _canvas_output_size_set(Eo *eo_e, void *_pd, va_list *list) evas_render_invalidate(eo_e); } -EAPI void -evas_output_size_get(const Evas *eo_e, int *w, int *h) +EOLIAN static void +_evas_output_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int *w, int *h) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_e, evas_canvas_output_size_get(w, h)); -} - -static void -_canvas_output_size_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - int *w = va_arg(*list, int *); - int *h = va_arg(*list, int *); - - const Evas_Public_Data *e = _pd; - if (w) *w = e->output.w; if (h) *h = e->output.h; } -EAPI void -evas_output_viewport_set(Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_output_viewport_set(x, y, w, h)); -} - -static void -_canvas_output_viewport_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_evas_output_viewport_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - - Evas_Public_Data *e = _pd; - if ((x == e->viewport.x) && (y == e->viewport.y) && (w == e->viewport.w) && (h == e->viewport.h)) return; if (w <= 0) return; @@ -515,54 +406,18 @@ _canvas_output_viewport_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) e->changed = 1; } -EAPI void -evas_output_viewport_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +EOLIAN static void +_evas_output_viewport_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_e, evas_canvas_output_viewport_get(x, y, w, h)); -} - -static void -_canvas_output_viewport_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - Evas_Coord *w = va_arg(*list, Evas_Coord *); - Evas_Coord *h = va_arg(*list, Evas_Coord *); - - const Evas_Public_Data *e = _pd; - if (x) *x = e->viewport.x; if (y) *y = e->viewport.y; if (w) *w = e->viewport.w; if (h) *h = e->viewport.h; } -EAPI void -evas_output_framespace_set(Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +EOLIAN static void +_evas_output_framespace_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_output_framespace_set(x, y, w, h)); -} - -static void -_canvas_output_framespace_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - - Evas_Public_Data *e = _pd; - if ((x == e->framespace.x) && (y == e->framespace.y) && (w == e->framespace.w) && (h == e->framespace.h)) return; e->framespace.x = x; @@ -574,121 +429,41 @@ _canvas_output_framespace_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) e->changed = 1; } -EAPI void -evas_output_framespace_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_e, evas_canvas_output_framespace_get(x, y, w, h)); -} - -static void -_canvas_output_framespace_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_evas_output_framespace_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - Evas_Coord *w = va_arg(*list, Evas_Coord *); - Evas_Coord *h = va_arg(*list, Evas_Coord *); - - const Evas_Public_Data *e = _pd; - if (x) *x = e->framespace.x; if (y) *y = e->framespace.y; if (w) *w = e->framespace.w; if (h) *h = e->framespace.h; } -EAPI Evas_Coord -evas_coord_screen_x_to_world(const Evas *eo_e, int x) +EOLIAN static Evas_Coord +_evas_coord_screen_x_to_world(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int x) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Evas_Coord ret = 0; - eo_do((Eo *)eo_e, evas_canvas_coord_screen_x_to_world(x, &ret)); - return ret; + if (e->output.w == e->viewport.w) return e->viewport.x + x; + else return (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w); } -static void -_canvas_coord_screen_x_to_world(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Evas_Coord +_evas_coord_screen_y_to_world(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int y) { - int x = va_arg(*list, int); - Evas_Coord *ret = va_arg(*list, Evas_Coord *); - - const Evas_Public_Data *e = _pd; - if (e->output.w == e->viewport.w) *ret = e->viewport.x + x; - else *ret = (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w); + if (e->output.h == e->viewport.h) return e->viewport.y + y; + else return (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h); } -EAPI Evas_Coord -evas_coord_screen_y_to_world(const Evas *eo_e, int y) +EOLIAN static int +_evas_coord_world_x_to_screen(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Evas_Coord ret = 0; - eo_do((Eo *)eo_e, evas_canvas_coord_screen_y_to_world(y, &ret)); - return ret; + if (e->output.w == e->viewport.w) return x - e->viewport.x; + else return (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) / (long long)e->viewport.w); } -static void -_canvas_coord_screen_y_to_world(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static int +_evas_coord_world_y_to_screen(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord y) { - int y = va_arg(*list, int); - Evas_Coord *ret = va_arg(*list, Evas_Coord *); - - const Evas_Public_Data *e = _pd; - if (e->output.h == e->viewport.h) *ret = e->viewport.y + y; - else *ret = (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h); -} - -EAPI int -evas_coord_world_x_to_screen(const Evas *eo_e, Evas_Coord x) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Evas_Coord ret = 0; - eo_do((Eo *)eo_e, evas_canvas_coord_world_x_to_screen(x, &ret)); - return ret; -} - -static void -_canvas_coord_world_x_to_screen(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord x = va_arg(*list, Evas_Coord); - int *ret = va_arg(*list, int *); - - const Evas_Public_Data *e = _pd; - if (e->output.w == e->viewport.w) *ret = x - e->viewport.x; - else *ret = (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) / (long long)e->viewport.w); -} - -EAPI int -evas_coord_world_y_to_screen(const Evas *eo_e, Evas_Coord y) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Evas_Coord ret = 0; - eo_do((Eo *)eo_e, evas_canvas_coord_world_y_to_screen(y, &ret)); - return ret; -} - -static void -_canvas_coord_world_y_to_screen(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord y = va_arg(*list, Evas_Coord); - int *ret = va_arg(*list, int *); - - const Evas_Public_Data *e = _pd; - if (e->output.h == e->viewport.h) *ret = y - e->viewport.y; - else *ret = (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) / (long long)e->viewport.h); + if (e->output.h == e->viewport.h) return y - e->viewport.y; + else return (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) / (long long)e->viewport.h); } EAPI int @@ -737,203 +512,75 @@ evas_object_image_extension_can_load_fast_get(const char *file) return evas_common_extension_can_load_get(file); } -EAPI void -evas_pointer_output_xy_get(const Evas *eo_e, int *x, int *y) +EOLIAN static void +_evas_pointer_output_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int *x, int *y) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_e, evas_canvas_pointer_output_xy_get(x, y)); -} - -static void -_canvas_pointer_output_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - int *x = va_arg(*list, int *); - int *y = va_arg(*list, int *); - const Evas_Public_Data *e = _pd; if (x) *x = e->pointer.x; if (y) *y = e->pointer.y; } -EAPI void -evas_pointer_canvas_xy_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y) +EOLIAN static void +_evas_pointer_canvas_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord *x, Evas_Coord *y) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_e, evas_canvas_pointer_canvas_xy_get(x, y)); -} - -static void -_canvas_pointer_canvas_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - - const Evas_Public_Data *e = _pd; if (x) *x = e->pointer.x; if (y) *y = e->pointer.y; } -EAPI int -evas_pointer_button_down_mask_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - int ret = 0; - eo_do((Eo *)eo_e, evas_canvas_pointer_button_down_mask_get(&ret)); - return ret; -} - -static void -_canvas_pointer_button_down_mask_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - int *ret = va_arg(*list, int *); - - const Evas_Public_Data *e = _pd; - *ret = (int)e->pointer.button; -} - -EAPI Eina_Bool -evas_pointer_inside_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Eina_Bool ret = EINA_FALSE; - eo_do((Eo *)eo_e, evas_canvas_pointer_inside_get(&ret)); - return ret; -} - -static void -_canvas_pointer_inside_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static int +_evas_pointer_button_down_mask_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - - const Evas_Public_Data *e = _pd; - *ret = e->pointer.inside; + return (int)e->pointer.button; } -EAPI void -evas_data_attach_set(Evas *eo_e, void *data) +EOLIAN static Eina_Bool +_evas_pointer_inside_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_data_attach_set(data)); + return e->pointer.inside; } -static void -_canvas_data_attach_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_evas_data_attach_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, void *data) { - void *data = va_arg(*list, void *); - Evas_Public_Data *e = _pd; e->attach_data = data; } -EAPI void * -evas_data_attach_get(const Evas *eo_e) +EOLIAN static void* +_evas_data_attach_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - void *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_data_attach_get(&ret)); - return ret; + return e->attach_data; } -static void -_canvas_data_attach_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_evas_focus_in(Eo *eo_e, Evas_Public_Data *e) { - void **ret = va_arg(*list, void **); - const Evas_Public_Data *e = _pd; - *ret = e->attach_data; -} - -EAPI void -evas_focus_in(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_focus_in()); -} - -static void -_canvas_focus_in(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Public_Data *e = _pd; if (e->focus) return; e->focus = 1; evas_event_callback_call(eo_e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL); } -EAPI void -evas_focus_out(Evas *eo_e) +EOLIAN static void +_evas_focus_out(Eo *eo_e, Evas_Public_Data *e) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_focus_out()); -} - -static void -_canvas_focus_out(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Public_Data *e = _pd; if (!e->focus) return; e->focus = 0; evas_event_callback_call(eo_e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL); } -EAPI Eina_Bool -evas_focus_state_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - Eina_Bool ret = 0; - eo_do((Eo *)eo_e, evas_canvas_focus_state_get(&ret)); - return ret; -} - -static void -_canvas_focus_state_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - const Evas_Public_Data *e = _pd; - *ret = e->focus; -} - -EAPI void -evas_nochange_push(Evas *eo_e) +EOLIAN static Eina_Bool +_evas_focus_state_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - eo_do(eo_e, evas_canvas_nochange_push()); + return e->focus; } -static void -_canvas_nochange_push(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_nochange_push(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - Evas_Public_Data *e = _pd; e->nochange++; } -EAPI void -evas_nochange_pop(Evas *eo_e) +EOLIAN static void +_evas_nochange_pop(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - eo_do(eo_e, evas_canvas_nochange_pop()); -} - -static void -_canvas_nochange_pop(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Public_Data *e = _pd; e->nochange--; } @@ -1012,236 +659,10 @@ evas_data_argb_unpremul(unsigned int *data, unsigned int len) evas_common_convert_argb_unpremul(data, len); } -static void -_evas_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static Evas * +_evas_evas_common_interface_evas_get(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED) { - Evas **evas = va_arg(*list, Evas **); - if (evas) *evas = (Evas *)eo_obj; + return (Evas *)eo_e; } -static void -_class_constructor(Eo_Class *klass) -{ - const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), - EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), - EO_OP_FUNC(EVAS_COMMON_ID(EVAS_COMMON_SUB_ID_EVAS_GET), _evas_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_SET), _canvas_output_method_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_GET), _canvas_output_method_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_GET), _canvas_engine_info_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_SET), _canvas_engine_info_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_SET), _canvas_output_size_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_GET), _canvas_output_size_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_SET), _canvas_output_viewport_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_GET), _canvas_output_viewport_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_SET), _canvas_output_framespace_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_GET), _canvas_output_framespace_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_SCREEN_X_TO_WORLD), _canvas_coord_screen_x_to_world), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_SCREEN_Y_TO_WORLD), _canvas_coord_screen_y_to_world), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_WORLD_X_TO_SCREEN), _canvas_coord_world_x_to_screen), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_WORLD_Y_TO_SCREEN), _canvas_coord_world_y_to_screen), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_OUTPUT_XY_GET), _canvas_pointer_output_xy_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_CANVAS_XY_GET), _canvas_pointer_canvas_xy_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_BUTTON_DOWN_MASK_GET), _canvas_pointer_button_down_mask_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_INSIDE_GET), _canvas_pointer_inside_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_DATA_ATTACH_SET), _canvas_data_attach_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_DATA_ATTACH_GET), _canvas_data_attach_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_IN), _canvas_focus_in), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_OUT), _canvas_focus_out), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_STATE_GET), _canvas_focus_state_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_NOCHANGE_PUSH), _canvas_nochange_push), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_NOCHANGE_POP), _canvas_nochange_pop), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_SET), _canvas_event_default_flags_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_GET), _canvas_event_default_flags_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_DOWN), _canvas_event_feed_mouse_down), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_UP), _canvas_event_feed_mouse_up), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_CANCEL), _canvas_event_feed_mouse_cancel), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_WHEEL), _canvas_event_feed_mouse_wheel), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MOUSE_MOVE), _canvas_event_input_mouse_move), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_MOVE), _canvas_event_feed_mouse_move), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_IN), _canvas_event_feed_mouse_in), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_OUT), _canvas_event_feed_mouse_out), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_DOWN), _canvas_event_feed_multi_down), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP), _canvas_event_feed_multi_up), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_MOVE), _canvas_event_feed_multi_move), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_DOWN), _canvas_event_input_multi_down), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_UP), _canvas_event_input_multi_up), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_MOVE), _canvas_event_input_multi_move), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_DOWN), _canvas_event_feed_key_down), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_UP), _canvas_event_feed_key_up), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_HOLD), _canvas_event_feed_hold), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_REFEED_EVENT), _canvas_event_refeed_event), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_DOWN_COUNT_GET), _canvas_event_down_count_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_GET), _canvas_focus_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_CLEAR), _canvas_font_path_clear), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_APPEND), _canvas_font_path_append), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_PREPEND), _canvas_font_path_prepend), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_LIST), _canvas_font_path_list), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_HINTING_SET), _canvas_font_hinting_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_HINTING_GET), _canvas_font_hinting_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_HINTING_CAN_HINT), _canvas_font_hinting_can_hint), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_CACHE_FLUSH), _canvas_font_cache_flush), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_CACHE_SET), _canvas_font_cache_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_CACHE_GET), _canvas_font_cache_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_AVAILABLE_LIST), _canvas_font_available_list), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_GET), _canvas_key_modifier_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_GET), _canvas_key_lock_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ADD), _canvas_key_modifier_add), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_DEL), _canvas_key_modifier_del), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_ADD), _canvas_key_lock_add), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_DEL), _canvas_key_lock_del), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ON), _canvas_key_modifier_on), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_OFF), _canvas_key_modifier_off), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_ON), _canvas_key_lock_on), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_OFF), _canvas_key_lock_off), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_MASK_GET), _canvas_key_modifier_mask_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_DAMAGE_RECTANGLE_ADD), _canvas_damage_rectangle_add), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBSCURED_RECTANGLE_ADD), _canvas_obscured_rectangle_add), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBSCURED_CLEAR), _canvas_obscured_clear), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_UPDATES), _canvas_render_updates), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER), _canvas_render), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_NORENDER), _canvas_norender), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_IDLE_FLUSH), _canvas_render_idle_flush), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SYNC), _canvas_sync), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_DUMP), _canvas_render_dump), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_BOTTOM_GET), _canvas_object_bottom_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_TOP_GET), _canvas_object_top_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_COUNT), _canvas_touch_point_list_count), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_XY_GET), _canvas_touch_point_list_nth_xy_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_ID_GET), _canvas_touch_point_list_nth_id_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_STATE_GET), _canvas_touch_point_list_nth_state_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_FLUSH), _canvas_image_cache_flush), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_RELOAD), _canvas_image_cache_reload), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_SET), _canvas_image_cache_set), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_GET), _canvas_image_cache_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_MAX_SIZE_GET), _canvas_image_max_size_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_NAME_FIND), _canvas_object_name_find), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_TOP_AT_XY_GET), _canvas_object_top_at_xy_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_TOP_IN_RECTANGLE_GET), _canvas_object_top_in_rectangle_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECTS_AT_XY_GET), _canvas_objects_at_xy_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECTS_IN_RECTANGLE_GET), _canvas_objects_in_rectangle_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE), _canvas_smart_objects_calculate), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET), _canvas_smart_objects_calculate_count_get), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_ASYNC), _canvas_render_async), - EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TREE_OBJECTS_AT_XY_GET), _canvas_tree_objects_at_xy_get), - EO_OP_FUNC_SENTINEL - }; - - eo_class_funcs_set(klass, func_desc); -} - -static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_SET, "Sets the output engine for the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_GET, "Retrieves the number of the output engine used for the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_ENGINE_INFO_GET, "Retrieves the current render engine info struct from the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_ENGINE_INFO_SET, "Applies the engine settings for the given evas from the given Evas_Engine_Info structure."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_SET, "Sets the output size of the render engine of the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_GET, "Retrieve the output size of the render engine of the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_SET, "Sets the output viewport of the given evas in evas units."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_GET, "Get the render engine's output viewport co-ordinates in canvas units."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_SET, "Sets the output framespace size of the render engine of the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_GET, "Get the render engine's output framespace co-ordinates in canvas units."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_COORD_SCREEN_X_TO_WORLD, "Convert/scale an output screen co-ordinate into canvas co-ordinates"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_COORD_SCREEN_Y_TO_WORLD, "Convert/scale an output screen co-ordinate into canvas co-ordinates"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_COORD_WORLD_X_TO_SCREEN, "Convert/scale a canvas co-ordinate into output screen co-ordinates"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_COORD_WORLD_Y_TO_SCREEN, "Convert/scale a canvas co-ordinate into output screen co-ordinates"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_POINTER_OUTPUT_XY_GET, "This function returns the current known pointer co-ordinates"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_POINTER_CANVAS_XY_GET, "This function returns the current known pointer co-ordinates"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_POINTER_BUTTON_DOWN_MASK_GET, "Returns a bitmask with the mouse buttons currently pressed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_POINTER_INSIDE_GET, "Returns whether the mouse pointer is logically inside the canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_DATA_ATTACH_SET, "Attaches a specific pointer to the evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_DATA_ATTACH_GET, "Returns the pointer attached by evas_data_attach_set()."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FOCUS_IN, "Inform to the evas that it got the focus."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FOCUS_OUT, "Inform to the evas that it lost the focus."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FOCUS_STATE_GET, "Get the focus state known by the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_NOCHANGE_PUSH, "Push the nochange flag up 1."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_NOCHANGE_POP, "Pop the nochange flag down 1."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_SET, "Set the default set of flags an event begins with."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_GET, "Get the defaulty set of flags an event begins with."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_DOWN, "Mouse down event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_UP, "Mouse up event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_CANCEL, "Mouse cancel event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_WHEEL, "Mouse wheel event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MOUSE_MOVE, "Mouse move event fed from input (only Ecore_Evas_Input should use it)."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_MOVE, "Mouse move event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_IN, "Mouse in event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_OUT, "Mouse out event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_DOWN, "Multi down event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP, "Multi up event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_MOVE, "Multi move event feed."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_DOWN, "Multi down event input."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_UP, "Multi up event input."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_MOVE, "Multi move event input."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_DOWN, "Key down event feed"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_UP, "Key up event feed"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_HOLD, "Hold event feed"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_REFEED_EVENT, "Re feed event."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_DOWN_COUNT_GET, "Get the number of mouse or multi presses currently active."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FOCUS_GET, "Retrieve the object that currently has focus."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_PATH_CLEAR, "Removes all font paths loaded into memory for the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_PATH_APPEND, "Appends a font path to the list of font paths used by the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_PATH_PREPEND, "Prepends a font path to the list of font paths used by the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_PATH_LIST, "Retrieves the list of font paths used by the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_HINTING_SET, "Changes the font hinting for the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_HINTING_GET, "Retrieves the font hinting used by the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_HINTING_CAN_HINT, "Checks if the font hinting is supported by the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_CACHE_FLUSH, "Force the given evas and associated engine to flush its font cache."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_CACHE_SET, "Changes the size of font cache of the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_CACHE_GET, "Changes the size of font cache of the given evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_FONT_AVAILABLE_LIST, "List of available font descriptions known or found by this evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_GET, "Returns a handle to the list of modifier keys registered."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_LOCK_GET, "Returns a handle to the list of lock keys registered in the canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ADD, "Adds the keyname key to the current list of modifier keys."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_DEL, "Removes the keyname key from the current list of modifier keys."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_LOCK_ADD, "Adds the keyname key to the current list of lock keys."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_LOCK_DEL, "Removes the keyname key from the current list of lock keys."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ON, "Enables or turns on programmatically the modifier key with name keyname."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_OFF, "Disables or turns off programmatically the modifier key with name keyname."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_LOCK_ON, "Enables or turns on programmatically the lock key with name keyname."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_LOCK_OFF, "Disables or turns off programmatically the lock key with name keyname."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_MASK_GET, "Creates a bit mask from the keyname modifier key."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_DAMAGE_RECTANGLE_ADD, "Add a damage rectangle."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBSCURED_RECTANGLE_ADD, "Add an obscured region to an Evas canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBSCURED_CLEAR, "Remove all obscured regions from an Evas canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_RENDER_UPDATES, "Force immediate renderization of the given Evas canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_RENDER, "Force renderization of the given canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_NORENDER, "Update the canvas internal objects but not triggering immediate."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_RENDER_IDLE_FLUSH, "Make the canvas discard internally cached data used for rendering."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_SYNC, "Force evas render to be synchronized (in case it is asynchronous)."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_RENDER_DUMP, "Make the canvas discard as much data as possible used by the engine at"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBJECT_BOTTOM_GET, "Get the lowest (stacked) Evas object on the canvas e."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBJECT_TOP_GET, "Get the highest (stacked) Evas object on the canvas e."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_COUNT, "Get the number of touched point in the evas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_XY_GET, "This function returns the nth touch point's co-ordinates."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_ID_GET, "This function returns the id of nth touch point."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_STATE_GET, "This function returns the state of nth touch point."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_FLUSH, "Flush the image cache of the canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_RELOAD, "Reload the image cache"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_SET, "Set the image cache."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_GET, "Get the image cache"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_IMAGE_MAX_SIZE_GET, "Get the maximum image size evas can possibly handle"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBJECT_NAME_FIND, "Retrieves the object on the given evas with the given name."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBJECT_TOP_AT_XY_GET, "Retrieve the Evas object stacked at the top of a given position in"), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBJECT_TOP_IN_RECTANGLE_GET, "Retrieve the Evas object stacked at the top of a given rectangulari region in a canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBJECTS_AT_XY_GET, "Retrieve a list of Evas objects lying over a given position in a canvas."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_OBJECTS_IN_RECTANGLE_GET, "Retrieves the objects in the given rectangle region."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE, "Call user-provided calculate() smart functions."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET, "Get the internal counter that counts the number of smart calculations."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_RENDER_ASYNC, "Renders the canvas asynchronously."), - EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_TREE_OBJECTS_AT_XY_GET, "Retrieve a list of Evas objects lying over a given position in a canvas."), - EO_OP_DESCRIPTION_SENTINEL -}; - -static const Eo_Class_Description class_desc = { - EO_VERSION, - "Evas", - EO_CLASS_TYPE_REGULAR, - EO_CLASS_DESCRIPTION_OPS(&EVAS_CANVAS_BASE_ID, op_desc, EVAS_CANVAS_SUB_ID_LAST), - NULL, - sizeof(Evas_Public_Data), - _class_constructor, - NULL -}; - -EO_DEFINE_CLASS(evas_class_get, &class_desc, EO_BASE_CLASS, EVAS_COMMON_CLASS, NULL); - +#include "canvas/evas.eo.c" diff --git a/src/lib/evas/canvas/evas_name.c b/src/lib/evas/canvas/evas_name.c index 5972ae4..b8289c6 100644 --- a/src/lib/evas/canvas/evas_name.c +++ b/src/lib/evas/canvas/evas_name.c @@ -24,25 +24,11 @@ _evas_object_name_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) return obj->name; } -EAPI Evas_Object * -evas_object_name_find(const Evas *e, const char *name) +EOLIAN Evas_Object* +_evas_object_name_find(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *name) { - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Evas_Object *ret = NULL; - eo_do((Eo *)e, evas_canvas_object_name_find(name, &ret)); - return ret; -} - -void -_canvas_object_name_find(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - const char *name = va_arg(*list, const char *); - Evas_Object **ret = va_arg(*list, Evas_Object **); - const Evas_Public_Data *e = _pd; - if (!name) *ret = NULL; - else *ret = (Evas_Object *)eina_hash_find(e->name_hash, name); + if (!name) return NULL; + else return (Evas_Object *)eina_hash_find(e->name_hash, name); } static Evas_Object * diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 8818df9..dd45b0c 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -3024,33 +3024,16 @@ _image_animated_frame_set(Eo *eo_obj, void *_pd, va_list *list) } -EAPI void -evas_image_cache_flush(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_image_cache_flush()); -} - -void -_canvas_image_cache_flush(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) +EOLIAN void +_evas_image_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - Evas_Public_Data *e = _pd; evas_render_rendering_wait(e); e->engine.func->image_cache_flush(e->engine.data.output); } -EAPI void -evas_image_cache_reload(Evas *eo_e) -{ - eo_do(eo_e, evas_canvas_image_cache_reload()); -} - -void -_canvas_image_cache_reload(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) +EOLIAN void +_evas_image_cache_reload(Eo *eo_e, Evas_Public_Data *e) { - Evas_Public_Data *e = _pd; Evas_Layer *layer; evas_image_cache_flush(eo_e); @@ -3086,72 +3069,32 @@ _canvas_image_cache_reload(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) evas_image_cache_flush(eo_e); } -EAPI void -evas_image_cache_set(Evas *eo_e, int size) +EOLIAN void +_evas_image_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_image_cache_set(size)); -} - -void -_canvas_image_cache_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - int size = va_arg(*list, int); - Evas_Public_Data *e = _pd; if (size < 0) size = 0; evas_render_rendering_wait(e); e->engine.func->image_cache_set(e->engine.data.output, size); } -EAPI int -evas_image_cache_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - int ret = 0; - eo_do((Eo *)eo_e, evas_canvas_image_cache_get(&ret)); - return ret; -} - -void -_canvas_image_cache_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN int +_evas_image_cache_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - int *ret = va_arg(*list, int *); - const Evas_Public_Data *e = _pd; - *ret = e->engine.func->image_cache_get(e->engine.data.output); + return e->engine.func->image_cache_get(e->engine.data.output); } -EAPI Eina_Bool -evas_image_max_size_get(const Evas *eo_e, int *maxw, int *maxh) +EOLIAN Eina_Bool +_evas_image_max_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int *maxw, int *maxh) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return EINA_FALSE; - MAGIC_CHECK_END(); - Eina_Bool ret = EINA_FALSE; - eo_do((Eo *)eo_e, evas_canvas_image_max_size_get(maxw, maxh, &ret)); - return ret; -} - -void -_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - int *maxw = va_arg(*list, int *); - int *maxh = va_arg(*list, int *); - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - if (ret) *ret = EINA_FALSE; int w = 0, h = 0; - const Evas_Public_Data *e = _pd; if (maxw) *maxw = 0xffff; if (maxh) *maxh = 0xffff; - if (!e->engine.func->image_max_size_get) return; + if (!e->engine.func->image_max_size_get) return EINA_FALSE; e->engine.func->image_max_size_get(e->engine.data.output, &w, &h); if (maxw) *maxw = w; if (maxh) *maxh = h; - if (ret) *ret = EINA_TRUE; + return EINA_TRUE; } /* all nice and private */ diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index a8edc7c..18ec09d 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -1579,29 +1579,11 @@ _evas_object_evas_common_interface_evas_get(Eo *eo_obj EINA_UNUSED, Evas_Object_ return obj->layer->evas->evas; } -EAPI Evas_Object * -evas_object_top_at_xy_get(const Evas *eo_e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) +EOLIAN Evas_Object* +_evas_object_top_at_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Evas_Object *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_object_top_at_xy_get(x, y, include_pass_events_objects, include_hidden_objects, &ret)); - return ret; -} - -void -_canvas_object_top_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Eina_Bool include_pass_events_objects = va_arg(*list, int); - Eina_Bool include_hidden_objects = va_arg(*list, int); - Evas_Object **ret = va_arg(*list, Evas_Object **); - Evas_Layer *lay; int xx, yy; - const Evas_Public_Data *e = _pd; xx = x; yy = y; @@ -1622,14 +1604,10 @@ _canvas_object_top_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) if ((!include_hidden_objects) && (!obj->cur->visible)) continue; evas_object_clip_recalc(obj); if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, 1, 1)) && - (!obj->clip.clipees)) - { - *ret = eo_obj; - return; - } + (!obj->clip.clipees)) return eo_obj; } } - *ret = NULL; + return NULL; } EAPI Evas_Object * @@ -1643,29 +1621,9 @@ evas_object_top_at_pointer_get(const Evas *eo_e) return ret; } -EAPI Evas_Object * -evas_object_top_in_rectangle_get(const Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) +EOLIAN Evas_Object* +_evas_object_top_in_rectangle_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Evas_Object *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_object_top_in_rectangle_get(x, y, w, h, include_pass_events_objects, include_hidden_objects, &ret)); - return ret; -} - -void -_canvas_object_top_in_rectangle_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - Eina_Bool include_pass_events_objects = va_arg(*list, int); - Eina_Bool include_hidden_objects = va_arg(*list, int); - Evas_Object **ret = va_arg(*list, Evas_Object **); - - const Evas_Public_Data *e = _pd; Evas_Layer *lay; int xx, yy, ww, hh; @@ -1694,41 +1652,19 @@ _canvas_object_top_in_rectangle_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *li if ((!include_hidden_objects) && (!obj->cur->visible)) continue; evas_object_clip_recalc(obj); if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, ww, hh)) && - (!obj->clip.clipees)) - { - *ret = eo_obj; - return; - } + (!obj->clip.clipees)) return eo_obj; } } - *ret = NULL; -} - -EAPI Eina_List * -evas_objects_at_xy_get(const Evas *eo_e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return NULL; - MAGIC_CHECK_END(); - Eina_List *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_objects_at_xy_get(x, y, include_pass_events_objects, include_hidden_objects, &ret)); - return ret; } -void -_canvas_objects_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN Eina_List* +_evas_objects_at_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Eina_Bool include_pass_events_objects = va_arg(*list, int); - Eina_Bool include_hidden_objects = va_arg(*list, int); - Eina_List **ret = va_arg(*list, Eina_List **); - Eina_List *in = NULL; Evas_Layer *lay; int xx, yy; - const Evas_Public_Data *e = _pd; xx = x; yy = y; //// xx = evas_coord_world_x_to_screen(eo_e, x); @@ -1753,7 +1689,7 @@ _canvas_objects_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) in = eina_list_prepend(in, eo_obj); } } - *ret = in; + return in; } /** @@ -1768,33 +1704,13 @@ _canvas_objects_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) * @return The list of evas object in the rectangle region. * */ -EAPI Eina_List * -evas_objects_in_rectangle_get(const Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Eina_List *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_objects_in_rectangle_get(x, y, w, h, include_pass_events_objects, include_hidden_objects, &ret)); - return ret; -} - -void -_canvas_objects_in_rectangle_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN Eina_List* +_evas_objects_in_rectangle_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); - Eina_Bool include_pass_events_objects = va_arg(*list, int); - Eina_Bool include_hidden_objects = va_arg(*list, int); - Eina_List **ret = va_arg(*list, Eina_List **); - Eina_List *in = NULL; Evas_Layer *lay; int xx, yy, ww, hh; - const Evas_Public_Data *e = _pd; xx = x; yy = y; ww = w; @@ -1825,7 +1741,7 @@ _canvas_objects_in_rectangle_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) in = eina_list_prepend(in, eo_obj); } } - *ret = in; + return in; } EOLIAN static const char * @@ -1923,3 +1839,4 @@ _evas_object_smart_type_check_ptr(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_ } #include "canvas/evas_object.eo.c" + diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 33b1eb0..b34fb0f 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -912,35 +912,16 @@ _evas_smart_calculate(Eo *eo_obj, Evas_Smart_Data *o) obj->smart.smart->smart_class->calculate(eo_obj); } -EAPI void -evas_smart_objects_calculate(Evas *eo_e) -{ - eo_do(eo_e, evas_canvas_smart_objects_calculate()); -} - -void -_canvas_smart_objects_calculate(Eo *eo_e, void *o EINA_UNUSED, va_list *list EINA_UNUSED) +EOLIAN void +_evas_smart_objects_calculate(Eo *eo_e, Evas_Public_Data *o EINA_UNUSED) { evas_call_smarts_calculate(eo_e); } -EAPI int -evas_smart_objects_calculate_count_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - int ret = 0; - eo_do((Eo *)eo_e, evas_canvas_smart_objects_calculate_count_get(&ret)); - return ret; -} - -void -_canvas_smart_objects_calculate_count_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN int +_evas_smart_objects_calculate_count_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - int *ret = va_arg(*list, int *); - const Evas_Public_Data *e = _pd; - *ret = e->smart_calc_count; + return e->smart_calc_count; } /** diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 319e0af..1f9296c 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -154,72 +154,32 @@ _accumulate_time(double before, struct accumulator *acc) } #endif -EAPI void -evas_damage_rectangle_add(Evas *eo_e, int x, int y, int w, int h) +EOLIAN void +_evas_damage_rectangle_add(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int x, int y, int w, int h) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_damage_rectangle_add(x, y, w, h)); -} - -void -_canvas_damage_rectangle_add(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - int x = va_arg(*list, int); - int y = va_arg(*list, int); - int w = va_arg(*list, int); - int h = va_arg(*list, int); - Eina_Rectangle *r; - Evas_Public_Data *e = _pd; NEW_RECT(r, x, y, w, h); if (!r) return; e->damages = eina_list_append(e->damages, r); e->changed = EINA_TRUE; } -EAPI void -evas_obscured_rectangle_add(Evas *eo_e, int x, int y, int w, int h) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_obscured_rectangle_add(x, y, w, h)); -} - -void -_canvas_obscured_rectangle_add(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_obscured_rectangle_add(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int x, int y, int w, int h) { - int x = va_arg(*list, int); - int y = va_arg(*list, int); - int w = va_arg(*list, int); - int h = va_arg(*list, int); - Eina_Rectangle *r; - Evas_Public_Data *e = _pd; NEW_RECT(r, x, y, w, h); if (!r) return; e->obscures = eina_list_append(e->obscures, r); } -EAPI void -evas_obscured_clear(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_obscured_clear()); -} - -void -_canvas_obscured_clear(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) +EOLIAN void +_evas_obscured_clear(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { Eina_Rectangle *r; - Evas_Public_Data *e = _pd; EINA_LIST_FREE(e->obscures, r) { eina_rectangle_free(r); @@ -2276,22 +2236,9 @@ evas_render_updates_free(Eina_List *updates) eina_rectangle_free(r); } -EAPI Eina_Bool -evas_render_async(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return EINA_FALSE; - MAGIC_CHECK_END(); - Eina_Bool ret = EINA_FALSE; - eo_do(eo_e, evas_canvas_render_async(&ret)); - return ret; -} - -void -_canvas_render_async(Eo *eo_e, void *_pd, va_list *list) +EOLIAN Eina_Bool +_evas_render_async(Eo *eo_e, Evas_Public_Data *e) { - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - Evas_Public_Data *e = _pd; static int render_2 = -1; if (render_2 == -1) @@ -2300,23 +2247,12 @@ _canvas_render_async(Eo *eo_e, void *_pd, va_list *list) else render_2 = 0; } if (render_2) - *ret = _evas_render2_begin(eo_e, EINA_TRUE, EINA_TRUE, EINA_TRUE); + return _evas_render2_begin(eo_e, EINA_TRUE, EINA_TRUE, EINA_TRUE); else - *ret = evas_render_updates_internal(eo_e, 1, 1, evas_render_pipe_wakeup, + return evas_render_updates_internal(eo_e, 1, 1, evas_render_pipe_wakeup, e, EINA_TRUE); } -EAPI Eina_List * -evas_render_updates(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Eina_List *ret = NULL; - eo_do(eo_e, evas_canvas_render_updates(&ret)); - return ret; -} - static Eina_List * evas_render_updates_internal_wait(Evas *eo_e, unsigned char make_updates, @@ -2348,67 +2284,29 @@ evas_render_updates_internal_wait(Evas *eo_e, return ret; } - -void -_canvas_render_updates(Eo *eo_e, void *_pd, va_list *list) +EOLIAN Eina_List* +_evas_render_updates(Eo *eo_e, Evas_Public_Data *e) { - Eina_List **ret = va_arg(*list, Eina_List **); - - Evas_Public_Data *e = _pd; - - if (!e->changed) - { - *ret = NULL; - return; - } - *ret = evas_render_updates_internal_wait(eo_e, 1, 1); + if (!e->changed) return NULL; + return evas_render_updates_internal_wait(eo_e, 1, 1); } -EAPI void -evas_render(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_render()); -} - -void -_canvas_render(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) +EOLIAN void +_evas_render(Eo *eo_e, Evas_Public_Data *e) { - Evas_Public_Data *e = _pd; - if (!e->changed) return; evas_render_updates_internal_wait(eo_e, 0, 1); } -EAPI void -evas_norender(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_norender()); -} - -void -_canvas_norender(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) +EOLIAN void +_evas_norender(Eo *eo_e, Evas_Public_Data *_pd EINA_UNUSED) { // if (!e->changed) return; evas_render_updates_internal_wait(eo_e, 0, 0); } -EAPI void -evas_render_idle_flush(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_render_idle_flush()); -} - -void -_canvas_render_idle_flush(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) +EOLIAN void +_evas_render_idle_flush(Eo *eo_e, Evas_Public_Data *e) { static int render_2 = -1; @@ -2423,7 +2321,6 @@ _canvas_render_idle_flush(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) } else { - Evas_Public_Data *e = _pd; evas_render_rendering_wait(e); @@ -2446,16 +2343,9 @@ _canvas_render_idle_flush(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) } } -EAPI void -evas_sync(Evas *eo_e) -{ - eo_do(eo_e, evas_canvas_sync()); -} - -void -_canvas_sync(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) +EOLIAN void +_evas_sync(Eo *eo_e, Evas_Public_Data *e) { - Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); static int render_2 = -1; if (render_2 == -1) @@ -2491,19 +2381,9 @@ _evas_render_dump_map_surfaces(Evas_Object *eo_obj) } } -EAPI void -evas_render_dump(Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_render_dump()); -} - -void -_canvas_render_dump(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) +EOLIAN void +_evas_render_dump(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - Evas_Public_Data *e = _pd; static int render_2 = -1; if (render_2 == -1) @@ -2640,3 +2520,4 @@ evas_unref_queue_texts_put(Evas_Public_Data *pd, void *texts) } /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ + diff --git a/src/lib/evas/canvas/evas_stack.c b/src/lib/evas/canvas/evas_stack.c index 4d6d270..b5d1b63 100644 --- a/src/lib/evas/canvas/evas_stack.c +++ b/src/lib/evas/canvas/evas_stack.c @@ -326,22 +326,9 @@ _evas_object_below_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) return NULL; } -EAPI Evas_Object * -evas_object_bottom_get(const Evas *e) +EOLIAN Evas_Object* +_evas_object_bottom_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - Evas_Object *ret = NULL; - eo_do((Eo *)e, evas_canvas_object_bottom_get(&ret)); - return ret; -} - -void -_canvas_object_bottom_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Object **ret = va_arg(*list, Evas_Object **); - const Evas_Public_Data *e = _pd; if (e->layers) { Evas_Object_Protected_Data *obj; @@ -349,60 +336,38 @@ _canvas_object_bottom_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) obj = e->layers->objects; while (obj) { - if (!obj->delete_me) - { - *ret = obj->object; - return; - } + if (!obj->delete_me) return obj->object; obj = evas_object_above_get_internal(obj); } } - *ret = NULL; -} - -EAPI Evas_Object * -evas_object_top_get(const Evas *eo_e) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return NULL; - MAGIC_CHECK_END(); - Evas_Object *ret = NULL; - eo_do((Eo *)eo_e, evas_canvas_object_top_get(&ret)); - return ret; } -void -_canvas_object_top_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *params_list) +EOLIAN Evas_Object* +_evas_object_top_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - Evas_Object **ret = va_arg(*params_list, Evas_Object **); - *ret = NULL; Evas_Object_Protected_Data *obj = NULL; Eina_Inlist *list; Evas_Layer *layer; - const Evas_Public_Data *e = _pd; list = EINA_INLIST_GET(e->layers); - if (!list) return; + if (!list) return NULL; layer = (Evas_Layer *) list->last; - if (!layer) return; + if (!layer) return NULL; list = EINA_INLIST_GET(layer->objects); - if (!list) return; + if (!list) return NULL; obj = (Evas_Object_Protected_Data *) list->last; - if (!obj) return; + if (!obj) return NULL; while (obj) { - if (!obj->delete_me) - { - *ret = obj->object; - return; - } + if (!obj->delete_me) return obj->object; obj = evas_object_below_get_internal(obj); } - *ret = obj->object; + return obj->object; } diff --git a/src/lib/evas/canvas/evas_touch_point.c b/src/lib/evas/canvas/evas_touch_point.c index 83da0a1..9b500c4 100644 --- a/src/lib/evas/canvas/evas_touch_point.c +++ b/src/lib/evas/canvas/evas_touch_point.c @@ -53,46 +53,17 @@ _evas_touch_point_remove(Evas *eo_e, int id) } } -EAPI unsigned int -evas_touch_point_list_count(Evas *eo_e) +EOLIAN unsigned int +_evas_touch_point_list_count(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) { - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - unsigned int ret = 0; - eo_do((Eo *)eo_e, evas_canvas_touch_point_list_count(&ret)); - return ret; + return eina_list_count(e->touch_points); } -void -_canvas_touch_point_list_count(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) -{ - unsigned int *ret = va_arg(*list, unsigned int *); - const Evas_Public_Data *e = _pd; - *ret = eina_list_count(e->touch_points); -} - -EAPI void -evas_touch_point_list_nth_xy_get(Evas *eo_e, unsigned int n, Evas_Coord *x, Evas_Coord *y) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - return; - MAGIC_CHECK_END(); - eo_do(eo_e, evas_canvas_touch_point_list_nth_xy_get(n, x, y)); -} - -void -_canvas_touch_point_list_nth_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN void +_evas_touch_point_list_nth_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) { - unsigned int n = va_arg(*list, unsigned int); - Evas_Coord *x = va_arg(*list, Evas_Coord *); - Evas_Coord *y = va_arg(*list, Evas_Coord *); - Evas_Coord_Touch_Point *point = NULL; - Evas_Public_Data *e = _pd; point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); if (!point) { @@ -104,52 +75,23 @@ _canvas_touch_point_list_nth_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *li if (y) *y = point->y; } -EAPI int -evas_touch_point_list_nth_id_get(Evas *eo_e, unsigned int n) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return -1; - MAGIC_CHECK_END(); - int ret = -1; - eo_do(eo_e, evas_canvas_touch_point_list_nth_id_get(n, &ret)); - return ret; -} - -void -_canvas_touch_point_list_nth_id_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN int +_evas_touch_point_list_nth_id_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, unsigned int n) { - unsigned int n = va_arg(*list, unsigned int); - int *ret = va_arg(*list, int *); - Evas_Coord_Touch_Point *point = NULL; - Evas_Public_Data *e = _pd; point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); - if (!point) *ret = -1; - else *ret = point->id; -} - -EAPI Evas_Touch_Point_State -evas_touch_point_list_nth_state_get(Evas *eo_e, unsigned int n) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return EVAS_TOUCH_POINT_CANCEL; - MAGIC_CHECK_END(); - Evas_Touch_Point_State ret = EVAS_TOUCH_POINT_CANCEL; - eo_do(eo_e, evas_canvas_touch_point_list_nth_state_get(n, &ret)); - return ret; + if (!point) return -1; + else return point->id; } -void -_canvas_touch_point_list_nth_state_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) +EOLIAN Evas_Touch_Point_State +_evas_touch_point_list_nth_state_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, unsigned int n) { - unsigned int n = va_arg(*list, unsigned int); - Evas_Touch_Point_State *ret = va_arg(*list, Evas_Touch_Point_State *); - Evas_Coord_Touch_Point *point = NULL; - Evas_Public_Data *e = _pd; point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); - if (!point) *ret = EVAS_TOUCH_POINT_CANCEL; - else *ret = point->state; + if (!point) return EVAS_TOUCH_POINT_CANCEL; + else return point->state; } + -- 2.7.4