Exemplo n.º 1
0
EAPI void
e_obj_dialog_show(E_Obj_Dialog *od)
{
   Evas_Coord w, h, mw, mh;
   const char *s;
   
   E_OBJECT_CHECK(od);
   E_OBJECT_TYPE_CHECK(od, E_OBJ_DIALOG_TYPE);

   edje_object_size_min_get(od->bg_object, &mw, &mh);
   edje_object_size_min_restricted_calc(od->bg_object, &mw, &mh, mw, mh);
   evas_object_resize(od->bg_object, mw, mh);
   e_win_resize(od->win, mw, mh);
   e_win_size_min_set(od->win, mw, mh);
   edje_object_size_max_get(od->bg_object, &w, &h);
   if ((w > 0) && (h > 0))
     {
	if (w < mw) w = mw;
	if (h < mh) h = mh;
	e_win_size_max_set(od->win, w, h);
     }
   s = edje_object_data_get(od->bg_object, "borderless");
   if (s && (!strcmp(s, "1")))
     e_win_borderless_set(od->win, 1);
   s = edje_object_data_get(od->bg_object, "shaped");
   if (s && (!strcmp(s, "1")))
     e_win_shaped_set(od->win, 1);
   e_win_show(od->win);
}
Exemplo n.º 2
0
Wayland_Surface *
e_mod_comp_wl_surface_create(int32_t x, int32_t y, int32_t w, int32_t h)
{
   Wayland_Surface *ws;

   LOGFN(__FILE__, __LINE__, __FUNCTION__);

   if (!(ws = calloc(1, sizeof(Wayland_Surface)))) return NULL;

   wl_list_init(&ws->link);
   wl_list_init(&ws->buffer_link);

   glGenTextures(1, &ws->texture);
   glBindTexture(GL_TEXTURE_2D, ws->texture);

   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

   ws->surface.resource.client = NULL;

   ws->x = x;
   ws->y = y;
   ws->w = w;
   ws->h = h;
   ws->buffer = NULL;

   ws->win = e_win_new(e_container_current_get(e_manager_current_get()));
   e_win_borderless_set(ws->win, EINA_TRUE);
   e_win_move_resize(ws->win, x, y, w, h);

   pixman_region32_init(&ws->damage);
   pixman_region32_init(&ws->opaque);

   wl_list_init(&ws->frame_callbacks);

   ws->buffer_destroy_listener.notify =
     _e_mod_comp_wl_surface_buffer_destroy_handle;

   /* ws->transform = NULL; */

   return ws;
}