Esempio n. 1
0
static void
_elm_ews_border_maximized_apply(Ecore_Evas *ee, Evas_Object *o)
{
   int x, y, w, h;
   if (ecore_evas_maximized_get(ee))
     {
        Eina_Rectangle *r;
        int ex, ey, ew, eh;

        edje_object_signal_emit(o, "elm,state,maximized,on", "elm");
        edje_object_message_signal_process(o);
        ecore_evas_geometry_get(ee, &x, &y, &w, &h);

        r = _elm_ews_wm_border_geo_find(ee);
        if (!r)
          {
             r = malloc(sizeof(Eina_Rectangle));
             eina_hash_add(_ews_borders_geo, &ee, r);
          }

        r->x = x;
        r->y = y;
        r->w = w;
        r->h = h;
        _elm_ews_border_usable_screen_geometry_get(&x, &y, &w, &h);
        edje_object_parts_extends_calc(o, &ex, &ey, &ew, &eh);
        x -= ex;
        y -= ey;
        w -= ew - r->w;
        h -= eh - r->h;
     }
   else
     {
        Eina_Rectangle *r = _elm_ews_wm_border_geo_find(ee);
        edje_object_signal_emit(o, "elm,state,maximized,off", "elm");

        if (!r) ecore_evas_geometry_get(ee, &x, &y, &w, &h);
        else
          {
             x = r->x;
             y = r->y;
             w = r->w;
             h = r->h;
          }
     }

   ecore_evas_move_resize(ee, x, y, w, h);
   _elm_ews_border_geo_apply(ee, o);
}
Esempio n. 2
0
EAPI void
e_popup_move_resize(E_Popup *pop, int x, int y, int w, int h)
{
   E_OBJECT_CHECK(pop);
   E_OBJECT_TYPE_CHECK(pop, E_POPUP_TYPE);
   if ((pop->x == x) && (pop->y == y) &&
       (pop->w == w) && (pop->h == h)) return;
   pop->x = x;
   pop->y = y;
   pop->w = w;
   pop->h = h;
   ecore_evas_move_resize(pop->ecore_evas,
			  pop->zone->x + pop->x, 
			  pop->zone->y + pop->y,
			  pop->w, pop->h);
   e_container_shape_move(pop->shape,
			  pop->zone->x + pop->x, 
			  pop->zone->y + pop->y);
   e_container_shape_resize(pop->shape, pop->w, pop->h);
}
Esempio n. 3
0
static void
_mouse_move_cb(void *data, Evas * evas, Evas_Object * obj, void *ev)
{
   Esmart_Resize *drag = NULL;
   Ecore_Event_Mouse_Move *evx = NULL;

   if ((drag = (Esmart_Resize *) data)
	 && ecore_event_current_type_get() == ECORE_EVENT_MOUSE_MOVE
	 && (evx = (Ecore_Event_Mouse_Move *)
	       ecore_event_current_event_get())
	 && drag->clicked)
     {
	int h, w, x, y;
	int minw, minh, maxw, maxh;

	w = drag->w + drag->resize_x * (evx->root.x - drag->dx);
	h = drag->h + drag->resize_y * (evx->root.y - drag->dy);

	ecore_evas_size_min_get(drag->ee, &minw, &minh);
	ecore_evas_size_max_get(drag->ee, &maxw, &maxh);

	w = MAX(minw, w);
	h = MAX(minh, h);
	w = MIN(maxw, w);
	h = MIN(maxh, h);

	if (drag->resize_x < 0)
	  x = drag->x - w + drag->w;
	else
	  x = drag->x;
	if (drag->resize_y < 0)
	  y = drag->y - h + drag->h;
	else
	  y = drag->y;

	ecore_evas_move_resize(drag->ee, x, y, w, h);
     }
}
Esempio n. 4
0
File: band.c Progetto: Elive/elicit
void
elicit_band_move_resize(Elicit_Band *band, int x, int y, int w, int h)
{
  ecore_evas_move_resize(band->ee, x, y, w, h);
  evas_object_resize(band->obj, w, h);
}
Esempio n. 5
0
void PlatformWebView::setWindowFrame(WKRect frame)
{
    ecore_evas_move_resize(m_window, frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
}
void EcoreEvasWindow::setGeometry( const Rect& rect )
{
    ecore_evas_move_resize( _ee, rect.x(), rect.y(), rect.width(), rect.height() );
}