Beispiel #1
0
void
_engage_element_object_stack_above(Evas_Object * o, Evas_Object * above)
{
  Engage_Element *data;

  data = evas_object_smart_data_get(o);

  if ((data = evas_object_smart_data_get(o))) {
    evas_object_stack_above(data->clip, above);
    evas_object_stack_above(data->icon, above);
    evas_object_stack_above(data->behavior, above);
  }
}
Beispiel #2
0
EAPI void
e_layout_child_raise_above(Evas_Object *obj, Evas_Object *above)
{
   E_Layout_Item *li;
   
   li = evas_object_data_get(obj, "e_layout_data");
   if (!li) return;
   if (!eina_list_data_find(li->sd->items, above)) return;
   if (!eina_list_data_find(li->sd->items, obj)) return;
   if ((li->sd->items) && eina_list_next(li->sd->items))
     {
	li->sd->items = eina_list_remove(li->sd->items, obj);
	evas_object_stack_above(obj, above);
	li->sd->items = eina_list_append_relative(li->sd->items, obj, above);
     }
}
/**
 * Sets the theme group to be used by the editable object.
 * This function has to be called, or the cursor and the selection won't be
 * visible.
 *
 * @param editable an editable object
 * @param category the theme category to use for the editable object
 * @param group the theme group to use for the editable object
 */
EAPI void
e_editable_theme_set(Evas_Object *editable, const char *category, const char *group)
{
   E_Editable_Smart_Data *sd;
   char *obj_group;
   const char *data;

   if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR();
   if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
     return;
   if ((!category) || (!group)) return;
   obj_group = alloca(strlen(group) + strlen("/selection") + 1);

   /* Gets the theme for the text object */
   sprintf(obj_group, "%s/text", group);
   e_theme_edje_object_set(sd->text_object, category, obj_group);
   sd->average_char_w = -1;
   sd->average_char_h = -1;

   /* Gets the theme for the cursor */
   sprintf(obj_group, "%s/cursor", group);
   e_theme_edje_object_set(sd->cursor_object, category, obj_group);

   edje_object_size_min_get(sd->cursor_object, &sd->cursor_width, NULL);
   if (sd->cursor_width < 1) sd->cursor_width = 1;

   /* Gets the theme for the selection */
   sprintf(obj_group, "%s/selection", group);
   e_theme_edje_object_set(sd->selection_object, category, obj_group);

   data = edje_object_data_get(sd->selection_object, "on_foreground");
   if ((data) && (strcmp(data, "1") == 0))
     {
        sd->selection_on_fg = 1;
        evas_object_stack_above(sd->selection_object, sd->text_object);
     }
   else
     {
        sd->selection_on_fg = 0;
        evas_object_stack_below(sd->selection_object, sd->text_object);
     }

   _e_editable_text_update(editable);
   _e_editable_cursor_update(editable);
}
void Object::stackAbove( const Object* obj )
{
  Dout( dc::notice, *this << " stackAbove" );
  evas_object_stack_above( o, obj->obj() );
}
EINTERN Eina_Bool
e_mod_comp_pixmap_rotation_handler_configure(E_Comp_Win *cw,
                                             int w, int h)
{
   Ecore_X_Window win;
   E_CHECK_RETURN(cw, 0);
   E_CHECK_RETURN(cw->pixrot, 0);
   E_CHECK_RETURN(((w == cw->w) && (h == cw->h)), 0);

   win = e_mod_comp_util_client_xid_get(cw);

   /* backup below obj */
   Eina_Bool bottom = EINA_FALSE;

   Evas_Object *below_obj = evas_object_below_get(cw->shobj);
   if (!below_obj)
     {
        if (evas_object_bottom_get(cw->c->evas) == cw->shobj)
          {
             L(LT_EVENT_X,
               "[COMP] %31s w:0x%08x bd:%s shobj is bottom.\n",
               "PIX_ROT", e_mod_comp_util_client_xid_get(cw),
               cw->bd ? "O" : "X");
             bottom = EINA_TRUE;
          }
     }

   if (cw->obj)
     {
        evas_object_hide(cw->obj);
        evas_object_del(cw->obj);
        cw->obj = NULL;
     }
   if (cw->shobj)
     {
        evas_object_hide(cw->obj);
        evas_object_del(cw->shobj);
        cw->shobj = NULL;
     }

   cw->shobj = edje_object_add(cw->c->evas);
   cw->obj = evas_object_image_filled_add(cw->c->evas);
   evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);

   if (cw->argb)
     evas_object_image_alpha_set(cw->obj, 1);
   else
     evas_object_image_alpha_set(cw->obj, 0);

   e_mod_comp_win_type_setup(cw);
   e_mod_comp_win_shadow_setup(cw);
   e_mod_comp_win_cb_setup(cw);

   evas_object_show(cw->obj);
   evas_object_pass_events_set(cw->obj, 1);
   evas_object_pass_events_set(cw->shobj, 1);

   /* restore stack */
   if (bottom)
     below_obj = evas_object_below_get(cw->shobj);

   evas_object_stack_above(cw->shobj, below_obj);
   L(LT_EVENT_X,
     "[COMP] %31s w:0x%08x bd:%s shobj restore stack.\n",
     "PIX_ROT", e_mod_comp_util_client_xid_get(cw),
     cw->bd ? "O" : "X");

   e_mod_comp_pixmap_rotation_done_send
     (win, ATOM_CM_PIXMAP_ROTATION_RESIZE_PIXMAP);

   return EINA_TRUE;
}