Extending GParamSpec



(Sorry if this mail appear twice, but It seems that my previous post 'bounced')

Hello,

I?m currently writing a library and I would like to ?extend? the property and
GParamSpec functionalities of the Glib (I?m currently writing my library in C++
but I would like to understand some Glib stuff first).

The main question I?ve Is about the best way to ?extend? GParamSpec.

I would like to add (to all GParamSpec* object so, GParamSpecInt,
GParamSpecUInt, GParamSpecInt64, etc ...) some new method and attributes.

1) An attributes saying if the GValue could be null or not, and so, also
changing the 'validate' method to check if the GValue is null or not.
This should be for all GParamSpec*

2) I would also like to know how to retrieve the value of the 'default_value'
parameter specified at the construction time of the GParamSpec*. I do not find
any g_param_spec_get_default nor any field In the GParamSpecInt structure where
this information is stored.

3) I would also like to add some new attributs as length, scale, precision or a
vector of allowed value (string value or integer, and then, checking Against
those values when affecting a new one).

The very first question is really how to extend the GParamSpec structure for my
extension may also be usable to the other GParamSpecInt, GParamSpecBool, etc
with the less code as possible.

Thanks for your help

+--------------------+
+ Laurent Marzullo
+



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