Eina_Types_Group(3)

NAME
Eina_Types_Group - Types

 - Definition for eina types and core functions.

SYNOPSIS

  Macros
#define EINA_API
Used to export functions (by changing visibility).
#define EINA_API_WEAK
Weak symbol, primarily useful in defining library functions which can be overridden in user code.
#define EWAPI EAPI EINA_API_WEAK
Weak symbols part of the EFL API.
#define EXPORTAPI
An alias for EINA_API.
#define __WORDSIZE 64
Architecture's word size (32 or 64 bits).
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
#define EINA_WARN_UNUSED_RESULT
Used to warn when the returned value of the function is not used.
#define EINA_ARG_NONNULL(...)
Used to warn when the specified arguments of the function are NULL.
#define EINA_DEPRECATED
Used to warn when the function is considered as 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.
#define EINA_SCANF(fmt, arg)
Indicates that this function accepts a scanf-style format string.
#define EINA_FORMAT(fmt)
Indicates that the output of this function can be used as a format string in printf-style functions.
#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.
#define EINA_LIKELY(exp) (exp)
Indicates that the expression is likely to be TRUE.
#define EINA_SENTINEL
Attribute from gcc to prevent calls without the necessary NULL sentinel in certain variadic functions.
#define EINA_FALLTHROUGH
Attribute from gcc to prevent warning and indicate that we expect to actually go to the next switch statement.
#define EINA_PREFETCH(arg)
Hints that the pointer arg needs to be pre-fetched into cache.
#define EINA_PREFETCH_WRITE(arg)
Hints that the pointer arg needs to be pre-fetched into cache.
#define EINA_PREFETCH_NOCACHE(arg)
Hints that the pointer arg needs to be pre-fetched into cache.
#define EINA_PREFETCH_NOCACHE_WRITE(arg)
Hints that the pointer arg needs to be pre-fetched into cache.
#define EINA_FALSE ((Eina_Bool)0)
boolean value FALSE (numerical value 0)
#define EINA_TRUE ((Eina_Bool)1)
boolean value TRUE (numerical value 1)
#define EINA_COMPARE_CB(function) ((Eina_Compare_Cb)function)
Macro to cast to Eina_Compare_Cb.
#define EINA_RANDOM_CB(function) ((Eina_Random_Cb)function)
Macro to cast to Eina_Random_Cb.
#define EINA_PROCESS_CB(Function) ((Eina_Process_Cb)Function)
Macro to cast to Eina_Process.
#define EINA_EACH_CB(Function) ((Eina_Each_Cb)Function)
Macro to cast to Eina_Each.
#define EINA_FREE_CB(Function) ((Eina_Free_Cb)Function)
Macro to cast to Eina_Free_Cb.
#define EINA_C_ARRAY_LENGTH(arr) (sizeof(arr) / sizeof((arr)[0]))
Macro to return the array length of a standard c array.
#define EINA_DOUBLE_EQUAL(x, y) (fabs((x) - (y)) <= (2.2204460492503131e-16) * fabs((x)))
Macro to compare 2 double floating point values and deal with precision loss issues.

  Typedefs
typedef unsigned char Eina_Bool
Type to mimic a boolean.
typedef int(* Eina_Compare_Cb) (const void *data1, const void *data2)
Function used in functions using sorting.
typedef int(* Eina_Random_Cb) (const int min, const int max)
Function used in shuffling functions.
typedef void *(* Eina_Process_Cb) (const void *container, void *data, void *fdata)
Method that processes some data and returns new data.
typedef Eina_Bool(* Eina_Each_Cb) (const void *container, void *data, void *fdata)
A callback type used when iterating over a container.
typedef void(* Eina_Free_Cb) (void *data)
A callback type used to free data when iterating over a container.

Detailed Description

Definition for eina types and core functions.

Macro Definition Documentation

  #define EINA_API_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 EINA_API_WEAK

Weak symbols part of the EFL API. Note: Not supported on all platforms.

  #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

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.

  #define EINA_ARG_NONNULL( ...)

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

Parameters
    ... Ordinals of the parameters to check for nullity (1..n)

Returns
    Nothing, but Doxygen will complain if it's not documented :-P

  #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
    fmt The 1-based index of the parameter specifying the format string.
    arg The 1-based index of the first data parameter.

  #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
    fmt The 1-based index of the parameter specifying the format string.
    arg The 1-based index of the first data parameter.

  #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
    fmt The 1-based index of the parameter specifying the format string.

  #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
    exp The expression to be used.

  #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
    exp The expression to be used.

  #define EINA_SENTINEL

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

Since
    1.7

  #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

  #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

  #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

  #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

  #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

  #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.

  #define EINA_DOUBLE_EQUAL(x, y) (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

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

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

Since
    1.8

  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
    data The data to process.
    fdata Context data.

Returns
    The processed data.

Author

Generated automatically by Doxygen for EFL from the source code.