Beispiel #1
0
void
_engage_element_object_stack_below(Evas_Object * o, Evas_Object * below)
{
  Engage_Element *data;

  if ((data = evas_object_smart_data_get(o))) {
    evas_object_stack_below(data->clip, below);
    evas_object_stack_below(data->icon, below);
    evas_object_stack_below(data->behavior, below);
  }
}
void
elexika_result_list_append(Evas_Object *obj, Eina_List *list)
{
    Evas_Object *o;
    Smart_Data *sd;
    Evas_Coord minw, minh;
    Eina_List *l;
    Match *match;

    sd = evas_object_smart_data_get(obj);
    if (!sd) return;

    for (l = list; l; l = l->next) {
        match = l->data;
        o = edje_object_add(evas_object_evas_get(sd->obj));
        edje_object_file_set(o, "../../data/themes/elexika.edj", "result");
        edje_object_part_text_set(o, "result.text", match->str);

        evas_object_clip_set(o, sd->clip);
        evas_object_smart_member_add(o, obj);
        sd->children = eina_list_append(sd->children, o);
        if (eina_list_count(sd->children) % 2 == 0)
            edje_object_signal_emit(o, "result,state,even", "result_list");

        evas_object_stack_below(o, sd->overlay);
        evas_object_show(o);
    }

    _sizing_eval(obj);
}
/* ***************************************************************************
 *  other internals
 * ***************************************************************************/
static void 
_elitaire_card_shadow_on(Evas_Object * card)
{
    Elitaire_Card * data = NULL;

    data = (Elitaire_Card *) evas_object_smart_data_get(card);

    if (data) {
        Evas_Coord x, y, w, h, dy;
        int n;

        if (data->shadow) return;
            
        data->shadow = edje_object_add(data->eli->evas);
        evas_object_smart_member_add(data->shadow, card);
        if (!edje_object_file_set(data->shadow, data->eli->file, "elitaire/card/shadow"))
            fprintf(stderr, _("Elitaire Error: The shadow pic is missed!\n"));

        n = elitaire_card_chain_length_calc(card);
        dy = elitaire_card_offset_get(data->eli);

        evas_object_geometry_get(card, &x, &y, &w, &h);
        evas_object_move(data->shadow, x, y);
        evas_object_resize(data->shadow, w, h + n * dy);
        evas_object_clip_set(data->shadow, data->eli->clip);
        evas_object_show(data->shadow);
        evas_object_stack_below(data->shadow, data->image);
    }
}
Beispiel #4
0
EAPI void
e_layout_child_lower_below(Evas_Object *obj, Evas_Object *below)
{
   E_Layout_Item *li;
   
   li = evas_object_data_get(obj, "e_layout_data");
   if (!li) return;
   if (!eina_list_data_find(li->sd->items, below)) 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_below(obj, below);
	li->sd->items = eina_list_prepend_relative(li->sd->items, obj, below);
     }
}
/**
 * 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);
}
Beispiel #6
0
static void
_elm_ews_border_stack_apply(Ecore_Evas *ee, Evas_Object *o)
{
   Evas_Object *bs_o = ecore_evas_ews_backing_store_get(ee);
   evas_object_stack_below(o, bs_o);
}
void Object::stackBelow( const Object* obj )
{
  Dout( dc::notice, *this << " stackBelow" );
  evas_object_stack_below( o, obj->obj() );
}
static void
_cube_pos(Cube *c,
          Evas_Coord x, Evas_Coord y, Evas_Coord z,
          double dx, double dy, double dz,
          Evas_Coord cx, Evas_Coord cy, Evas_Coord foc, Evas_Coord z0)
{
   Evas_Map *m;
   int i, j, order[6], sorted;
   Evas_Coord mz[6];

   m = evas_map_new(4);
   evas_map_smooth_set(m, 0);

   for (i = 0; i < 6; i++)
     {
        Evas_Coord tz[4];

        for (j = 0; j < 4; j++)
          {
             evas_map_point_coord_set(m, j,
                                      c->side[i].pt[j].x + x,
                                      c->side[i].pt[j].y + y,
                                      c->side[i].pt[j].z + z);
             evas_map_point_image_uv_set(m, j,
                                         c->side[i].pt[j].u,
                                         c->side[i].pt[j].v);
             evas_map_point_color_set(m, j, 255, 255, 255, 255);
          }
        evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
        evas_map_util_3d_lighting(m, -1000, -1000, -1000,
                                  255, 255, 255,
                                  20, 20, 20);
        evas_map_util_3d_perspective(m, cx, cy, foc, z0);
        if (evas_map_util_clockwise_get(m))
          {
             evas_object_map_enable_set(c->side[i].o, 1);
             evas_object_map_set(c->side[i].o, m);
             evas_object_show(c->side[i].o);
          }
        else
           evas_object_hide(c->side[i].o);

        order[i] = i;
        for (j = 0; j < 4; j++)
           evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
        mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
     }
   sorted = 0;
   do
     {
        sorted = 1;
        for (i = 0; i < 5; i++)
          {
             if (mz[order[i]] > mz[order[i + 1]])
               {
                  j = order[i];
                  order[i] = order[i + 1];
                  order[i + 1] = j;
                  sorted = 0;
               }
          }
     }
   while (!sorted);

   evas_object_raise(c->side[order[0]].o);
   for (i = 1; i < 6; i++)
      evas_object_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
   evas_map_free(m);
}