ValueTable function implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First of all, as a newbie I'm a little confused. So
to clear my conception I got to ask this question.
Please forgive my ignorance. The api
(http://www.gtk.org/api/2.6/gobject/gobject-Type-Information.html#id2884668)
talks about GTypeValueTable. If the collect_format has more than one
character(say 3 or 4) what collect_value() and
lcopy_value() would look like? For example an
implementation of collect_value() is:


static gchar*
value_collect_int (GValue      *value,
           guint        n_collect_values,
           GTypeCValue *collect_values,
           guint        collect_flags)
{
  value->data[0].v_int = collect_values[0].v_int;
 
  return NULL;
}


And lcopy_value() is:


static gchar*
value_lcopy_char (const GValue *value,
          guint         n_collect_values,
          GTypeCValue  *collect_values,
          guint         collect_flags)
{
  gint8 *int8_p = collect_values[0].v_pointer;
 
  if (!int8_p)
    return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
 
  *int8_p = value->data[0].v_int;
 
  return NULL;
}

Thanks for your patience and time.
Regards
David

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux