Help on GObject Introspection Annotations
- From: Daniel Espinosa <esodan gmail com>
- To: gtk list <gtk-list gnome org>
- Subject: Help on GObject Introspection Annotations
- Date: Fri, 21 Oct 2011 14:46:07 -0500
Resently has been added the following annotations for gtk-doc headings:
Set value func:
Get value func:
in GDA we have a GdaNumeric struct with gda_value_set_numeric and
gda_value_get_numeric to set this Boxed Derived type to a GValue is it
correct to add the following annotations:
/**
* GdaNumeric:
* @number: a string representing a number
* @precision: precision to use when @number is converted (not implemented jet)
* @width: (not implemented jet)
*
* Holds numbers represented as strings.
*
* Set value func: gda_value_set_numeric
* Get value func: gda_value_get_numeric
*/
typedef struct {
gchar *number;
glong precision;
glong width;
/*< private >*/
gpointer reserved; /* reserved for future usage with GMP
(http://gmplib.org/) */
} GdaNumeric;
What about the following new annotations?
Unref func:
Ref func:
we have gda_numeric_free and gda_numeric_copy and is possible to add a
new gda_numeric_new, do these annotations must point to some of these
functions?
What a bout char* number member if we add a gda_numeric_set_number
function, because bindings (like python) can't set its value, for me
is better to just use:
# set value
numeric.number = "3.40012"
and
# get value
numeric.number
hiding gda_numeric_set_number. But How Can I annotate these member in
order to use that function instead to try to access directly the
member? This is because you use this code in python:
from gi.repository import Gda
n = Gda.Numeric()
n.number = "3.04020"
I get these messages:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: unable to set value for field
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]