Low-level core library that forms the basis for projects such as GTK+ and GNOME.
Go to file
Emmanuele Bassi 400dfc2908 Add introspection data for property accessors
A GObject property can be accessed generically through the GObject API,
e.g. g_object_set_property() and g_object_get_property(). Properties
typically also have public accessor functions, which are (according to
our own best practices) called through the generic API.

The introspection data is currently missing the relation between a
property and its public accessor functions. With this information, a
language binding could, for instance, avoid exposing the C API entirely,
thus minimizing the chances of collisions between property names and
accessor functions; alternatively, a binding could call the C API
directly instead of going through the generic GObject API, thus avoiding
the boxing and unboxing from a native type to a GIArgument and finally
into a GValue, and vice versa.

In the GIR, we add two new attributes to the `property` element:

  - setter="SYMBOL"
  - getter="SYMBOL"

where "symbol" is the C function identifier of the setter and getter
functions, respectively. The `setter` attribute is only applied to
writable, non-construct-only properties; the `getter` attribute is only
applied to readable properties.

We maintain the ABI compatibility of the typelib data by using 20 bits
of the 25 reserved bits inside the PropertyBlob structure. The data is
exposed through two new GIPropertyInfo methods:

  - g_property_info_get_setter()
  - g_property_info_get_getter()

which return the GIFunctionInfo for the setter and getter functions,
respectively.
2021-08-05 17:47:29 +01:00
cmph Revert "Revert "Meson: Fix build when glib is built as subproject"" 2020-04-24 15:05:03 -04:00
cmph-bdz-test.c Drop calls to g_type_init() 2012-10-16 10:58:08 -04:00
docs.c docs: Remove everything not related to libgirepository and restructure. Fixes #244 2018-12-14 11:29:11 +01:00
gdump.c Add "final" class attribute 2021-08-05 16:24:23 +00:00
gi-dump-types.c meson: also build gi-dump-types on Windows 2020-05-19 19:39:34 +02:00
giarginfo.c docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
giarginfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
gibaseinfo.c baseinfo: don't abort when calling g_base_info_get_name() on a GITypeInfo. Fixes #96 2018-12-15 23:33:32 +00:00
gibaseinfo.h docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
gicallableinfo.c girepository: Fix leak in g_callable_info_invoke 2021-06-18 14:28:05 +00:00
gicallableinfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
giconstantinfo.c Use g_memdup2() with newer versions of GLib 2021-03-12 18:55:44 +00:00
giconstantinfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
gienuminfo.c docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
gienuminfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
gifieldinfo.c docs: Field offsets are in the units of bytes 2018-12-14 16:28:58 +01:00
gifieldinfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
gifunctioninfo.c Property accessors work for interfaces and objects 2021-08-05 17:47:29 +01:00
gifunctioninfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
giinterfaceinfo.c docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
giinterfaceinfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
ginvoke.c Initialise argument 2021-06-24 18:17:56 +00:00
giobjectinfo.c Add "final" class attribute 2021-08-05 16:24:23 +00:00
giobjectinfo.h Add "final" class attribute 2021-08-05 16:24:23 +00:00
gipropertyinfo.c Add introspection data for property accessors 2021-08-05 17:47:29 +01:00
gipropertyinfo.h Add introspection data for property accessors 2021-08-05 17:47:29 +01:00
giregisteredtypeinfo.c docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
giregisteredtypeinfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
girepository-private.h build: enable -Wredundant-decls 2018-07-29 18:57:03 +02:00
girepository.c Add missing nullable annotation to g_irepository_get_shared_library 2020-05-14 17:24:08 +02:00
girepository.h girepository: Return pointer array for interface cache 2019-06-20 11:54:10 -07:00
girffi.c build: enable -Wswitch-default 2018-07-29 18:57:03 +02:00
girffi.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
girmodule.c girepository: Use constant time calculation for sections after Object fields 2015-10-10 17:41:24 -04:00
girmodule.h Add Emacs mode lines to C sources 2012-02-03 13:42:56 -05:00
girnode.c Add introspection data for property accessors 2021-08-05 17:47:29 +01:00
girnode.h Add introspection data for property accessors 2021-08-05 17:47:29 +01:00
giroffsets.c docs: fix up reference docs a bit 2013-10-10 16:48:51 -04:00
girparser.c Add introspection data for property accessors 2021-08-05 17:47:29 +01:00
girparser.h Add Emacs mode lines to C sources 2012-02-03 13:42:56 -05:00
girwriter.c Add introspection data for property accessors 2021-08-05 17:47:29 +01:00
girwriter.h Add Emacs mode lines to C sources 2012-02-03 13:42:56 -05:00
gisignalinfo.c docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
gisignalinfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
gistructinfo.c structinfo: Fix offset in find_method() 2019-08-14 23:17:54 +02:00
gistructinfo.h docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
gitypeinfo.c girepository: Add GITypeInfo utility functions for storing values in pointers 2020-04-26 10:24:26 -07:00
gitypeinfo.h girepository: Add GITypeInfo utility functions for storing values in pointers 2020-04-26 10:24:26 -07:00
gitypelib-internal.h Add introspection data for property accessors 2021-08-05 17:47:29 +01:00
gitypelib.c girepository: Fix leak in prefix_with_context 2021-06-18 14:28:05 +00:00
gitypelib.h docs: Remove everything not related to libgirepository and restructure. Fixes #244 2018-12-14 11:29:11 +01:00
gitypes.h docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
giunioninfo.c docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
giunioninfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
giversion.c girepository: Add version macros and functions. Fixes #200 2018-12-16 12:51:58 +01:00
giversion.h.in girepository: Add version macros and functions. Fixes #200 2018-12-16 12:51:58 +01:00
giversionmacros.h Add version macros for 1.70 2021-08-05 16:24:23 +00:00
givfuncinfo.c docs: fix gtk-doc warnings and update version infos 2018-12-09 18:26:26 +01:00
givfuncinfo.h girepository: Add Header for Version Macros 2014-08-15 09:45:41 +08:00
gthash-test.c Drop calls to g_type_init() 2012-10-16 10:58:08 -04:00
gthash.c build: enable -Wtype-limits 2018-07-29 18:57:03 +02:00
meson.build Make test suite work with cross-related options 2021-05-23 12:56:21 -04:00