Emmanuele Bassi 605fdf7046 Add copy and free function annotations for POD types
Plain Old Data (POD) types with or without a representation in the GType
type system can still have a copy and/or a free function. We should
allow annotating these types with their corresponding functions for
copying their data into a new instance, and freeing their data.

From a language bindings perspective, POD types should have a boxed
GType wrapper around them, so they can use the generic GBoxed API to
copy and free instances; from a documentation perspective, though, it'd
be good to have a way to match a structured type, like a struct or a
union, with its copy and free functions.

In order to do that, we add two new header block annotations:

- (copy-func function_name)
- (free-func function_name)

These annotations work exactly like ref-func and unref-func for typed
instances:

    /**
     * GdkRGBA: (copy-func gdk_rgba_copy)
     *   (free-func gdk_rgba_free)
     * @red: ...
     * @green: ...
     * @blue: ...
     * @alpha: ...
     *
     * ...
     */

The function is stored in the GIR data as two new attributes for the
`<record>` and `<union>` elements:

    <record name="RGBA"
            c:type="GdkRGBA"
            copy-function="gdk_rgba_copy"
            free-function="gdk_rgba_free"
            glib:type-name="GdkRGBA"
            glib:get-type="gdk_rgba_get_type"
            c:symbol-prefix="gdk_rgba">

The annotations are not mandatory.

See: #14
2023-01-08 14:50:28 +00:00
2012-10-16 10:58:08 -04:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:20:03 +00:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:20:51 +00:00
2021-06-24 18:17:56 +00:00
2022-02-13 14:20:51 +00:00
2021-08-05 16:24:23 +00:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:41:48 +00:00
2012-02-03 13:42:56 -05:00
2013-10-10 16:48:51 -04:00
2012-02-03 13:42:56 -05:00
2012-02-03 13:42:56 -05:00
2022-02-13 14:20:51 +00:00
2022-02-13 14:35:53 +00:00
2022-02-13 14:35:53 +00:00
2023-01-08 14:47:58 +00:00
2022-02-13 14:20:51 +00:00
2012-10-16 10:58:08 -04:00
2018-07-29 18:57:03 +02:00
Description
Low-level core library that forms the basis for projects such as GTK+ and GNOME.
136 MiB
Languages
C 95.3%
Python 2.3%
Meson 1.3%
Objective-C 0.3%
Shell 0.2%
Other 0.5%