Re: where to find GIR XML documentation?




On Tue, 19 Feb 2019 at 19:27, Phil Clayton <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?

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()?

--
TH



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