1 /** Used to set if a video thumbnail is animating or not 2 * 3 * @ingroup Elm_Thumb 4 */ 5 typedef enum 6 { 7 ELM_THUMB_ANIMATION_START = 0, /** Play animation once */ 8 ELM_THUMB_ANIMATION_LOOP, /** Keep playing animation until stop is requested 9 */ 10 ELM_THUMB_ANIMATION_STOP, /** Stop playing the animation */ 11 ELM_THUMB_ANIMATION_LAST 12 } Elm_Thumb_Animation_Setting; 13 14 /** 15 * Add a new thumb object to the parent. 16 * 17 * @param parent The parent object. 18 * @return The new object or NULL if it cannot be created. 19 * 20 * @see elm_thumb_file_set() 21 * @see elm_thumb_ethumb_client_get() 22 * 23 * @ingroup Elm_Thumb 24 */ 25 EAPI Evas_Object *elm_thumb_add(Evas_Object *parent); 26 27 /** 28 * 29 * Set the file that will be used as thumbnail @b source. 30 * 31 * The file can be an image or a video (in that case extension will e used 32 * to guess if it is a video or not). To start the video animation, use the 33 * function elm_thumb_animate(). 34 * 35 * @see elm_thumb_file_get() 36 * @see elm_thumb_reload() 37 * @see elm_thumb_animate() 38 * 39 * @ingroup Elm_Thumb 40 * 41 * @param[in] file The path to file that will be used as thumbnail source. 42 * @param[in] key The key used in case of an EET file. 43 */ 44 EAPI void elm_thumb_file_set(Eo *obj, const char *file, const char *key); 45 46 /** 47 * 48 * Get the image or video path and key used to generate the thumbnail. 49 * 50 * @see elm_thumb_file_set() 51 * @see elm_thumb_path_get() 52 * 53 * @ingroup Elm_Thumb 54 * 55 * @param[out] file The path to file that will be used as thumbnail source. 56 * @param[out] key The key used in case of an EET file. 57 */ 58 EAPI void elm_thumb_file_get(const Eo *obj, const char **file, const char **key); 59 60 /** 61 * @brief Make the thumbnail 'editable'. 62 * 63 * This means the thumbnail is a valid drag target for drag and drop, and can 64 * be cut or pasted too. 65 * 66 * @param[in] edit The editable state, default is @c false. 67 * 68 * @ingroup Elm_Thumb 69 */ 70 EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit); 71 72 /** 73 * @brief Get whether the thumbnail is editable. 74 * 75 * This means the thumbnail is a valid drag target for drag and drop, and can 76 * be cut or pasted too. 77 * 78 * @return The editable state, default is @c false. 79 * 80 * @ingroup Elm_Thumb 81 */ 82 EAPI Eina_Bool elm_thumb_editable_get(const Evas_Object *obj); 83 84 /** 85 * @brief Set the compression for the thumb object. 86 * 87 * @param[in] compress The compression of the thumb. 88 * 89 * @since 1.8 90 * 91 * @ingroup Elm_Thumb 92 */ 93 EAPI void elm_thumb_compress_set(Evas_Object *obj, int compress); 94 95 /** 96 * @brief Get the compression of the thumb object. 97 * 98 * @param[out] compress The compression of the thumb. 99 * 100 * @return Force the return type to be sure the argument doesn't become the 101 * return 102 * 103 * @since 1.8 104 * 105 * @ingroup Elm_Thumb 106 */ 107 EAPI void elm_thumb_compress_get(const Evas_Object *obj, int *compress); 108 109 /** 110 * @brief Set the format for the thumb object. 111 * 112 * @param[in] format The format setting. 113 * 114 * @since 1.8 115 * 116 * @ingroup Elm_Thumb 117 */ 118 EAPI void elm_thumb_format_set(Evas_Object *obj, Ethumb_Thumb_Format format); 119 120 /** 121 * @brief Get the format of the thumb object. 122 * 123 * @return The format setting. 124 * 125 * @since 1.8 126 * 127 * @ingroup Elm_Thumb 128 */ 129 EAPI Ethumb_Thumb_Format elm_thumb_format_get(const Evas_Object *obj); 130 131 /** 132 * @brief Set the animation state for the thumb object. 133 * 134 * If its content is an animated video, you may start/stop the animation or 135 * tell it o play continuously and looping. 136 * 137 * @param[in] setting The animation setting or #ELM_THUMB_ANIMATION_LAST 138 * 139 * @ingroup Elm_Thumb 140 */ 141 EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting setting); 142 143 /** 144 * @brief Get the animation state for the thumb object. 145 * 146 * @return The animation setting or #ELM_THUMB_ANIMATION_LAST 147 * 148 * @ingroup Elm_Thumb 149 */ 150 EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj); 151 152 /** 153 * @brief Set the FDO size for the thumb object. 154 * 155 * @param[in] size The FDO size setting. 156 * 157 * @since 1.8 158 * 159 * @ingroup Elm_Thumb 160 */ 161 EAPI void elm_thumb_fdo_size_set(Evas_Object *obj, Ethumb_Thumb_FDO_Size size); 162 163 /** 164 * @brief Get the fdo size of the thumb object. 165 * 166 * @return The FDO size setting. 167 * 168 * @since 1.8 169 * 170 * @ingroup Elm_Thumb 171 */ 172 EAPI Ethumb_Thumb_FDO_Size elm_thumb_fdo_size_get(const Evas_Object *obj); 173 174 /** 175 * @brief Set the orientation for the thumb object. 176 * 177 * @param[in] orient The orientation setting. 178 * 179 * @since 1.8 180 * 181 * @ingroup Elm_Thumb 182 */ 183 EAPI void elm_thumb_orientation_set(Evas_Object *obj, Ethumb_Thumb_Orientation orient); 184 185 /** 186 * @brief Get the orientation of the thumb object. 187 * 188 * @return The orientation setting. 189 * 190 * @since 1.8 191 * 192 * @ingroup Elm_Thumb 193 */ 194 EAPI Ethumb_Thumb_Orientation elm_thumb_orientation_get(const Evas_Object *obj); 195 196 /** 197 * @brief Set the aspect for the thumb object. 198 * 199 * @param[in] aspect The aspect setting. 200 * 201 * @since 1.8 202 * 203 * @ingroup Elm_Thumb 204 */ 205 EAPI void elm_thumb_aspect_set(Evas_Object *obj, Ethumb_Thumb_Aspect aspect); 206 207 /** 208 * @brief Get the aspect of the thumb object. 209 * 210 * @return The aspect setting. 211 * 212 * @since 1.8 213 * 214 * @ingroup Elm_Thumb 215 */ 216 EAPI Ethumb_Thumb_Aspect elm_thumb_aspect_get(const Evas_Object *obj); 217 218 /** 219 * @brief Set the quality for the thumb object. 220 * 221 * @param[in] quality The quality of the thumb. 222 * 223 * @since 1.8 224 * 225 * @ingroup Elm_Thumb 226 */ 227 EAPI void elm_thumb_quality_set(Evas_Object *obj, int quality); 228 229 /** 230 * @brief Get the quality of the thumb object. 231 * 232 * @param[out] quality The quality of the thumb. 233 * 234 * @since 1.8 235 * 236 * @ingroup Elm_Thumb 237 */ 238 EAPI void elm_thumb_quality_get(const Evas_Object *obj, int *quality); 239 240 /** 241 * @brief Set the size for the thumb object. 242 * 243 * @param[in] tw The width of the thumb. 244 * @param[in] th The height of the thumb. 245 * 246 * @since 1.8 247 * 248 * @ingroup Elm_Thumb 249 */ 250 EAPI void elm_thumb_size_set(Evas_Object *obj, int tw, int th); 251 252 /** 253 * @brief Get the size of the thumb object. 254 * 255 * @param[out] tw The width of the thumb. 256 * @param[out] th The height of the thumb. 257 * 258 * @since 1.8 259 * 260 * @ingroup Elm_Thumb 261 */ 262 EAPI void elm_thumb_size_get(const Evas_Object *obj, int *tw, int *th); 263 264 /** 265 * @brief Set the crop alignment for the thumb object. 266 * 267 * @param[in] cropx The x coordinate of the crop. 268 * @param[in] cropy The y coordinate of the crop. 269 * 270 * @since 1.8 271 * 272 * @ingroup Elm_Thumb 273 */ 274 EAPI void elm_thumb_crop_align_set(Evas_Object *obj, double cropx, double cropy); 275 276 /** 277 * @brief Get the crop alignment of the thumb object. 278 * 279 * @param[out] cropx The x coordinate of the crop. 280 * @param[out] cropy The y coordinate of the crop. 281 * 282 * @since 1.8 283 * 284 * @ingroup Elm_Thumb 285 */ 286 EAPI void elm_thumb_crop_align_get(const Evas_Object *obj, double *cropx, double *cropy); 287 288 /** 289 * @brief Get the path and key to the image or video thumbnail generated by 290 * ethumb. 291 * 292 * One just needs to make sure that the thumbnail was generated before getting 293 * its path; otherwise, the path will be @c null. One way to do that is by 294 * asking for the path when/after the "generate,stop" smart callback is called. 295 * 296 * @param[out] file Pointer to thumb path. 297 * @param[out] key Pointer to thumb key. 298 * 299 * @ingroup Elm_Thumb 300 */ 301 EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key); 302 303 /** 304 * @brief Reload thumbnail if it was generated before. 305 * 306 * This is useful if the ethumb client configuration changed, like its size, 307 * aspect or any other property one set in the handle returned by 308 * elm_thumb_ethumb_client_get(). 309 * 310 * If the options didn't change, the thumbnail won't be generated again, but 311 * the old one will still be used. 312 * 313 * @ingroup Elm_Thumb 314 */ 315 EAPI void elm_thumb_reload(Evas_Object *obj); 316 317 #include "elm_thumb_eo.legacy.h" 318