Macros | Typedefs
Types

Definition for eina types and core functions. More...

Macros

#define EAPI
 Used to export functions (by changing visibility).
 
#define EAPI_WEAK
 Weak symbol, primarily useful in defining library functions which can be overridden in user code. Note: Not supported on all platforms.
 
#define EWAPI   EAPI EAPI_WEAK
 Weak symbols part of the EFL API. Note: Not supported on all platforms.
 
#define EXPORTAPI
 An alias for EAPI.
 
#define __WORDSIZE   64
 Architecture's word size (32 or 64 bits). Defined by Eina if its definition cannot be found in the system's headers.
 
#define EINA_UNUSED
 
#define EINA_WARN_UNUSED_RESULT
 
#define EINA_ARG_NONNULL(...)
 
#define EINA_DEPRECATED
 
#define EINA_MALLOC
 EINA_MALLOC is used to tell the compiler that a function may be treated as if any non-NULL pointer it returns cannot alias any other pointer valid when the function returns and that the memory has undefined content.
 
#define EINA_PURE
 EINA_PURE is used to tell the compiler this function has no effect except the return value and its return value depends only on the parameters and/or global variables.
 
#define EINA_PRINTF(fmt, arg)
 Indicates that this function accepts a printf-style format string. This allows some compilers to perform additional checks on the parameters passed to the function. More...
 
#define EINA_SCANF(fmt, arg)
 Indicates that this function accepts a scanf-style format string. This allows some compilers to perform additional checks on the parameters passed to the function. More...
 
#define EINA_FORMAT(fmt)
 Indicates that the output of this function can be used as a format string in printf-style functions. Some compilers will check that the return value of this function is consistent with the fmt parameter. More...
 
#define EINA_CONST
 Attribute from gcc to prevent the function to read/modify any global memory.
 
#define EINA_NOINSTRUMENT
 Attribute from gcc to disable instrumentation for a specific function.
 
#define EINA_UNLIKELY(exp)   (exp)
 Indicates that the expression is likely to be FALSE. Some compilers and processor architectures can then optimize the more likely path. More...
 
#define EINA_LIKELY(exp)   (exp)
 Indicates that the expression is likely to be TRUE. Some compilers and processor architectures can then optimize the more likely path. More...
 
#define EINA_SENTINEL
 Attribute from gcc to prevent calls without the necessary NULL sentinel in certain variadic functions. More...
 
#define EINA_FALLTHROUGH
 Attribute from gcc to prevent warning and indicate that we expect to actually go to the next switch statement. More...
 
#define EINA_PREFETCH(arg)
 Hints that the pointer arg needs to be pre-fetched into cache. More...
 
#define EINA_PREFETCH_WRITE(arg)
 Hints that the pointer arg needs to be pre-fetched into cache. More...
 
#define EINA_PREFETCH_NOCACHE(arg)
 Hints that the pointer arg needs to be pre-fetched into cache. More...
 
#define EINA_PREFETCH_NOCACHE_WRITE(arg)
 Hints that the pointer arg needs to be pre-fetched into cache. More...
 
#define EINA_FALSE   ((Eina_Bool)0)
 
#define EINA_TRUE   ((Eina_Bool)1)
 
#define EINA_COMPARE_CB(function)   ((Eina_Compare_Cb)function)
 
#define EINA_RANDOM_CB(function)   ((Eina_Random_Cb)function)
 
#define EINA_PROCESS_CB(Function)   ((Eina_Process_Cb)Function)
 
#define EINA_EACH_CB(Function)   ((Eina_Each_Cb)Function)
 
#define EINA_FREE_CB(Function)   ((Eina_Free_Cb)Function)
 
#define EINA_C_ARRAY_LENGTH(arr)   (sizeof(arr) / sizeof((arr)[0]))
 
#define EINA_DOUBLE_EQUAL(x, y)   (fabs((x) - (y)) <= (2.2204460492503131e-16) * fabs((x)))
 

Typedefs

typedef unsigned char Eina_Bool
 
typedef int(* Eina_Compare_Cb) (const void *data1, const void *data2)
 
typedef int(* Eina_Random_Cb) (const int min, const int max)
 
typedef void *(* Eina_Process_Cb) (const void *container, void *data, void *fdata)
 
typedef Eina_Bool(* Eina_Each_Cb) (const void *container, void *data, void *fdata)
 
typedef void(* Eina_Free_Cb) (void *data)
 

Detailed Description

Definition for eina types and core functions.

Macro Definition Documentation

