efl/src/lib/efl/Efl.h

258 lines
7.3 KiB
C
Raw Normal View History

#ifndef _EFL_H
#define _EFL_H
#if defined ( __cplusplus )
extern "C" {
#endif
#include <Eo.h>
2014-08-26 03:04:47 -07:00
#ifdef EAPI
# undef EAPI
#endif
#ifdef EWAPI
# undef EWAPI
#endif
#ifdef EOAPI
# undef EOAPI
#endif
2014-08-26 03:04:47 -07:00
#ifdef _WIN32
# ifdef EFL_BUILD
2014-08-26 03:04:47 -07:00
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
2014-08-26 03:04:47 -07:00
# else
# define EAPI __declspec(dllimport)
# endif
# define EAPI_WEAK
2014-08-26 03:04:47 -07:00
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# define EAPI_WEAK __attribute__ ((weak))
2014-08-26 03:04:47 -07:00
# else
# define EAPI
# define EAPI_WEAK
2014-08-26 03:04:47 -07:00
# endif
# else
# define EAPI
# define EAPI_WEAK
2014-08-26 03:04:47 -07:00
# endif
#endif
2014-08-26 03:04:47 -07:00
#define EWAPI EAPI EAPI_WEAK
#define EOAPI EAPI EAPI_WEAK
#define EFL_VERSION_1_18 1
#define EFL_VERSION_1_19 1
#define EFL_VERSION_1_20 1
#define EFL_VERSION_1_21 1
2019-04-05 17:16:44 -07:00
#define EFL_VERSION_1_22 1
2019-04-05 17:17:27 -07:00
#define EFL_VERSION_1_23 1
/* Add here all the required ifdef for any @protected method */
#ifdef EFL_BUILD
# define EFL_PACK_LAYOUT_PROTECTED
# define EFL_GFX_HINT_PROTECTED
#endif
/**
* @ingroup Efl
* @since 1.18
*
* This type is a alias to struct tm.
* It is intended to be a standard way to reference it in .eo files.
*/
typedef struct tm Efl_Time;
Efl.Text.Cursor Summary: Implementation of new cursor text object. This Patch Contains : 1- Remove Efl.Text.Cursor & Efl.Text_Markup_Interactive interfaces and replace them with one Class Efl.Text.Cursor => there are some modifications on cursor methods 2- Update all related classes to use Efl.Text.Cursor object instead of the old interfaces 3- If class uses Efl.Text_Cursor_Cursor (handle), mainly annotation it will stay as it is until we update other annotations into attribute_factory 4- Add main cursor property into efl.text.interactive 5- Add cursor_new method in efl.ui.text (I think we may move it into efl.text.interactive interface) There still some parts that need discussion: especially cursor movement functionality, I prefer to move function with Enum, instead of special function for each movement. ``` enum @beta Efl.Text.Cursor_Move_Type { [[Text cursor movement types]] char_next, [[Advances to the next character]] char_prev, [[Advances to the previous character]] cluster_next, [[Advances to the next grapheme cluster]] cluster_prev, [[Advances to the previous grapheme cluster]] paragraph_start, [[Advances to the first character in this paragraph]] paragraph_end, [[Advances to the last character in this paragraph]] word_start, [[Advance to current word start]] word_end, [[Advance to current word end]] line_start, [[Advance to current line first character]] line_end, [[Advance to current line last character]] paragraph_first, [[Advance to current paragraph first character]] paragraph_last, [[Advance to current paragraph last character]] paragraph_next, [[Advances to the start of the next text node]] paragraph_prev [[Advances to the end of the previous text node]] } move { [[Move the cursor]] params { @in type: Efl.Text.Cursor_Move_Type; [[The type of movement]] } return: bool; [[True if actually moved]] } ``` or old way: ``` char_next { [[Advances to the next character]] // FIXME: Make the number of characters we moved by? Useful for all the other functions return: bool; [[True if actually moved]] } char_prev { [[Advances to the previous character]] return: bool; [[True if actually moved]] } char_delete { [[Deletes a single character from position pointed by given cursor.]] } cluster_next { [[Advances to the next grapheme cluster]] return: bool; [[True if actually moved]] } cluster_prev { [[Advances to the previous grapheme cluster]] return: bool; [[True if actually moved]] } // FIXME: paragraph_end is inconsistent with word_end. The one goes to the last character and the other after the last character. paragraph_start { [[Advances to the first character in this paragraph]] return: bool; [[True if actually moved]] } paragraph_end { [[Advances to the last character in this paragraph]] return: bool; [[True if actually moved]] } word_start { [[Advance to current word start]] return: bool; [[True if actually moved]] } word_end { [[Advance to current word end]] return: bool; [[True if actually moved]] } line_start { [[Advance to current line first character]] return: bool; [[True if actually moved]] } line_end { [[Advance to current line last character]] return: bool; [[True if actually moved]] } paragraph_first { [[Advance to current paragraph first character]] return: bool; [[True if actually moved]] } paragraph_last { [[Advance to current paragraph last character]] return: bool; [[True if actually moved]] } paragraph_next { [[Advances to the start of the next text node]] return: bool; [[True if actually moved]] } paragraph_prev { [[Advances to the end of the previous text node]] return: bool; [[True if actually moved]] } ``` Reviewers: woohyun, tasn, segfaultxavi Reviewed By: woohyun Subscribers: a.srour, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10542
2019-11-22 00:35:54 -08:00
typedef struct _Efl_Text_Cursor_Handle Efl_Text_Cursor_Handle;
typedef struct _Efl_Text_Cursor_Handle _Efl_Text_Cursor_Handle;
typedef struct _Efl_Text_Attribute_Handle Efl_Text_Attribute_Handle;
#include "interfaces/efl_types.eot.h"
#include <Efl_MVVM_Common.h>
/* Data types */
#ifdef EFL_BETA_API_SUPPORT
/** No error on load */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_NONE;
/** A non-specific error occurred */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
/** File (or file path) does not exist */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST;
/** Permission denied to an existing file (or path) */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_PERMISSION_DENIED;
/** Allocation of resources failure prevented load */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
/** File corrupt (but was detected as a known format) */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CORRUPT_FILE;
/** File is not a known format */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT;
/** Reading operation has been cancelled during decoding */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CANCELLED;
/** (Edje only) The file pointed to is incompatible, i.e., it doesn't
* match the library's current version's format. */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_INCOMPATIBLE_FILE;
/** (Edje only) The group/collection set to load from was not found in the file */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_COLLECTION;
/** (Edje only) The group/collection set to load from had recursive references
* on its components */
extern EWAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RECURSIVE_REFERENCE;
#endif /* EFL_BETA_API_SUPPORT */
#include "interfaces/efl_gfx_types.eot.h"
#include "interfaces/efl_ui_drag_types.eot.h"
typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
/* Interfaces */
#include "interfaces/efl_config.eo.h"
2014-08-07 04:51:36 -07:00
#include "interfaces/efl_control.eo.h"
#include "interfaces/efl_duplicate.eo.h"
#include "interfaces/efl_file.h"
#include "interfaces/efl_file.eo.h"
#include "interfaces/efl_file_save.eo.h"
#include "interfaces/efl_gfx_image.eo.h"
#include "interfaces/efl_gfx_frame_controller.eo.h"
#include "interfaces/efl_gfx_image_load_controller.eo.h"
#include "interfaces/efl_gfx_image_orientable.eo.h"
#include "interfaces/efl_part.eo.h"
#include "interfaces/efl_playable.eo.h"
#include "interfaces/efl_player.eo.h"
#include "interfaces/efl_audio_control.eo.h"
#include "interfaces/efl_text.eo.h"
#include "interfaces/efl_text_types.eot.h"
#include "interfaces/efl_ui_i18n.eo.h"
#include "interfaces/efl_ui_layout_orientable.eo.h"
#include "interfaces/efl_ui_layout_orientable_readonly.eo.h"
#include "interfaces/efl_ui_drag.eo.h"
#include "interfaces/efl_ui_range_display.eo.h"
#include "interfaces/efl_ui_range_interactive.eo.h"
#include "interfaces/efl_ui_autorepeat.eo.h"
#include "interfaces/efl_ui_draggable.eo.h"
#include "interfaces/efl_ui_scrollable.eo.h"
scroller: Introducing Efl.Ui.Scroller Summary: scrollable widgets had a interface_scrollable as a mixin so that the widgets had a 'is-a' relation with interface_scrollabe. however, new scroller concept don't have 'is-a' relationship, but 'has-a' relationship. scrollable widgets should have a scroll manager inside them, then scroll manager handles event from user and api implementations. and also we cut the features such as paging because there will be aka 'elm_pager'. we are expecting that the new concept make us to maintain the scroller easier. please excuse for many unorganized code and logics. : ( [contained commit] scrollable: add efl_ui_scroller example scrollable: refactoring for behavior in case of multiple scroller scrollable: remove repetitive scrollbar code. scrollable: combine calculating bounce distance code. scroll_manager: mouse up function refactoring scroll_manager: mouse move function refactoring scroll_manager: warp animator wip scroll_manager: fix denominator value when calculating flicking behavior. Fix to disconnect bounce animator once animation is done gather duplicated animator drop logics gather duplicated conditions Rearrange prototypes and append comment Add manipulate functions for animators scroll_manager: change member_add function. scroll_manger: apply mirroring logic scroll_manager: apply scrollbar apply API to scroller widget scroll_manager: apply scroll event callback Change logics for all about scroll animating efl_ui_pan: add efl_ui_pan scrollable: change content_min_limit to match_content scroll theme: apply overlapped scrollbar + many others! Reviewers: akanad, woohyun, cedric, jpeg Subscribers: jenkins, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5222 Note by @jpeg: Unfortunately this patch comes in a massive single blob, after too many rebase operations. It has now come to a point where I think the API is nice and it works as I'd expect. Now I only wonder how applicable this will be for Efl.Ui.List. As we can see Photocam (legacy and unified API) could be transformed to use this new API.
2017-12-18 04:08:25 -08:00
#include "interfaces/efl_ui_scrollbar.eo.h"
#include "interfaces/efl_ui_container_selectable.eo.h"
#include "interfaces/efl_ui_zoom.eo.h"
#include "interfaces/efl_screen.eo.h"
2016-01-28 16:12:39 -08:00
/* Core interface */
#include "interfaces/efl_interpolator.eo.h"
2016-01-28 16:12:39 -08:00
/* Graphics */
#include "interfaces/efl_gfx_entity.eo.h"
#include "interfaces/efl_gfx_color.eo.h"
#include "interfaces/efl_gfx_buffer.eo.h"
#include "interfaces/efl_gfx_stack.eo.h"
#include "interfaces/efl_gfx_fill.eo.h"
#include "interfaces/efl_gfx_view.eo.h"
#include "interfaces/efl_gfx_path.eo.h"
2015-04-03 07:23:16 -07:00
#include "interfaces/efl_gfx_shape.eo.h"
#include "interfaces/efl_gfx_gradient.eo.h"
2015-04-03 07:23:16 -07:00
#include "interfaces/efl_gfx_gradient_linear.eo.h"
#include "interfaces/efl_gfx_gradient_radial.eo.h"
#include "interfaces/efl_gfx_filter.eo.h"
#include "interfaces/efl_gfx_blur.eo.h"
#include "interfaces/efl_gfx_hint.eo.h"
#include "interfaces/efl_gfx_color_class.eo.h"
#include "interfaces/efl_gfx_text_class.eo.h"
#include "interfaces/efl_gfx_size_class.eo.h"
/* Canvas & UI */
#include "interfaces/efl_ui_view.eo.h"
#include "interfaces/efl_ui_property_bind.eo.h"
#include "interfaces/efl_ui_factory.eo.h"
#include "interfaces/efl_ui_view_factory.eo.h"
#include "interfaces/efl_ui_factory_bind.eo.h"
#include "interfaces/efl_model_provider.eo.h"
#include "interfaces/efl_cached_item.eo.h"
/* Observable interface */
#include "interfaces/efl_observer.eo.h"
#include "interfaces/efl_observable.eo.h"
/* Packing & containers */
#include "interfaces/efl_container.eo.h"
#include "interfaces/efl_content.eo.h"
#include "interfaces/efl_pack.eo.h"
#include "interfaces/efl_pack_layout.eo.h"
#include "interfaces/efl_pack_linear.eo.h"
#include "interfaces/efl_pack_table.eo.h"
#include "interfaces/efl_gfx_arrangement.eo.h"
/* Input and Output */
#include "interfaces/efl_io_closer.eo.h"
#include "interfaces/efl_io_reader.eo.h"
#include "interfaces/efl_io_writer.eo.h"
#include "interfaces/efl_io_sizer.eo.h"
#include "interfaces/efl_io_positioner.eo.h"
#include "interfaces/efl_io_buffer.eo.h"
#include "interfaces/efl_io_queue.eo.h"
/* Text interfaces */
#include "interfaces/efl_text_font_properties.eo.h"
#include "interfaces/efl_text_style.eo.h"
#include "interfaces/efl_text_format.eo.h"
#include "interfaces/efl_text_markup.eo.h"
#include "interfaces/efl_text_markup_util.eo.h"
#include "interfaces/efl_input_text.eo.h"
/**
* @brief Get a proxy object referring to a part of an object.
*
* The returned object is valid for only a single function call.
* Of course, if the first call is @ref efl_ref, it will last
* until @ref efl_unref.
*
* @param[in] obj The object.
* @param[in] name The part name.
*
* @return A (proxy) object, valid for a single call.
*
* @since 1.21
*/
EAPI Efl_Object *efl_part(const Eo *obj, const char *name);
#ifdef EFL_BETA_API_SUPPORT
EAPI void efl_observable_tuple_free(Efl_Observable_Tuple *tuple);
2015-11-18 23:10:41 -08:00
#else
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "interfaces/efl_gfx_types.eot.h"
#include "interfaces/efl_ui_drag_types.eot.h"
#include "interfaces/efl_text_types.eot.h"
2015-11-18 23:10:41 -08:00
#endif
#endif
/* work-around bug in gcc --as-needed link optimization */
EAPI void __efl_internal_init(void);
#if defined ( __cplusplus )
}
#endif
#undef EAPI
#define EAPI
#endif