summaryrefslogtreecommitdiff
path: root/src/lib/efl/Efl.h
blob: 5edb18ebe3a407a4a04eaf123d902f270610e534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
#ifndef _EFL_H
#define _EFL_H

#if defined ( __cplusplus )
extern "C" {
#endif

#include <Eo.h>

#ifdef EAPI
# undef EAPI
#endif
#ifdef EWAPI
# undef EWAPI
#endif
#ifdef EOAPI
# undef EOAPI
#endif

#ifdef _WIN32
# ifdef EFL_BUILD
#  ifdef DLL_EXPORT
#   define EAPI __declspec(dllexport)
#  else
#   define EAPI
#  endif
# else
#  define EAPI __declspec(dllimport)
# endif
# define EAPI_WEAK
#else
# ifdef __GNUC__
#  if __GNUC__ >= 4
#   define EAPI __attribute__ ((visibility("default")))
#   define EAPI_WEAK __attribute__ ((weak))
#  else
#   define EAPI
#   define EAPI_WEAK
#  endif
# else
#  define EAPI
#  define EAPI_WEAK
# endif
#endif

#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
#define EFL_VERSION_1_22 1
#define EFL_VERSION_1_23 1
#define EFL_VERSION_1_24 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;

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


/* Core interface */
#include "interfaces/efl_interpolator.eo.h"

/* 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"

/**
 * @brief Set the list of commands and points to be used to create the content
 * of path.
 *
 * @param[in] obj The object.
 * @param[in] op Command list
 * @param[in] points Point list
 *
 * @ingroup Efl_Gfx_Path
 */
EOAPI void efl_gfx_path_set(Eo *obj, const Efl_Gfx_Path_Command_Type *op, const double *points);

/**
 * @brief Set the list of commands and points to be used to create the content
 * of path.
 *
 * @param[in] obj The object.
 * @param[out] op Command list
 * @param[out] points Point list
 *
 * @ingroup Efl_Gfx_Path
 */
EOAPI void efl_gfx_path_get(const Eo *obj, const Efl_Gfx_Path_Command_Type **op, const double **points);

#include "interfaces/efl_gfx_path.eo.h"
#include "interfaces/efl_gfx_shape.eo.h"
#include "interfaces/efl_gfx_gradient.eo.h"
#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_entity.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);



static inline Eina_Bool
efl_config_bool_set(Efl_Config *obj, const char * name, Eina_Bool val)
{
   Eina_Value *v = eina_value_new(EINA_VALUE_TYPE_UCHAR);
   Eina_Bool b;
   eina_value_set(v, val);
   b = efl_config_set(obj, name, v);
   eina_value_free(v);
   return b;
}

static inline Eina_Bool
efl_config_bool_get(const Efl_Config *obj, const char * name)
{
   Eina_Value *v = efl_config_get(obj, name);
   Eina_Bool b = 0;
   if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_UCHAR)
     eina_value_get(v, &b);
   eina_value_free(v);
   return b;
}

static inline Eina_Bool
efl_config_int_set(Efl_Config *obj, const char * name, int val)
{
   Eina_Value *v = eina_value_new(EINA_VALUE_TYPE_INT);
   Eina_Bool b;
   eina_value_set(v, val);
   b = efl_config_set(obj, name, v);
   eina_value_free(v);
   return b;
}

static inline int
efl_config_int_get(const Efl_Config *obj, const char * name)
{
   Eina_Value *v = efl_config_get(obj, name);
   int b = 0;
   if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_INT)
     eina_value_get(v, &b);
   eina_value_free(v);
   return b;
}

static inline Eina_Bool
efl_config_double_set(Efl_Config *obj, const char * name, double val)
{
   Eina_Value *v = eina_value_new(EINA_VALUE_TYPE_DOUBLE);
   Eina_Bool b;
   eina_value_set(v, val);
   b = efl_config_set(obj, name, v);
   eina_value_free(v);
   return b;
}

static inline double
efl_config_double_get(const Efl_Config *obj, const char * name)
{
   Eina_Value *v = efl_config_get(obj, name);
   double b = 0;
   if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_DOUBLE)
     eina_value_get(v, &b);
   eina_value_free(v);
   return b;
}

static inline Eina_Bool
efl_config_string_set(Efl_Config *obj, const char *name, const char *val)
{
   Eina_Value *v = eina_value_new(EINA_VALUE_TYPE_STRING);
   Eina_Bool b;
   eina_value_set(v, val);
   b = efl_config_set(obj, name, v);
   eina_value_free(v);
   return b;
}

static inline Eina_Stringshare *
efl_config_string_get(const Efl_Config *obj, const char *name)
{
   Eina_Value *v = efl_config_get(obj, name);
   Eina_Stringshare *s = 0;
   if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_STRING)
     {
        const char *b = 0;
        eina_value_get(v, &b);
        s = eina_stringshare_add(b);
     }
   eina_value_free(v);
   return s;
}

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