◆ EINA_UNUSED

#define EINA_UNUSED

Used to indicate that a function parameter is purposely unused. This silences some compiler's warning about unused parameters.

Examples
actionslider_example_01.c, banshee.c, bg_example_01.c, bg_example_02.c, bg_example_03.c, box_example_02.c, bubble_example_01.c, button_example_00.c, button_example_01.c, calendar_example_01.c, calendar_example_02.c, calendar_example_03.c, calendar_example_04.c, calendar_example_05.c, calendar_example_06.c, check_example_01.c, client.c, clock_example.c, codegen_example.c, colorselector_example_01.c, combobox_example_01.c, complex-types-client-eina-value.c, complex-types-server.c, complex-types.c, conformant_example_01.c, conformant_example_02.c, connman-list-services.c, ctxpopup_example_01.c, datetime_example.c, dayselector_example.c, diskselector_example_01.c, diskselector_example_02.c, ecore_con_client_example.c, ecore_con_client_simple_example.c, ecore_con_lookup_example.c, ecore_con_server_example.c, ecore_con_server_simple_example.c, ecore_con_url_cookies_example.c, ecore_con_url_download_example.c, ecore_con_url_headers_example.c, ecore_evas_basics_example.c, ecore_evas_buffer_example_02.c, ecore_evas_callbacks.c, ecore_evas_object_example.c, ecore_evas_window_sizes_example.c, ecore_event_example_01.c, ecore_event_example_02.c, ecore_exe_example.c, ecore_exe_example_child.c, ecore_fd_handler_example.c, ecore_idler_example.c, ecore_imf_example.c, ecore_job_example.c, ecore_pipe_gstreamer_example.c, ecore_pipe_simple_example.c, ecore_poller_example.c, ecore_thread_example.c, ecore_time_functions_example.c, ecore_timer_example.c, edje-basic.c, edje-box.c, edje-box2.c, edje-color-class.c, edje-drag.c, edje-perspective.c, edje-signals-messages.c, edje-swallow.c, edje-table.c, edje-text.c, eet-data-file_descriptor_01.c, efl_thread_1.c, efl_thread_2.c, efl_thread_3.c, efl_thread_4.c, efl_thread_5.c, efl_thread_6.c, eina_accessor_01.c, eina_array_01.c, eina_array_02.c, eina_file_01.c, eina_hash_01.c, eina_hash_02.c, eina_hash_03.c, eina_hash_04.c, eina_hash_05.c, eina_hash_06.c, eina_hash_07.c, eina_hash_08.c, eina_inarray_01.c, eina_inarray_02.c, eina_inarray_03.c, eina_iterator_01.c, eina_log_03.c, eina_magic_01.c, eina_simple_xml_parser_01.c, eina_str_01.c, eina_strbuf_01.c, eina_stringshare_01.c, eina_tiler_01.c, eina_value_03.c, eio_file_ls.c, emotion_basic_example.c, emotion_signals_example.c, emotion_test_main.c, entry_example.c, evas-aspect-hints.c, evas-box.c, evas-events.c, evas-hints.c, evas-images.c, evas-images2.c, evas-map-utils.c, evas-object-manipulation.c, evas-smart-interface.c, evas-smart-object.c, evas-stacking.c, evas-table.c, evas-text.c, fileselector_button_example.c, fileselector_entry_example.c, fileselector_example.c, flip_example_01.c, flipselector_example.c, frame_example_01.c, general_funcs_example.c, gengrid_example.c, genlist_example_01.c, genlist_example_02.c, genlist_example_03.c, genlist_example_04.c, genlist_example_05.c, glview_example_01.c, hover_example_01.c, hoversel_example_01.c, icon_example_01.c, image_example_01.c, index_example_01.c, index_example_02.c, inwin_example.c, label_example_01.c, layout_example_01.c, layout_example_02.c, layout_example_03.c, list_example_01.c, list_example_02.c, list_example_03.c, map_example_01.c, map_example_02.c, map_example_03.c, mapbuf_example.c, menu_example_01.c, naviframe_example.c, notify_example_01.c, ofono-dial.c, panel_example_01.c, panes_example.c, photocam_example_01.c, popup_example_01.c, popup_example_02.c, popup_example_03.c, prefs_example_01.c, prefs_example_02.c, prefs_example_03.c, progressbar_example.c, radio_example_01.c, scroller_example_01.c, segment_control_example.c, separator_example_01.c, server.c, slider_example.c, slideshow_example.c, spinner_example.c, table_example_01.c, table_example_02.c, theme_example_01.c, theme_example_02.c, thumb_example_01.c, toolbar_example_01.c, toolbar_example_02.c, toolbar_example_03.c, track_example_01.c, transit_example_01.c, transit_example_02.c, transit_example_03.c, transit_example_04.c, web_example_02.c, and win_example.c.

