Re: where to find GIR XML documentation?
- From: Phil Clayton <phil clayton veonix com>
- To: gir-devel-list gnome org
- Subject: Re: where to find GIR XML documentation?
- Date: Wed, 20 Feb 2019 07:04:52 +0000
On 19/02/19 22:06, Tony Houghton wrote:
On Tue, 19 Feb 2019 at 19:27, Phil Clayton <phil clayton veonix com 
<mailto:phil clayton veonix com>> wrote:
    girepository has an abstract model of types.  g_type_info_get_tag gives
    the type tag.  If the tag is G_TYPE_TAG_INTERFACE,
    g_type_info_get_interface gets the interface.  If it is
    GI_TYPE_TAG_ARRAY, g_type_info_get_array_* and
    g_type_info_is_zero_terminated can be used to get array
    information.  If
    it is a container tag, e.g. GI_TYPE_TAG_ARRAY, GI_TYPE_TAG_GLIST etc,
    g_type_info_get_param_type can be used to get the element type
    information.
Oh, is that what g_type_info_get_param_type() is for, getting the 
element type of containers? So n has to be 0 for arrays and lists and 0 
or 1 for HashTables?
Yes, exactly.
This sounds better than I realised, but I think if you want to use 
aliases you still have to do a full parse of the gir XML. Unless this...
    On 19/02/19 18:37, Tony Houghton wrote:
     >  Or is it
     > possible to get a typename by using g_base_info_get_attribute()?
Certainly g_irepository_get_info doesn't return a type info that 
represents an alias type declared in a namespace.  It's not clear to me 
how g_base_info_get_attribute could be used for alias information.  We 
would have to check an attribute of anything with a type, e.g. 
arguments, return values, properties?  Also, I can't see any 
documentation about such an attribute.
Phil
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]