Example #1
0
static void
_eina_simple_xml_node_tag_attributes_append(Eina_Strbuf *buf, Eina_Simple_XML_Node_Tag *tag)
{
   Eina_Simple_XML_Attribute *a;

   EINA_INLIST_FOREACH(tag->attributes, a)
     eina_strbuf_append_printf(buf, " %s=\"%s\"", a->key, a->value);
}
Example #2
0
static void
_eina_simple_xml_node_children_dump(Eina_Strbuf *buf, Eina_Simple_XML_Node_Tag *tag, const char *indent, unsigned level)
{
   Eina_Simple_XML_Node *node;

   EINA_INLIST_FOREACH(tag->children, node)
     _eina_simple_xml_node_dump(buf, node, indent, level);
}
static Evas_Event_Flags
_cb_call(Tap_Longpress_Info *info, Elm_Gesture_State state, void *event_info)
{
   Evas_Event_Flags flags = EVAS_EVENT_FLAG_NONE;
   Func_Data *cb_info;
   EINA_INLIST_FOREACH(info->cbs[state], cb_info)
      flags |= cb_info->cb(cb_info->user_data, event_info);
   return flags;
}
Example #4
0
void
_ecore_timer_enable_new(void)
{
   Ecore_Timer *timer;

   if (!timers_added) return;
   timers_added = 0;
   EINA_INLIST_FOREACH(timers, timer) timer->just_added = 0;
}
Example #5
0
int
_ecore_timer_call(double when)
{
   if (!timers) return 0;
   if (last_check > when)
     {
        Ecore_Timer *timer;
        /* User set time backwards */
        EINA_INLIST_FOREACH(timers, timer) timer->at -= (last_check - when);
     }
   last_check = when;

   if (!timer_current)
     {
        /* regular main loop, start from head */
        timer_current = timers;
     }
   else
     {
        /* recursive main loop, continue from where we were */
        Ecore_Timer *timer_old = timer_current;
        timer_current = (Ecore_Timer *)EINA_INLIST_GET(timer_current)->next;
        _ecore_timer_reschedule(timer_old, when);
     }

   while (timer_current)
     {
        Ecore_Timer *timer = timer_current;

        if (timer->at > when)
          {
             timer_current = NULL; /* ended walk, next should restart. */
             return 0;
          }

        if ((timer->just_added) || (timer->delete_me))
          {
             timer_current = (Ecore_Timer*)EINA_INLIST_GET(timer_current)->next;
             continue;
          }

        timer->references++;
        if (!timer->func(timer->data))
          {
             if (!timer->delete_me) ecore_timer_del(timer);
          }
        timer->references--;

        if (timer_current) /* may have changed in recursive main loops */
          timer_current = (Ecore_Timer *)EINA_INLIST_GET(timer_current)->next;

        _ecore_timer_reschedule(timer, when);
     }
   return 0;
}
Example #6
0
static void
eupnp_service_action_dump(const Eupnp_Service_Action *a)
{
   if (!a) return;

   INF("\tAction dump");
   INF("\t\tname: %s", a->name);

   if (a->arguments)
     {
	Eupnp_Service_Action_Argument *arg;

	EINA_INLIST_FOREACH(a->arguments, arg)
	   eupnp_service_action_argument_dump(arg);
     }
}
Example #7
0
EAPI char *
ecore_timer_dump(void)
{
#ifdef WANT_ECORE_TIMER_DUMP
   Eina_Strbuf *result;
   char *out;
   Ecore_Timer *tm;
   Eina_List *tmp = NULL;
   int living_timer = 0;
   int unknow_timer = 0;

   _ecore_lock();
   result = eina_strbuf_new();

   EINA_INLIST_FOREACH(timers, tm)
     tmp = eina_list_sorted_insert(tmp, _ecore_timer_cmp, tm);

   EINA_LIST_FREE(tmp, tm)
     {
        char **strings;
        int j;

        if (!tm->frozen && !tm->delete_me)
          living_timer++;

        strings = backtrace_symbols((void **)tm->timer_bt, tm->timer_bt_num);
        if (tm->timer_bt_num <= 0 || strings == NULL)
          {
             unknow_timer++;
             continue;
          }

        eina_strbuf_append_printf(result, "*** timer: %f ***\n", tm->in);
        if (tm->frozen)
          eina_strbuf_append(result, "FROZEN\n");
        if (tm->delete_me)
          eina_strbuf_append(result, "DELETED\n");
        for (j = 0; j < tm->timer_bt_num; j++)
          eina_strbuf_append_printf(result, "%s\n", strings[j]);

        free(strings);
     }
Example #8
0
static void
eupnp_service_state_variable_dump(const Eupnp_State_Variable *st)
{
   CHECK_NULL_RET(st);

   INF("\t\tState variable dump");
   INF("\t\t\tname: %s", st->name);
   INF("\t\t\tsendEvents: %d", st->send_events);
   INF("\t\t\tdefault value: %s", (char *)st->default_value);
   INF("\t\t\trange min: %s", (char *)st->range_min);
   INF("\t\t\trange max: %s", (char *)st->range_max);
   INF("\t\t\trange step: %s", (char *)st->range_step);
   INF("\t\t\tdata type: %d", st->data_type);

   if (st->allowed_value_list)
   {
      Eupnp_State_Variable_Allowed_Value *item;
      INF("\t\t\tAllowed value list:");

      EINA_INLIST_FOREACH(st->allowed_value_list, item)
	INF("\t\t\t\t%s", item->value);
   }
}
Example #9
0
void
evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
                   RGBA_Polygon_Point * points, int x, int y)
{
   RGBA_Polygon_Point *pt;
   RGBA_Vertex *point;
   RGBA_Edge *edges;
   int num_active_edges;
   int n;
   int i, j, k;
   int y0, y1, yi;
   int ext_x, ext_y, ext_w, ext_h;
   int *sorted_index;
   DATA8 alpha;
   DATA8 gry8;

   alpha = A_VAL(&dc->col.col);
   if (alpha == 0)
      return;
   alpha++;

   gry8 = GRY_8_FROM_RGB(&dc->col.col);

   ext_x = 0;
   ext_y = 0;
   ext_w = dst->cache_entry.w;
   ext_h = dst->cache_entry.h;
   if (dc->clip.use)
      RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h,
                         dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);

   if ((ext_w <= 0) || (ext_h <= 0))
      return;

   n = 0;
   EINA_INLIST_FOREACH(points, pt) n++;

   if (n < 3)
      return;

   edges = malloc(sizeof(RGBA_Edge) * n);
   if (!edges)
      return;

   point = malloc(sizeof(RGBA_Vertex) * n);
   if (!point)
     {
        free(edges);
        return;
     }

   sorted_index = malloc(sizeof(int) * n);
   if (!sorted_index)
     {
        free(edges);
        free(point);
        return;
     }

   k = 0;
   EINA_INLIST_FOREACH(points, pt)
   {
      point[k].x = pt->x + x;
      point[k].y = pt->y + y;
      point[k].i = k;
      k++;
   }