◆ EINA_WARN_UNUSED_RESULT

EAPI void EINA_WARN_UNUSED_RESULT

Used to warn when the returned value of the function is not used.

◆ EINA_ARG_NONNULL

#define EINA_ARG_NONNULL (   ...)

Used to warn when the specified arguments of the function are NULL.

Parameters
[in]...Ordinals of the parameters to check for nullity (1..n)
Returns
Nothing, but Doxygen will complain if it's not documented :-P

◆ EINA_DEPRECATED

#define EINA_DEPRECATED

Used to warn when the function is considered as deprecated.

◆ EINA_PRINTF

#define EINA_PRINTF (   fmt,
  arg 
)

Indicates that this function accepts a printf-style format string. This allows some compilers to perform additional checks on the parameters passed to the function.

Parameters
[in]fmtThe 1-based index of the parameter specifying the format string.
[in]argThe 1-based index of the first data parameter.

◆ EINA_SCANF

#define EINA_SCANF (   fmt,
  arg 
)

Indicates that this function accepts a scanf-style format string. This allows some compilers to perform additional checks on the parameters passed to the function.

Parameters
[in]fmtThe 1-based index of the parameter specifying the format string.
[in]argThe 1-based index of the first data parameter.

◆ EINA_FORMAT

#define EINA_FORMAT (   fmt)

Indicates that the output of this function can be used as a format string in printf-style functions. Some compilers will check that the return value of this function is consistent with the fmt parameter.

Parameters
[in]fmtThe 1-based index of the parameter specifying the format string.

◆ EINA_UNLIKELY

#define EINA_UNLIKELY (   exp)    (exp)

Indicates that the expression is likely to be FALSE. Some compilers and processor architectures can then optimize the more likely path.

Parameters
[in]expThe expression to be used.

◆ EINA_LIKELY

#define EINA_LIKELY (   exp)    (exp)

Indicates that the expression is likely to be TRUE. Some compilers and processor architectures can then optimize the more likely path.

Parameters
[in]expThe expression to be used.

◆ EINA_SENTINEL

#define EINA_SENTINEL

Attribute from gcc to prevent calls without the necessary NULL sentinel in certain variadic functions.

Since
1.7

◆ EINA_FALLTHROUGH

#define EINA_FALLTHROUGH

Attribute from gcc to prevent warning and indicate that we expect to actually go to the next switch statement.

Since
1.20

◆ EINA_PREFETCH

#define EINA_PREFETCH (   arg)

Hints that the pointer arg needs to be pre-fetched into cache.

This hints to the compiler to probably issue a prefetch command for the memory address arg and ensure it goes into all levels of cache. For just writing to an address look at EINA_PREFETCH_WRITE().

Note that the pointer arg does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.

Since
1.19

◆ EINA_PREFETCH_WRITE

#define EINA_PREFETCH_WRITE (   arg)

Hints that the pointer arg needs to be pre-fetched into cache.

This hints to the compiler to probably issue a prefetch command for the memory address arg and ensure it goes into all levels of cache. This specifically indicates that the address is going to be written to as opposed to being read from as with EINA_PREFETCH().

Note that the pointer arg does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.

Since
1.19

◆ EINA_PREFETCH_NOCACHE

#define EINA_PREFETCH_NOCACHE (   arg)

Hints that the pointer arg needs to be pre-fetched into cache.

This hints to the compiler to probably issue a prefetch command for the memory address arg and ensure it goes into just the closest(l1) cache. For just writing to an address look at EINA_PREFETCH_WRITE_NOCACHE().

Note that the pointer arg does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.

Since
1.19

◆ EINA_PREFETCH_NOCACHE_WRITE

#define EINA_PREFETCH_NOCACHE_WRITE (   arg)

Hints that the pointer arg needs to be pre-fetched into cache.

This hints to the compiler to probably issue a prefetch command for the memory address arg and ensure it goes into just the closest(l1) cache. This specifically indicates that the address is going to be written to as opposed to being read from as with EINA_PREFETCH_NOCACHE(). Note that the pointer arg does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.

Since
1.19

◆ EINA_FALSE

#define EINA_FALSE   ((Eina_Bool)0)

