diff --git a/legacy/evas/configure.ac b/legacy/evas/configure.ac index 94dfe28019..2a2295ac3a 100644 --- a/legacy/evas/configure.ac +++ b/legacy/evas/configure.ac @@ -1232,6 +1232,38 @@ if test x$want_valgrind = "xyes"; then ) fi +## Examples + +install_examples="yes" +AC_ARG_ENABLE([install-examples], + AC_HELP_STRING([--disable-install-examples], + [disable installing examples (compiled or just source). + @<:@default==enabled@:>@]), + [ + if test "x${enableval}" = "xyes" ; then + install_examples="yes" + else + install_examples="no" + fi + ], + [install_examples="yes"]) +AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"]) + +build_examples="no" +AC_ARG_ENABLE([build-examples], + AC_HELP_STRING([--enable-build-examples], + [enable building examples. @<:@default==disabled@:>@]), + [ + if test "x${enableval}" = "xyes" ; then + build_examples="yes" + else + build_examples="no" + fi + ], + [build_examples="no"]) +AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"]) + + ##################################################################### ## Fill in flags @@ -1322,6 +1354,7 @@ src/modules/savers/jpeg/Makefile src/modules/savers/png/Makefile src/modules/savers/tiff/Makefile src/lib/include/Makefile +src/examples/Makefile README evas.spec ]) @@ -1467,6 +1500,7 @@ echo " 32bpp Rotation 180......: $conv_32_rgb_rot_180" echo " 32bpp Rotation 270......: $conv_32_rgb_rot_270" echo echo "Documentation.............: ${build_doc}" +echo "Examples..................: install:${install_examples} build:${build_examples}" echo echo "Compilation............: make (or gmake)" echo " CPPFLAGS.............: $CPPFLAGS" diff --git a/legacy/evas/doc/Doxyfile b/legacy/evas/doc/Doxyfile index c5675b131e..d1c0539de5 100644 --- a/legacy/evas/doc/Doxyfile +++ b/legacy/evas/doc/Doxyfile @@ -33,7 +33,7 @@ INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = NO STRIP_FROM_PATH = INTERNAL_DOCS = NO -STRIP_CODE_COMMENTS = YES +STRIP_CODE_COMMENTS = NO CASE_SENSE_NAMES = YES SHORT_NAMES = NO HIDE_SCOPE_NAMES = NO @@ -46,7 +46,7 @@ INHERIT_DOCS = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 2 +TAB_SIZE = 8 GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES @@ -67,9 +67,9 @@ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = -EXAMPLE_PATH = +EXAMPLE_PATH = ../src/examples EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO +EXAMPLE_RECURSIVE = YES INPUT_FILTER = FILTER_SOURCE_FILES = NO SOURCE_BROWSER = NO @@ -78,7 +78,7 @@ REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 2 -IGNORE_PREFIX = +IGNORE_PREFIX = evas_ _evas_ Evas_ _Evas_ EVAS_ _EVAS_ GENERATE_TREEVIEW = NO TREEVIEW_WIDTH = 250 GENERATE_LATEX = YES diff --git a/legacy/evas/doc/e.css b/legacy/evas/doc/e.css index 07ebd1e5bb..12b1ae5e16 100644 --- a/legacy/evas/doc/e.css +++ b/legacy/evas/doc/e.css @@ -434,3 +434,9 @@ body { width: 100%; } +pre.fragment { + font-family: monospace; + background-color: #e9e9e9; + border: 1px solid #d9d9d9; + padding: 10px; +} diff --git a/legacy/evas/doc/evas.dox.in b/legacy/evas/doc/evas.dox.in index e3f4fd3f79..fc6a283489 100644 --- a/legacy/evas/doc/evas.dox.in +++ b/legacy/evas/doc/evas.dox.in @@ -5,19 +5,28 @@ @image html e_big.png @version @PACKAGE_VERSION@ -@author Carsten Haitzler -@author Till Adam -@author Steve Ireland -@author Brett Nash -@author Tilman Sauerbeck -@author Corey Donohoe -@author Yuri Hudobin -@author Nathan Ingersoll -@author Willem Monsuwe -@author Vincent Torri -@author Gustavo Barbieri -@author Cedric Bail -@date 2000-2008 +@author Carsten Haitzler +@author Till Adam +@author Steve Ireland +@author Brett Nash +@author Tilman Sauerbeck +@author Corey Donohoe +@author Yuri Hudobin +@author Nathan Ingersoll +@author Willem Monsuwe +@author Vincent Torri +@author Gustavo Barbieri +@author Cedric Bail +@date 2000-2010 + +@section toc Table of Contents + +@li @ref intro +@li @ref work +@li @ref compiling +@li @ref install +@li @ref next_steps +@li @ref intro_example @section intro What is Evas? @@ -42,6 +51,21 @@ it small and lean. It has several display back-ends, letting it display on several display systems, making it portable for cross-device and cross-platform development. +@subsection intro_not_evas What Evas is not? + +Evas is not a widget set or widget toolkit, however it is their +base. See Elementary (http://docs.enlightenment.org/auto/elementary/) +for a toolkit based on Evas, Edje, Ecore and other Enlightenment +technologies. + +It is not dependent or aware of main loops, input or output +systems. Input should be polled from various sources and feed them to +Evas. Similarly, it will not create windows or report windows updates +to your system, rather just drawing the pixels and reporting to the +user the areas that were changed. Of course these operations are quite +common and thus they are ready to use in Ecore, particularly in +Ecore_Evas (http://docs.enlightenment.org/auto/ecore/). + @section work How does Evas work? @@ -53,14 +77,16 @@ engine, and controls the target windowing system in order to produce rendered results of the current canvases state on the display. Immediate mode display systems retain very little, or no state. A program -will execute a series of commands: +will execute a series of commands, as in the pseudo code: @verbatim -bitmap_handle = create_new_bitmap(); -draw_line(0, 0, 100, 200); -draw_rectangle(10, 30, 50, 500); -draw_bitmap(10, 30, bitmap_handle); -etc. +draw line from position (0, 0) to position (100, 200); + +draw rectangle from position (10, 30) to position (50, 500); + +bitmap_handle = create_bitmap(); +scale bitmap_handle to size 100 x 100; +draw image bitmap_handle at position (10, 30); @endverbatim The series of commands is executed by the windowing system and the results @@ -85,25 +111,61 @@ mistakes at this level and produce code that is sub optimal. Those familiar with this kind of programming will simply get bored by writing the same code again and again. +For example, if in the above scene, the windowing system requires the +application to redraw the area from 0, 0 to 50, 50 (also referred as +"expose event"), then the programmer must calculate manually the +updates and repaint it again: + +@verbatim +Redraw from position (0, 0) to position (50, 50): + +// what was in area (0, 0, 50, 50)? + +// 1. intersection part of line (0, 0) to (100, 200)? + draw line from position (0, 0) to position (25, 50); + +// 2. intersection part of rectangle (10, 30) to (50, 500)? + draw rectangle from position (10, 30) to position (50, 50) + +// 3. intersection part of image at (10, 30), size 100 x 100? + bitmap_subimage = subregion from position (0, 0) to position (40, 20) + draw image bitmap_subimage at position (10, 30); +@endverbatim + +The clever reader might have noticed that, if all elements in the +above scene are opaque, then the system is doing useless paints: part +of the line is behind the rectangle, and part of the rectangle is +behind the image. These useless paints tends to be very costly, as +pixels tend to be 4 bytes in size, thus an overlapping region of 100 x +100 pixels is around 40000 useless writes! The developer could write +code to calculate the overlapping areas and avoid painting then, but +then it should be mixed with the "expose event" handling mentioned +above and quickly one realizes the initially simpler method became +really complex. + Evas is a structural system in which the programmer creates and manages display objects and their properties, and as a result of this higher level state management, the canvas is able to redraw the set of objects when needed to represent the current state of the canvas. -For example: +For example, the pseudo code: @verbatim -bitmap_handle = create_bitmap(); -move(bitmap_handle, 10, 30); -show(bitmap_handle); -rectangle_handle = create_rectangle(); -move(rectangle_handle, 10, 30); -resize(rectangle_handle, 50, 500); -show(rectangle_handle); line_handle = create_line(); -set_line_coords(line_handle, 0, 0, 100, 200); -show(line_handle); -etc. +set line_handle from position (0, 0) to position (100, 200); +show line_handle; + +rectangle_handle = create_rectangle(); +move rectangle_handle to position (10, 30); +resize rectangle_handle to size 40 x 470; +show rectangle_handle; + +bitmap_handle = create_bitmap(); +scale bitmap_handle to size 100 x 100; +move bitmap_handle to position (10, 30); +show bitmap_handle; + +render scene; @endverbatim This may look longer, but when the display needs to be refreshed or updated, @@ -171,6 +233,35 @@ su - make install @endverbatim +@section next_steps Next Steps + +After you understood what Evas is and installed it in your system you +should proceed understanding the programming interface for all +objects, then see the specific for the most used elements. We'd +recommend you to take a while to learn Ecore +(http://docs.enlightenment.org/auto/ecore/) and Edje +(http://docs.enlightenment.org/auto/edje/) as they will likely save +you tons of work compared to using just Evas directly. + +Recommended reading: + +@li @ref Evas_Object_Group +@li @ref Evas_Object_Rectangle +@li @ref Evas_Object_Image +@li @ref Evas_Object_Text +@li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group to define + an object that provides custom functions to handle clipping, + hiding, moving, resizing, setting the color and more. These could + be as simple as a group of objects that move together (see @ref + Evas_Smart_Object_Clipped). These smart objects can implement what + ends to be a widget, providing some intelligence (thus the name), + like a button or check box. + +@section intro_example Introductory Example + +@include evas-buffer-simple.c + + @todo (1.0) Need a way ot scaling an image and just PRODUCING the output (scaling direct to target buffe r- no blend/copy etc.) @todo (1.0) Could improve evas's scaling down code to limit multiple samples per output pixel to maybe 2x2? @@ -186,12 +277,9 @@ make install @todo (1.0) Add button grabbing @todo (1.0) Add generic object method call system @todo (1.0) Add callbacks set for smart object parents to be set on all child smart objects too. -@todo (1.0) Define image load errors (and maybe have an error to string func) -@todo (1.0) Add text styles (outline etc.) @todo (1.0) Add font load query calls (so we know if a font load failed) @todo (1.0) Add font listing calls @todo (1.0) Add ability to check image comments & disk format -@todo (1.0) Add group objects @todo (1.0) Add fontset support @todo (1.0) Export engine rendering API cleanly to Evas API @todo (1.0) Add smart object ability to provide rendering callback diff --git a/legacy/evas/src/Makefile.am b/legacy/evas/src/Makefile.am index 1f5220881d..8828c78896 100644 --- a/legacy/evas/src/Makefile.am +++ b/legacy/evas/src/Makefile.am @@ -1,3 +1,3 @@ MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = lib bin modules +SUBDIRS = lib bin modules examples diff --git a/legacy/evas/src/examples/Makefile.am b/legacy/evas/src/examples/Makefile.am new file mode 100644 index 0000000000..746146dc80 --- /dev/null +++ b/legacy/evas/src/examples/Makefile.am @@ -0,0 +1,43 @@ +MAINTAINERCLEANFILES = Makefile.in + +pkglibdir = $(datadir)/$(PACKAGE)/examples + +if BUILD_EXAMPLES + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@FRIBIDI_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@pthread_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +pkglib_PROGRAMS = + +if BUILD_ENGINE_BUFFER +AM_CPPFLAGS += -I$(top_srcdir)/src/modules/engines/buffer + +pkglib_PROGRAMS += evas_buffer_simple +evas_buffer_simple_SOURCES = evas-buffer-simple.c +evas_buffer_simple_LDADD = $(top_builddir)/src/lib/libevas.la +endif + +endif + + + +filesdir = $(datadir)/$(PACKAGE)/examples +files_DATA = + +if INSTALL_EXAMPLES +files_DATA += \ + evas-buffer-simple.c +endif diff --git a/legacy/evas/src/examples/evas-buffer-simple.c b/legacy/evas/src/examples/evas-buffer-simple.c new file mode 100644 index 0000000000..6676ef10b0 --- /dev/null +++ b/legacy/evas/src/examples/evas-buffer-simple.c @@ -0,0 +1,228 @@ +/** + * Simple Evas example using the Buffer engine. + * + * You must have Evas compiled with the buffer engine, and have the + * evas-software-buffer pkg-config files installed. + * + * Compile with: + * + * @verbatim + * gcc -o evas-buffer-simple evas-buffer-simple.c `pkg-config --libs --cflags evas evas-software-buffer` + * @endverbatim + * + */ +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +/* + * create_canvas(), destroy_canvas() and draw_scene() are support functions. + * + * They are only required to use raw Evas, but for real world usage, + * it is recommended to use ecore and its ecore-evas submodule, that + * provide convenience canvas creators, integration with main loop and + * automatic render of updates (draw_scene()) when system goes back to + * main loop. + */ +static Evas *create_canvas(int width, int height); +static void destroy_canvas(Evas *canvas); +static void draw_scene(Evas *canvas); + +// support function to save scene as PPM image +static void save_scene(Evas *canvas, const char *dest); + +int main(void) +{ + Evas *canvas; + Evas_Object *bg, *r1, *r2, *r3; + + evas_init(); + + // create your canvas + // NOTE: consider using ecore_evas_buffer_new() instead! + canvas = create_canvas(WIDTH, HEIGHT); + if (!canvas) + return -1; + + bg = evas_object_rectangle_add(canvas); + evas_object_color_set(bg, 255, 255, 255, 255); // white bg + evas_object_move(bg, 0, 0); // at origin + evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas + evas_object_show(bg); + + puts("initial scene, with just background:"); + draw_scene(canvas); + + r1 = evas_object_rectangle_add(canvas); + evas_object_color_set(r1, 255, 0, 0, 255); // 100% opaque red + evas_object_move(r1, 10, 10); + evas_object_resize(r1, 100, 100); + evas_object_show(r1); + + // pay attention to transparency! Evas color values are pre-multiplied by + // alpha, so 50% opaque green is: + // non-premul: r=0, g=255, b=0 a=128 (50% alpha) + // premul: + // r_premul = r * a / 255 = 0 * 128 / 255 = 0 + // g_premul = g * a / 255 = 255 * 128 / 255 = 128 + // b_premul = b * a / 255 = 0 * 128 / 255 = 0 + // + // this 50% green is over a red background, so it will show in the + // final output as yellow (green + red = yellow) + r2 = evas_object_rectangle_add(canvas); + evas_object_color_set(r2, 0, 128, 0, 128); // 50% opaque green + evas_object_move(r2, 10, 10); + evas_object_resize(r2, 50, 50); + evas_object_show(r2); + + r3 = evas_object_rectangle_add(canvas); + evas_object_color_set(r3, 0, 128, 0, 255); // 100% opaque dark green + evas_object_move(r3, 60, 60); + evas_object_resize(r3, 50, 50); + evas_object_show(r3); + + puts("final scene (note updates):"); + draw_scene(canvas); + save_scene(canvas, "/tmp/evas-buffer-simple-render.ppm"); + + // NOTE: use ecore_evas_buffer_new() and here ecore_evas_free() + destroy_canvas(canvas); + + evas_shutdown(); + + return 0; +} + +static Evas *create_canvas(int width, int height) +{ + Evas *canvas; + Evas_Engine_Info_Buffer *einfo; + int method; + void *pixels; + + method = evas_render_method_lookup("buffer"); + if (method <= 0) + { + fputs("ERROR: evas was not compiled with 'buffer' engine!\n", stderr); + return NULL; + } + + canvas = evas_new(); + if (!canvas) + { + fputs("ERROR: could not instantiate new evas canvas.\n", stderr); + return NULL; + } + + evas_output_method_set(canvas, method); + evas_output_size_set(canvas, width, height); + evas_output_viewport_set(canvas, 0, 0, width, height); + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + if (!einfo) + { + fputs("ERROR: could not get evas engine info!\n", stderr); + evas_free(canvas); + return NULL; + } + + // ARGB32 is sizeof(int), that is 4 bytes, per pixel + pixels = malloc(width * height * sizeof(int)); + if (!pixels) + { + fputs("ERROR: could not allocate canvas pixels!\n", stderr); + evas_free(canvas); + return NULL; + } + + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + einfo->info.dest_buffer = pixels; + einfo->info.dest_buffer_row_bytes = width * sizeof(int); + einfo->info.use_color_key = 0; + einfo->info.alpha_threshold = 0; + einfo->info.func.new_update_region = NULL; + einfo->info.func.free_update_region = NULL; + evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo); + + return canvas; +} + +static void destroy_canvas(Evas *canvas) +{ + Evas_Engine_Info_Buffer *einfo; + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + if (!einfo) + { + fputs("ERROR: could not get evas engine info!\n", stderr); + evas_free(canvas); + return; + } + + free(einfo->info.dest_buffer); + evas_free(canvas); +} + +static void draw_scene(Evas *canvas) +{ + Eina_List *updates, *n; + Eina_Rectangle *update; + + // render and get the updated rectangles: + updates = evas_render_updates(canvas); + + // informative only here, just print the updated areas: + EINA_LIST_FOREACH(updates, n, update) + printf("UPDATED REGION: pos: %3d, %3d size: %3dx%3d\n", + update->x, update->y, update->w, update->h); + + // free list of updates + evas_render_updates_free(updates); +} + +static void save_scene(Evas *canvas, const char *dest) +{ + Evas_Engine_Info_Buffer *einfo; + const unsigned int *pixels, *pixels_end; + int width, height; + FILE *f; + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + if (!einfo) + { + fputs("ERROR: could not get evas engine info!\n", stderr); + return; + } + evas_output_size_get(canvas, &width, &height); + + f = fopen(dest, "wb+"); + if (!f) + { + fprintf(stderr, "ERROR: could not open for writing '%s': %s\n", + dest, strerror(errno)); + return; + } + + pixels = einfo->info.dest_buffer; + pixels_end = pixels + (width * height); + + // PPM P6 format is dead simple to write: + fprintf(f, "P6\n%d %d\n255\n", width, height); + for (; pixels < pixels_end; pixels++) + { + int r, g, b; + + r = ((*pixels) & 0xff0000) >> 16; + g = ((*pixels) & 0x00ff00) >> 8; + b = (*pixels) & 0x0000ff; + + fprintf(f, "%c%c%c", r, g, b); + } + + fclose(f); + printf("saved scene as '%s'\n", dest); +} diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h index 2f90f0ec46..f98df31dd1 100644 --- a/legacy/evas/src/lib/Evas.h +++ b/legacy/evas/src/lib/Evas.h @@ -41,6 +41,13 @@ * @todo finish api documentation */ + +/** + * Identifier of callbacks to be used with object or canvas. + * + * @see evas_object_event_callback_add() + * @see evas_event_callback_add() + */ typedef enum _Evas_Callback_Type { /* @@ -88,6 +95,9 @@ typedef enum _Evas_Callback_Type EVAS_CALLBACK_LAST /**< keep as last element/sentinel -- not really an event */ } Evas_Callback_Type; /**< The type of event to trigger the callback */ +/** + * Flags for Mouse Button events + */ typedef enum _Evas_Button_Flags { EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */ @@ -95,12 +105,19 @@ typedef enum _Evas_Button_Flags EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */ } Evas_Button_Flags; /**< Flags for Mouse Button events */ +/** + * Flags for Events + */ typedef enum _Evas_Event_Flags { EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */ EVAS_EVENT_FLAG_ON_HOLD = (1 << 0) /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ } Evas_Event_Flags; /**< Flags for Events */ +/** + * Flags for Font Hinting + * @ingroup Evas_Font_Group + */ typedef enum _Evas_Font_Hinting_Flags { EVAS_FONT_HINTING_NONE, /**< No font hinting */ @@ -108,6 +125,10 @@ typedef enum _Evas_Font_Hinting_Flags EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */ } Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */ +/** + * Colorspaces for pixel data supported by Evas + * @ingroup Evas_Object_Image + */ typedef enum _Evas_Colorspace { EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ @@ -117,12 +138,16 @@ typedef enum _Evas_Colorspace EVAS_COLORSPACE_RGB565_A5P /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */ } Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ +/** + * How to pack items into cells in a table. + * @ingroup Evas_Object_Table + */ typedef enum _Evas_Object_Table_Homogeneous_Mode { EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 -} Evas_Object_Table_Homogeneous_Mode; +} Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */ typedef struct _Evas_Transform Evas_Transform; /**< An Evas projective or affine transform */ typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */ @@ -134,12 +159,46 @@ typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Ev typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */ typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */ -typedef struct _Evas_Smart_Class Evas_Smart_Class; /**< A smart object base class */ -typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description; /**< A smart object callback description, used to provide introspection */ -typedef struct _Evas_Map Evas_Map; /**< An array of map points */ +/** + * @typedef Evas_Smart_Class + * A smart object base class + * @ingroup Evas_Smart_Group + */ +typedef struct _Evas_Smart_Class Evas_Smart_Class; + +/** + * @typedef Evas_Smart_Cb_Description + * A smart object callback description, used to provide introspection + * @ingroup Evas_Smart_Group + */ +typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description; + +/** + * @typedef Evas_Map + * An opaque handle to map points + * @see evas_map_new() + * @see evas_map_free() + * @see evas_map_dup() + * @ingroup Evas_Object_Group_Map + */ +typedef struct _Evas_Map Evas_Map; + +/** + * @typedef Evas + * An Evas canvas handle. + * @see evas_new() + * @see evas_free() + * @ingroup Evas_Canvas + */ +typedef struct _Evas Evas; + +/** + * @typedef Evas_Object + * An Evas Object handle. + * @ingroup Evas_Object_Group + */ +typedef struct _Evas_Object Evas_Object; -typedef struct _Evas Evas; /**< An Evas canvas handle */ -typedef struct _Evas_Object Evas_Object; /**< An Evas Object handle */ typedef void Evas_Performance; /**< An Evas Performance handle */ typedef struct _Evas_Modifier Evas_Modifier; /**< An Evas Modifier */ typedef struct _Evas_Lock Evas_Lock; /**< An Evas Lock */ @@ -158,7 +217,7 @@ struct _Evas_Transform /** An affine or projective coordinate transformation mat float mzx, mzy, mzz; }; -struct _Evas_Coord_Rectangle /** A rectangle in Evas_Coord */ +struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */ { Evas_Coord x; /**< top-left x co-ordinate of rectangle */ Evas_Coord y; /**< top-left y co-ordinate of rectangle */ @@ -204,229 +263,6 @@ typedef enum _Evas_Aspect_Control } Evas_Aspect_Control; -#define EVAS_SMART_CLASS_VERSION 4 /** the version you have to put into the version field in the smart class struct */ -struct _Evas_Smart_Class /** a smart object class */ -{ - const char *name; /** the string name of the class */ - - int version; - - void (*add) (Evas_Object *o); - void (*del) (Evas_Object *o); - void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y); - void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h); - void (*show) (Evas_Object *o); - void (*hide) (Evas_Object *o); - void (*color_set) (Evas_Object *o, int r, int g, int b, int a); - void (*clip_set) (Evas_Object *o, Evas_Object *clip); - void (*clip_unset) (Evas_Object *o); - void (*calculate) (Evas_Object *o); - void (*member_add) (Evas_Object *o, Evas_Object *child); - void (*member_del) (Evas_Object *o, Evas_Object *child); - - const Evas_Smart_Class *parent; /**< this class inherits from this parent */ - const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, NULL terminated */ - - const void *data; -}; - -struct _Evas_Smart_Cb_Description -{ - const char *name; /**< callback name, ie: "changed" */ - - /** - * @brief Hint type of @c event_info parameter of Evas_Smart_Cb. - * - * The type string uses the pattern similar to - * - * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures - * - * but extended to optionally include variable names within - * brackets preceding types. Example: - * - * @li Structure with two integers: - * @c "(ii)" - * - * @li Structure called 'x' with two integers named 'a' and 'b': - * @c "[x]([a]i[b]i)" - * - * @li Array of integers: - * @c "ai" - * - * @li Array called 'x' of struct with two integers: - * @c "[x]a(ii)" - * - * @note This type string is used as a hint and is @b not validated - * or enforced anyhow. Implementors should make the best use - * of it to help bindings, documentation and other users of - * introspection features. - */ - const char *type; -}; - -/** - * Initializer to zero a whole Evas_Smart_Class structure. - * - * @see EVAS_SMART_CLASS_INIT_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS - */ -#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} - -/** - * Initializer to zero a whole Evas_Smart_Class structure and set version. - * - * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to - * latest EVAS_SMART_CLASS_VERSION. - * - * @see EVAS_SMART_CLASS_INIT_NULL - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS - */ -#define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} - -/** - * Initializer to zero a whole Evas_Smart_Class structure and set name - * and version. - * - * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to - * latest EVAS_SMART_CLASS_VERSION and name to the specified value. - * - * It will keep a reference to name field as a "const char *", that is, - * name must be available while the structure is used (hint: static or global!) - * and will not be modified. - * - * @see EVAS_SMART_CLASS_INIT_NULL - * @see EVAS_SMART_CLASS_INIT_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS - */ -#define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} - -/** - * Initializer to zero a whole Evas_Smart_Class structure and set name, - * version and parent class. - * - * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to - * latest EVAS_SMART_CLASS_VERSION, name to the specified value and - * parent class. - * - * It will keep a reference to name field as a "const char *", that is, - * name must be available while the structure is used (hint: static or global!) - * and will not be modified. Similarly, parent reference will be kept. - * - * @see EVAS_SMART_CLASS_INIT_NULL - * @see EVAS_SMART_CLASS_INIT_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS - */ -#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL} - -/** - * Initializer to zero a whole Evas_Smart_Class structure and set name, - * version, parent class and callbacks definition. - * - * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to - * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent - * class and callbacks at this level. - * - * It will keep a reference to name field as a "const char *", that is, - * name must be available while the structure is used (hint: static or global!) - * and will not be modified. Similarly, parent and callbacks reference - * will be kept. - * - * @see EVAS_SMART_CLASS_INIT_NULL - * @see EVAS_SMART_CLASS_INIT_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION - * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT - */ -#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks} - -/** - * Convenience macro to subclass a Smart Class. - * - * This macro saves some typing when writing a Smart Class derived from - * another one. In order to work, the user needs to provide some functions - * adhering to the following guidelines. - * - _smart_set_user(): the internal _smart_set function will call - * this one provided by the user after inheriting everything from the - * parent, which should take care of setting the right member functions - * for the class. - * - _parent_sc: smart class of the parent. When calling parent - * functions from overloaded ones, use this global variable. - * - _smart_class_new(): this function returns the Evas_Smart needed - * to create smart objects with this class, should be called by the public - * _add() function. - * - If this new class should be subclassable as well, a public _smart_set() - * function is desirable to fill the class used as parent by the children. - * It's up to the user to provide this interface, which will most likely - * call _smart_set() to get the job done. - * - * @param smart_name The name used for the Smart Class. e.g: "Evas_Object_Box". - * @param prefix Prefix used for all variables and functions defined. - * @param api_type Type of the structure used as API for the Smart Class. Either Evas_Smart_Class or something derived from it. - * @param parent_type Type of the parent class API. - * @param parent_func Function that sets up the parent class. e.g: evas_object_box_smart_set(). - * @param cb_desc Array of callback descriptions for this Smart Class. - */ -#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \ -static parent_type prefix##_parent_sc; \ -static Eina_Bool prefix##_parent_init = 0; \ -static void prefix##_smart_set_user(api_type *api); \ -static void prefix##_smart_set(api_type *api) \ -{ \ - Evas_Smart_Class *sc; \ - if (!(sc = (Evas_Smart_Class *)api)) \ - return; \ - if (!prefix##_parent_init) \ - { \ - memset(&prefix##_parent_sc, 0, sizeof(parent_type)); \ - ((Evas_Smart_Class*)&prefix##_parent_sc)->version = EVAS_SMART_CLASS_VERSION; \ - parent_func(&prefix##_parent_sc); \ - prefix##_parent_init = 1; \ - } \ - evas_smart_class_inherit(sc, &prefix##_parent_sc); \ - prefix##_smart_set_user(api); \ -} \ -static Evas_Smart * prefix##_smart_class_new(void) \ -{ \ - static Evas_Smart *smart = NULL; \ - static api_type api; \ - if (!smart) \ - { \ - Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \ - memset(&api, 0, sizeof(api_type)); \ - sc->version = EVAS_SMART_CLASS_VERSION; \ - sc->name = smart_name; \ - sc->callbacks = cb_desc; \ - prefix##_smart_set(&api); \ - smart = evas_smart_class_new(sc); \ - } \ - return smart; \ -} - -/** - * Convenience macro to allocate smart data only if needed. - * - * When writing a subclassable smart object, the .add function will need - * to check if the smart private data was already allocated by some child - * object or not. This macro makes it easier to do it. - * - * @param o Evas object passed to the .add function - * @param priv_type The type of the data to allocate - */ -#define EVAS_SMART_DATA_ALLOC(o, priv_type) \ - priv_type *priv; \ - priv = evas_object_smart_data_get(o); \ - if (!priv) \ - { \ - priv = (priv_type *)calloc(1, sizeof(priv_type)); \ - if (!priv) \ - return; \ - evas_object_smart_data_set(o, priv); \ - } typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */ typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */ @@ -504,6 +340,10 @@ struct _Evas_Native_Surface #define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ #define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ +/** + * How the object should be rendered to output. + * @ingroup Evas_Object_Group_Extras + */ typedef enum _Evas_Render_Op { EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */ @@ -518,7 +358,7 @@ typedef enum _Evas_Render_Op EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */ EVAS_RENDER_MASK = 10, /**< d = d*sa */ EVAS_RENDER_MUL = 11 /**< d = d*s */ -} Evas_Render_Op; /**< */ +} Evas_Render_Op; /**< How the object should be rendered to output. */ typedef enum _Evas_Border_Fill_Mode { @@ -735,11 +575,22 @@ struct _Evas_Event_Hold /** Hold change event */ Evas_Device *dev; }; +/** + * How mouse pointer should be handled by Evas. + * + * If #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse is down an + * object, then moves outside of it, the pointer still behaves as + * being bound to the object, albeit out of its drawing region. On + * mouse up, the event will be feed to the object, that may check if + * the final position is over or not and do something about it. + * + * @ingroup Evas_Object_Group_Extras + */ typedef enum _Evas_Object_Pointer_Mode { EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ EVAS_OBJECT_POINTER_MODE_NOGRAB -} Evas_Object_Pointer_Mode; +} Evas_Object_Pointer_Mode; /**< How mouse pointer should be handled by Evas. */ typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); typedef void (*Evas_Event_Cb) (void *data, Evas *e, void *event_info); @@ -749,14 +600,80 @@ typedef void (*Evas_Object_Event_Cb) (void *data, Evas *e, Evas_Object *obj, voi extern "C" { #endif - EAPI int evas_alloc_error (void); - +/** + * @defgroup Evas_Group Top level functions + * + * Functions that affect Evas as a whole. + */ EAPI int evas_init (void); EAPI int evas_shutdown (void); + EAPI int evas_alloc_error (void); + + EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; + EAPI int evas_async_events_process (void); + EAPI Eina_Bool evas_async_events_put (const void *target, Evas_Callback_Type type, void *event_info, void (*func)(void *target, Evas_Callback_Type type, void *event_info)) EINA_ARG_NONNULL(1, 4); + +/** + * @defgroup Evas_Canvas Canvas functions + * + * Functions that deal with the basic evas object. They are the + * functions you need to use at a minimum to get a working evas, and + * to destroy it. + * + */ + EAPI Evas *evas_new (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC; EAPI void evas_free (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_focus_in (Evas *e); + EAPI void evas_focus_out (Evas *e); + EAPI Eina_Bool evas_focus_state_get (const Evas *e) EINA_PURE; + + EAPI void evas_data_attach_set (Evas *e, void *data) EINA_ARG_NONNULL(1); + EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); + EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); + EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1); + EAPI Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI void evas_render_updates_free (Eina_List *updates); + EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_norender (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_render_idle_flush (Evas *e) EINA_ARG_NONNULL(1); + + +/** + * @defgroup Evas_Output_Method Render Engine Functions + * + * Functions that are used to set the render engine for a given + * function, and then get that engine working. + * + * The following code snippet shows how they can be used to + * initialise an evas that uses the X11 software engine: + * @code + * Evas *evas; + * Evas_Engine_Info_Software_X11 *einfo; + * extern Display *display; + * extern Window win; + * + * evas_init(); + * + * evas = evas_new(); + * evas_output_method_set(evas, evas_render_method_lookup("software_x11")); + * evas_output_size_set(evas, 640, 480); + * evas_output_viewport_set(evas, 0, 0, 640, 480); + * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas); + * einfo->info.display = display; + * einfo->info.visual = DefaultVisual(display, DefaultScreen(display)); + * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display)); + * einfo->info.drawable = win; + * einfo->info.depth = DefaultDepth(display, DefaultScreen(display)); + * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo); + * @endcode + * + * @ingroup Evas_Canvas + */ EAPI int evas_render_method_lookup (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Eina_List *evas_render_method_list (void) EINA_WARN_UNUSED_RESULT; EAPI void evas_render_method_list_free (Eina_List *list); @@ -767,89 +684,490 @@ extern "C" { EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; EAPI int evas_engine_info_set (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1); +/** + * @defgroup Evas_Output_Size Output and Viewport Resizing Functions + * + * Functions that set and retrieve the output and viewport size of an + * evas. + * + * @ingroup Evas_Canvas + */ EAPI void evas_output_size_set (Evas *e, int w, int h) EINA_ARG_NONNULL(1); EAPI void evas_output_size_get (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1); EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); +/** + * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions + * + * Functions that are used to map coordinates from the canvas to the + * screen or the screen to the canvas. + * + * @ingroup Evas_Canvas + */ EAPI Evas_Coord evas_coord_screen_x_to_world (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Evas_Coord evas_coord_screen_y_to_world (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI int evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI int evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +/** + * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions + * + * Functions that deal with the status of the pointer (mouse cursor). + * + * @ingroup Evas_Canvas + */ EAPI void evas_pointer_output_xy_get (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1); EAPI void evas_pointer_canvas_xy_get (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); EAPI int evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Eina_Bool evas_pointer_inside_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI void evas_data_attach_set (Evas *e, void *data) EINA_ARG_NONNULL(1); - EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI void evas_focus_in (Evas *e); - EAPI void evas_focus_out (Evas *e); - EAPI Eina_Bool evas_focus_state_get (const Evas *e); - -/* DOC UP TO HERE */ - EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); - EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); - EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1); - EAPI Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI void evas_render_updates_free (Eina_List *updates); - EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(1); - EAPI void evas_norender (Evas *e) EINA_ARG_NONNULL(1); - EAPI void evas_render_idle_flush (Evas *e) EINA_ARG_NONNULL(1); -/* rectangle objects */ + +/** + * @defgroup Evas_Event_Freezing_Group Event Freezing Functions + * + * Functions that deal with the freezing of event processing of an + * evas. + * + * @ingroup Evas_Canvas + */ + EAPI void evas_event_freeze (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONNULL(1); + EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Event_Feeding_Group Event Feeding Functions + * + * Functions to tell Evas that events happened and should be + * processed. + * + * As explained in @ref intro_not_evas, Evas does not know how to poll + * for events, so the developer should do it and then feed such events + * to the canvas to be processed. This is only required if operating + * Evas directly as modules such as Ecore_Evas does that for you. + * + * @ingroup Evas_Canvas + */ + EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_multi_down (Evas *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); + EAPI void evas_event_feed_multi_up (Evas *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); + EAPI void evas_event_feed_multi_move (Evas *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); + EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_key_down (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_key_up (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Canvas_Events Canvas Events + * + * Canvas generates some events + * + * @ingroup Evas_Canvas + */ + + EAPI void evas_event_callback_add (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + EAPI void *evas_event_callback_del (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3); + EAPI void *evas_event_callback_del_full (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + +/** + * @defgroup Evas_Image_Group Image Functions + * + * Functions that deals with images at canvas level. + * + * @ingroup Evas_Canvas + */ + EAPI void evas_image_cache_flush (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_image_cache_reload (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); + EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * @defgroup Evas_Font_Group Font Functions + * + * Functions that deals with fonts. + * + * @ingroup Evas_Canvas + */ + EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1); + EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_font_cache_flush (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_font_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); + EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_font_available_list_free (Evas *e, Eina_List *available) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Font_Path_Group Font Path Functions + * + * Functions that edit the paths being used to load fonts. + * + * @ingroup Evas_Font_Group + */ + EAPI void evas_font_path_clear (Evas *e) EINA_ARG_NONNULL(1); + EAPI void evas_font_path_append (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); + EAPI void evas_font_path_prepend (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); + EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Object_Group Generic Object Functions + * + * Functions that manipulate generic evas objects. + */ + +/** + * @defgroup Evas_Object_Group_Basic Basic Object Manipulation + * + * Methods that are often used, like those that change the color, + * clippers and geometry of the object. + * + * @ingroup Evas_Object_Group + */ + EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2); + EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_clip_unset (Evas_Object *obj); + EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1); + EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); + EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); + EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + EAPI void evas_object_geometry_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + + EAPI void evas_object_show (Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void evas_object_hide (Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); + EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + + EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_raise (Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2); + EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * @defgroup Evas_Object_Group_Events Object Events + * + * Objects generates events when they are moved, resized, when their + * visibility change, when they are deleted and so on. These methods + * will allow one to handle such events. + * + * The events can be those from keyboard and mouse, if the object + * accepts these events. + * + * @ingroup Evas_Object_Group + */ + EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3); + EAPI void *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + + EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspecitve, 3D...) + * + * Evas allows different transformations to be applied to all kinds of + * objects. These are applied by means of UV mapping. + * + * With UV mapping, one maps points in the source object to a 3D space + * positioning at target. This allows rotation, perspective, scale and + * lots of other effects, depending on the map that is used. + * + * Each map point may carry a multiplier color. If properly + * calculated, these can do shading effects on the object, producing + * 3D effects. + * + * As usual, Evas provides both the raw and easy to use methods. The + * raw methods allow developer to create its maps somewhere else, + * maybe load them from some file format. The easy to use methods, + * calculate the points given some high-level parameters, such as + * rotation angle, ambient light and so on. + * + * @note applying mapping will reduce performance, so use with + * care. The impact on performance depends on engine in + * use. Software is quite optimized, but not as fast as OpenGL. + * + * @ingroup Evas_Object_Group + */ + EAPI void evas_object_map_enable_set (Evas_Object *obj, Eina_Bool enabled); + EAPI Eina_Bool evas_object_map_enable_get (const Evas_Object *obj); + EAPI void evas_object_map_source_set (Evas_Object *obj, Evas_Object *src); + EAPI Evas_Object *evas_object_map_source_get (const Evas_Object *obj); + EAPI void evas_object_map_set (Evas_Object *obj, const Evas_Map *map); + EAPI const Evas_Map *evas_object_map_get (const Evas_Object *obj); + + EAPI void evas_map_util_points_populate_from_object_full (Evas_Map *m, const Evas_Object *obj, Evas_Coord z); + EAPI void evas_map_util_points_populate_from_object (Evas_Map *m, const Evas_Object *obj); + EAPI void evas_map_util_points_populate_from_geometry (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z); + + EAPI void evas_map_util_points_color_set (Evas_Map *m, int r, int g, int b, int a); + + EAPI void evas_map_util_rotate (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy); + EAPI void evas_map_util_zoom (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy); + EAPI void evas_map_util_3d_rotate (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz); + EAPI void evas_map_util_3d_lighting (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab); + EAPI void evas_map_util_3d_perspective (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); + EAPI Eina_Bool evas_map_util_clockwise_get (Evas_Map *m); + + EAPI Evas_Map *evas_map_new (int count); + EAPI void evas_map_smooth_set (Evas_Map *m, Eina_Bool enabled); + EAPI Eina_Bool evas_map_smooth_get (const Evas_Map *m); + EAPI void evas_map_alpha_set (Evas_Map *m, Eina_Bool enabled); + EAPI Eina_Bool evas_map_alpha_get (const Evas_Map *m); + EAPI Evas_Map *evas_map_dup (const Evas_Map *m); + EAPI void evas_map_free (Evas_Map *m); + EAPI void evas_map_point_coord_set (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z); + EAPI void evas_map_point_coord_get (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z); + EAPI void evas_map_point_image_uv_set (Evas_Map *m, int idx, double u, double v); + EAPI void evas_map_point_image_uv_get (const Evas_Map *m, int idx, double *u, double *v); + EAPI void evas_map_point_color_set (Evas_Map *m, int idx, int r, int g, int b, int a); + EAPI void evas_map_point_color_get (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a); + +/** + * @defgroup Evas_Object_Group_Size_Hints Size Hints + * + * Objects may carry hints so another object that acts as a manager + * (see @ref Evas_Smart_Object_Group) may know how to proper position + * and resize the object. The Size Hints provide a common interface + * that is recommended as the protocol for such information. + * + * @ingroup Evas_Object_Group + */ + EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); + EAPI void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Object_Group_Extras Extra Object Manipulation + * + * Miscellaneous functions that also apply to any object, but are less + * used or not implemented by all objects. + * + * @ingroup Evas_Object_Group + */ + EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + EAPI void *evas_object_data_del (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2); + + EAPI void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1); + EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_scale_set (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1); + EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_color_interpolation_set (Evas_Object *obj, int color_space) EINA_ARG_NONNULL(1); + EAPI int evas_object_color_interpolation_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1); + EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI void evas_object_precise_is_inside_set (Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_object_precise_is_inside_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Object_Group_Find Finding Objects + * + * Functions that allows finding objects by their position, name or + * other properties. + * + * @ingroup Evas_Object_Group + */ + EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors + * + * Evas provides a way to intercept method calls. The interceptor + * callback may opt to completely deny the call, or may check and + * change the parameters before continuing. The continuation of an + * intercepted call is done by calling the intercepted call again, + * from inside the interceptor callback. + * + * @ingroup Evas_Object_Group + */ + EAPI void evas_object_intercept_show_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_show_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_hide_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_hide_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_move_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_move_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_resize_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_resize_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_raise_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_raise_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_lower_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_lower_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_stack_above_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_stack_below_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_layer_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_layer_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_color_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_color_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_clip_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_clip_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip)) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_clip_unset_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_clip_unset_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); + + + +/** + * @defgroup Evas_Object_Specific Specific Object Functions + * + * Functions that work on specific objects. + * + */ + +/** + * @defgroup Evas_Object_Rectangle Rectangle Object Functions + * + * Functions that operate on evas rectangle objects. + * + * @ingroup Evas_Object_Specific + */ EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; -/* line objects */ - EAPI Evas_Object *evas_object_line_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - EAPI void evas_object_line_xy_set (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2); - EAPI void evas_object_line_xy_get (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2); - -/* gradient objects */ - EAPI Evas_Object *evas_object_gradient_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - EAPI void evas_object_gradient_color_stop_add (Evas_Object *obj, int r, int g, int b, int a, int delta) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient_alpha_stop_add (Evas_Object *obj, int a, int delta) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient_color_data_set (Evas_Object *obj, void *color_data, int len, Eina_Bool has_alpha) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_gradient_alpha_data_set (Evas_Object *obj, void *alpha_data, int len) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_gradient_clear (Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient_type_set (Evas_Object *obj, const char *type, const char *instance_params) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_gradient_type_get (const Evas_Object *obj, char **type, char **instance_params) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_gradient_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient_fill_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1); - EAPI Evas_Angle evas_object_gradient_fill_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_gradient_fill_spread_set(Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1); - EAPI int evas_object_gradient_fill_spread_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_gradient_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1); - EAPI Evas_Angle evas_object_gradient_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_gradient_direction_set (Evas_Object *obj, int direction) EINA_ARG_NONNULL(1); - EAPI int evas_object_gradient_direction_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_gradient_offset_set (Evas_Object *obj, float offset) EINA_ARG_NONNULL(1); - EAPI float evas_object_gradient_offset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - -/* new gradient2 objects - generic properties */ - EAPI void evas_object_gradient2_color_np_stop_insert (Evas_Object *obj, int r, int g, int b, int a, float pos) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient2_fill_spread_set (Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1); - EAPI int evas_object_gradient2_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_gradient2_fill_transform_set (Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient2_fill_transform_get (const Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1); - -/* linear gradient2 objects */ - EAPI Evas_Object *evas_object_gradient2_linear_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - EAPI void evas_object_gradient2_linear_fill_set (Evas_Object *obj, float x0, float y0, float x1, float y1) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient2_linear_fill_get (const Evas_Object *obj, float *x0, float *y0, float *x1, float *y1) EINA_ARG_NONNULL(1); - -/* radial gradient2 objects */ - EAPI Evas_Object *evas_object_gradient2_radial_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - EAPI void evas_object_gradient2_radial_fill_set (Evas_Object *obj, float cx, float cy, float rx, float ry) EINA_ARG_NONNULL(1); - EAPI void evas_object_gradient2_radial_fill_get (const Evas_Object *obj, float *cx, float *cy, float *rx, float *ry) EINA_ARG_NONNULL(1); - -/* polygon objects */ - EAPI Evas_Object *evas_object_polygon_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - EAPI void evas_object_polygon_point_add (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); - EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/* image objects */ +/** + * @defgroup Evas_Object_Image Image Object Functions + * + * Functions used to create and manipulate image objects. + * + * Note - Image objects may return or accept "image data" in multiple + * formats. This is based on the colorspace of an object. Here is a + * rundown on formats: + * + * EVAS_COLORSPACE_ARGB8888: + * + * This pixel format is a linear block of pixels, starting at the + * top-left row by row until the bottom right of the image or pixel + * region. All pixels are 32-bit unsigned int's with the high-byte + * being alpha and the low byte being blue in the format ARGB. Alpha + * may or may not be used by evas depending on the alpha flag of the + * image, but if not used, should be set to 0xff anyway. + * + * This colorspace uses premultiplied alpha. That means that R, G and + * B cannot exceed A in value. The conversion from non-premultiplied + * colorspace is: + * + * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255; + * + * So 50% transparent blue will be: 0x80000080. This will not be + * "dark" - just 50% transparent. Values are 0 == black, 255 == solid + * or full red, green or blue. + * + * EVAS_COLORSPACE_YCBCR422P601_PL: + * + * This is a pointer-list indirected set of YUV (YCbCr) pixel + * data. This means that the data returned or set is not actual pixel + * data, but pointers TO lines of pixel data. The list of pointers + * will first be N rows of pointers to the Y plane - pointing to the + * first pixel at the start of each row in the Y plane. N is the + * height of the image data in pixels. Each pixel in the Y, U and V + * planes is 1 byte exactly, packed. The next N / 2 pointers will + * point to rows in the U plane, and the next N / 2 pointers will + * point to the V plane rows. U and V planes are half the horizontal + * and vertical resolution of the Y plane. + * + * Row order is top to bottom and row pixels are stored left to right. + * + * There is a limitation that these images MUST be a multiple of 2 + * pixels in size horizontally or vertically. This is due to the U and + * V planes being half resolution. Also note that this assumes the + * itu601 YUV colorspace specification. This is defined for standard + * television and mpeg streams. HDTV may use the itu709 + * specification. + * + * Values are 0 to 255, indicating full or no signal in that plane + * respectively. + * + * EVAS_COLORSPACE_YCBCR422P709_PL: + * + * Not implemented yet. + * + * EVAS_COLORSPACE_RGB565_A5P: + * + * In the process of being implemented in 1 engine only. This may change. + * + * This is a pointer to image data for 16-bit half-word pixel data in + * 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with + * the high-byte containing red and the low byte containing blue, per + * pixel. This data is packed row by row from the top-left to the + * bottom right. + * + * If the image has an alpha channel enabled there will be an extra + * alpha plane after the color pixel plane. If not, then this data + * will not exist and should not be accessed in any way. This plane is + * a set of pixels with 1 byte per pixel defining the alpha values of + * all pixels in the image from the top-left to the bottom right of + * the image, row by row. Even though the values of the alpha pixels + * can be 0 to 255, only values 0 through to 32 are used, 32 being + * solid and 0 being transparent. + * + * RGB values can be 0 to 31 for red and blue and 0 to 63 for green, + * with 0 being black and 31 or 63 being full red, green or blue + * respectively. This colorspace is also pre-multiplied like + * EVAS_COLORSPACE_ARGB8888 so: + * + * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32; + * + * @ingroup Evas_Object_Specific + */ EAPI Evas_Object *evas_object_image_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI Evas_Object *evas_object_image_filled_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; @@ -897,7 +1215,7 @@ extern "C" { EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); - + EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1); EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2); @@ -907,13 +1225,15 @@ extern "C" { EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1); EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; -/* image cache */ - EAPI void evas_image_cache_flush (Evas *e) EINA_ARG_NONNULL(1); - EAPI void evas_image_cache_reload (Evas *e) EINA_ARG_NONNULL(1); - EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); - EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - -/* text objects */ +/** + * @defgroup Evas_Object_Text Text Object Functions + * + * Functions that operate on single line, single style text objects. + * + * For multiline and multiple style text, see @ref Evas_Object_Textblock. + * + * @ingroup Evas_Object_Specific + */ typedef enum _Evas_Text_Style_Type { EVAS_TEXT_STYLE_PLAIN, @@ -957,28 +1277,19 @@ extern "C" { EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); -/* string and font handling */ - EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); - EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); - EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_font_path_clear (Evas *e) EINA_ARG_NONNULL(1); - EAPI void evas_font_path_append (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); - EAPI void evas_font_path_prepend (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); - EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - - EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1); - EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - - EAPI void evas_font_cache_flush (Evas *e) EINA_ARG_NONNULL(1); - EAPI void evas_font_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); - EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - - EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_font_available_list_free (Evas *e, Eina_List *available) EINA_ARG_NONNULL(1); - -/* textblock objects */ +/** + * @defgroup Evas_Object_Textblock Textblock Object Functions + * + * Functions used to create and manipulate textblock objects. Unlike + * @ref Evas_Object_Text, these handle complex text, doing multiple + * styles and multiline text based on HTML-like tags. Of these extra + * features will be heavier on memory and processing cost. + * + * @todo put here some usage examples + * + * @ingroup Evas_Object_Specific + */ typedef struct _Evas_Textblock_Style Evas_Textblock_Style; typedef struct _Evas_Textblock_Cursor Evas_Textblock_Cursor; typedef struct _Evas_Textblock_Rectangle Evas_Textblock_Rectangle; @@ -1066,119 +1377,359 @@ extern "C" { EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); EAPI void evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); +/** + * @defgroup Evas_Line_Group Line Object Functions + * + * Functions used to deal with evas line objects. + * + * @ingroup Evas_Object_Specific + */ + EAPI Evas_Object *evas_object_line_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + EAPI void evas_object_line_xy_set (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2); + EAPI void evas_object_line_xy_get (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2); -/* general objects */ - EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @defgroup Evas_Object_Polygon Polygon Object Functions + * + * Functions that operate on evas polygon objects. + * + * Hint: as evas does not provide ellipse, smooth paths or circle, one + * can calculate points and convert these to a polygon. + * + * @ingroup Evas_Object_Specific + */ + EAPI Evas_Object *evas_object_polygon_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + EAPI void evas_object_polygon_point_add (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); + EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @defgroup Evas_Object_Gradient_Group Gradient Object Functions + * + * Functions that work on evas gradient objects. + * + * @ingroup Evas_Object_Specific + */ + EAPI Evas_Object *evas_object_gradient_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + EAPI void evas_object_gradient_color_stop_add (Evas_Object *obj, int r, int g, int b, int a, int delta) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient_alpha_stop_add (Evas_Object *obj, int a, int delta) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient_color_data_set (Evas_Object *obj, void *color_data, int len, Eina_Bool has_alpha) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_gradient_alpha_data_set (Evas_Object *obj, void *alpha_data, int len) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_gradient_clear (Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient_type_set (Evas_Object *obj, const char *type, const char *instance_params) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_gradient_type_get (const Evas_Object *obj, char **type, char **instance_params) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_gradient_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient_fill_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1); + EAPI Evas_Angle evas_object_gradient_fill_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_gradient_fill_spread_set(Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1); + EAPI int evas_object_gradient_fill_spread_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_gradient_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1); + EAPI Evas_Angle evas_object_gradient_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_gradient_direction_set (Evas_Object *obj, int direction) EINA_ARG_NONNULL(1); + EAPI int evas_object_gradient_direction_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_gradient_offset_set (Evas_Object *obj, float offset) EINA_ARG_NONNULL(1); + EAPI float evas_object_gradient_offset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1); - EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @defgroup Evas_Object_Gradient2_Group Gradient2 Object Functions + * + * Functions that work on evas gradient2 objects. + * + * @ingroup Evas_Object_Specific + */ + EAPI void evas_object_gradient2_color_np_stop_insert (Evas_Object *obj, int r, int g, int b, int a, float pos) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient2_fill_spread_set (Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1); + EAPI int evas_object_gradient2_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_object_gradient2_fill_transform_set (Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient2_fill_transform_get (const Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1); - EAPI void evas_object_raise (Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2); - EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/* linear gradient2 objects */ + EAPI Evas_Object *evas_object_gradient2_linear_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + EAPI void evas_object_gradient2_linear_fill_set (Evas_Object *obj, float x0, float y0, float x1, float y1) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient2_linear_fill_get (const Evas_Object *obj, float *x0, float *y0, float *x1, float *y1) EINA_ARG_NONNULL(1); - EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); - EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - EAPI void evas_object_geometry_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); +/* radial gradient2 objects */ + EAPI Evas_Object *evas_object_gradient2_radial_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + EAPI void evas_object_gradient2_radial_fill_set (Evas_Object *obj, float cx, float cy, float rx, float ry) EINA_ARG_NONNULL(1); + EAPI void evas_object_gradient2_radial_fill_get (const Evas_Object *obj, float *cx, float *cy, float *rx, float *ry) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); - EAPI void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1); - EAPI void evas_object_show (Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI void evas_object_hide (Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @defgroup Evas_Smart_Group Smart Functions + * + * Functions that deal with Evas_Smart's, creating definition + * (classes) of objects that will have customized behavior for methods + * like evas_object_move(), evas_object_resize(), + * evas_object_clip_set() and others. + * + * These objects will accept the generic methods defined in @ref + * Evas_Object_Group and the extensions defined in @ref + * Evas_Smart_Object_Group. There are couple of existent smart objects + * in Evas itself, see @ref Evas_Object_Box, @ref Evas_Object_Table + * and @ref Evas_Smart_Object_Clipped. + */ - EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1); - EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @def EVAS_SMART_CLASS_VERSION + * The version you have to put into the version field in the smart + * class struct + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_VERSION 4 +/** + * @struct _Evas_Smart_Class + * a smart object class + * @ingroup Evas_Smart_Group + */ +struct _Evas_Smart_Class +{ + const char *name; /**< the string name of the class */ - EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + int version; - EAPI void evas_object_scale_set (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1); - EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + void (*add) (Evas_Object *o); + void (*del) (Evas_Object *o); + void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y); + void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h); + void (*show) (Evas_Object *o); + void (*hide) (Evas_Object *o); + void (*color_set) (Evas_Object *o, int r, int g, int b, int a); + void (*clip_set) (Evas_Object *o, Evas_Object *clip); + void (*clip_unset) (Evas_Object *o); + void (*calculate) (Evas_Object *o); + void (*member_add) (Evas_Object *o, Evas_Object *child); + void (*member_del) (Evas_Object *o, Evas_Object *child); - EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + const Evas_Smart_Class *parent; /**< this class inherits from this parent */ + const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, NULL terminated */ - EAPI void evas_object_color_interpolation_set (Evas_Object *obj, int color_space) EINA_ARG_NONNULL(1); - EAPI int evas_object_color_interpolation_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + const void *data; +}; - EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2); - EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_clip_unset (Evas_Object *obj); - EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @struct _Evas_Smart_Cb_Description + * + * Describes a callback used by a smart class + * evas_object_smart_callback_call(), particularly useful to explain + * to user and its code (ie: introspection) what the parameter @c + * event_info will contain. + * + * @ingroup Evas_Smart_Group + */ +struct _Evas_Smart_Cb_Description +{ + const char *name; /**< callback name, ie: "changed" */ - EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; - EAPI void *evas_object_data_del (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2); + /** + * @brief Hint type of @c event_info parameter of Evas_Smart_Cb. + * + * The type string uses the pattern similar to + * + * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures + * + * but extended to optionally include variable names within + * brackets preceding types. Example: + * + * @li Structure with two integers: + * @c "(ii)" + * + * @li Structure called 'x' with two integers named 'a' and 'b': + * @c "[x]([a]i[b]i)" + * + * @li Array of integers: + * @c "ai" + * + * @li Array called 'x' of struct with two integers: + * @c "[x]a(ii)" + * + * @note This type string is used as a hint and is @b not validated + * or enforced anyhow. Implementors should make the best use + * of it to help bindings, documentation and other users of + * introspection features. + */ + const char *type; +}; - EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); - EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @def EVAS_SMART_CLASS_INIT_NULL + * Initializer to zero a whole Evas_Smart_Class structure. + * + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} - EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @def EVAS_SMART_CLASS_INIT_VERSION + * Initializer to zero a whole Evas_Smart_Class structure and set version. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} - EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @def EVAS_SMART_CLASS_INIT_NAME_VERSION + * Initializer to zero a whole Evas_Smart_Class structure and set name + * and version. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION and name to the specified value. + * + * It will keep a reference to name field as a "const char *", that is, + * name must be available while the structure is used (hint: static or global!) + * and will not be modified. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} - EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * Initializer to zero a whole Evas_Smart_Class structure and set name, + * version and parent class. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION, name to the specified value and + * parent class. + * + * It will keep a reference to name field as a "const char *", that is, + * name must be available while the structure is used (hint: static or global!) + * and will not be modified. Similarly, parent reference will be kept. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL} - EAPI void evas_object_map_enable_set (Evas_Object *obj, Eina_Bool enabled); - EAPI Eina_Bool evas_object_map_enable_get (const Evas_Object *obj); - EAPI void evas_object_map_source_set (Evas_Object *obj, Evas_Object *src); - EAPI Evas_Object *evas_object_map_source_get (const Evas_Object *obj); - EAPI void evas_object_map_set (Evas_Object *obj, const Evas_Map *map); - EAPI const Evas_Map *evas_object_map_get (const Evas_Object *obj); +/** + * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * Initializer to zero a whole Evas_Smart_Class structure and set name, + * version, parent class and callbacks definition. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent + * class and callbacks at this level. + * + * It will keep a reference to name field as a "const char *", that is, + * name must be available while the structure is used (hint: static or global!) + * and will not be modified. Similarly, parent and callbacks reference + * will be kept. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks} - EAPI void evas_map_util_points_populate_from_object_full (Evas_Map *m, const Evas_Object *obj, Evas_Coord z); - EAPI void evas_map_util_points_populate_from_object (Evas_Map *m, const Evas_Object *obj); - EAPI void evas_map_util_points_populate_from_geometry (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z); +/** + * @def EVAS_SMART_SUBCLASS_NEW + * + * Convenience macro to subclass a Smart Class. + * + * This macro saves some typing when writing a Smart Class derived from + * another one. In order to work, the user needs to provide some functions + * adhering to the following guidelines. + * - @_smart_set_user(): the internal _smart_set function will call + * this one provided by the user after inheriting everything from the + * parent, which should take care of setting the right member functions + * for the class. + * - @_parent_sc: smart class of the parent. When calling parent + * functions from overloaded ones, use this global variable. + * - @_smart_class_new(): this function returns the Evas_Smart needed + * to create smart objects with this class, should be called by the public + * _add() function. + * - If this new class should be subclassable as well, a public _smart_set() + * function is desirable to fill the class used as parent by the children. + * It's up to the user to provide this interface, which will most likely + * call @_smart_set() to get the job done. + * + * @param smart_name The name used for the Smart Class. e.g: "Evas_Object_Box". + * @param prefix Prefix used for all variables and functions defined. + * @param api_type Type of the structure used as API for the Smart Class. Either Evas_Smart_Class or something derived from it. + * @param parent_type Type of the parent class API. + * @param parent_func Function that sets up the parent class. e.g: evas_object_box_smart_set(). + * @param cb_desc Array of callback descriptions for this Smart Class. + * + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \ + static parent_type prefix##_parent_sc; \ + static Eina_Bool prefix##_parent_init = 0; \ + static void prefix##_smart_set_user(api_type *api); \ + static void prefix##_smart_set(api_type *api) \ + { \ + Evas_Smart_Class *sc; \ + if (!(sc = (Evas_Smart_Class *)api)) \ + return; \ + if (!prefix##_parent_init) \ + { \ + memset(&prefix##_parent_sc, 0, sizeof(parent_type)); \ + ((Evas_Smart_Class*)&prefix##_parent_sc)->version = EVAS_SMART_CLASS_VERSION; \ + parent_func(&prefix##_parent_sc); \ + prefix##_parent_init = 1; \ + } \ + evas_smart_class_inherit(sc, &prefix##_parent_sc); \ + prefix##_smart_set_user(api); \ + } \ + static Evas_Smart * prefix##_smart_class_new(void) \ + { \ + static Evas_Smart *smart = NULL; \ + static api_type api; \ + if (!smart) \ + { \ + Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \ + memset(&api, 0, sizeof(api_type)); \ + sc->version = EVAS_SMART_CLASS_VERSION; \ + sc->name = smart_name; \ + sc->callbacks = cb_desc; \ + prefix##_smart_set(&api); \ + smart = evas_smart_class_new(sc); \ + } \ + return smart; \ + } - EAPI void evas_map_util_points_color_set (Evas_Map *m, int r, int g, int b, int a); +/** + * @def EVAS_SMART_DATA_ALLOC + * Convenience macro to allocate smart data only if needed. + * + * When writing a subclassable smart object, the .add function will need + * to check if the smart private data was already allocated by some child + * object or not. This macro makes it easier to do it. + * + * @param o Evas object passed to the .add function + * @param priv_type The type of the data to allocate + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_DATA_ALLOC(o, priv_type) \ + priv_type *priv; \ + priv = evas_object_smart_data_get(o); \ + if (!priv) \ + { \ + priv = (priv_type *)calloc(1, sizeof(priv_type)); \ + if (!priv) \ + return; \ + evas_object_smart_data_set(o, priv); \ + } - EAPI void evas_map_util_rotate (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy); - EAPI void evas_map_util_zoom (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy); - EAPI void evas_map_util_3d_rotate (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz); - EAPI void evas_map_util_3d_lighting (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ab, int ag); - EAPI void evas_map_util_3d_perspective (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); - EAPI Eina_Bool evas_map_util_clockwise_get (Evas_Map *m); - - EAPI Evas_Map *evas_map_new (int count); - EAPI void evas_map_smooth_set (Evas_Map *m, Eina_Bool enabled); - EAPI Eina_Bool evas_map_smooth_get (const Evas_Map *m); - EAPI void evas_map_alpha_set (Evas_Map *m, Eina_Bool enabled); - EAPI Eina_Bool evas_map_alpha_get (const Evas_Map *m); - EAPI Evas_Map *evas_map_dup (const Evas_Map *m); - EAPI void evas_map_free (Evas_Map *m); - EAPI void evas_map_point_coord_set (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z); - EAPI void evas_map_point_coord_get (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z); - EAPI void evas_map_point_image_uv_set (Evas_Map *m, int idx, double u, double v); - EAPI void evas_map_point_image_uv_get (const Evas_Map *m, int idx, double *u, double *v); - EAPI void evas_map_point_color_set (Evas_Map *m, int idx, int r, int g, int b, int a); - EAPI void evas_map_point_color_get (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a); - -/* smart objects */ EINA_DEPRECATED EAPI Evas_Smart *evas_smart_new (const char *name, void (*func_add) (Evas_Object *obj), void (*func_del) (Evas_Object *obj), void (*func_layer_set) (Evas_Object *obj, int l), void (*func_raise) (Evas_Object *obj), void (*func_lower) (Evas_Object *obj), void (*func_stack_above) (Evas_Object *obj, Evas_Object *above), void (*func_stack_below) (Evas_Object *obj, Evas_Object *below), void (*func_move) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*func_resize) (Evas_Object *obj, Evas_Coord w, Evas_Coord h), void (*func_show) (Evas_Object *obj), void (*func_hide) (Evas_Object *obj), void (*func_color_set) (Evas_Object *obj, int r, int g, int b, int a), void (*func_clip_set) (Evas_Object *obj, Evas_Object *clip), void (*func_clip_unset) (Evas_Object *obj), const void *data) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1); EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; @@ -1189,6 +1740,7 @@ extern "C" { EAPI Eina_Bool evas_smart_class_inherit_full (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2); /** + * @def evas_smart_class_inherit * Easy to use version of evas_smart_class_inherit_full(). * * This version will use sizeof(parent_sc), copying everything. @@ -1196,10 +1748,23 @@ extern "C" { * @param sc child class, will have methods copied from @a parent_sc * @param parent_sc parent class, will provide contents to be copied. * @return 1 on success, 0 on failure. + * @ingroup Evas_Smart_Group */ #define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc)) - +/** + * @defgroup Evas_Smart_Object_Group Smart Object Functions + * + * Functions dealing with evas smart objects (instances). + * + * Smart objects are groupings of primitive evas objects that behave as a + * cohesive group. For instance, a file manager icon may be a smart object + * composed of an image object, a text label and two rectangles that appear + * behind the image and text when the icon is selected. As a smart object, + * the normal evas api could be used on the icon object. + * + * @see @ref Evas_Smart_Group for class definitions. + */ EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC; EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA_ARG_NONNULL(1); @@ -1220,259 +1785,90 @@ extern "C" { EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1); EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; EAPI void evas_object_smart_calculate (Evas_Object *obj) EINA_ARG_NONNULL(1); - + EAPI void evas_smart_objects_calculate (Evas *e); -/* events */ - EAPI void evas_event_freeze (Evas *e) EINA_ARG_NONNULL(1); - EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONNULL(1); - EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_multi_down (Evas *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); - EAPI void evas_event_feed_multi_up (Evas *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); - EAPI void evas_event_feed_multi_move (Evas *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); - EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_key_down (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_key_up (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); - EAPI void evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object + * + * Clipped smart object is a base to construct other smart objects + * that based on the concept of having an internal clipper that is + * applied to all its other children. This clipper will control the + * visibility, clipping and color of sibling objects (remember that + * the clipping is recursive, and clipper color modulates the color of + * its clippees). By default, this base will also move children + * relatively to the parent, and delete them when parent is + * deleted. In other words, it is the base for simple object grouping. + * + * @see evas_object_smart_clipped_smart_set() + * + * @ingroup Evas_Smart_Object_Group + */ - EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - - EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - - EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; - - EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; - - EAPI void evas_key_modifier_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - EAPI void evas_key_modifier_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - EAPI void evas_key_lock_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - EAPI void evas_key_lock_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - - EAPI void evas_key_modifier_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - EAPI void evas_key_modifier_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - EAPI void evas_key_lock_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - EAPI void evas_key_lock_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); - - EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; - - EAPI Eina_Bool evas_object_key_grab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_key_ungrab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2); - - EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1); - EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - - - EAPI void evas_object_precise_is_inside_set (Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_object_precise_is_inside_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - - EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); - EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3); - EAPI void *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); - - EAPI void evas_event_callback_add (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); - EAPI void *evas_event_callback_del (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3); - EAPI void *evas_event_callback_del_full (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); - - EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; - EAPI int evas_async_events_process (void); - EAPI Eina_Bool evas_async_events_put (const void *target, Evas_Callback_Type type, void *event_info, void (*func)(void *target, Evas_Callback_Type type, void *event_info)) EINA_ARG_NONNULL(1, 4); - - EAPI void evas_object_intercept_show_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_show_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_hide_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_hide_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_move_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_move_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_resize_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_resize_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_raise_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_raise_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_lower_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_lower_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_stack_above_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_stack_below_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_layer_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_layer_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_color_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_color_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_clip_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_clip_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip)) EINA_ARG_NONNULL(1, 2); - EAPI void evas_object_intercept_clip_unset_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void *evas_object_intercept_clip_unset_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2); - - typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats; - typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache; - typedef struct _Evas_Cserve_Image Evas_Cserve_Image; - typedef struct _Evas_Cserve_Config Evas_Cserve_Config; - - struct _Evas_Cserve_Stats - { - int saved_memory; - int wasted_memory; - int saved_memory_peak; - int wasted_memory_peak; - double saved_time_image_header_load; - double saved_time_image_data_load; - }; - - struct _Evas_Cserve_Image_Cache - { - struct { - int mem_total; - int count; - } active, cached; - Eina_List *images; - }; - - struct _Evas_Cserve_Image - { - const char *file, *key; - int w, h; - time_t file_mod_time; - time_t file_checked_time; - time_t cached_time; - int refcount; - int data_refcount; - int memory_footprint; - double head_load_time; - double data_load_time; - Eina_Bool alpha : 1; - Eina_Bool data_loaded : 1; - Eina_Bool active : 1; - Eina_Bool dead : 1; - Eina_Bool useless : 1; - }; - - struct _Evas_Cserve_Config - { - int cache_max_usage; - int cache_item_timeout; - int cache_item_timeout_check; - }; - - EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; - EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; - EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT EINA_PURE; - EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE; - EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; - EAPI Eina_Bool evas_cserve_config_set (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; - EAPI void evas_cserve_disconnect (void) EINA_PURE; - -/* Evas utility routines for color space conversions */ -/* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */ -/* rgb color space has r,g,b in the range 0 to 255 */ - EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b); - EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v); - -/* argb color space has a,r,g,b in the range 0 to 255 */ - EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b); - EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b); - - EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len); - EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len); - -/* Evas utility routines for working with transforms */ - /* Set t to the identity */ - EAPI void evas_transform_identity_set (Evas_Transform *t); - /* Left-multiply t by an xy rotation defined by the given angle (in degrees) */ - EAPI void evas_transform_rotate (double angle, Evas_Transform *t); - /* Left-multiply t by an xy translation defined by the given dx, dy values */ - EAPI void evas_transform_translate (float dx, float dy, Evas_Transform *t); - /* Left-multiply t by an xy scaling defined by the given sx, sy factors */ - EAPI void evas_transform_scale (float sx, float sy, Evas_Transform *t); - /* Left-multiply t by an xy shearing defined by the given sh, sv values */ - EAPI void evas_transform_shear (float sh, float sv, Evas_Transform *t); - /* Left-multiply t by the given transform l */ - EAPI void evas_transform_compose (Evas_Transform *l, Evas_Transform *t); - -/* Evas imaging api - exports some of the comon gfx engine routines */ -/* this is not complete and should be considered experimental. use at your */ -/* own risk */ - - typedef struct _Evas_Imaging_Image Evas_Imaging_Image; - typedef struct _Evas_Imaging_Font Evas_Imaging_Font; - - /** - * Error identifier or EVAS_LOAD_ERROR_NONE. see evas_load_error_str(). - */ - EAPI extern int evas_imaging_image_load_error; - - EAPI Evas_Imaging_Image *evas_imaging_image_load (const char *file, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC; - EAPI void evas_imaging_image_free (Evas_Imaging_Image *im) EINA_ARG_NONNULL(1); - EAPI void evas_imaging_image_size_get (const Evas_Imaging_Image *im, int *w, int *h) EINA_ARG_NONNULL(1); - EAPI Eina_Bool evas_imaging_image_alpha_get (const Evas_Imaging_Image *im) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_imaging_image_cache_set (int bytes); - EAPI int evas_imaging_image_cache_get (void) EINA_WARN_UNUSED_RESULT; - - EAPI void evas_imaging_font_hinting_set (Evas_Font_Hinting_Flags hinting); - EAPI Evas_Font_Hinting_Flags evas_imaging_font_hinting_get (void) EINA_WARN_UNUSED_RESULT; - EAPI Eina_Bool evas_imaging_font_hinting_can_hint (Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT; - - EAPI Evas_Imaging_Font *evas_imaging_font_load (const char *file, const char *key, int size) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - EAPI void evas_imaging_font_free (Evas_Imaging_Font *fn) EINA_ARG_NONNULL(1); - EAPI int evas_imaging_font_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI int evas_imaging_font_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI int evas_imaging_font_max_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI int evas_imaging_font_max_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI int evas_imaging_font_line_advance_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_imaging_font_string_advance_get (const Evas_Imaging_Font *fn, const char *str, int *x, int *y) EINA_ARG_NONNULL(1, 2); - EAPI void evas_imaging_font_string_size_query (const Evas_Imaging_Font *fn, const char *str, int *w, int *h) EINA_ARG_NONNULL(1, 2); - EAPI int evas_imaging_font_string_inset_get (const Evas_Imaging_Font *fn, const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; - EAPI int evas_imaging_font_string_char_coords_get (const Evas_Imaging_Font *fn, const char *str, int pos, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; - EAPI int evas_imaging_font_string_char_at_coords_get (const Evas_Imaging_Font *fn, const char *str, int x, int y, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; - - EAPI void evas_imaging_font_cache_set (int bytes); - EAPI int evas_imaging_font_cache_get (void) EINA_WARN_UNUSED_RESULT; - - - /** - * Utilities: - */ - EAPI const char *evas_load_error_str(int error); - - - /** - * Every subclass should provide this at the beginning of their own - * data set with evas_object_smart_data_set(). - */ - typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data; - struct _Evas_Object_Smart_Clipped_Data - { - Evas_Object *clipper; - Evas *evas; - }; +/** + * Every subclass should provide this at the beginning of their own + * data set with evas_object_smart_data_set(). + */ + typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data; + struct _Evas_Object_Smart_Clipped_Data + { + Evas_Object *clipper; + Evas *evas; + }; EAPI Evas_Object *evas_object_smart_clipped_clipper_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; EAPI void evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc) EINA_ARG_NONNULL(1); - /* convenience */ EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1); - +/** + * @defgroup Evas_Object_Box Box (Sequence) Smart Object. + * + * Convenience smart object that packs children as a sequence using + * a layout function specified by user. There are a couple of helper + * layout functions, all of them using children size hints to define + * their size and alignment inside their cell space. + * + * @see @ref Evas_Object_Group_Size_Hints + * + * @ingroup Evas_Smart_Object_Group + */ +/** + * @typedef Evas_Object_Box_Api + * Smart Class extension providing extra box requirements. + * @ingroup Evas_Object_Box + */ typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api; +/** + * @typedef Evas_Object_Box_Data + * Smart instance data providing box requirements. + * @ingroup Evas_Object_Box + */ typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data; +/** + * @typedef Evas_Object_Box_Option + * The base structure for a box option. + * @ingroup Evas_Object_Box + */ typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option; typedef void (*Evas_Object_Box_Layout)(Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data); +/** + * @def EVAS_OBJECT_BOX_API_VERSION + * @ingroup Evas_Object_Box + */ #define EVAS_OBJECT_BOX_API_VERSION 1 +/** + * @struct _Evas_Object_Box_Api + * + * This structure should be used by any class that wants to inherit + * from box to provide custom behavior not allowed only by providing a + * layout function with evas_object_box_layout_set(). + * + * @extends Evas_Smart_Class + * @ingroup Evas_Object_Box + */ struct _Evas_Object_Box_Api { Evas_Smart_Class base; @@ -1493,6 +1889,7 @@ extern "C" { }; /** + * @def EVAS_OBJECT_BOX_API_INIT * Initializer for whole Evas_Object_Box_Api structure. * * @param smart_class_init initializer to use for the "base" field @@ -1504,19 +1901,23 @@ extern "C" { * @see EVAS_OBJECT_BOX_API_INIT_NULL * @see EVAS_OBJECT_BOX_API_INIT_VERSION * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION + * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} /** + * @def EVAS_OBJECT_BOX_API_INIT_NULL * Initializer to zero a whole Evas_Object_Box_Api structure. * * @see EVAS_OBJECT_BOX_API_INIT_VERSION * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION * @see EVAS_OBJECT_BOX_API_INIT + * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL) /** + * @def EVAS_OBJECT_BOX_API_INIT_VERSION * Initializer to zero a whole Evas_Object_Box_Api structure and set version. * * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of @@ -1525,10 +1926,12 @@ extern "C" { * @see EVAS_OBJECT_BOX_API_INIT_NULL * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION * @see EVAS_OBJECT_BOX_API_INIT + * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) /** + * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION * Initializer to zero a whole Evas_Object_Box_Api structure and set * name and version. * @@ -1543,9 +1946,21 @@ extern "C" { * @see EVAS_OBJECT_BOX_API_INIT_NULL * @see EVAS_OBJECT_BOX_API_INIT_VERSION * @see EVAS_OBJECT_BOX_API_INIT + * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) +/** + * @struct _Evas_Object_Box_Data + * + * This structure augments clipped smart object's instance data, + * providing extra members required by generic box implementation. If + * a subclass inherits from #Evas_Object_Box_Api then it may augment + * #Evas_Object_Box_Data to fit its own needs. + * + * @extends Evas_Object_Smart_Clipped_Data + * @ingroup Evas_Object_Box + */ struct _Evas_Object_Box_Data { Evas_Object_Smart_Clipped_Data base; @@ -1611,6 +2026,17 @@ extern "C" { EAPI Eina_Bool evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2); +/** + * @defgroup Evas_Object_Table Table Smart Object. + * + * Convenience smart object that packs children using a tabular + * layout using children size hints to define their size and + * alignment inside their cell space. + * + * @see @ref Evas_Object_Group_Size_Hints + * + * @ingroup Evas_Smart_Object_Group + */ EAPI Evas_Object *evas_object_table_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI Evas_Object *evas_object_table_add_to(Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI void evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1); @@ -1629,6 +2055,204 @@ extern "C" { EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI Eina_List *evas_object_table_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * @defgroup Evas_Cserve Shared Image Cache Server + * + * Provides client-server infrastructure to share bitmaps across + * multiple processes, saving data and processing power. + */ + typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats; + typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache; + typedef struct _Evas_Cserve_Image Evas_Cserve_Image; + typedef struct _Evas_Cserve_Config Evas_Cserve_Config; + +/** + * Statistics about server that shares cached bitmaps. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Stats + { + int saved_memory; /**< current saved memory, in bytes */ + int wasted_memory; /**< current wasted memory, in bytes */ + int saved_memory_peak; /**< peak of saved memory, in bytes */ + int wasted_memory_peak; /**< peak of wasted memory, in bytes */ + double saved_time_image_header_load; + double saved_time_image_data_load; + }; + +/** + * Cache of images shared by server. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Image_Cache + { + struct { + int mem_total; + int count; + } active, cached; + Eina_List *images; + }; + +/** + * An image shared by the server. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Image + { + const char *file, *key; + int w, h; + time_t file_mod_time; + time_t file_checked_time; + time_t cached_time; + int refcount; + int data_refcount; + int memory_footprint; + double head_load_time; + double data_load_time; + Eina_Bool alpha : 1; + Eina_Bool data_loaded : 1; + Eina_Bool active : 1; + Eina_Bool dead : 1; + Eina_Bool useless : 1; + }; + +/** + * Configuration that controls the server that shares cached bitmaps. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Config + { + int cache_max_usage; + int cache_item_timeout; + int cache_item_timeout_check; + }; + + EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; + EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT; + EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT; + EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE; + EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; + EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; + EAPI void evas_cserve_disconnect (void); + + +/** + * @defgroup Evas_Utils General Utilities + * + * Some functions that are handy but are not specific of canvas or + * objects. + */ + EAPI const char *evas_load_error_str(int error); + +/* Evas utility routines for color space conversions */ +/* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */ +/* rgb color space has r,g,b in the range 0 to 255 */ + EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b); + EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v); + +/* argb color space has a,r,g,b in the range 0 to 255 */ + EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b); + EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b); + + EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len); + EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len); + +/* Evas utility routines for working with transforms */ + /* Set t to the identity */ + EAPI void evas_transform_identity_set (Evas_Transform *t); + /* Left-multiply t by an xy rotation defined by the given angle (in degrees) */ + EAPI void evas_transform_rotate (double angle, Evas_Transform *t); + /* Left-multiply t by an xy translation defined by the given dx, dy values */ + EAPI void evas_transform_translate (float dx, float dy, Evas_Transform *t); + /* Left-multiply t by an xy scaling defined by the given sx, sy factors */ + EAPI void evas_transform_scale (float sx, float sy, Evas_Transform *t); + /* Left-multiply t by an xy shearing defined by the given sh, sv values */ + EAPI void evas_transform_shear (float sh, float sv, Evas_Transform *t); + /* Left-multiply t by the given transform l */ + EAPI void evas_transform_compose (Evas_Transform *l, Evas_Transform *t); + +/* string and font handling */ + EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); + EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); + EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Imaging Imaging and Commong GFX + * + * Evas imaging api - exports some of the comon gfx engine routines + * this is not complete and should be considered experimental. use at your + * own risk + */ + + typedef struct _Evas_Imaging_Image Evas_Imaging_Image; + typedef struct _Evas_Imaging_Font Evas_Imaging_Font; + + /** + * Error identifier or EVAS_LOAD_ERROR_NONE. see evas_load_error_str(). + * @ingroup Evas_Imaging + */ + EAPI extern int evas_imaging_image_load_error; + + EAPI Evas_Imaging_Image *evas_imaging_image_load (const char *file, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC; + EAPI void evas_imaging_image_free (Evas_Imaging_Image *im) EINA_ARG_NONNULL(1); + EAPI void evas_imaging_image_size_get (const Evas_Imaging_Image *im, int *w, int *h) EINA_ARG_NONNULL(1); + EAPI Eina_Bool evas_imaging_image_alpha_get (const Evas_Imaging_Image *im) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_imaging_image_cache_set (int bytes); + EAPI int evas_imaging_image_cache_get (void) EINA_WARN_UNUSED_RESULT; + + EAPI void evas_imaging_font_hinting_set (Evas_Font_Hinting_Flags hinting); + EAPI Evas_Font_Hinting_Flags evas_imaging_font_hinting_get (void) EINA_WARN_UNUSED_RESULT; + EAPI Eina_Bool evas_imaging_font_hinting_can_hint (Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT; + + EAPI Evas_Imaging_Font *evas_imaging_font_load (const char *file, const char *key, int size) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + EAPI void evas_imaging_font_free (Evas_Imaging_Font *fn) EINA_ARG_NONNULL(1); + EAPI int evas_imaging_font_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI int evas_imaging_font_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI int evas_imaging_font_max_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI int evas_imaging_font_max_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI int evas_imaging_font_line_advance_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI void evas_imaging_font_string_advance_get (const Evas_Imaging_Font *fn, const char *str, int *x, int *y) EINA_ARG_NONNULL(1, 2); + EAPI void evas_imaging_font_string_size_query (const Evas_Imaging_Font *fn, const char *str, int *w, int *h) EINA_ARG_NONNULL(1, 2); + EAPI int evas_imaging_font_string_inset_get (const Evas_Imaging_Font *fn, const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + EAPI int evas_imaging_font_string_char_coords_get (const Evas_Imaging_Font *fn, const char *str, int pos, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + EAPI int evas_imaging_font_string_char_at_coords_get (const Evas_Imaging_Font *fn, const char *str, int x, int y, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + EAPI void evas_imaging_font_cache_set (int bytes); + EAPI int evas_imaging_font_cache_get (void) EINA_WARN_UNUSED_RESULT; + + + + + +/** + * TO BE DOCUMENTED: + * @todo document key modifiers. + */ + EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + EAPI void evas_key_modifier_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + EAPI void evas_key_modifier_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + EAPI void evas_key_lock_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + EAPI void evas_key_lock_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + + EAPI void evas_key_modifier_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + EAPI void evas_key_modifier_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + EAPI void evas_key_lock_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + EAPI void evas_key_lock_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + + EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + EAPI Eina_Bool evas_object_key_grab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_key_ungrab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2); + + + #ifdef __cplusplus } #endif diff --git a/legacy/evas/src/lib/canvas/evas_async_events.c b/legacy/evas/src/lib/canvas/evas_async_events.c index 45cbf3f76f..76a3787d0e 100644 --- a/legacy/evas/src/lib/canvas/evas_async_events.c +++ b/legacy/evas/src/lib/canvas/evas_async_events.c @@ -81,6 +81,7 @@ evas_async_events_shutdown(void) * asynchronous events of the canvas. Naturally, other mainloops, * apart from ecore, may make use of it. * + * @ingroup Evas_Group */ EAPI int evas_async_events_fd_get(void) @@ -103,6 +104,7 @@ evas_async_events_fd_get(void) * together with other event parameters, when queued, get called (with * those parameters), in that order. * + * @ingroup Evas_Group */ EAPI int evas_async_events_process(void) @@ -156,6 +158,7 @@ evas_async_events_process(void) * whose call is to happen after evas_async_events_process() is * called. * + * @ingroup Evas_Group */ EAPI Eina_Bool evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, void (*func)(void *target, Evas_Callback_Type type, void *event_info)) diff --git a/legacy/evas/src/lib/canvas/evas_callbacks.c b/legacy/evas/src/lib/canvas/evas_callbacks.c index c61d73c2b5..c67c67b51b 100644 --- a/legacy/evas/src/lib/canvas/evas_callbacks.c +++ b/legacy/evas/src/lib/canvas/evas_callbacks.c @@ -184,7 +184,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Events * @{ */ @@ -221,18 +221,18 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void * that triggered the callback. * * The event type @p type to trigger the function may be one of - * EVAS_CALLBACK_MOUSE_IN, EVAS_CALLBACK_MOUSE_OUT, - * EVAS_CALLBACK_MOUSE_DOWN, EVAS_CALLBACK_MOUSE_UP, - * EVAS_CALLBACK_MOUSE_MOVE, EVAS_CALLBACK_MOUSE_WHEEL, - * EVAS_CALLBACK_FREE, EVAS_CALLBACK_KEY_DOWN, EVAS_CALLBACK_KEY_UP, - * EVAS_CALLBACK_FOCUS_IN, EVAS_CALLBACK_FOCUS_OUT, - * EVAS_CALLBACK_SHOW, EVAS_CALLBACK_HIDE, EVAS_CALLBACK_MOVE, - * EVAS_CALLBACK_RESIZE or EVAS_CALLBACK_RESTACK. + * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT, + * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP, + * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL, + * #EVAS_CALLBACK_FREE, #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP, + * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT, + * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE, + * #EVAS_CALLBACK_RESIZE or #EVAS_CALLBACK_RESTACK. * This determines the kind of event that will trigger the callback to * be called. The @p event_info pointer passed to the callback will * be one of the following, depending on the event triggering it: * - * EVAS_CALLBACK_MOUSE_IN: event_info = pointer to Evas_Event_Mouse_In + * #EVAS_CALLBACK_MOUSE_IN: event_info = pointer to Evas_Event_Mouse_In * * This event is triggered when the mouse pointer enters the region of * the object @p obj. This may occur by the mouse pointer being moved @@ -241,9 +241,9 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void * shown, raised, moved, resized, or other objects being moved out of * the way, hidden, lowered or moved out of the way. * - * EVAS_CALLBACK_MOUSE_OUT: event_info = pointer to Evas_Event_Mouse_Out + * #EVAS_CALLBACK_MOUSE_OUT: event_info = pointer to Evas_Event_Mouse_Out * - * This event is triggered exactly like EVAS_CALLBACK_MOUSE_IN is, but + * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is, but * occurs when the mouse pointer exits an object. Note that no out * events will be reported if the mouse pointer is implicitly grabbed * to an object (the mouse buttons are down at all and any were @@ -252,7 +252,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void * depressed). Out events will be reported once all buttons are * released, if the mouse has left the object. * - * EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to + * #EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to * Evas_Event_Mouse_Down * * This event is triggered by a mouse button being depressed while @@ -265,25 +265,25 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void * presses. When all buttons are released, event propagation occurs as * normal. * - * EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up + * #EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up * * This event is triggered by a mouse button being released while over * an object or when passively grabbed to an object. If this is the * last mouse button to be raised on an object then the passive grab * is released and event processing will continue as normal. * - * EVAS_CALLBACK_MOUSE_MOVE: event_info = pointer to Evas_Event_Mouse_Move + * #EVAS_CALLBACK_MOUSE_MOVE: event_info = pointer to Evas_Event_Mouse_Move * * This event is triggered by the mouse pointer moving while over an * object or passively grabbed to an object. * - * EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to + * #EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to * Evas_Event_Mouse_Wheel * * This event is triggered by the mouse wheel being rolled while over * an object or passively grabbed to an object. * - * EVAS_CALLBACK_FREE: event_info = NULL + * #EVAS_CALLBACK_FREE: event_info = NULL * * This event is triggered just before Evas is about to free all * memory used by an object and remove all references to it. This is @@ -292,48 +292,48 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void * valid when this callback is called, but after this callback * returns, there is no guarantee on the object's validity. * - * EVAS_CALLBACK_KEY_DOWN: event_info = pointer to Evas_Event_Key_Down + * #EVAS_CALLBACK_KEY_DOWN: event_info = pointer to Evas_Event_Key_Down * * This callback is called when a key is pressed and the focus is on * the object, or a key has been grabbed to a particular object which * wants to intercept the key press regardless of what object has the * focus. * - * EVAS_CALLBACK_KEY_UP: event_info = pointer to Evas_Event_Key_Up + * #EVAS_CALLBACK_KEY_UP: event_info = pointer to Evas_Event_Key_Up * * This callback is called when a key is released and the focus is on * the object, or a key has been grabbed to a particular object which * wants to intercept the key release regardless of what object has * the focus. * - * EVAS_CALLBACK_FOCUS_IN: event_info = NULL + * #EVAS_CALLBACK_FOCUS_IN: event_info = NULL * * This event is called when an object gains the focus. When the * callback is called the object has already gained the focus. * - * EVAS_CALLBACK_FOCUS_OUT: event_info = NULL + * #EVAS_CALLBACK_FOCUS_OUT: event_info = NULL * * This event is triggered by an object losing the focus. When the * callback is called the object has already lost the focus. * - * EVAS_CALLBACK_SHOW: event_info = NULL + * #EVAS_CALLBACK_SHOW: event_info = NULL * * This event is triggered by the object being shown by * evas_object_show(). * - * EVAS_CALLBACK_HIDE: event_info = NULL + * #EVAS_CALLBACK_HIDE: event_info = NULL * * This event is triggered by an object being hidden by * evas_object_hide(). * - * EVAS_CALLBACK_MOVE: event_info = NULL + * #EVAS_CALLBACK_MOVE: event_info = NULL * * This event is triggered by an object being * moved. evas_object_move() can trigger this, as can any * object-specific manipulations that would mean the object's origin * could move. * - * EVAS_CALLBACK_RESIZE: event_info = NULL + * #EVAS_CALLBACK_RESIZE: event_info = NULL * * This event is triggered by an object being resized. Resizes can be * triggered by evas_object_resize() or by any object-specific calls @@ -501,6 +501,73 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E return NULL; } +/** + * @} + */ + +/** + * @addtogroup Evas_Canvas_Events + * @{ + */ + +/** + * Add a callback function to the canvas. + * + * @param e Canvas to attach a callback to + * @param type The type of event that will trigger the callback + * @param func The function to be called when the event is triggered + * @param data The data pointer to be passed to @p func + * + * This function adds a function callback to the canvas when the event + * of type @p type occurs on canvas @p e. The function is @p func. + * + * In the event of a memory allocation error during addition of the + * callback to the canvas, evas_alloc_error() should be used to + * determine the nature of the error, if any, and the program should + * sensibly try and recover. + * + * The function will be passed the pointer @p data when it is + * called. A callback function must look like this: + * + * @code + * void callback (void *data, Evas *e, void *event_info); + * @endcode + * + * The first parameter @p data in this function will be the same value + * passed to evas_event_callback_add() as the @p data parameter. The + * second parameter @p e is the canvas handle on which the event + * occured. The third parameter @p event_info is a pointer to a data + * structure that may or may not be passed to the callback, depending + * on the event type that triggered the callback. + * + * The event type @p type to trigger the function may be one of + * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST, + * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT. + * This determines the kind of event that will trigger the callback to + * be called. So far none of the event types provide useful data, so + * in all of them @p event_info pointer is @c NULL. + * + * Example: + * @code + * extern Evas *e; + * extern void *my_data; + * void focus_in_callback(void *data, Evas *e, void *event_info); + * void focus_out_callback(void *data, Evas *e, void *event_info); + * + * evas_event_callback_add(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback, my_data); + * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE) + * { + * fprintf(stderr, "ERROR: Callback registering failed! Abort!\n"); + * exit(-1); + * } + * evas_event_callback_add(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, focus_out_callback, my_data); + * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE) + * { + * fprintf(stderr, "ERROR: Callback registering failed! Abort!\n"); + * exit(-1); + * } + * @endcode + */ EAPI void evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) { @@ -530,6 +597,30 @@ evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, co eina_inlist_prepend(e->callbacks->callbacks, EINA_INLIST_GET(fn)); } +/** + * Delete a callback function from the canvas. + * + * @param e Canvas to remove a callback from + * @param type The type of event that was triggering the callback + * @param func The function that was to be called when the event was triggered + * @return The data pointer that was to be passed to the callback + * + * This function removes the most recently added callback from the + * canvas @p e which was triggered by the event type @p type and was + * calling the function @p func when triggered. If the removal is + * successful it will also return the data pointer that was passed to + * evas_event_callback_add() when the callback was added to the + * canvas. If not successful NULL will be returned. + * + * Example: + * @code + * extern Evas *e; + * void *my_data; + * void focus_in_callback(void *data, Evas *e, void *event_info); + * + * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback); + * @endcode + */ EAPI void * evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) { @@ -559,6 +650,32 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) return NULL; } +/** + * Delete a callback function from the canvas. + * + * @param e Canvas to remove a callback from + * @param type The type of event that was triggering the callback + * @param func The function that was to be called when the event was triggered + * @param data The data pointer that was to be passed to the callback + * @return The data pointer that was to be passed to the callback + * + * This function removes the most recently added callback from the + * canvas @p e which was triggered by the event type @p type and was + * calling the function @p func with data @p data when triggered. If + * the removal is successful it will also return the data pointer that + * was passed to evas_event_callback_add() (that will be the same as + * the parameter) when the callback was added to the canvas. If not + * successful NULL will be returned. + * + * Example: + * @code + * extern Evas *e; + * void *my_data; + * void focus_in_callback(void *data, Evas *e, void *event_info); + * + * my_data = evas_event_callback_del_full(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback, my_data); + * @endcode + */ EAPI void * evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) { diff --git a/legacy/evas/src/lib/canvas/evas_clip.c b/legacy/evas/src/lib/canvas/evas_clip.c index fa2951a5b3..1f9ce4d5bb 100644 --- a/legacy/evas/src/lib/canvas/evas_clip.c +++ b/legacy/evas/src/lib/canvas/evas_clip.c @@ -41,7 +41,7 @@ evas_object_clippers_was_visible(Evas_Object *obj) /* public functions */ /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Basic * @{ */ diff --git a/legacy/evas/src/lib/canvas/evas_data.c b/legacy/evas/src/lib/canvas/evas_data.c index e8b6d203b2..a3ddc7f6c2 100644 --- a/legacy/evas/src/lib/canvas/evas_data.c +++ b/legacy/evas/src/lib/canvas/evas_data.c @@ -2,7 +2,7 @@ #include "evas_private.h" /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Extras * @{ */ diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c index 5b03acd168..21648e16bd 100644 --- a/legacy/evas/src/lib/canvas/evas_events.c +++ b/legacy/evas/src/lib/canvas/evas_events.c @@ -158,10 +158,8 @@ evas_event_list_copy(Eina_List *list) /* public functions */ /** - * @defgroup Evas_Event_Freezing_Group Evas Event Freezing Functions - * - * Functions that deal with the freezing of event processing of an - * evas. + * @addtogroup Evas_Event_Freezing_Group + * @{ */ /** @@ -183,7 +181,6 @@ evas_event_list_copy(Eina_List *list) * evas_object_resize(object, 200, 200); * evas_event_thaw(evas); * @endcode - * @ingroup Evas_Event_Freezing_Group */ EAPI void evas_event_freeze(Evas *e) @@ -205,7 +202,6 @@ evas_event_freeze(Evas *e) * invole any "missed" events to be evaluated. * * See evas_event_freeze() for an example. - * @ingroup Evas_Event_Freezing_Group */ EAPI void evas_event_thaw(Evas *e) @@ -233,6 +229,15 @@ evas_event_thaw(Evas *e) evas_debug_generic(" Thaw of events when already thawed!!!\n"); } +/** + * @} + */ + +/** + * @addtogroup Evas_Event_Feeding_Group + * @{ + */ + /** * Return the freeze count of a given canvas. * @param e The canvas to fetch the freeze count from. @@ -250,7 +255,7 @@ evas_event_thaw(Evas *e) * * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas); * @endcode - * @ingroup Evas_Event_Freezing_Group + * */ EAPI int evas_event_freeze_get(const Evas *e) @@ -1466,9 +1471,12 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data _evas_unwalk(e); } +/** + * @} + */ /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Events * @{ */ @@ -1482,8 +1490,6 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data * pass events) instead. * * If @p pass is false, events will be processed as normal. - * - * @ingroup Evas_Object_Event_Flags_Group */ EAPI void evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) @@ -1511,8 +1517,6 @@ evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) * Determine whether an object is set to pass events. * @param obj * @return pass events state - * - * @ingroup Evas_Object_Event_Flags_Group */ EAPI Eina_Bool evas_object_pass_events_get(const Evas_Object *obj) @@ -1534,8 +1538,6 @@ evas_object_pass_events_get(const Evas_Object *obj) * * If @p repeat is false, events occuring on @p obj will be processed * normally. - * - * @ingroup Evas_Object_Event_Flags_Group */ EAPI void evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) @@ -1562,8 +1564,6 @@ evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) * Determine whether an object is set to repeat events. * @param obj * @return repeat events state - * - * @ingroup Evas_Object_Event_Flags_Group */ EAPI Eina_Bool evas_object_repeat_events_get(const Evas_Object *obj) @@ -1591,7 +1591,6 @@ evas_object_repeat_events_get(const Evas_Object *obj) * object, @p obj, will not be passed on to the parent smart object. * * The default value is true. - * @ingroup Evas_Object_Event_Flags_Group */ EAPI void evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop) @@ -1606,8 +1605,6 @@ evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop) * Determine whether an object is set to propagate events. * @param obj * @return propogate events state - * - * @ingroup Evas_Object_Event_Flags_Group */ EAPI Eina_Bool evas_object_propagate_events_get(const Evas_Object *obj) @@ -1640,6 +1637,8 @@ evas_object_propagate_events_get(const Evas_Object *obj) * be emitted just when inside this object area. * * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB. + * + * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting) @@ -1654,6 +1653,7 @@ evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting) * Determine how pointer will behave. * @param obj * @return pointer behavior. + * @ingroup Evas_Object_Group_Extras */ EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Evas_Object *obj) diff --git a/legacy/evas/src/lib/canvas/evas_focus.c b/legacy/evas/src/lib/canvas/evas_focus.c index 9ce9cd8bfa..6e2ec5bb02 100644 --- a/legacy/evas/src/lib/canvas/evas_focus.c +++ b/legacy/evas/src/lib/canvas/evas_focus.c @@ -7,6 +7,10 @@ /* public calls */ +/** + * @addtogroup Evas_Object_Group_Basic + * @{ + */ /** * Sets focus to the given object. * @@ -75,6 +79,10 @@ evas_object_focus_get(const Evas_Object *obj) return obj->focused; } +/** + * @} + */ + /** * Retrieve the object that currently has focus. * @@ -88,6 +96,8 @@ evas_object_focus_get(const Evas_Object *obj) * @see evas_object_key_ungrab * * @return The object that has focus or NULL is there is not one. + * + * @ingroup Evas_Object_Group_Find */ EAPI Evas_Object * evas_focus_get(const Evas *e) diff --git a/legacy/evas/src/lib/canvas/evas_layer.c b/legacy/evas/src/lib/canvas/evas_layer.c index 9f0041da2e..a3e5f5bc2a 100644 --- a/legacy/evas/src/lib/canvas/evas_layer.c +++ b/legacy/evas/src/lib/canvas/evas_layer.c @@ -136,7 +136,7 @@ evas_layer_del(Evas_Layer *lay) /* public functions */ /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Basic * @{ */ @@ -147,6 +147,7 @@ evas_layer_del(Evas_Layer *lay) * * @param obj The given evas object. * @param l The number of the layer to place the object on. + * Between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX. */ EAPI void evas_object_layer_set(Evas_Object *obj, short l) diff --git a/legacy/evas/src/lib/canvas/evas_main.c b/legacy/evas/src/lib/canvas/evas_main.c index 666afab09f..00b692b3a6 100644 --- a/legacy/evas/src/lib/canvas/evas_main.c +++ b/legacy/evas/src/lib/canvas/evas_main.c @@ -14,6 +14,7 @@ int _evas_log_dom_global = -1; * * @see evas_shutdown(). * + * @ingroup Evas_Group */ EAPI int evas_init(void) @@ -75,8 +76,8 @@ evas_init(void) * * @see evas_init(). * + * @ingroup Evas_Group */ - EAPI int evas_shutdown(void) { @@ -104,14 +105,6 @@ evas_shutdown(void) return _evas_init_count; } -/** - * @defgroup Evas_Canvas Evas Canvas functions - * - * Functions that deal with the basic evas object. They are the - * functions you need to use at a minimum to get a working evas, and - * to destroy it. - * - */ /** * Creates a new empty evas. @@ -123,7 +116,15 @@ evas_shutdown(void) * @li Ensure that the render engine is given the correct settings * with @ref evas_engine_info_set . * - * This function should only fail if the memory allocation fails. + * This function should only fail if the memory allocation fails + * + * @note this function is very low level. Instead of using it + * directly, consider using the high level functions in + * Ecore_Evas such as @c ecore_evas_new(). See + * http://docs.enlightenment.org/auto/ecore/. + * + * @attention it is recommended that one calls evas_init() before + * creating new canvas. * * @return A new uninitialised Evas canvas on success. Otherwise, @c * NULL. @@ -164,6 +165,7 @@ evas_new(void) * in this function. * * @param e The given evas. + * * @ingroup Evas_Canvas */ EAPI void @@ -268,34 +270,6 @@ evas_free(Evas *e) free(e); } -/** - * @defgroup Evas_Output_Method Evas Render Engine Functions - * - * Functions that are used to set the render engine for a given - * function, and then get that engine working. - * - * The following code snippet shows how they can be used to - * initialise an evas that uses the X11 software engine: - * @code - * Evas *evas; - * Evas_Engine_Info_Software_X11 *einfo; - * extern Display *display; - * extern Window win; - * - * evas = evas_new(); - * evas_output_method_set(evas, evas_render_method_lookup("software_x11")); - * evas_output_size_set(evas, 640, 480); - * evas_output_viewport_set(evas, 0, 0, 640, 480); - * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas); - * einfo->info.display = display; - * einfo->info.visual = DefaultVisual(display, DefaultScreen(display)); - * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display)); - * einfo->info.drawable = win; - * einfo->info.depth = DefaultDepth(display, DefaultScreen(display)); - * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo); - * @endcode - */ - /** * Sets the output engine for the given evas. * @@ -303,6 +277,9 @@ evas_free(Evas *e) * 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. + * * @param e The given evas. * @param render_method The numeric engine value to use. * @ingroup Evas_Output_Method @@ -400,8 +377,6 @@ evas_engine_info_get(const Evas *e) * * Once called, the @p info pointer should be considered invalid. * - * Example: - * * @param e The pointer to the Evas Canvas * @param info The pointer to the Engine Info to use * @return 1 if no error occured, 0 otherwise @@ -419,14 +394,6 @@ evas_engine_info_set(Evas *e, Evas_Engine_Info *info) return e->engine.func->setup(e, info); } -/** - * @defgroup Evas_Output_Size Evas Output and Viewport Resizing - * Functions - * - * Functions that set and retrieve the output and viewport size of an - * evas. - */ - /** * Sets the output size of the render engine of the given evas. * @@ -572,14 +539,6 @@ evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord if (h) *h = e->viewport.h; } -/** - * @defgroup Evas_Coord_Mapping_Group Evas Coordinate Mapping - * Functions - * - * Functions that are used to map coordinates from the canvas to the - * screen or the screen to the canvas. - */ - /** * Convert/scale an ouput screen co-ordinate into canvas co-ordinates * @@ -727,11 +686,16 @@ evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y) * written accessing render method ID's directly, without first * obtaining it from this function. * + * @attention it is mandatory that one calls evas_init() before + * looking up the render method. + * * Example: * @code * int engine_id; * Evas *evas; * + * evas_init(); + * * evas = evas_new(); * if (!evas) * { @@ -889,12 +853,6 @@ evas_render_method_list_free(Eina_List *list) eina_list_free(list); } -/** - * @defgroup Evas_Pointer_Group Evas Pointer Functions - * - * Functions that deal with the status of the pointer. - */ - /** * This function returns the current known pointer co-ordinates * @@ -1051,6 +1009,7 @@ evas_pointer_inside_get(const Evas *e) * * @param e The canvas to attach the pointer to * @param data The pointer to attach + * @ingroup Evas_Canvas */ EAPI void evas_data_attach_set(Evas *e, void *data) @@ -1066,6 +1025,7 @@ evas_data_attach_set(Evas *e, void *data) * * @param e The canvas to attach the pointer to * @return The pointer attached + * @ingroup Evas_Canvas */ EAPI void * evas_data_attach_get(const Evas *e) @@ -1076,6 +1036,12 @@ evas_data_attach_get(const Evas *e) return e->attach_data; } +/** + * Inform to the evas that it got the focus. + * + * @param e The evas to change information. + * @ingroup Evas_Canvas + */ EAPI void evas_focus_in(Evas *e) { @@ -1087,6 +1053,12 @@ evas_focus_in(Evas *e) evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL); } +/** + * Inform to the evas that it lost the focus. + * + * @param e The evas to change information. + * @ingroup Evas_Canvas + */ EAPI void evas_focus_out(Evas *e) { @@ -1098,6 +1070,12 @@ evas_focus_out(Evas *e) evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL); } +/** + * Get the focus state known by the given evas + * + * @param e The evas to query information. + * @ingroup Evas_Canvas + */ EAPI Eina_Bool evas_focus_state_get(const Evas *e) { @@ -1120,6 +1098,13 @@ _evas_unwalk(Evas *e) if ((e->walking_list == 0) && (e->delete_me)) evas_free(e); } +/** + * Converts the given error code into a string describing it in english. + * @param error the error code. + * @return Always return a valid string. If given @p error is not + * supported "Unknown error" is returned. + * @ingroup Evas_Utils + */ EAPI const char * evas_load_error_str(int error) { diff --git a/legacy/evas/src/lib/canvas/evas_map.c b/legacy/evas/src/lib/canvas/evas_map.c index 543a31bb6f..96d249e994 100644 --- a/legacy/evas/src/lib/canvas/evas_map.c +++ b/legacy/evas/src/lib/canvas/evas_map.c @@ -262,6 +262,11 @@ evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y) } +/** + * @addtogroup Evas_Object_Group_Map + * @{ + */ + /** * Enable or disable the map that is set * @@ -274,7 +279,7 @@ evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y) * disable the map with evas_object_map_enable_set() as needed. * * @param obj object to enable the map on - * @param enbled enabled state + * @param enabled enabled state */ EAPI void evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) @@ -1136,14 +1141,14 @@ evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz, * @param lr light red value (0 - 255) * @param lg light green value (0 - 255) * @param lb light blue value (0 - 255) - * @param lr ambient color red value (0 - 255) - * @param lg ambient color green value (0 - 255) - * @param lb ambient color blue value (0 - 255) + * @param ar ambient color red value (0 - 255) + * @param ag ambient color green value (0 - 255) + * @param ab ambient color blue value (0 - 255) */ EAPI void evas_map_util_3d_lighting(Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, - int lr, int lg, int lb, int ar, int ab, int ag) + int lr, int lg, int lb, int ar, int ag, int ab) { int i; @@ -1309,3 +1314,7 @@ evas_map_util_clockwise_get(Evas_Map *m) if (count > 0) return 1; return 0; } + +/** + * @} + */ diff --git a/legacy/evas/src/lib/canvas/evas_name.c b/legacy/evas/src/lib/canvas/evas_name.c index 92bb187f16..f5e204ba68 100644 --- a/legacy/evas/src/lib/canvas/evas_name.c +++ b/legacy/evas/src/lib/canvas/evas_name.c @@ -2,7 +2,7 @@ #include "evas_private.h" /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Basic * @{ */ @@ -45,12 +45,17 @@ evas_object_name_get(const Evas_Object *obj) return obj->name; } +/** + * @} + */ + /** * Retrieves the object on the given evas with the given name. * @param e The given evas. * @param name The given name. * @return If successful, the evas object with the given name. Otherwise, * @c NULL. + * @ingroup Evas_Object_Group_Find */ EAPI Evas_Object * evas_object_name_find(const Evas *e, const char *name) @@ -61,7 +66,3 @@ evas_object_name_find(const Evas *e, const char *name) if (!name) return NULL; return (Evas_Object *)eina_hash_find(e->name_hash, name); } - -/** - * @} - */ diff --git a/legacy/evas/src/lib/canvas/evas_object_box.c b/legacy/evas/src/lib/canvas/evas_object_box.c index 0efd262139..22602400b7 100644 --- a/legacy/evas/src/lib/canvas/evas_object_box.c +++ b/legacy/evas/src/lib/canvas/evas_object_box.c @@ -22,7 +22,6 @@ struct _Evas_Object_Box_Accessor /** * @addtogroup Evas_Object_Box * @{ - * @ingroup Evas_Smart_Object_Group */ #define EVAS_OBJECT_BOX_DATA_GET(o, ptr) \ diff --git a/legacy/evas/src/lib/canvas/evas_object_gradient.c b/legacy/evas/src/lib/canvas/evas_object_gradient.c index 506708f50d..9a97a4695c 100644 --- a/legacy/evas/src/lib/canvas/evas_object_gradient.c +++ b/legacy/evas/src/lib/canvas/evas_object_gradient.c @@ -84,25 +84,9 @@ static const Evas_Object_Func object_func = /* the actual api call to add a gradient */ -/** - * @defgroup Evas_Object_Gradient_Group Gradient Object Functions - * - * Functions that work on evas gradient objects. - * - * The following example shows how - */ - -/** - * @defgroup Evas_Object_Specific Specific Object Functions - * - * Functions that work on specific objects. - * - */ - /** * @addtogroup Evas_Object_Gradient_Group * @{ - * @ingroup Evas_Object_Specific */ /** @@ -724,6 +708,7 @@ evas_object_gradient_type_get(const Evas_Object *obj, char **name, char **params * This function converts a given color in HSV color format to RGB * color format. * + * @ingroup Evas_Utils **/ EAPI void evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) @@ -744,6 +729,7 @@ evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) * This function converts a given color in RGB color format to HSV * color format. * + * @ingroup Evas_Utils **/ EAPI void evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) @@ -762,6 +748,7 @@ evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) * This function pre-multiplies a given rbg triplet by an alpha * factor. Alpha factor is used to define transparency. * + * @ingroup Evas_Utils **/ EAPI void evas_color_argb_premul(int a, int *r, int *g, int *b) @@ -782,6 +769,7 @@ evas_color_argb_premul(int a, int *r, int *g, int *b) * * @see evas_color_argb_premul(). * + * @ingroup Evas_Utils **/ EAPI void evas_color_argb_unpremul(int a, int *r, int *g, int *b) @@ -798,6 +786,7 @@ evas_color_argb_unpremul(int a, int *r, int *g, int *b) * This function pre-multiplies a given data by an alpha * factor. Alpha factor is used to define transparency. * + * @ingroup Evas_Utils **/ EAPI void evas_data_argb_premul(unsigned int *data, unsigned int len) @@ -815,6 +804,7 @@ evas_data_argb_premul(unsigned int *data, unsigned int len) * This function undoes pre-multiplication of a given data by an alpha * factor. Alpha factor is used to define transparency. * + * @ingroup Evas_Utils **/ EAPI void evas_data_argb_unpremul(unsigned int *data, unsigned int len) diff --git a/legacy/evas/src/lib/canvas/evas_object_gradient2.c b/legacy/evas/src/lib/canvas/evas_object_gradient2.c index 42b8018944..ab003ce4b2 100644 --- a/legacy/evas/src/lib/canvas/evas_object_gradient2.c +++ b/legacy/evas/src/lib/canvas/evas_object_gradient2.c @@ -19,18 +19,9 @@ struct _Evas_Object_Gradient2 }; - -/** - * @defgroup Evas_Object_Gradient2_Group Gradient2 Object Functions - * - * Functions that work on evas gradient2 objects. - * - */ - /** * @addtogroup Evas_Object_Gradient2_Group * @{ - * @ingroup Evas_Object_Specific */ /** diff --git a/legacy/evas/src/lib/canvas/evas_object_image.c b/legacy/evas/src/lib/canvas/evas_object_image.c index 4b773d0e0b..bbda40c37a 100644 --- a/legacy/evas/src/lib/canvas/evas_object_image.c +++ b/legacy/evas/src/lib/canvas/evas_object_image.c @@ -120,94 +120,10 @@ static const Evas_Object_Func object_func = evas_object_image_can_map }; -/** - * @defgroup Evas_Object_Image Image Object Functions - * - * Functions used to create and manipulate image objects. - * - * Note - Image objects may return or accept "image data" in multiple - * formats. This is based on the colorspace of an object. Here is a - * rundown on formats: - * - * EVAS_COLORSPACE_ARGB8888: - * - * This pixel format is a linear block of pixels, starting at the - * top-left row by row until the bottom right of the image or pixel - * region. All pixels are 32-bit unsigned int's with the high-byte - * being alpha and the low byte being blue in the format ARGB. Alpha - * may or may not be used by evas depending on the alpha flag of the - * image, but if not used, should be set to 0xff anyway. - * - * This colorspace uses premultiplied alpha. That means that R, G and - * B cannot exceed A in value. The conversion from non-premultiplied - * colorspace is: - * - * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255; - * - * So 50% transparent blue will be: 0x80000080. This will not be - * "dark" - just 50% transparent. Values are 0 == black, 255 == solid - * or full red, green or blue. - * - * EVAS_COLORSPACE_YCBCR422P601_PL: - * - * This is a pointer-list indirected set of YUV (YCbCr) pixel - * data. This means that the data returned or set is not actual pixel - * data, but pointers TO lines of pixel data. The list of pointers - * will first be N rows of pointers to the Y plane - pointing to the - * first pixel at the start of each row in the Y plane. N is the - * height of the image data in pixels. Each pixel in the Y, U and V - * planes is 1 byte exactly, packed. The next N / 2 pointers will - * point to rows in the U plane, and the next N / 2 pointers will - * point to the V plane rows. U and V planes are half the horizontal - * and vertical resolution of the Y plane. - * - * Row order is top to bottom and row pixels are stored left to right. - * - * There is a limitation that these images MUST be a multiple of 2 - * pixels in size horizontally or vertically. This is due to the U and - * V planes being half resolution. Also note that this assumes the - * itu601 YUV colorspace specification. This is defined for standard - * television and mpeg streams. HDTV may use the itu709 - * specification. - * - * Values are 0 to 255, indicating full or no signal in that plane - * respectively. - * - * EVAS_COLORSPACE_YCBCR422P709_PL: - * - * Not implemented yet. - * - * EVAS_COLORSPACE_RGB565_A5P: - * - * In the process of being implemented in 1 engine only. This may change. - * - * This is a pointer to image data for 16-bit half-word pixel data in - * 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with - * the high-byte containing red and the low byte containing blue, per - * pixel. This data is packed row by row from the top-left to the - * bottom right. - * - * If the image has an alpha channel enabled there will be an extra - * alpha plane after the color pixel plane. If not, then this data - * will not exist and should not be accessed in any way. This plane is - * a set of pixels with 1 byte per pixel defining the alpha values of - * all pixels in the image from the top-left to the bottom right of - * the image, row by row. Even though the values of the alpha pixels - * can be 0 to 255, only values 0 through to 32 are used, 32 being - * solid and 0 being transparent. - * - * RGB values can be 0 to 31 for red and blue and 0 to 63 for green, - * with 0 being black and 31 or 63 being full red, green or blue - * respectively. This colorspace is also pre-multiplied like - * EVAS_COLORSPACE_ARGB8888 so: - * - * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32; - */ /** * @addtogroup Evas_Object_Image * @{ - * @ingroup Evas_Object_Specific */ /** @@ -2070,6 +1986,15 @@ evas_object_image_content_hint_get(const Evas_Object *obj) return o->content_hint; } +/** + * @} + */ + +/** + * @addtogroup Evas_Image_Group + * @{ + */ + /** * Flush the image cache of the canvas. * @@ -2094,6 +2019,7 @@ evas_image_cache_flush(Evas *e) * @param e The given evas pointer. * * This function reloads the image cache of canvas. + * */ EAPI void evas_image_cache_reload(Evas *e) diff --git a/legacy/evas/src/lib/canvas/evas_object_intercept.c b/legacy/evas/src/lib/canvas/evas_object_intercept.c index b1195dee46..33876857e0 100644 --- a/legacy/evas/src/lib/canvas/evas_object_intercept.c +++ b/legacy/evas/src/lib/canvas/evas_object_intercept.c @@ -239,6 +239,11 @@ evas_object_intercept_call_clip_unset(Evas_Object *obj) /* public calls */ +/** + * @addtogroup Evas_Object_Group_Interceptors + * @{ + */ + /** * Set the callback function that intercepts a show event of a object. * @@ -809,3 +814,7 @@ evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, void (*func) (vo evas_object_intercept_deinit(obj); return data; } + +/** + * @} + */ diff --git a/legacy/evas/src/lib/canvas/evas_object_line.c b/legacy/evas/src/lib/canvas/evas_object_line.c index 138ad20aee..2cf1b0afc0 100644 --- a/legacy/evas/src/lib/canvas/evas_object_line.c +++ b/legacy/evas/src/lib/canvas/evas_object_line.c @@ -72,16 +72,10 @@ static const Evas_Object_Func object_func = /* the actual api call to add a rect */ /* it has no other api calls as all properties are standard */ -/** - * @defgroup Evas_Line_Group Line Object Functions - * - * Functions used to deal with evas line objects. - */ /** * @addtogroup Evas_Line_Group * @{ - * @ingroup Evas_Object_Specific */ /** diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c index f13017305b..a016e2a7c2 100644 --- a/legacy/evas/src/lib/canvas/evas_object_main.c +++ b/legacy/evas/src/lib/canvas/evas_object_main.c @@ -349,12 +349,6 @@ evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) } /* routines apps will call */ -/** - * @defgroup Evas_Object_Group Generic Object Functions - * - * Functions that manipulate generic evas objects. - */ - /** * Deletes the given evas object and frees its memory. * @@ -363,7 +357,7 @@ evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) * also called. * * @param obj The given evas object. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_del(Evas_Object *obj) @@ -410,7 +404,7 @@ evas_object_del(Evas_Object *obj) * @param obj The given evas object. * @param x X position to move the object to, in canvas units. * @param y Y position to move the object to, in canvas units. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) @@ -484,7 +478,24 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) * @param obj The given evas object. * @param w The new width of the evas object. * @param h The new height of the evas object. - * @ingroup Evas_Object_Group + * + * @note Be aware that resizing an object changes its drawing area, + * but that does imply the object is rescaled! For instance, + * images are filled inside their drawing area using the + * specifications of evas_object_image_fill_set(), thus to scale + * the image to match exactly your drawing area, you need to + * change the evas_object_image_fill_set() as well. Consider the + * following example: + * @code + * // rescale image to fill exactly its area without tiling: + * evas_object_resize(img, w, h); + * evas_object_image_fill_set(img, 0, 0, w, h); + * @endcode + * This is more evident in images, but text, textblock, lines + * and polygons will behave similarly. Check their specific APIs + * to know how to achive your desired behavior. + * + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) @@ -574,7 +585,7 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) * object. * @param h Pointer to an integer in which to store the height of the * object. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) @@ -595,7 +606,7 @@ evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, E } /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Size_Hints * @{ */ @@ -1034,7 +1045,7 @@ evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, /** * Makes the given evas object visible. * @param obj The given evas object. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_show(Evas_Object *obj) @@ -1083,7 +1094,13 @@ evas_object_show(Evas_Object *obj) /** * Makes the given evas object invisible. * @param obj The given evas object. - * @ingroup Evas_Object_Group + * + * @note the hidden objects will not be checked for changes and will + * not catch events. That is, they are much ligher than an + * object that is invisible due indirect effects, such as + * clipped or out-of-viewport. + * + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_hide(Evas_Object *obj) @@ -1175,7 +1192,7 @@ evas_object_hide(Evas_Object *obj) * Retrieves whether or not the given evas object is visible. * @param obj The given evas object. * @return @c 1 if the object is visible. @c 0 otherwise. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj) @@ -1194,7 +1211,7 @@ evas_object_visible_get(const Evas_Object *obj) * @param g The green component of the given colour. * @param b The blue component of the given colour. * @param a The alpha component of the given colour. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a) @@ -1241,7 +1258,7 @@ evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a) * the colour. * @param a Pointer to an integer in which to store the alpha component of * the colour. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) @@ -1266,7 +1283,7 @@ evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) * * @param obj The given evas object. * @param anti_alias 1 if the object is to be anti_aliased, 0 otherwise. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias) @@ -1286,7 +1303,7 @@ evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias) * Retrieves whether or not the given evas object is to be drawn anti_aliased. * @param obj The given evas object. * @return @c 1 if the object is to be anti_aliased. @c 0 otherwise. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI Eina_Bool evas_object_anti_alias_get(const Evas_Object *obj) @@ -1303,7 +1320,7 @@ evas_object_anti_alias_get(const Evas_Object *obj) * * @param obj The given evas object. * @param scale The scaling factor. 1.0 == none. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_scale_set(Evas_Object *obj, double scale) @@ -1325,7 +1342,7 @@ evas_object_scale_set(Evas_Object *obj, double scale) * @param obj The given evas object. * @return The scaling factor. * - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI double evas_object_scale_get(const Evas_Object *obj) @@ -1343,7 +1360,7 @@ evas_object_scale_get(const Evas_Object *obj) * @param obj The given evas object. * @param color_space one of EVAS_COLOR_SPACE_ARGB or EVAS_COLOR_SPACE_AHSV. * - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_color_interpolation_set(Evas_Object *obj, int color_space) @@ -1363,7 +1380,7 @@ evas_object_color_interpolation_set(Evas_Object *obj, int color_space) * Retrieves the current value of the color space used for linear interpolation. * @param obj The given evas object. * @return @c EVAS_COLOR_SPACE_ARGB or EVAS_COLOR_SPACE_AHSV. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI int evas_object_color_interpolation_get(const Evas_Object *obj) @@ -1379,7 +1396,7 @@ evas_object_color_interpolation_get(const Evas_Object *obj) * Sets the render_op to be used for rendering the evas object. * @param obj The given evas object. * @param render_op one of the Evas_Render_Op values. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op) @@ -1399,7 +1416,7 @@ evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op) * Retrieves the current value of the operation used for rendering the evas object. * @param obj The given evas object. * @return one of the enumerated values in Evas_Render_Op. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Extras */ EAPI Evas_Render_Op evas_object_render_op_get(const Evas_Object *obj) @@ -1415,7 +1432,7 @@ evas_object_render_op_get(const Evas_Object *obj) * Retrieves the evas that the given evas object is on. * @param obj The given evas object. * @return The evas that the object is on. - * @ingroup Evas_Object_Group + * @ingroup Evas_Object_Group_Basic */ EAPI Evas * evas_object_evas_get(const Evas_Object *obj) @@ -1428,7 +1445,7 @@ evas_object_evas_get(const Evas_Object *obj) } /** - * @addtogroup Evas_Object_Group + * @addtogroup Evas_Object_Group_Find * @{ */ @@ -1633,10 +1650,15 @@ evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Co return in; } +/** + * @} + */ + /** * Retrieves the name of the type of the given evas object. * @param obj The given object. * @return The name. + * @ingroup Evas_Object_Group_Basic */ EAPI const char * evas_object_type_get(const Evas_Object *obj) @@ -1653,6 +1675,7 @@ evas_object_type_get(const Evas_Object *obj) * @param obj The given object. * @param precise wheter to use a precise point collision detection or not * The default value is false. + * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) @@ -1664,8 +1687,10 @@ evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) } /** - * Determine whether an object is set to use a precise point collision detection. + * Determine whether an object is set to use a precise point collision + * detection. * @param obj The given object. + * @ingroup Evas_Object_Group_Extras */ EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) @@ -1675,7 +1700,3 @@ evas_object_precise_is_inside_get(const Evas_Object *obj) MAGIC_CHECK_END(); return obj->precise_is_inside; } - -/** - * @} - */ diff --git a/legacy/evas/src/lib/canvas/evas_object_polygon.c b/legacy/evas/src/lib/canvas/evas_object_polygon.c index e3eb7ff3c5..15a5546b12 100644 --- a/legacy/evas/src/lib/canvas/evas_object_polygon.c +++ b/legacy/evas/src/lib/canvas/evas_object_polygon.c @@ -75,16 +75,9 @@ static const Evas_Object_Func object_func = /* the actual api call to add a rect */ /* it has no other api calls as all properties are standard */ -/** - * @defgroup Evas_Object_Polygon Polygon Object Functions - * - * Functions that operate on evas polygon objects. - */ - /** * @addtogroup Evas_Object_Polygon * @{ - * @ingroup Evas_Object_Specific */ /** diff --git a/legacy/evas/src/lib/canvas/evas_object_rectangle.c b/legacy/evas/src/lib/canvas/evas_object_rectangle.c index 9e2dd42776..b3d8fed2c5 100644 --- a/legacy/evas/src/lib/canvas/evas_object_rectangle.c +++ b/legacy/evas/src/lib/canvas/evas_object_rectangle.c @@ -66,16 +66,10 @@ static const Evas_Object_Func object_func = /* the actual api call to add a rect */ /* it has no other api calls as all properties are standard */ -/** - * @defgroup Evas_Object_Rectangle Rectangle Object Functions - * - * Functions that operate on evas rectangle objects. - */ /** * @addtogroup Evas_Object_Rectangle * @{ - * @ingroup Evas_Object_Specific */ /** diff --git a/legacy/evas/src/lib/canvas/evas_object_smart.c b/legacy/evas/src/lib/canvas/evas_object_smart.c index 93455fccd8..21516997cc 100644 --- a/legacy/evas/src/lib/canvas/evas_object_smart.c +++ b/legacy/evas/src/lib/canvas/evas_object_smart.c @@ -65,18 +65,6 @@ static const Evas_Object_Func object_func = }; /* public funcs */ -/** - * @defgroup Evas_Smart_Object_Group Evas Smart Object Functions - * - * Functions dealing with evas smart objects. - * - * Smart objects are groupings of primitive evas objects that behave as a - * cohesive group. For instance, a file manager icon may be a smart object - * composed of an image object, a text label and two rectangles that appear - * behind the image and text when the icon is selected. As a smart object, - * the normal evas api could be used on the icon object. - * - */ /** * Store a pointer to user data for a smart object. * @@ -534,7 +522,7 @@ evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_ * @a instance_count can be ignored, the terminator @c NULL is not * counted in these values. * - * @param s the smart object. + * @param obj the smart object. * @param class_descriptions where to store class callbacks * descriptions array, if any is known. If no descriptions are * known, @c NULL is returned. This parameter may be @c NULL if diff --git a/legacy/evas/src/lib/canvas/evas_object_smart_clipped.c b/legacy/evas/src/lib/canvas/evas_object_smart_clipped.c index 8ece21a0e9..5df37fd940 100644 --- a/legacy/evas/src/lib/canvas/evas_object_smart_clipped.c +++ b/legacy/evas/src/lib/canvas/evas_object_smart_clipped.c @@ -2,7 +2,7 @@ #include "evas_private.h" /** - * @addtogroup Evas_Smart_Object_Group + * @addtogroup Evas_Smart_Object_Clipped Clipped Smart Object * @{ */ diff --git a/legacy/evas/src/lib/canvas/evas_object_text.c b/legacy/evas/src/lib/canvas/evas_object_text.c index 054862ad0d..0c72b1f2d8 100644 --- a/legacy/evas/src/lib/canvas/evas_object_text.c +++ b/legacy/evas/src/lib/canvas/evas_object_text.c @@ -80,16 +80,9 @@ static const Evas_Object_Func object_func = /* the actual api call to add a rect */ /* it has no other api calls as all properties are standard */ -/** - * @defgroup Evas_Object_Text Text Object Functions - * - * Functions that operate on evas text objects. - */ - /** * @addtogroup Evas_Object_Text * @{ - * @ingroup Evas_Object_Specific */ /** @@ -1006,11 +999,6 @@ evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, i * @} */ -/** - * @defgroup Evas_Font_Path_Group Evas Font Path Functions - * - * Functions that edit the paths being used to load fonts. - */ /** * Removes all font paths loaded into memory for the given evas. @@ -1096,6 +1084,14 @@ evas_font_object_rehint(Evas_Object *obj) } } +/** + * Changes the font hinting for the given evas. + * + * @param e The given evas. + * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE, + * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + * @ingroup Evas_Font_Group + */ EAPI void evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting) { @@ -1115,6 +1111,14 @@ evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting) } } +/** + * Retrieves the font hinting used by the given evas. + * + * @param e The given evas to query. + * @return The hinting in use, one of #EVAS_FONT_HINTING_NONE, + * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + * @ingroup Evas_Font_Group + */ EAPI Evas_Font_Hinting_Flags evas_font_hinting_get(const Evas *e) { @@ -1124,6 +1128,15 @@ evas_font_hinting_get(const Evas *e) return e->hinting; } +/** + * Checks if the font hinting is supported by the given evas. + * + * @param e The given evas to query. + * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE, + * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + * @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise. + * @ingroup Evas_Font_Group + */ EAPI Eina_Bool evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting) { @@ -1136,15 +1149,11 @@ evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting) return EINA_FALSE; } - - - - /** - * To be documented. - * - * FIXME: To be fixed. + * Force the given evas and associated engine to flush its font cache. * + * @param e The given evas to flush font cache. + * @ingroup Evas_Font_Group */ EAPI void evas_font_cache_flush(Evas *e) @@ -1157,10 +1166,12 @@ evas_font_cache_flush(Evas *e) } /** - * To be documented. + * Changes the size of font cache of the given evas. * - * FIXME: To be fixed. + * @param e The given evas to flush font cache. + * @param size The size, in bytes. * + * @ingroup Evas_Font_Group */ EAPI void evas_font_cache_set(Evas *e, int size) @@ -1174,10 +1185,12 @@ evas_font_cache_set(Evas *e, int size) } /** - * To be documented. + * Changes the size of font cache of the given evas. * - * FIXME: To be fixed. + * @param e The given evas to flush font cache. + * @return The size, in bytes. * + * @ingroup Evas_Font_Group */ EAPI int evas_font_cache_get(const Evas *e) @@ -1190,10 +1203,18 @@ evas_font_cache_get(const Evas *e) } /** - * To be documented. + * List of available font descriptions known or found by this evas. * - * FIXME: To be fixed. + * 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. * + * @param e The evas instance to query. + * @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 */ EAPI Eina_List * evas_font_available_list(const Evas *e) @@ -1206,10 +1227,12 @@ evas_font_available_list(const Evas *e) } /** - * To be documented. + * Free list of font descriptions returned by evas_font_dir_available_list(). * - * FIXME: To be fixed. + * @param e The evas instance that returned such list. + * @param available the list returned by evas_font_dir_available_list(). * + * @ingroup Evas_Font_Group */ EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) @@ -1226,6 +1249,7 @@ evas_font_available_list_free(Evas *e, Eina_List *available) * * FIXME: To be fixed. * + * @ingroup Evas_Utils */ EAPI int evas_string_char_next_get(const char *str, int pos, int *decoded) @@ -1246,6 +1270,7 @@ evas_string_char_next_get(const char *str, int pos, int *decoded) * * FIXME: To be fixed. * + * @ingroup Evas_Utils */ EAPI int evas_string_char_prev_get(const char *str, int pos, int *decoded) @@ -1265,6 +1290,7 @@ evas_string_char_prev_get(const char *str, int pos, int *decoded) * Get the length in characters of the string. * @param str The string to get the length of. * @return The length in characters (not bytes) + * @ingroup Evas_Utils */ EAPI int evas_string_char_len_get(const char *str) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 75ee5abc31..a49703898a 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -212,18 +212,10 @@ static const Evas_Object_Func object_func = return (x); \ MAGIC_CHECK_END(); -/** - * @defgroup Evas_Object_Textblock Textblock Object Functions - * - * Functions used to create and manipulate textblock objects. - * - * Note: put here some usage examples - */ /** * @addtogroup Evas_Object_Textblock * @{ - * @ingroup Evas_Object_Specific */ /* styles */ @@ -4956,6 +4948,12 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons return rects; } +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) { @@ -4963,6 +4961,12 @@ evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) return cur->eol; } +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI void evas_textblock_cursor_eol_set(Evas_Textblock_Cursor *cur, Eina_Bool eol) { diff --git a/legacy/evas/src/lib/canvas/evas_render.c b/legacy/evas/src/lib/canvas/evas_render.c index 3db53fcaf2..b951fa984c 100644 --- a/legacy/evas/src/lib/canvas/evas_render.c +++ b/legacy/evas/src/lib/canvas/evas_render.c @@ -53,6 +53,7 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char * This is the function by which one tells evas that a part of the * canvas has to be repainted. * + * @ingroup Evas_Canvas */ EAPI void evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h) @@ -83,6 +84,7 @@ evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h) * * @see evas_obscured_clear(). * + * @ingroup Evas_Canvas */ EAPI void evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h) @@ -107,6 +109,7 @@ evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h) * evas_obscured_rectangle_add() and makes it a region that have to be * repainted. * + * @ingroup Evas_Canvas */ EAPI void evas_obscured_clear(Evas *e) @@ -1166,6 +1169,7 @@ evas_render_updates_internal(Evas *e, * This function removes the region from the render updates list. It * makes the region doesn't be render updated anymore. * + * @ingroup Evas_Canvas */ EAPI void evas_render_updates_free(Eina_List *updates) @@ -1180,11 +1184,13 @@ evas_render_updates_free(Eina_List *updates) * Force immediate renderization of the given canvas. * * @param e The given canvas pointer. - * @return A list of updated rectangles of the canvas. + * @return A newly allocated list of updated rectangles of the canvas. + * Free this list with evas_render_updates_free(). * * This function forces an immediate renderization update of the given * given canvas. * + * @ingroup Evas_Canvas */ EAPI Eina_List * evas_render_updates(Evas *e) @@ -1198,12 +1204,11 @@ evas_render_updates(Evas *e) } /** - * Force renderization of a region + * Force renderization of the given canvas. * * @param e The given canvas pointer. * - * This function forces renderization of the region given. - * + * @ingroup Evas_Canvas */ EAPI void evas_render(Evas *e) @@ -1228,6 +1233,7 @@ evas_render(Evas *e) * * @see evas_render. * + * @ingroup Evas_Canvas */ EAPI void evas_norender(Evas *e) @@ -1247,6 +1253,7 @@ evas_norender(Evas *e) * * This function flushes the arrays of delete, active and render objects. * + * @ingroup Evas_Canvas */ EAPI void evas_render_idle_flush(Evas *e) diff --git a/legacy/evas/src/lib/canvas/evas_smart.c b/legacy/evas/src/lib/canvas/evas_smart.c index 861b00198d..f85c1a4bce 100644 --- a/legacy/evas/src/lib/canvas/evas_smart.c +++ b/legacy/evas/src/lib/canvas/evas_smart.c @@ -6,13 +6,6 @@ static void _evas_smart_class_callbacks_create(Evas_Smart *s); /* all public */ -/** - * @defgroup Evas_Smart_Group Evas Smart Functions - * - * Functions that deal with Evas_Smart's. - * - */ - /** * @addtogroup Evas_Smart_Group * @{ diff --git a/legacy/evas/src/lib/canvas/evas_stack.c b/legacy/evas/src/lib/canvas/evas_stack.c index b7fcb68e3f..1ca1b668f0 100644 --- a/legacy/evas/src/lib/canvas/evas_stack.c +++ b/legacy/evas/src/lib/canvas/evas_stack.c @@ -37,12 +37,15 @@ evas_object_below_get_internal(const Evas_Object *obj) return NULL; } +/** + * @addtogroup Evas_Object_Group_Basic + * @{ + */ + /** * Raise @p obj to the top of its layer. * * @param obj the object to raise - * - * @ingroup Evas_Object_Group */ EAPI void evas_object_raise(Evas_Object *obj) @@ -97,8 +100,6 @@ evas_object_raise(Evas_Object *obj) * Lower @p obj to the bottom of its layer. * * @param obj the object to lower - * - * @ingroup Evas_Object_Group */ EAPI void evas_object_lower(Evas_Object *obj) @@ -160,8 +161,6 @@ evas_object_lower(Evas_Object *obj) * * @param obj the object to stack * @param above the object above which to stack - * - * @ingroup Evas_Object_Group */ EAPI void evas_object_stack_above(Evas_Object *obj, Evas_Object *above) @@ -254,8 +253,6 @@ evas_object_stack_above(Evas_Object *obj, Evas_Object *above) * * @param obj the object to stack * @param below the object below which to stack - * - * @ingroup Evas_Object_Group */ EAPI void evas_object_stack_below(Evas_Object *obj, Evas_Object *below) @@ -342,8 +339,6 @@ evas_object_stack_below(Evas_Object *obj, Evas_Object *below) * * @param obj an Evas_Object * @return the Evas_Object directly above - * - * @ingroup Evas_Object_Group */ EAPI Evas_Object * evas_object_above_get(const Evas_Object *obj) @@ -375,8 +370,6 @@ evas_object_above_get(const Evas_Object *obj) * * @param obj an Evas_Object * @return the Evas_Object directly below - * - * @ingroup Evas_Object_Group */ EAPI Evas_Object * evas_object_below_get(const Evas_Object *obj) @@ -403,13 +396,20 @@ evas_object_below_get(const Evas_Object *obj) return NULL; } +/** + * @} + */ + +/** + * @addtogroup Evas_Object_Group_Find + * @{ + */ + /** * Get the lowest evas object on the Evas @p e * * @param e an Evas * @return the lowest object - * - * @ingroup Evas_Object_Group */ EAPI Evas_Object * evas_object_bottom_get(const Evas *e) @@ -436,8 +436,6 @@ evas_object_bottom_get(const Evas *e) * * @param e an Evas * @return the highest object - * - * @ingroup Evas_Object_Group */ EAPI Evas_Object * evas_object_top_get(const Evas *e) @@ -470,3 +468,7 @@ evas_object_top_get(const Evas *e) return obj; } + +/** + * @} + */ diff --git a/legacy/evas/src/lib/canvas/evas_stats.c b/legacy/evas/src/lib/canvas/evas_stats.c index d43569c10c..94cb27b606 100644 --- a/legacy/evas/src/lib/canvas/evas_stats.c +++ b/legacy/evas/src/lib/canvas/evas_stats.c @@ -2,6 +2,11 @@ #include "evas_private.h" #include "evas_cs.h" +/** + * Retrieves if the system wants to share bitmaps using the server. + * @return @c EINA_TRUE if wants, @c EINA_FALSE otherwise. + * @ingroup Evas_Cserve + */ EAPI Eina_Bool evas_cserve_want_get(void) { @@ -11,6 +16,11 @@ evas_cserve_want_get(void) return 0; } +/** + * Retrieves if the system is connected to the server used to shae bitmaps. + * @return @c EINA_TRUE if connected, @c EINA_FALSE otherwise. + * @ingroup Evas_Cserve + */ EAPI Eina_Bool evas_cserve_connected_get(void) { @@ -20,6 +30,14 @@ evas_cserve_connected_get(void) return 0; } +/** + * Retrieves if the system wants to share bitmaps using the server. + * @param stats pointer to structure to fill with statistics about + * cache server. + * @return @c EINA_TRUE if @p stats were filled with data, + * @c EINA_FALSE otherwise and @p stats is untouched. + * @ingroup Evas_Cserve + */ EAPI Eina_Bool evas_cserve_stats_get(Evas_Cserve_Stats *stats) { @@ -137,6 +155,13 @@ evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache) #endif } +/** + * Retrieves the current configuration of the server. + * @param config where to store current server configuration. + * @return @c EINA_TRUE if @p config were filled with data, + * @c EINA_FALSE otherwise and @p config is untouched. + * @ingroup Evas_Cserve + */ EAPI Eina_Bool evas_cserve_config_get(Evas_Cserve_Config *config) { @@ -154,8 +179,15 @@ evas_cserve_config_get(Evas_Cserve_Config *config) #endif } +/** + * Changes the configuration of the server. + * @param config where to store current server configuration. + * @return @c EINA_TRUE if @p config were successfully applied, + * @c EINA_FALSE otherwise. + * @ingroup Evas_Cserve + */ EAPI Eina_Bool -evas_cserve_config_set(Evas_Cserve_Config *config) +evas_cserve_config_set(const Evas_Cserve_Config *config) { #ifdef EVAS_CSERVE Op_Setconfig conf; @@ -170,6 +202,10 @@ evas_cserve_config_set(Evas_Cserve_Config *config) #endif } +/** + * Force system to disconnect from cache server. + * @ingroup Evas_Cserve + */ EAPI void evas_cserve_disconnect(void) { diff --git a/legacy/evas/src/lib/canvas/evas_transform.c b/legacy/evas/src/lib/canvas/evas_transform.c index f5d0f418ab..024e173e66 100644 --- a/legacy/evas/src/lib/canvas/evas_transform.c +++ b/legacy/evas/src/lib/canvas/evas_transform.c @@ -2,6 +2,17 @@ #include "evas_private.h" #include +/** + * @addtogroup Evas_Utils + * @{ + */ + +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI void evas_transform_identity_set(Evas_Transform *t) { @@ -14,6 +25,12 @@ evas_transform_identity_set(Evas_Transform *t) } } +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI void evas_transform_rotate(double angle, Evas_Transform *t) { @@ -39,6 +56,12 @@ evas_transform_rotate(double angle, Evas_Transform *t) t->myz = (-sa * mxz) + (ca * myz); } +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI void evas_transform_translate(float dx, float dy, Evas_Transform *t) { @@ -54,6 +77,12 @@ evas_transform_translate(float dx, float dy, Evas_Transform *t) t->myz = dy * t->mzz; } +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI void evas_transform_scale(float sx, float sy, Evas_Transform *t) { @@ -69,6 +98,12 @@ evas_transform_scale(float sx, float sy, Evas_Transform *t) t->myz = sy * t->myz; } +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI void evas_transform_shear(float sh, float sv, Evas_Transform *t) { @@ -90,6 +125,12 @@ evas_transform_shear(float sh, float sv, Evas_Transform *t) t->myz = (sv * mxz) + myz; } +/** + * To be documented. + * + * FIXME: To be fixed. + * + */ EAPI void evas_transform_compose(Evas_Transform *l, Evas_Transform *t) { @@ -115,3 +156,7 @@ evas_transform_compose(Evas_Transform *l, Evas_Transform *t) t->mzy = (l->mzx * mxy) + (l->mzy * myy) + (l->mzz * mzy); t->mzz = (l->mzx * mxz) + (l->mzy * myz) + (l->mzz * mzz); } + +/** + * @} + */ diff --git a/legacy/evas/src/lib/imaging/evas_imaging.c b/legacy/evas/src/lib/imaging/evas_imaging.c index cb948ddf71..ee073710f8 100644 --- a/legacy/evas/src/lib/imaging/evas_imaging.c +++ b/legacy/evas/src/lib/imaging/evas_imaging.c @@ -9,6 +9,11 @@ #include "evas_common.h" #include "evas_private.h" +/** + * @addtogroup Evas_Imaging + * @{ + */ + EAPI int evas_imaging_image_load_error = EVAS_LOAD_ERROR_NONE; EAPI Evas_Imaging_Image * @@ -236,3 +241,6 @@ evas_imaging_font_cache_get(void) return evas_common_font_cache_get(); } +/** + * @} + */ diff --git a/legacy/evas/src/lib/main.c b/legacy/evas/src/lib/main.c index a50e8cdd30..0dfe709cae 100644 --- a/legacy/evas/src/lib/main.c +++ b/legacy/evas/src/lib/main.c @@ -54,6 +54,8 @@ static int _evas_debug_abort = 0; * my_memory_cleanup(); * } * @endcode + * + * @ingroup Evas_Group */ EAPI int evas_alloc_error(void)