| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Follow the same semantics as Vala:
1. emitters should have the same return value as the signal
2. emitters should have the same parameters as the signal they
emit (minus the instance parameter, which is implied in
signals)
|
|
|
|
|
|
| |
Signals that have an emitter function should have an annotation to allow
consumers of the introspection XML to effectively pair signals to their
corresponding emitter functions that share the same prototype.
|
|
|
|
|
|
|
| |
If a property is not introspectable we need to decouple it from its
accessors; the property data will not be compiled into the typelib,
and when the compiler will try to resolve the offsets into the binary
blob we'll get a fatal exception.
|
|
|
|
|
| |
Use the parent type and the function symbol when erroring out if we
can't find a property accessor.
|
|
|
|
|
|
|
| |
Some readonly boolean properties in the form of 'has-foo' or 'is-bar'
expose a getter function in the form of `get_has_foo()` or
`get_is_bar()`, according to extant coding practices. We should ensure
we still check for those.
|
|
|
|
|
|
| |
If the (set-property) and (get-property) annotations on methods do not
round trip with the (setter) and (getter) annotations on the
corresponding property, we want to emit a warning.
|
|
|
|
|
|
|
|
| |
The `set-property` and `get-property` identifier annotations only apply
to methods.
The `setter` and `getter` identifier annotations only apply to
properties.
|
|
|
|
| |
Easier to read than `0x3ff`.
|
|
|
|
|
|
|
|
| |
If a property is boolean and read-only, the getter method can be the
same as the property name, for instance:
- gtk_widget_has_focus()
- gtk_media_stream_has_audio()
|
|
|
|
|
|
|
| |
The heuristic is pretty trivial: for any given non-construct-only,
writable property, we check if there's a `set_<property>` method; for
any given readable property, we check if there's a `get_<property>`
method.
|
|
|
|
|
| |
Public accessor functions are the functions typically called through
g_object_set_property() and g_object_get_property().
|
| |
|
| |
|
|
|
|
|
| |
We need new annotations to allow library developers to associate a
setter and a getter functions to a property definition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Mention them in the annotations list, and add the new attributes to the
GIR schema.
|
|
|
|
| |
Add an accessors pair to Regress.TestObj and annotate them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce two new annotations:
- (set-property PROPERTY_NAME)
- (get-property PROPERTY_NAME)
These annotations are valid inside function blocks for methods on
objects and interfaces, and define whether a function is a property
accessor, e.g.:
/**
* gtk_widget_set_name: (set-property name)
* @self: ...
* @name: ...
*
* ...
*/
/**
* gtk_widget_get_name: (get-property name)
* @self: ...
*
* ...
*
* Returns: ...
*/
The annotations are transformed into the GIR data as attributes:
- glib:set-property="PROPERTY_NAME"
- glib:get-property="PROPERTY_NAME"
The underlying typelib data has had flags for setter and getter
functions for a while, but they have never been plugged into the GIR
data or the introspection scanner. Now they are; you can retrieve the
GIPropertyInfo from a GIFunctionInfo that has the GI_FUNCTION_IS_SETTER
or GI_FUNCTION_IS_GETTER flags set.
Fixes: #13
|
|
|
|
|
|
| |
We need to check the container type before trying to obtain a
GIPropertyInfo for GIFunctionInfos that have a SETTER or a GETTER flag
set.
|
| |
|
|
|
|
|
|
|
|
| |
A "final" class is a leaf node in a derivable type hierarchy, and cannot
be derived any further.
This matches the changes in libgobject that introduced G_TYPE_FLAG_FINAL
to the type flags.
|
|
|
|
| |
We are going to introduce new API.
|
|
|
|
| |
Up to the 2.69.1 tag.
|
|
|
|
|
|
|
| |
This is so that GJS can use these variables in its own build files when
including gobject-introspection as a Meson subproject. Previously we
took the approach of using the files in their installed locations, but
that doesn't work as a subproject.
|
|
|
|
|
|
|
| |
The GNOME developers documentation website has been updated, and we're
in the process of moving API references elsewhere. The old documentation
is still available under developer-old.gnome.org, so let's update the
URLs we have in our documentation.
|
|
|
|
|
|
|
|
|
| |
The (out caller-allocates) and (out callee-allocates) annotations are
meant for structured or pointer types. Plain old data types are just
regular out parameters and don't need the annotation about who allocates
them.
See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2005
|
|
|
|
|
|
| |
Make the variable names intelligible, and include a bunch of built files
that are necessary to ensure that the generated GIR data actually
matches the GLib API.
|
| |
|
|
|
|
|
| |
GLib has dropped the internal copy libpcre, so we need to promote
libpcre's subproject to the top level.
|
|
|
|
|
|
|
| |
GLib dropped the internal libpcre copy, which means we end up with a
subproject inside a subproject.
Since libpcre is frozen, we can rely on using the installed copy.
|
|
|
|
| |
Don't install them as part of the CI job. It's pointless repetition.
|
|
|
|
| |
Avoid a "maybe uninitialized" compiler warning.
|
|
|
|
|
|
|
|
|
| |
Drop explicit `-Wall` and `-Wextra` from the compiler flags.
Meson adds `-Wall` with `warning_level=1`, and `-Wextra` with
`warning_level=2`.
Fixes: #319
|
|
|
|
|
|
|
| |
Don't call Ninja directly, and don't enter the build directory.
Also move shared options to environment variables, so we don't have to
copy and paste them everywhere.
|
| |
|
|
|
|
| |
Not every Linux distro ships with Docker, and Podman is nicer.
|
| |
|
|
|
|
| |
Fedora 29 was EOL'ed in 2019.
|
| |
|
|
|
|
|
|
|
| |
This member will contain the string from the GEnumValue/GFlagsValue
'value_name' introspection dump.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
| |
Don't rely on runtime name, but on C header parsed symbol.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
| |
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
| |
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
|
|
|
| |
Check for errors during g_file_open_tmp() and fdopen(). Make sure to
free tmp_name and error as needed.
Found with Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
| |
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
| |
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
| |
Unref type before reusing it. Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
| |
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
| |
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
|
|
|
| |
Use the depth= argument from Meson 0.52 to limit the clone depth of
subprojects to 1. This should make the CI images a little smaller, and
reduce the bandwidth required to build them (although that’s not so
important because it only happens once every few months).
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|