boolean value FALSE (numerical value 0)

Examples
banshee.c, bg_example_03.c, codegen_example.c, combobox_example_01.c, complex-types-client-eina-value.c, ctxpopup_example_01.c, datetime_example.c, diskselector_example_02.c, ecore_con_client_example.c, ecore_con_server_example.c, ecore_con_url_headers_example.c, ecore_evas_object_example.c, ecore_evas_window_sizes_example.c, ecore_imf_example.c, ecore_thread_example.c, ecore_time_functions_example.c, edje-box.c, edje-color-class.c, edje-perspective.c, eet-data-file_descriptor_01.c, eet-data-file_descriptor_02.c, eet-data-nested.c, eet-data-simple.c, eina_array_02.c, eina_file_01.c, eina_simple_xml_parser_01.c, eina_tiler_01.c, eina_value_03.c, eio_file_ls.c, emotion_test_main.c, entry_example.c, ephysics_logo.c, evas-events.c, evas-map-utils.c, fileselector_button_example.c, fileselector_example.c, flipselector_example.c, general_funcs_example.c, gengrid_example.c, genlist_example_02.c, genlist_example_05.c, hoversel_example_01.c, icon_example_01.c, image_example_01.c, index_example_02.c, inwin_example.c, layout_example_03.c, list_example_03.c, mapbuf_example.c, notify_example_01.c, panel_example_01.c, photocam_example_01.c, prefs_example_02.c, progressbar_example.c, scroller_example_01.c, slider_example.c, slideshow_example.c, spinner_example.c, table_example_02.c, test_bouncing_ball.c, test_bouncing_text.c, test_camera.c, test_camera_track.c, test_collision_detection.c, test_delete.c, test_growing_balls.c, test_rotating_forever.c, test_velocity.c, thumb_example_01.c, toolbar_example_01.c, toolbar_example_02.c, transit_example_03.c, transit_example_04.c, web_example_02.c, and win_example.c.

◆ EINA_TRUE

#define EINA_TRUE   ((Eina_Bool)1)

boolean value TRUE (numerical value 1)

Examples
actionslider_example_01.c, banshee.c, bg_example_01.c, bg_example_02.c, bg_example_03.c, box_example_02.c, bubble_example_01.c, button_example_00.c, button_example_01.c, calendar_example_01.c, calendar_example_02.c, calendar_example_03.c, calendar_example_04.c, calendar_example_05.c, calendar_example_06.c, check_example_01.c, client.c, clock_example.c, codegen_example.c, colorselector_example_01.c, combobox_example_01.c, complex-types-client-eina-value.c, complex-types-server.c, conformant_example_01.c, conformant_example_02.c, ctxpopup_example_01.c, datetime_example.c, dayselector_example.c, diskselector_example_01.c, diskselector_example_02.c, ecore_con_client_example.c, ecore_con_server_example.c, ecore_con_url_cookies_example.c, ecore_con_url_download_example.c, ecore_con_url_headers_example.c, ecore_evas_buffer_example_02.c, ecore_evas_window_sizes_example.c, ecore_exe_example.c, ecore_fd_handler_gnutls_example.c, ecore_imf_example.c, ecore_pipe_gstreamer_example.c, ecore_poller_example.c, ecore_thread_example.c, edje-basic.c, edje-box.c, edje-color-class.c, edje-drag.c, edje-perspective.c, edje-signals-messages.c, edje-table.c, edje-text.c, eet-data-file_descriptor_01.c, eet-data-file_descriptor_02.c, eet-data-nested.c, eet-data-simple.c, efl_thread_5.c, efl_thread_6.c, eina_array_01.c, eina_array_02.c, eina_hash_01.c, eina_hash_02.c, eina_hash_03.c, eina_hash_04.c, eina_hash_05.c, eina_hash_06.c, eina_hash_07.c, eina_iterator_01.c, eina_simple_xml_parser_01.c, eina_tiler_01.c, eina_value_03.c, eio_file_ls.c, emotion_basic_example.c, emotion_signals_example.c, emotion_test_main.c, entry_example.c, ephysics_logo.c, evas-aspect-hints.c, evas-box.c, evas-events.c, evas-hints.c, evas-images.c, evas-images2.c, evas-map-utils.c, evas-object-manipulation.c, evas-smart-interface.c, evas-smart-object.c, evas-stacking.c, evas-text.c, fileselector_button_example.c, fileselector_entry_example.c, fileselector_example.c, flip_example_01.c, flipselector_example.c, frame_example_01.c, general_funcs_example.c, gengrid_example.c, genlist_example_01.c, genlist_example_02.c, genlist_example_03.c, genlist_example_04.c, genlist_example_05.c, glview_example_01.c, hover_example_01.c, hoversel_example_01.c, icon_example_01.c, image_example_01.c, index_example_01.c, index_example_02.c, inwin_example.c, label_example_01.c, layout_example_01.c, layout_example_02.c, layout_example_03.c, list_example_01.c, list_example_02.c, list_example_03.c, map_example_01.c, map_example_02.c, map_example_03.c, mapbuf_example.c, menu_example_01.c, naviframe_example.c, notify_example_01.c, panel_example_01.c, panes_example.c, photocam_example_01.c, popup_example_01.c, popup_example_02.c, popup_example_03.c, prefs_data_example.c, prefs_example_01.c, prefs_example_02.c, prefs_example_03.c, progressbar_example.c, radio_example_01.c, scroller_example_01.c, segment_control_example.c, separator_example_01.c, slider_example.c, slideshow_example.c, spinner_example.c, table_example_01.c, table_example_02.c, test_bouncing_ball.c, test_bouncing_text.c, test_camera.c, test_camera_track.c, test_collision_detection.c, test_collision_filter.c, test_constraint.c, test_delete.c, test_forces.c, test_growing_balls.c, test_no_gravity.c, test_rotating_forever.c, test_shapes.c, test_sleeping_threshold.c, test_slider.c, test_velocity.c, theme_example_01.c, theme_example_02.c, thumb_example_01.c, toolbar_example_01.c, toolbar_example_02.c, toolbar_example_03.c, track_example_01.c, transit_example_01.c, transit_example_02.c, transit_example_03.c, transit_example_04.c, web_example_02.c, and win_example.c.

