////////////////////////////////////////////////////
-static void
-_e_comp_object_frame_recalc(E_Comp_Object *cw)
+EINTERN void
+e_comp_object_frame_recalc(Evas_Object *obj)
{
+ API_ENTRY;
+
cw->client_inset.l = 0;
cw->client_inset.r = 0;
cw->client_inset.t = 0;
cw->client_inset.calc = 0;
}
-static void
-_e_comp_smart_cb_frame_recalc(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- E_Comp_Object *cw = data;
- E_Zone *zone;
- int w, h, pw, ph;
-
- /* - get current size
- * - calc new size
- * - readjust for new frame size
- */
-
- w = cw->ec->w, h = cw->ec->h;
- e_comp_object_frame_wh_unadjust(obj, w, h, &pw, &ph);
-
- _e_comp_object_frame_recalc(cw);
-
- if (!cw->ec->fullscreen)
- e_comp_object_frame_wh_adjust(obj, cw->ec->client.w, cw->ec->client.h, &w, &h);
-
- evas_object_smart_callback_call(cw->smart_obj, "frame_recalc_done", &cw->client_inset);
- if (cw->ec->fullscreen)
- {
- zone = e_comp_zone_find_by_ec(cw->ec);
- if (!zone) return;
- evas_object_resize(cw->ec->frame, zone->w, zone->h);
- }
- else if (cw->ec->new_client)
- {
- if ((cw->ec->w < 1) || (cw->ec->h < 1)) return;
- e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h);
- evas_object_resize(cw->ec->frame, w, h);
- }
- else if ((w != cw->ec->w) || (h != cw->ec->h))
- evas_object_resize(cw->ec->frame, w, h);
-}
-
-static void
-_e_comp_smart_cb_maximize(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+EINTERN void
+e_comp_object_maximize(Evas_Object *obj)
{
- E_Comp_Object *cw = data;
+ API_ENTRY;
_e_comp_object_shadow_setup(cw);
}
-static void
-_e_comp_smart_cb_fullscreen(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+EINTERN void
+e_comp_object_fullscreen(Evas_Object *obj)
{
- E_Comp_Object *cw = data;
+ API_ENTRY;
if (_e_comp_object_shadow_setup(cw))
e_comp_object_damage(cw->smart_obj, 0, 0, cw->ec->w, cw->ec->h);
}
-static void
-_e_comp_smart_cb_unmaximize(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
-
-}
-
-static void
-_e_comp_smart_cb_unfullscreen(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+EINTERN void
+e_comp_object_unfullscreen(Evas_Object *obj)
{
- E_Comp_Object *cw = data;
+ API_ENTRY;
if (_e_comp_object_shadow_setup(cw))
{
evas_object_intercept_focus_set_callback_add(obj, _e_comp_intercept_focus, cw);
evas_object_intercept_color_set_callback_add(obj, _e_comp_intercept_color_set, cw);
- evas_object_smart_callback_add(obj, "maximize", _e_comp_smart_cb_maximize, cw);
- evas_object_smart_callback_add(obj, "fullscreen", _e_comp_smart_cb_fullscreen, cw);
- evas_object_smart_callback_add(obj, "unmaximize", _e_comp_smart_cb_unmaximize, cw);
- evas_object_smart_callback_add(obj, "unfullscreen", _e_comp_smart_cb_unfullscreen, cw);
-
- evas_object_smart_callback_add(obj, "frame_recalc", _e_comp_smart_cb_frame_recalc, cw);
-
evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_IN, _e_comp_smart_focus_in, cw);
evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_OUT, _e_comp_smart_focus_out, cw);
}
e_comp_object_damage(Evas_Object *obj, int x, int y, int w, int h)
{
int tw, th;
- Eina_Rectangle rect;
API_ENTRY;
if (cw->ec->input_only || (!cw->updates)) return;
if (cw->nocomp) return;
- rect.x = x, rect.y = y;
- rect.w = w, rect.h = h;
- evas_object_smart_callback_call(obj, "damage", &rect);
if (e_comp_is_on_overlay(cw->ec))
{
e_comp_object_damage(obj, 0, 0, cw->w, cw->h);
_e_comp_object_transparent_set(obj, EINA_FALSE);
- evas_object_smart_callback_call(obj, "redirected", NULL);
}
else
{
_e_comp_object_clear(cw);
_e_comp_object_transparent_set(obj, EINA_TRUE);
- evas_object_smart_callback_call(obj, "unredirected", NULL);
}
}
eina_tiler_tile_size_set(cw->updates, 1, 1);
}
cw->update_count = cw->updates_full = cw->updates_exist = 0;
- evas_object_smart_callback_call(obj, "dirty", NULL);
if (cw->visible || (!visible) || (!cw->pending_updates) || cw->native) return;
/* force render if main object is hidden but mirrors are visible */
RENDER_DEBUG("FORCING RENDER %p", cw->ec);