コード例 #1
0
ファイル: evas_object_polygon.c プロジェクト: tasn/efl
EAPI Evas_Object *
evas_object_polygon_add(Evas *e)
{
   e = evas_find(e);
   EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(e, EVAS_CANVAS_CLASS), NULL);
   return efl_add(MY_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
}
コード例 #2
0
EOLIAN static Efl_Object *
_efl_net_dialer_simple_efl_object_finalize(Eo *o, Efl_Net_Dialer_Simple_Data *pd)
{
   if (efl_io_buffered_stream_inner_io_get(o)) goto end;

   if (!pd->inner_class)
     {
        ERR("no valid dialer was set with efl_io_buffered_stream_inner_io_set() and no class set with efl_net_dialer_simple_inner_class_set()!");
        return NULL;
     }
   else
     {
        Eo *dialer = efl_add(pd->inner_class, o);
        EINA_SAFETY_ON_NULL_RETURN_VAL(dialer, NULL);

        if (!efl_isa(dialer, EFL_NET_DIALER_INTERFACE))
          {
             ERR("class %s=%p doesn't implement Efl.Net.Dialer interface!", efl_class_name_get(pd->inner_class), pd->inner_class);
             efl_del(dialer);
             return NULL;
          }
        DBG("created new inner dialer %p (%s)", dialer, efl_class_name_get(efl_class_get(dialer)));

        efl_io_buffered_stream_inner_io_set(o, dialer);
     }

 end:
   return efl_finalize(efl_super(o, MY_CLASS));
}
コード例 #3
0
EOLIAN static void
_efl_net_dialer_simple_efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Net_Dialer_Simple_Data *pd, Efl_Object *io)
{
   EINA_SAFETY_ON_FALSE_RETURN(efl_isa(io, EFL_NET_DIALER_INTERFACE));
   efl_io_buffered_stream_inner_io_set(efl_super(o, MY_CLASS), io);
   efl_event_callback_array_add(io, _efl_net_dialer_simple_inner_io_cbs(), o);

   /* apply pending dialer values */
   if (pd->pending.proxy_url)
     {
        pd->pending.proxy_url = EINA_FALSE;
        efl_net_dialer_proxy_set(io, pd->proxy_url);
        eina_stringshare_replace(&pd->proxy_url, NULL);
     }
   if (pd->pending.dial_timeout)
     {
        pd->pending.dial_timeout = EINA_FALSE;
        efl_net_dialer_timeout_dial_set(io, pd->dial_timeout);
     }

   /* apply pending io buffered stream (own) values */
   if (pd->pending.timeout_inactivity)
     {
        pd->pending.timeout_inactivity = EINA_FALSE;
        efl_io_buffered_stream_timeout_inactivity_set(o, pd->timeout_inactivity);
     }
   if (pd->pending.max_queue_size_input)
     {
        pd->pending.max_queue_size_input = EINA_FALSE;
        efl_io_buffered_stream_max_queue_size_input_set(o, pd->max_queue_size_input);
     }
   if (pd->pending.max_queue_size_output)
     {
        pd->pending.max_queue_size_output = EINA_FALSE;
        efl_io_buffered_stream_max_queue_size_output_set(o, pd->max_queue_size_output);
     }
   if (pd->pending.read_chunk_size)
     {
        pd->pending.read_chunk_size = EINA_FALSE;
        efl_io_buffered_stream_read_chunk_size_set(o, pd->read_chunk_size);
     }
   if (pd->pending.line_delimiter)
     {
        pd->pending.line_delimiter = EINA_FALSE;
        efl_io_buffered_stream_line_delimiter_set(o, pd->line_delimiter);
        free((void *)pd->line_delimiter.mem);
        pd->line_delimiter.mem = NULL;
     }
}
コード例 #4
0
ファイル: efl_canvas_vg_node.c プロジェクト: tasn/efl
static void
_node_change(Efl_VG *obj, Efl_Canvas_Vg_Node_Data *nd)
{
   if (!nd || nd->flags != EFL_GFX_CHANGE_FLAG_NONE) return;
   nd->flags = EFL_GFX_CHANGE_FLAG_ALL;

   Eo *p = obj;
   while ((p = efl_parent_get(p)))
     {
        if (!efl_isa(p, MY_CLASS)) break;
        Efl_Canvas_Vg_Node_Data *pnd = efl_data_scope_get(p, MY_CLASS);
        if (pnd->flags != EFL_GFX_CHANGE_FLAG_NONE) break;
        pnd->flags = EFL_GFX_CHANGE_FLAG_ALL;
     }
   if (efl_invalidated_get(nd->vg_obj)) return;
   efl_canvas_vg_object_change(nd->vd);
}
コード例 #5
0
ファイル: test_evas_snapshot.c プロジェクト: tasn/efl
 EINA_ITERATOR_FOREACH(it, o)
   {
      if (efl_isa(o, EFL_PLAYER_INTERFACE) && efl_player_playable_get(o))
        efl_player_play_set(o, !efl_player_play_get(o));
   }