◆ EINA_COMPARE_CB

#define EINA_COMPARE_CB (   function)    ((Eina_Compare_Cb)function)

Macro to cast to Eina_Compare_Cb.

◆ EINA_RANDOM_CB

#define EINA_RANDOM_CB (   function)    ((Eina_Random_Cb)function)

Macro to cast to Eina_Random_Cb.

◆ EINA_PROCESS_CB

#define EINA_PROCESS_CB (   Function)    ((Eina_Process_Cb)Function)

Macro to cast to Eina_Process.

◆ EINA_EACH_CB

#define EINA_EACH_CB (   Function)    ((Eina_Each_Cb)Function)

Macro to cast to Eina_Each.

◆ EINA_FREE_CB

#define EINA_FREE_CB (   Function)    ((Eina_Free_Cb)Function)

Macro to cast to Eina_Free_Cb.

◆ EINA_C_ARRAY_LENGTH

#define EINA_C_ARRAY_LENGTH (   arr)    (sizeof(arr) / sizeof((arr)[0]))

Macro to return the array length of a standard c array.

For example: int foo[] = { 0, 1, 2, 3 }; would return 4 and not 4 * sizeof(int).

Since
1.2.0
Examples
complex-types-server.c, eina_value_02.c, and ephysics_logo.c.

◆ EINA_DOUBLE_EQUAL

#define EINA_DOUBLE_EQUAL (   x,
 
)    (fabs((x) - (y)) <= (2.2204460492503131e-16) * fabs((x)))

Macro to compare 2 double floating point values and deal with precision loss issues.

Since
1.18

Typedef Documentation

◆ Eina_Bool

Type to mimic a boolean.

Note
it differs from stdbool.h as this is defined as an unsigned char to make it usable by bitfields (Eina_Bool name:1) and also take as few bytes as possible.

◆ Eina_Compare_Cb

Eina_Compare_Cb

Function used in functions using sorting. It compares data1 and data2. If data1 is 'less' than data2, -1 must be returned, if it is 'greater', 1 must be returned, and if they are equal, 0 must be returned.

Examples
eina_list_02.c.

◆ Eina_Random_Cb

Eina_Random_Cb

Function used in shuffling functions. An integer between min and max inclusive must be returned.

Since
1.8

◆ Eina_Process_Cb

Eina_Process_Cb

Method that processes some data and returns new data. It's meant to be used as a callback to process all nodes inside a container (See eina_iterator_processed_new, for example.)

Parameters
dataThe data to process.
fdataContext data.
Returns
The processed data.

◆ Eina_Each_Cb

Eina_Each_Cb

A callback type used when iterating over a container.

◆ Eina_Free_Cb

Eina_Free_Cb

A callback type used to free data when iterating over a container.