forked from enlightenment/efl
[elm] Image now (better) inheritable.
SVN revision: 74607
This commit is contained in:
parent
39ebd3a128
commit
451c8e6791
|
@ -8,32 +8,7 @@
|
||||||
# define FMT_SIZE_T "%zu"
|
# define FMT_SIZE_T "%zu"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char IMAGE_SMART_NAME[] = "elm_image";
|
EAPI const char ELM_IMAGE_SMART_NAME[] = "elm_image";
|
||||||
|
|
||||||
#define ELM_IMAGE_DATA_GET(o, sd) \
|
|
||||||
Elm_Image_Smart_Data * sd = evas_object_smart_data_get(o)
|
|
||||||
|
|
||||||
#define ELM_IMAGE_DATA_GET_OR_RETURN(o, ptr) \
|
|
||||||
ELM_IMAGE_DATA_GET(o, ptr); \
|
|
||||||
if (!ptr) \
|
|
||||||
{ \
|
|
||||||
CRITICAL("No widget data for object %p (%s)", \
|
|
||||||
o, evas_object_type_get(o)); \
|
|
||||||
return; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ELM_IMAGE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
|
||||||
ELM_IMAGE_DATA_GET(o, ptr); \
|
|
||||||
if (!ptr) \
|
|
||||||
{ \
|
|
||||||
CRITICAL("No widget data for object %p (%s)", \
|
|
||||||
o, evas_object_type_get(o)); \
|
|
||||||
return val; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ELM_IMAGE_CHECK(obj) \
|
|
||||||
if (!obj || !elm_widget_type_check((obj), IMAGE_SMART_NAME, __func__)) \
|
|
||||||
return
|
|
||||||
|
|
||||||
static const char SIG_DND[] = "drop";
|
static const char SIG_DND[] = "drop";
|
||||||
static const char SIG_CLICKED[] = "clicked";
|
static const char SIG_CLICKED[] = "clicked";
|
||||||
|
@ -44,7 +19,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
EVAS_SMART_SUBCLASS_NEW
|
EVAS_SMART_SUBCLASS_NEW
|
||||||
(IMAGE_SMART_NAME, _elm_image, Elm_Image_Smart_Class,
|
(ELM_IMAGE_SMART_NAME, _elm_image, Elm_Image_Smart_Class,
|
||||||
Elm_Widget_Smart_Class, elm_widget_smart_class_get, _smart_callbacks);
|
Elm_Widget_Smart_Class, elm_widget_smart_class_get, _smart_callbacks);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1061,7 +1036,7 @@ EAPI const Elm_Image_Smart_Class *
|
||||||
elm_image_smart_class_get(void)
|
elm_image_smart_class_get(void)
|
||||||
{
|
{
|
||||||
static Elm_Image_Smart_Class _sc =
|
static Elm_Image_Smart_Class _sc =
|
||||||
ELM_IMAGE_SMART_CLASS_INIT_NAME_VERSION(IMAGE_SMART_NAME);
|
ELM_IMAGE_SMART_CLASS_INIT_NAME_VERSION(ELM_IMAGE_SMART_NAME);
|
||||||
static const Elm_Image_Smart_Class *class = NULL;
|
static const Elm_Image_Smart_Class *class = NULL;
|
||||||
Evas_Smart_Class *esc = (Evas_Smart_Class *)&_sc;
|
Evas_Smart_Class *esc = (Evas_Smart_Class *)&_sc;
|
||||||
|
|
||||||
|
|
|
@ -216,6 +216,32 @@ struct _Elm_Image_Smart_Data
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
EAPI extern const char ELM_IMAGE_SMART_NAME[];
|
||||||
EAPI const Elm_Image_Smart_Class *elm_image_smart_class_get(void);
|
EAPI const Elm_Image_Smart_Class *elm_image_smart_class_get(void);
|
||||||
|
|
||||||
|
#define ELM_IMAGE_DATA_GET(o, sd) \
|
||||||
|
Elm_Image_Smart_Data * sd = evas_object_smart_data_get(o)
|
||||||
|
|
||||||
|
#define ELM_IMAGE_DATA_GET_OR_RETURN(o, ptr) \
|
||||||
|
ELM_IMAGE_DATA_GET(o, ptr); \
|
||||||
|
if (!ptr) \
|
||||||
|
{ \
|
||||||
|
CRITICAL("No widget data for object %p (%s)", \
|
||||||
|
o, evas_object_type_get(o)); \
|
||||||
|
return; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ELM_IMAGE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
||||||
|
ELM_IMAGE_DATA_GET(o, ptr); \
|
||||||
|
if (!ptr) \
|
||||||
|
{ \
|
||||||
|
CRITICAL("No widget data for object %p (%s)", \
|
||||||
|
o, evas_object_type_get(o)); \
|
||||||
|
return val; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ELM_IMAGE_CHECK(obj) \
|
||||||
|
if (!obj || !elm_widget_type_check((obj), ELM_IMAGE_SMART_NAME, __func__)) \
|
||||||
|
return
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue