summaryrefslogtreecommitdiff
path: root/src/lib/elm_thumb_eo.h
blob: e85e14ffb4bcbd1791c35ca9f617653f4dd6de2d (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
#define ELM_OBJ_THUMB_CLASS elm_obj_thumb_class_get()

const Eo_Class *elm_obj_thumb_class_get(void) EINA_CONST;

extern EAPI Eo_Op ELM_OBJ_THUMB_BASE_ID;

enum
{
   ELM_OBJ_THUMB_SUB_ID_RELOAD,
   ELM_OBJ_THUMB_SUB_ID_FILE_SET,
   ELM_OBJ_THUMB_SUB_ID_FILE_GET,
   ELM_OBJ_THUMB_SUB_ID_PATH_GET,
   ELM_OBJ_THUMB_SUB_ID_ASPECT_SET,
   ELM_OBJ_THUMB_SUB_ID_ASPECT_GET,
   ELM_OBJ_THUMB_SUB_ID_FDO_SIZE_SET,
   ELM_OBJ_THUMB_SUB_ID_FDO_SIZE_GET,
   ELM_OBJ_THUMB_SUB_ID_FORMAT_SET,
   ELM_OBJ_THUMB_SUB_ID_FORMAT_GET,
   ELM_OBJ_THUMB_SUB_ID_ORIENTATION_SET,
   ELM_OBJ_THUMB_SUB_ID_ORIENTATION_GET,
   ELM_OBJ_THUMB_SUB_ID_CROP_ALIGN_SET,
   ELM_OBJ_THUMB_SUB_ID_CROP_ALIGN_GET,
   ELM_OBJ_THUMB_SUB_ID_SIZE_SET,
   ELM_OBJ_THUMB_SUB_ID_SIZE_GET,
   ELM_OBJ_THUMB_SUB_ID_COMPRESS_SET,
   ELM_OBJ_THUMB_SUB_ID_COMPRESS_GET,
   ELM_OBJ_THUMB_SUB_ID_QUALITY_SET,
   ELM_OBJ_THUMB_SUB_ID_QUALITY_GET,
   ELM_OBJ_THUMB_SUB_ID_ANIMATE_SET,
   ELM_OBJ_THUMB_SUB_ID_ANIMATE_GET,
   ELM_OBJ_THUMB_SUB_ID_EDITABLE_SET,
   ELM_OBJ_THUMB_SUB_ID_EDITABLE_GET,
   ELM_OBJ_THUMB_SUB_ID_LAST
};

#define ELM_OBJ_THUMB_ID(sub_id) (ELM_OBJ_THUMB_BASE_ID + sub_id)


/**
 * @def elm_obj_thumb_reload
 * @since 1.8
 *
 * Reload thumbnail if it was generated before.
 *
 *
 * @see elm_thumb_reload
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_reload() ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_RELOAD)

/**
 * @def elm_obj_thumb_file_set
 * @since 1.8
 *
 * Set the file that will be used as thumbnail source.
 *
 * @param[in] file
 * @param[in] key
 *
 * @see elm_thumb_file_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_file_set(file, key) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, key)

/**
 * @def elm_obj_thumb_file_get
 * @since 1.8
 *
 * Get the image or video path and key used to generate the thumbnail.
 *
 * @param[out] file
 * @param[out] key
 *
 * @see elm_thumb_file_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_file_get(file, key) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_FILE_GET), EO_TYPECHECK(const char **, file), EO_TYPECHECK(const char **, key)

/**
 * @def elm_obj_thumb_path_get
 * @since 1.8
 *
 * Get the path and key to the image or video thumbnail generated by ethumb.
 *
 * @param[out] file
 * @param[out] key
 *
 * @see elm_thumb_path_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_path_get(file, key) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_PATH_GET), EO_TYPECHECK(const char **, file), EO_TYPECHECK(const char **, key)

/**
 * @def elm_obj_thumb_aspect_set
 * @since 1.8
 *
 * Set the aspect for the thumb object
 *
 * @param[in] setting
 *
 * @see elm_thumb_aspect_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_aspect_set(aspect) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_ASPECT_SET), EO_TYPECHECK(Ethumb_Thumb_Aspect, aspect)

/**
 * @def elm_obj_thumb_aspect_get
 * @since 1.8
 *
 * Get the aspect of the thumb object
 * @param[out] ret
 *
 * @see elm_thumb_aspect_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_aspect_get(ret) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_ASPECT_GET), EO_TYPECHECK(Ethumb_Thumb_Aspect *, ret)

/**
 * @def elm_obj_thumb_fdo_size_set
 * @since 1.8
 *
 * Set the fdo size for the thumb object
 *
 * @param[in] setting
 *
 * @see elm_thumb_fdo_size_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_fdo_size_set(size) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_FDO_SIZE_SET), EO_TYPECHECK(Ethumb_Thumb_FDO_Size, size)

/**
 * @def elm_obj_thumb_fdo_size_get
 * @since 1.8
 *
 * Get the fdo size of the thumb object
 * @param[out] ret
 *
 * @see elm_thumb_fdo_size_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_fdo_size_get(ret) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_FDO_SIZE_GET), EO_TYPECHECK(Ethumb_Thumb_FDO_Size *, ret)

/**
 * @def elm_obj_thumb_format_set
 * @since 1.8
 *
 * Set the format for the thumb object
 *
 * @param[in] setting
 *
 * @see elm_thumb_format_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_format_set(format) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_FORMAT_SET), EO_TYPECHECK(Ethumb_Thumb_Format, format)

/**
 * @def elm_obj_thumb_format_get
 * @since 1.8
 *
 * Get the format of the thumb object
 * @param[out] ret
 *
 * @see elm_thumb_format_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_format_get(ret) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_FORMAT_GET), EO_TYPECHECK(Ethumb_Thumb_Format *, ret)

/**
 * @def elm_obj_thumb_orientation_set
 * @since 1.8
 *
 * Set the orientation for the thumb object
 *
 * @param[in] setting
 *
 * @see elm_thumb_orientation_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_orientation_set(orient) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_ORIENTATION_SET), EO_TYPECHECK(Ethumb_Thumb_Orientation, orient)

/**
 * @def elm_obj_thumb_orientation_get
 * @since 1.8
 *
 * Get the orientation of the thumb object
 * @param[out] ret
 *
 * @see elm_thumb_orientaion_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_orientation_get(ret) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_ORIENTATION_GET), EO_TYPECHECK(Ethumb_Thumb_Orientation *, ret)

/**
 * @def elm_obj_thumb_size_set
 * @since 1.8
 *
 * Set the width and height of the thumbnail
 *
 * @param[in] width
 * @param[in] height
 *0
 * @see elm_thumb_size_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_size_set(tw, th) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_SIZE_SET), EO_TYPECHECK(int, tw), EO_TYPECHECK(int, th)

/**
 * @def elm_obj_thumb_size_get
 * @since 1.8
 *
 * Get the size of the thumbnail.
 *
 * @param[out] tw
 * @param[out] th
 *
 * @see elm_thumb_size_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_size_get(tw, th) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_SIZE_GET), EO_TYPECHECK(int *, tw), EO_TYPECHECK(int *, th)

/**
 * @def elm_obj_thumb_crop_align_set
 * @since 1.8
 *
 * Set the crop alignment of the thumbnail
 *
 * @param[in] x coordinate
 * @param[in] y coordinate
 *
 * @see elm_thumb_crop_align_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_crop_align_set(cropx, cropy) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_CROP_ALIGN_SET), EO_TYPECHECK(double, cropx), EO_TYPECHECK(double, cropy)

/**
 * @def elm_obj_thumb_crop_align_get
 * @since 1.8
 *
 * Get the crop alignment of the thumbnail.
 *
 * @param[out] cropx
 * @param[out] cropy
 *
 * @see elm_thumb_crop_align_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_crop_align_get(cropx, cropy) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_CROP_ALIGN_GET), EO_TYPECHECK(double *, cropx), EO_TYPECHECK(double *, cropy)

/**
 * @def elm_obj_thumb_compress_set
 * @since 1.8
 *
 * Set the compression of the thumbnail
 *
 * @param[in] compress
 *
 * @see elm_thumb_compress_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_compress_set(compress) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_COMPRESS_SET), EO_TYPECHECK(int, compress)

/**
 * @def elm_obj_thumb_compress_get
 * @since 1.8
 *
 * Get the compression of the thumbnail.
 *
 * @param[out] compress
 *
 * @see elm_thumb_compress_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_compress_get(compress) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_COMPRESS_GET), EO_TYPECHECK(int *, compress)

/**
 * @def elm_obj_thumb_quality_set
 * @since 1.8
 *
 * Set the quality of the thumbnail
 *
 * @param[in] quality
 *
 * @see elm_thumb_quality_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_quality_set(quality) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_QUALITY_SET), EO_TYPECHECK(int, quality)

/**
 * @def elm_obj_thumb_quality_get
 * @since 1.8
 *
 * Get the quality of the thumbnail.
 *
 * @param[out] quality
 *
 * @see elm_thumb_quality_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_quality_get(quality) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_QUALITY_GET), EO_TYPECHECK(int *, quality)

/**
 * @def elm_obj_thumb_animate_set
 * @since 1.8
 *
 * Set the animation state for the thumb object. If its content is an animated
 *
 * @param[in] setting
 *
 * @see elm_thumb_animate_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_animate_set(setting) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_ANIMATE_SET), EO_TYPECHECK(Elm_Thumb_Animation_Setting, setting)

/**
 * @def elm_obj_thumb_animate_get
 * @since 1.8
 *
 * Get the animation state for the thumb object.
 *
 * @param[out] ret
 *
 * @see elm_thumb_animate_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_animate_get(ret) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_ANIMATE_GET), EO_TYPECHECK(Elm_Thumb_Animation_Setting *, ret)

/**
 * @def elm_obj_thumb_editable_set
 * @since 1.8
 *
 * Make the thumbnail 'editable'.
 *
 * @param[in] edit
 * @param[out] ret
 *
 * @see elm_thumb_editable_set
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_editable_set(edit, ret) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_EDITABLE_SET), EO_TYPECHECK(Eina_Bool, edit), EO_TYPECHECK(Eina_Bool *, ret)

/**
 * @def elm_obj_thumb_editable_get
 * @since 1.8
 *
 * Make the thumbnail 'editable'.
 *
 * @param[out] ret
 *
 * @see elm_thumb_editable_get
 *
 * @ingroup Thumb
 */
#define elm_obj_thumb_editable_get(ret) ELM_OBJ_THUMB_ID(ELM_OBJ_THUMB_SUB_ID_EDITABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)