Evas_Object *base, *rect, *img, *overlay;
const char *file, *group;
Elm_Bg_Option option;
- struct {
- Evas_Coord w, h;
- } load_opts;
+ struct
+ {
+ Evas_Coord w, h;
+ } load_opts;
};
static const char *widtype = NULL;
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
-
if (part && strcmp(part, "overlay")) return;
-
wd = elm_widget_data_get(obj);
if (!wd) return;
- if (wd->overlay)
- {
- evas_object_del(wd->overlay);
- wd->overlay = NULL;
- }
+
+ if (content == wd->overlay) return;
+ if (wd->overlay) evas_object_del(wd->overlay);
+
+ wd->overlay = content;
if (content)
{
- wd->overlay = content;
edje_object_part_swallow(wd->base, "elm.swallow.content", content);
elm_widget_sub_object_add(obj, content);
}
return EINA_TRUE;
}
-EAPI Eina_Bool
+EAPI void
elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group)
{
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (file) *file = wd->file;
if (group) *group = wd->group;
- return EINA_TRUE;
+ return;
}
-EAPI Eina_Bool
+EAPI void
elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
{
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
wd = elm_widget_data_get(obj);
wd->option = option;
_custom_resize(wd, NULL, NULL, NULL);
- return EINA_TRUE;
+ return;
}
EAPI Elm_Bg_Option
return wd->option;
}
-EAPI Eina_Bool
+EAPI void
elm_bg_color_set(Evas_Object *obj, int r, int g, int b)
{
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
wd = elm_widget_data_get(obj);
}
evas_object_color_set(wd->rect, r, g, b, 255);
- return EINA_TRUE;
+ return;
}
-EAPI Eina_Bool
+EAPI void
elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b)
{
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
wd = elm_widget_data_get(obj);
evas_object_color_get(wd->rect, r, g, b, NULL);
- return EINA_TRUE;
+ return;
}
-EAPI Eina_Bool
+EAPI void
elm_bg_load_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
const char *p;
- if (!wd) return EINA_FALSE;
+ if (!wd) return;
wd->load_opts.w = w;
wd->load_opts.h = h;
- if (!wd->img) return EINA_FALSE;
+ if (!wd->img) return;
if (!(((p = strrchr(wd->file, '.'))) && (!strcasecmp(p, ".edj"))))
evas_object_image_load_size_set(wd->img, w, h);
- return EINA_TRUE;
+ return;
}