diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 300cb865a1f54f3db8adfc660d62ee2da154431f..aaf0c27d7f72e3e88cf5fc342824a5543c0a859c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,7 @@ variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 3
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v28"
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
- DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v25"
+ DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v26"
.only-default:
only:
@@ -290,11 +290,13 @@ reference:
EXTRA_MESON_FLAGS: "--buildtype=release"
script:
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} -Dgtk_doc=true _build
- - ninja -C _build gdk4-doc gsk4-doc gtk4-doc
+ - meson compile -C _build
- mkdir -p _reference/
- - mv _build/docs/reference/gdk/html/ _reference/gdk/
- - mv _build/docs/reference/gsk/html/ _reference/gsk/
- - mv _build/docs/reference/gtk/html/ _reference/gtk/
+ - mv _build/docs/reference/gdk/gdk4/ _reference/gdk4/
+ - mv _build/docs/reference/gdk/gdk4-x11/ _reference/gdk4-x11/
+ - mv _build/docs/reference/gdk/gdk4-wayland/ _reference/gdk4-wayland/
+ - mv _build/docs/reference/gsk/gsk4/ _reference/gsk4/
+ - mv _build/docs/reference/gtk/gtk4/ _reference/gtk4/
artifacts:
paths:
- _reference
diff --git a/.gitlab-ci/README.md b/.gitlab-ci/README.md
index e7b063144f93f6b0bbe3804deb71fa936fae5421..162a1a88df6d24821199e8da9efe000a0574fc1b 100644
--- a/.gitlab-ci/README.md
+++ b/.gitlab-ci/README.md
@@ -17,8 +17,8 @@ branch, as well as their available versions.
### Checklist for Updating a CI image
- [ ] Update the `${image}.Dockerfile` file with the dependencies
- - [ ] Run `./run-docker.sh build --base ${image} --base-version ${number}`
- - [ ] Run `./run-docker.sh push --base ${image} --base-version ${number}`
+ - [ ] Run `./run-docker.sh build --base ${image} --version ${number}`
+ - [ ] Run `./run-docker.sh push --base ${image} --version ${number}`
once the Docker image is built; you may need to log in by using
`docker login` or `podman login`
- [ ] Update the `image` keys in the `.gitlab-ci.yml` file with the new
@@ -30,8 +30,8 @@ branch, as well as their available versions.
- [ ] Write a new `${image}.Dockerfile` with the instructions to set up
a build environment
- [ ] Add the `pip3 install meson` incantation
- - [ ] Run `./run-docker.sh build --base ${image} --base-version ${number}`
- - [ ] Run `./run-docker.sh push --base ${image} --base-version ${number}`
+ - [ ] Run `./run-docker.sh build --base ${image} --version ${number}`
+ - [ ] Run `./run-docker.sh push --base ${image} --version ${number}`
- [ ] Add the new job to `.gitlab-ci.yml` referencing the image
- [ ] Open a merge request with your changes and let it run
diff --git a/.gitlab-ci/fedora-docs.Dockerfile b/.gitlab-ci/fedora-docs.Dockerfile
index d2e8c5ad40437633a33f8886fb50533009129227..d9c9b44ea23e9f2c41b45fe75b20286d90995c04 100644
--- a/.gitlab-ci/fedora-docs.Dockerfile
+++ b/.gitlab-ci/fedora-docs.Dockerfile
@@ -1,6 +1,11 @@
-FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v25
+FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v28
-RUN dnf -y install pandoc
+RUN dnf -y install \
+ python3-jinja2 \
+ python3-markdown \
+ python3-pygments \
+ python3-toml \
+ python3-typogrify
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index a992f9f60a11a01bd3fa5f61e5e25d379dce5e59..c911e6afe180a306c01bc99b4bc5c25d51b9e0f2 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -32,7 +32,7 @@ while (($# > 0)); do
list) list=1;;
help) print_help=1;;
--base|-b) read_arg base "$@" || shift;;
- --base-version) read_arg base_version "$@" || shift;;
+ --version|-v) read_arg base_version "$@" || shift;;
--no-login) no_login=1;;
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
esac
diff --git a/docs/CODING-STYLE.md b/docs/CODING-STYLE.md
index 11d105edd961f1efc7a0c1fb082604882dd73777..d48df10f6f7708c12944eafd04221a3c0eb1da75 100644
--- a/docs/CODING-STYLE.md
+++ b/docs/CODING-STYLE.md
@@ -696,27 +696,29 @@ Public macros should not be used unless they evaluate to a constant.
### Symbol visibility
Any symbol that is not explicitly annotated using a `GDK_AVAILABLE_IN_*`
-macro is considered internal, and not exported in the shared library.
+or `GDK_DEPRECATED_IN_*` macro is considered internal, and not exported
+in the shared library.
Never export variables as public API, since this is cumbersome on some
platforms. It is always preferable to add getters and setters instead.
Non-exported functions that are needed in more than one source file
-should be declared in a private header file.
+should be declared in a private header file with a name that ends in
+`private.h`.
Non-exported functions that are only needed in one source file
should be declared static.
### Documentation
-All public APIs must have gtk-doc comments. For functions, these should
+All public APIs must have doc comments. For functions, these should
be placed in the source file, directly above the function.
```c
/* valid */
/**
* gtk_get_flow:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Gets the flow of a widget.
*
@@ -736,29 +738,34 @@ be placed in the source file, directly above the function.
Doc comments for macros, function types, class structs, etc should be
placed next to the definitions, typically in headers.
-Section introductions should be placed in the source file they describe,
-after the license header:
+The main content of the doc comments uses markdown, which can include
+inline formatting, sections, tables, images, links. For links to
+symbols/classes/etc, we use a markdown extension syntax like this:
+
+[class@Gtk.Widget], [method@Gtk.ListView.get_factory],...
+
+Every doc comment should start with a single-sentence paragraph that
+can serve as a summary of sorts (it will often be placed next to a
+link pointing to the full documentation for the symbol/class/etc).
+The summary should not include links.
+
+Long-form documentation for classes should be included in the doc
+comment for the struct, typically at the top of the source file,
+after the license header and includes:
```c
- /* valid */
/**
- * SECTION:gtksizerequest
- * @Short_Description: Height-for-width geometry management
- * @Title: GtkSizeRequest
+ * GtkSizeRequest:
+ *
+ * The GtkSizeRequest interface is GTK's height-for-width geometry
+ * geometry management system.
+ *
+ * # Geometry management
*
- * The GtkSizeRequest interface is GTK's height-for-width (and
- * width-for-height) geometry management system.
* ...
*/
```
-To properly document a new function, macro, function type or struct,
-it needs to be listed in the `sections.txt` file.
-
-To properly document a new class, it needs to be given its own section
-in the sections.txt, needs to be included in the `docs.xml` file, and the
-`get_type` function needs to listed in the `.types` file.
-
For more information on the documentation style and contribution guidelines,
please [follow the corresponding contribution guide](./reference/README.md).
diff --git a/docs/reference/README.md b/docs/reference/README.md
index 94ea3896972d634bcf7e50dd1060441e19424db0..6594f58f366fe54e80a82a6a5f5fcb32fc9ac857 100644
--- a/docs/reference/README.md
+++ b/docs/reference/README.md
@@ -6,40 +6,41 @@ The GTK documentation is divided in two major components:
source code
- static pages that provide an overview of specific sections of the API
-In both cases, the contents are parsed, converted into DocBook format, and
-cross-linked in order to match types, functions, signals, and properties.
-From the DocBook output, we generate HTML, which can be used to read the
-documentation both offline and online.
+In both cases, the contents are parsed as markdown and cross-linked in order
+to match types, functions, signals, and properties. Ultimatively, we generate
+HTML, which can be used to read the documentation both offline and online.
-In both cases, contributing to the GTK documentation requires modifying
-files tracked in the source control repository, and follows the same steps
-as any other code contribution as outlined in the GTK [contribution
-guide][contributing]. Please, refer to that document for any further
-question on the mechanics of contributing to GTK.
+Contributing to the GTK documentation requires modifying files tracked in the
+source control repository, and follows the same steps as any other code
+contribution as outlined in the GTK [contribution guide][contributing].
+Please, refer to that document for any further question on the mechanics
+of contributing to GTK.
-GTK uses [gtk-doc][gtkdoc] to generate its documentation. Please, visit the
-gtk-doc website to read the project's documentation.
+GTK uses [gi-docgen][gidocgen] to generate its documentation. Please, visit
+the gi-docgen website to read the project's documentation.
[contributing]: ../../CONTRIBUTING.md
-[gtkdoc]: https://wiki.gnome.org/DocumentationProject/GtkDoc
+[gi-docgen]: https://gitlab.gnome.org/ebassi/gi-docgen
## Contributing to the API reference
Whenever you need to add or modify the documentation of a type or a
-function, you will need to edit a `gtk-doc` comment stanza, typically right
+function, you will need to edit a comment stanza, typically right
above the type or function declaration. For instance:
```c
/**
* gtk_foo_set_bar:
- * @self: a #GtkFoo
- * @bar: a #GtkBar
+ * @self: a foo widget
+ * @bar: (nullable): the bar to set
*
- * Sets the given #GtkBar instance on a #GtkFoo widget.
+ * Sets the given `GtkBar` instance on a foo widget.
+ *
+ * Returns: `TRUE` if the bar was set
*/
-void
+gboolean
gtk_foo_set_bar (GtkFoo *self,
- GtkBar *bar)
+ GtkBar *bar)
{
...
```
@@ -51,31 +52,14 @@ Or, for types:
* GtkFoo:
*
* A foo widget instance.
- *
- * The contents of this structure are private and should never
- * be accessed directly.
*/
struct _GtkFoo
{
+ /*< private >*/
GtkWidget parent_instance;
};
```
-Each public function and type in the GTK API reference must be listed in the
-`sections.txt` file for the specific namespace to which it belongs: GDK,
-GSK, or GTK. For instance, if you add a function named `gtk_foo_set_bar()`,
-you will need to:
-
- 1. open `docs/reference/gtk/gtk4-sections.txt`
- 1. find the section that lists the symbols of the `GtkFoo` type
- 1. add `gtk_foo_set_bar` to the list
-
-New classes require:
-
- 1. a new section in the `sections.txt` file
- 1. the `get_type` function added to the `.types` file
- 1. an `xinclude` element in the `docs.xml` file
-
The GTK documentation also contains a number of 'freestanding' chapters
for which the source is in .md files in docs/reference/gtk.
@@ -90,49 +74,61 @@ unrelated reasons.
### Syntax
-The input syntax for GTK documentation is markdown, in a flavor that is
-similar to what you see on gitlab or github. The markdown support for
-fragments that are extracted from sources is more limited than for
+The input syntax for GTK documentation is Markdown, in a flavor that is
+similar to what you see on GitLab or GitHub. The markdown support for
+fragments that are extracted from sources is identical to the one for
freestanding chapters. As an exception, man pages for tools are currently
maintained in docbook, since the conversion from markdown to docbook is
losing too much of the expected formatting.
In addition to typical markdown formatting such as \*emphasis\* or \_italics\_,
-gtk-doc supports a few abbreviations for cross-references and formatting:
+the GTK documentation supports additional link formats, like:
-`#ClassName`
+`[class@Namespace.ClassName]`
: Creates a link to the docs for a class
-`function()`
- : Creates a link to the docs for a function
+`[method@Namespace.Method.name]`
+ : Creates a link to the docs for a method in a class
-`%constant`
- : Generates suitable markup for enum values or constants
+`[func@Namespace.function]`
+ : Creates a link to the docs for a global function
-### Sections
+For more information on the available link formats, see the gi-docgen
+documentation.
- - The "section" of each type must contain a name, to be referenced in the
- `sections.txt` file; a title; and a short description. For instance:
+Every doc comment should start with a single-sentence paragraph that
+can serve as a summary of sorts (it will often be placed next to a
+link pointing to the full documentation for the symbol/class/etc).
+The summary should not include links.
-```c
-/**
- * SECTION:gtkshortcut
- * @Title: GtkShortcut
- * @Short_desc: A key shortcut
- *
- * ...
-```
+### Introspection annotations
- For classes, the title should be the name of the class. While it's
- possible to add section titles directly to the `sections.txt` file, this
- is considered deprecated, and should not be done for newly written code.
- - For classes, the long description should contain an overview of the type;
- what it does; typical use cases; and idiomatic examples of its use.
- - For widget classes, the long description of a section should also contain:
- - special XML elements and attributes parsed by the class, in case of a
- custom GtkBuildable implementation
- - the CSS element name to be used by selectors
- - the CSS selector hierarchy for children, in case of a composite widget
+The purpose of the annotations for function arguments, properties, signals,
+etc., is to describe the API in a machine readable way. The annotations
+are consumed by language bindings and by the documentation tools.
+
+For more information about the annotations used by GTK, you should refer to
+the [GObject Introspection documentation][gi-annotations].
+
+[gi-annotations]: https://gi.readthedocs.io/en/latest/annotations/giannotations.html
+
+### Type description
+
+Each type should be annotated with a description of what the type does.
+
+For classes, the description should contain an overview of the type;
+what it does; typical use cases; and idiomatic examples of its use.
+
+For widget classes, the description should also contain:
+
+ - special XML elements and attributes parsed by the class, in case of a
+ custom GtkBuildable implementation
+ - the CSS element name to be used by selectors
+ - the CSS selector hierarchy for children, in case of a composite widget
+ - the accessible role of the class
+
+Each section in a type description can have a heading; it's preferred to use
+second and third level headings only.
### Functions
@@ -155,17 +151,26 @@ Checks whether the widget is set to be visible or not.
- Methods are special functions whose first argument is always the instance
of a certain class. The instance argument for newly written code should be
called `self`.
- - If a method is a setter or a getter for an object property, link the
- property in the methods's description.
+ - If a method is a setter or a getter for an object property, you should
+ add an `(attributes org.gtk.Method.set_property=property-name)` or a
+ an `(attributes org.gtk.Method.get_property=property-name)` annotation
+ to the method's identifier
- If a method changes one or more properties as side effect, link those
properties in the method's description
- - If a method is a signal emitter, link the signal in the method's
- description.
+ - If a method is a signal emitter, you should use the
+ `(attributes org.gtk.Method.signal=signal-name)` annotation in
+ the method's identifier
+
+### Arguments and return values
+
+ - Arguments should be descriptive, but short
+ - There is no need to mention the type of the argument
+ - Always annotate nullability, direction, and ownership transfer
### Signals
- While GObject can introspect argument and return types for signals,
- you should *always* document them with an explicit gtk-doc stanza.
+ you should *always* document them with an explicit documentation stanza.
- The syntax for signal stanzas is similar to functions:
```c
@@ -181,12 +186,15 @@ Checks whether the widget is set to be visible or not.
- While GObject properties contain text that can be extracted
programmatically in order to build their documentation, you should
- *always* document them with an explicit gtk-doc stanza. The text
+ *always* document them with an explicit documentation stanza. The text
associated to the property is short and meant to be used when
programmatically building user interfaces, and not for documentation
purposes.
- Always note if setting a property has side effects, like causing another
property to change state.
+ - If the property has public accessors you should annotate it with
+ the `(attributes org.gtk.Property.set=setter_function)` and
+ `(attributes org.gtk.Property.get=getter_function)` attributes
- The syntax for property documentation is:
```c
@@ -198,8 +206,9 @@ Checks whether the widget is set to be visible or not.
### Actions
- - Actions are new in GTK 4, and gtk-doc had to learn a new syntax
- to document them:
+ - Actions are new in GTK 4, and describe an action associated to
+ a widget class
+ - The syntax for action documentation is:
```
/**c
diff --git a/docs/reference/gdk/cairo.md b/docs/reference/gdk/cairo.md
new file mode 100644
index 0000000000000000000000000000000000000000..f7d3c969b4369dd5017986856ae29c924c4667a3
--- /dev/null
+++ b/docs/reference/gdk/cairo.md
@@ -0,0 +1,18 @@
+----
+Title: Cairo interaction
+----
+
+## Functions to support using cairo
+
+[Cairo](http://cairographics.org) is a graphics library that supports vector
+graphics and image compositing that can be used with GTK.
+
+GDK does not wrap the Cairo API; instead it allows to create Cairo
+drawing contexts which can be used to draw on [class@Gdk.Surface]s.
+
+Additional functions allow use [struct@Gdk.Rectangle]s with Cairo
+and to use [struct@Gdk.RGBA], `GdkPixbuf`, and [class@Gdk.Surface]
+instances as sources for drawing operations.
+
+For more information on Cairo, please see the
+[Cairo API reference](https://www.cairographics.org/manual/).
diff --git a/docs/reference/gdk/gdk4-docs.xml b/docs/reference/gdk/gdk4-docs.xml
deleted file mode 100644
index d63c7e346c6fc6a0e9d706fa51060b8184e99a7c..0000000000000000000000000000000000000000
--- a/docs/reference/gdk/gdk4-docs.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-]>
-
-
- GDK 4 Reference Manual
-
- This document is for the GDK 4 library, version &version;.
- The latest versions can be found online at
- https://developer.gnome.org/gdk4/.
- If you are looking for the older GDK 3 series of libraries,
- see https://developer.gnome.org/gdk3/.
-
-
-
-
- API Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GDK Platform Support
-
-
-
-
-
-
- Index of all symbols
-
-
-
- Index of new symbols in 4.2
-
-
-
- Index of deprecated symbols
-
-
-
-
-
-
diff --git a/docs/reference/gdk/gdk4-overrides.txt b/docs/reference/gdk/gdk4-overrides.txt
deleted file mode 100644
index 5dab67c7c97673ccc31e4b1bc6faa76cc04b20d6..0000000000000000000000000000000000000000
--- a/docs/reference/gdk/gdk4-overrides.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-GDK_WINDOWING_X11
-#define GDK_WINDOWING_X11
-
-
-
-GDK_WINDOWING_WIN32
-#define GDK_WINDOWING_WIN32
-
-
-
-GDK_WINDOWING_MACOS
-#define GDK_WINDOWING_MACOS
-
-
-
-GDK_WINDOWING_WAYLAND
-#define GDK_WINDOWING_WAYLAND
-
-
-
-GDK_DISABLE_DEPRECATION_WARNINGS
-#define GDK_DISABLE_DEPRECATION_WARNINGS
-
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
deleted file mode 100644
index 5d0cd8a11a7e9adf1fa02dafe204bc09702edd70..0000000000000000000000000000000000000000
--- a/docs/reference/gdk/gdk4-sections.txt
+++ /dev/null
@@ -1,1350 +0,0 @@
-gdk/gdk.h
-
-
-General
-general
-
-
-GDK_WINDOWING_X11
-GDK_WINDOWING_WIN32
-GDK_WINDOWING_MACOS
-GDK_WINDOWING_WAYLAND
-
-
-GDK_MAJOR_VERSION
-GDK_MICRO_VERSION
-GDK_MINOR_VERSION
-
-
-GDK_VERSION_4_0
-GDK_VERSION_MIN_REQUIRED
-GDK_VERSION_MAX_ALLOWED
-GDK_DISABLE_DEPRECATION_WARNINGS
-
-
-GDK_TYPE_GRAB_STATUS
-
-
-GDK_TYPE_STATUS
-GdkStatus
-GDKVAR
-GDK_EXTERN_VAR
-_GDK_EXTERN
-GDK_DECLARE_INTERNAL_TYPE
-gdk_axis_use_get_type
-gdk_byte_order_get_type
-gdk_crossing_mode_get_type
-gdk_cursor_type_get_type
-gdk_drag_action_get_type
-gdk_drag_protocol_get_type
-gdk_event_mask_get_type
-gdk_event_type_get_type
-gdk_extension_mode_get_type
-gdk_filter_return_get_type
-gdk_grab_ownership_get_type
-gdk_grab_status_get_type
-gdk_gravity_get_type
-gdk_input_mode_get_type
-gdk_input_source_get_type
-gdk_modifier_intent_get_type
-gdk_modifier_type_get_type
-gdk_notify_type_get_type
-gdk_prop_mode_get_type
-gdk_scroll_direction_get_type
-gdk_setting_action_get_type
-gdk_status_get_type
-gdk_visibility_state_get_type
-gdk_surface_attributes_type_get_type
-gdk_surface_edge_get_type
-gdk_surface_hints_get_type
-gdk_surface_state_get_type
-gdk_surface_type_get_type
-gdk_surface_type_hint_get_type
-gdk_wm_decoration_get_type
-gdk_wm_function_get_type
-GDK_AVAILABLE_IN_4_0
-GDK_AVAILABLE_IN_ALL
-GDK_UNAVAILABLE
-GDK_DEPRECATED
-GDK_DEPRECATED_FOR
-GDK_DEPRECATED_IN_4_0
-GDK_DEPRECATED_IN_4_0_FOR
-GDK_VERSION_CUR_STABLE
-GDK_VERSION_PREV_STABLE
-
-
-
-gdkdisplay
-GdkDisplay
-GdkDisplay
-gdk_display_open
-gdk_display_get_default
-gdk_display_get_name
-gdk_display_device_is_grabbed
-gdk_display_beep
-gdk_display_sync
-gdk_display_flush
-gdk_display_close
-gdk_display_is_closed
-gdk_display_is_rgba
-gdk_display_is_composited
-gdk_display_supports_input_shapes
-gdk_display_get_app_launch_context
-gdk_display_notify_startup_complete
-gdk_display_get_default_seat
-gdk_display_list_seats
-gdk_display_get_monitors
-gdk_display_get_monitor_at_surface
-gdk_display_get_clipboard
-gdk_display_get_primary_clipboard
-gdk_display_get_setting
-gdk_display_get_startup_notification_id
-
-
-gdk_display_put_event
-
-
-gdk_display_map_keyval
-gdk_display_map_keycode
-gdk_display_translate_key
-
-
-GDK_DISPLAY
-GDK_DISPLAY_OBJECT
-GDK_IS_DISPLAY
-GDK_TYPE_DISPLAY
-GDK_DISPLAY_CLASS
-GDK_IS_DISPLAY_CLASS
-GDK_DISPLAY_GET_CLASS
-
-
-gdk_display_get_type
-GdkDisplayClass
-
-
-
-gdkdisplaymanager
-GdkDisplayManager
-GdkDisplayManager
-gdk_display_manager_get
-gdk_display_manager_get_default_display
-gdk_display_manager_set_default_display
-gdk_display_manager_list_displays
-gdk_display_manager_open_display
-
-
-gdk_set_allowed_backends
-
-
-GDK_DISPLAY_MANAGER
-GDK_DISPLAY_MANAGER_CLASS
-GDK_DISPLAY_MANAGER_GET_CLASS
-GDK_IS_DISPLAY_MANAGER_CLASS
-GDK_IS_DISPLAY_MANAGER
-GDK_TYPE_DISPLAY_MANAGER
-GdkDisplayManagerClass
-gdk_display_manager_get_type
-
-
-
-Pixbufs
-pixbufs
-gdk_pixbuf_get_from_surface
-gdk_pixbuf_get_from_texture
-
-
-
-RGBA Colors
-rgba_colors
-GdkRGBA
-gdk_rgba_copy
-gdk_rgba_free
-gdk_rgba_is_clear
-gdk_rgba_is_opaque
-gdk_rgba_parse
-gdk_rgba_equal
-gdk_rgba_hash
-gdk_rgba_to_string
-
-
-GDK_TYPE_RGBA
-
-
-gdk_rgba_get_type
-
-
-
-GdkSurface
-gdksurface
-GdkSurface
-GdkGravity
-gdk_surface_new_toplevel
-gdk_surface_new_popup
-gdk_surface_destroy
-gdk_surface_is_destroyed
-gdk_surface_get_display
-gdk_surface_hide
-gdk_surface_get_mapped
-gdk_surface_translate_coordinates
-gdk_surface_beep
-gdk_surface_get_scale_factor
-gdk_surface_set_opaque_region
-gdk_surface_create_gl_context
-gdk_surface_create_vulkan_context
-gdk_surface_create_cairo_context
-
-
-gdk_surface_queue_render
-gdk_surface_get_frame_clock
-gdk_surface_request_layout
-
-
-gdk_surface_set_cursor
-gdk_surface_get_cursor
-gdk_surface_set_input_region
-gdk_surface_get_width
-gdk_surface_get_height
-gdk_surface_get_device_position
-GdkModifierType
-GDK_MODIFIER_MASK
-
-
-gdk_surface_get_device_cursor
-gdk_surface_set_device_cursor
-
-
-GDK_SURFACE
-GDK_SURFACE_GET_CLASS
-GDK_TYPE_SURFACE
-GDK_IS_SURFACE
-GDK_SURFACE_CLASS
-GDK_IS_SURFACE_CLASS
-GDK_TYPE_FILTER_RETURN
-GDK_TYPE_GRAVITY
-GDK_TYPE_MODIFIER_TYPE
-GDK_TYPE_SURFACE_ATTRIBUTES_TYPE
-GDK_TYPE_SURFACE_EDGE
-GDK_TYPE_SURFACE_HINTS
-GDK_TYPE_SURFACE_TYPE
-GDK_TYPE_SURFACE_TYPE_HINT
-GDK_TYPE_WM_DECORATION
-GDK_TYPE_WM_FUNCTION
-GDK_TYPE_TOPLEVEL_STATE
-
-
-gdk_surface_get_type
-gdk_surface_window_class_get_type
-GdkSurfaceClass
-GdkSurfaceImpl
-GdkSurfaceImplClass
-GdkSurfaceRedirect
-gdk_surface_impl_get_type
-gdk_fullscreen_mode_get_type
-
-
-
-gdkcontentformats
-Content Formats
-gdk_intern_mime_type
-
-
-GdkContentFormats
-gdk_content_formats_new
-gdk_content_formats_new_for_gtype
-gdk_content_formats_ref
-gdk_content_formats_unref
-gdk_content_formats_print
-gdk_content_formats_to_string
-gdk_content_formats_get_gtypes
-gdk_content_formats_get_mime_types
-gdk_content_formats_union
-gdk_content_formats_match
-gdk_content_formats_match_gtype
-gdk_content_formats_match_mime_type
-gdk_content_formats_contain_gtype
-gdk_content_formats_contain_mime_type
-
-
-gdk_content_formats_union_serialize_gtypes
-gdk_content_formats_union_deserialize_gtypes
-gdk_content_formats_union_serialize_mime_types
-gdk_content_formats_union_deserialize_mime_types
-
-
-GdkContentFormatsBuilder
-gdk_content_formats_builder_new
-gdk_content_formats_builder_free_to_formats
-gdk_content_formats_builder_add_formats
-gdk_content_formats_builder_add_gtype
-gdk_content_formats_builder_add_mime_type
-
-
-gdk_content_formats_builder_ref
-gdk_content_formats_builder_unref
-gdk_content_formats_builder_to_formats
-
-
-GDK_TYPE_FILE_LIST
-gdk_file_list_get_type
-gdk_content_formats_get_type
-gdk_content_formats_builder_get_type
-
-
-
-Pango Interaction
-pango_interaction
-gdk_pango_layout_get_clip_region
-gdk_pango_layout_line_get_clip_region
-
-
-
-Cairo Interaction
-cairo_interaction
-gdk_surface_create_similar_surface
-gdk_cairo_set_source_rgba
-gdk_cairo_set_source_pixbuf
-gdk_cairo_rectangle
-gdk_cairo_region
-gdk_cairo_region_create_from_surface
-gdk_cairo_draw_from_gl
-
-
-
-Rectangles and Regions
-regions
-GdkRectangle
-gdk_rectangle_intersect
-gdk_rectangle_union
-gdk_rectangle_equal
-gdk_rectangle_contains_point
-
-
-gdk_rectangle_get_type
-
-
-
-Keyboard Handling
-keys
-gdk_keyval_name
-gdk_keyval_from_name
-gdk_keyval_convert_case
-gdk_keyval_to_upper
-gdk_keyval_to_lower
-gdk_keyval_is_upper
-gdk_keyval_is_lower
-gdk_keyval_to_unicode
-gdk_unicode_to_keyval
-
-
-
-
-GdkDevice
-gdkdevice
-GdkDevice
-GdkInputSource
-GdkAxisUse
-GdkAxisFlags
-GdkDeviceTool
-GdkDeviceToolType
-
-
-gdk_device_get_name
-gdk_device_get_vendor_id
-gdk_device_get_product_id
-gdk_device_get_source
-gdk_device_get_display
-gdk_device_get_has_cursor
-gdk_device_get_seat
-gdk_device_get_num_touches
-gdk_device_get_device_tool
-gdk_device_get_caps_lock_state
-gdk_device_get_direction
-gdk_device_get_modifier_state
-gdk_device_get_num_lock_state
-gdk_device_get_scroll_lock_state
-gdk_device_has_bidi_layouts
-
-
-gdk_device_get_surface_at_position
-GdkTimeCoord
-
-
-gdk_device_tool_get_serial
-gdk_device_tool_get_tool_type
-gdk_device_tool_get_hardware_id
-gdk_device_tool_get_axes
-
-
-GDK_TYPE_AXIS_FLAGS
-GDK_TYPE_AXIS_USE
-GDK_TYPE_EXTENSION_MODE
-GDK_TYPE_INPUT_MODE
-GDK_TYPE_INPUT_SOURCE
-GDK_TYPE_DEVICE_TYPE
-GDK_TYPE_GRAB_OWNERSHIP
-GDK_DEVICE
-GDK_DEVICE_CLASS
-GDK_DEVICE_GET_CLASS
-GDK_IS_DEVICE
-GDK_IS_DEVICE_CLASS
-GDK_TYPE_DEVICE
-GDK_DEVICE_TOOL
-GDK_IS_DEVICE_TOOL
-
-
-GdkDeviceClass
-gdk_device_get_type
-gdk_device_type_get_type
-gdk_device_tool_get_type
-gdk_device_tool_new
-GDK_MAX_TIMECOORD_AXES
-
-
-
-GdkDevicePad
-gdkdevicepad
-GdkDevicePad
-GdkDevicePadFeature
-gdk_device_pad_get_n_groups
-gdk_device_pad_get_group_n_modes
-gdk_device_pad_get_n_features
-gdk_device_pad_get_feature_group
-
-
-GDK_TYPE_DEVICE_PAD
-GDK_DEVICE_PAD
-GDK_IS_DEVICE_PAD
-GDK_DEVICE_PAD_GET_IFACE
-
-
-gdk_device_pad_get_type
-
-
-
-GdkSeat
-gdkseat
-GdkSeat
-GdkSeatCapabilities
-gdk_seat_get_display
-gdk_seat_get_capabilities
-gdk_seat_get_pointer
-gdk_seat_get_keyboard
-gdk_seat_get_devices
-gdk_seat_get_tools
-
-
-GDK_SEAT
-GDK_IS_SEAT
-GDK_TYPE_SEAT
-GDK_TYPE_SEAT_CAPABILITIES
-
-
-gdk_seat_get_type
-gdk_seat_capabilities_get_type
-
-
-
-Events
-events
-GdkEvent
-GdkEventType
-GdkKeymapKey
-GdkKeyMatch
-GdkTouchpadGesturePhase
-GdkScrollDirection
-GdkCrossingMode
-GdkNotifyType
-GDK_CURRENT_TIME
-GDK_PRIORITY_EVENTS
-GDK_PRIORITY_REDRAW
-GDK_EVENT_PROPAGATE
-GDK_EVENT_STOP
-GDK_BUTTON_PRIMARY
-GDK_BUTTON_MIDDLE
-GDK_BUTTON_SECONDARY
-
-
-gdk_event_ref
-gdk_event_unref
-
-
-gdk_event_get_event_type
-gdk_event_get_surface
-gdk_event_get_device
-gdk_event_get_device_tool
-gdk_event_get_time
-gdk_event_get_display
-gdk_event_get_seat
-GdkEventSequence
-gdk_event_get_event_sequence
-gdk_event_get_modifier_state
-gdk_event_get_position
-gdk_event_get_axes
-gdk_event_get_axis
-gdk_event_get_history
-gdk_event_get_pointer_emulated
-gdk_event_triggers_context_menu
-GdkButtonEvent
-gdk_button_event_get_button
-GdkScrollEvent
-gdk_scroll_event_get_direction
-gdk_scroll_event_get_deltas
-gdk_scroll_event_is_stop
-GdkMotionEvent
-GdkKeyEvent
-gdk_key_event_get_keyval
-gdk_key_event_get_keycode
-gdk_key_event_get_consumed_modifiers
-gdk_key_event_get_layout
-gdk_key_event_get_level
-gdk_key_event_is_modifier
-gdk_key_event_matches
-gdk_key_event_get_match
-GdkFocusEvent
-gdk_focus_event_get_in
-gdk_touch_event_get_emulating_pointer
-GdkCrossingEvent
-gdk_crossing_event_get_mode
-gdk_crossing_event_get_detail
-gdk_crossing_event_get_focus
-GdkGrabBrokenEvent
-gdk_grab_broken_event_get_grab_surface
-gdk_grab_broken_event_get_implicit
-GdkDeleteEvent
-GdkDNDEvent
-gdk_dnd_event_get_drop
-GdkTouchEvent
-GdkTouchpadEvent
-gdk_touchpad_event_get_gesture_phase
-gdk_touchpad_event_get_n_fingers
-gdk_touchpad_event_get_deltas
-gdk_touchpad_event_get_pinch_angle_delta
-gdk_touchpad_event_get_pinch_scale
-GdkPadEvent
-gdk_pad_event_get_axis_value
-gdk_pad_event_get_button
-gdk_pad_event_get_group_mode
-GdkProximityEvent
-
-
-gdk_events_get_angle
-gdk_events_get_center
-gdk_events_get_distance
-
-
-GDK_EVENT
-GDK_TYPE_EVENT
-GDK_TYPE_EVENT_MASK
-GDK_TYPE_EVENT_TYPE
-GDK_TYPE_CROSSING_MODE
-GDK_TYPE_SCROLL_DIRECTION
-GDK_TYPE_NOTIFY_TYPE
-GDK_IS_EVENT
-GDK_IS_EVENT_TYPE
-GDK_TYPE_BUTTON_EVENT
-GDK_TYPE_CROSSING_EVENT
-GDK_TYPE_DELETE_EVENT
-GDK_TYPE_DND_EVENT
-GDK_TYPE_FOCUS_EVENT
-GDK_TYPE_GRAB_BROKEN_EVENT
-GDK_TYPE_KEY_EVENT
-GDK_TYPE_MOTION_EVENT
-GDK_TYPE_PAD_EVENT
-GDK_TYPE_PROXIMITY_EVENT
-GDK_TYPE_SCROLL_EVENT
-GDK_TYPE_TOUCH_EVENT
-GDK_TYPE_TOUCHPAD_EVENT
-
-gdk_event_get_type
-gdk_event_sequence_get_type
-gdk_button_event_get_type
-gdk_crossing_event_get_type
-gdk_delete_event_get_type
-gdk_dnd_event_get_type
-gdk_focus_event_get_type
-gdk_grab_broken_event_get_type
-gdk_key_event_get_type
-gdk_motion_event_get_type
-gdk_pad_event_get_type
-gdk_proximity_event_get_type
-gdk_scroll_event_get_type
-gdk_touch_event_get_type
-gdk_touchpad_event_get_type
-
-
-
-gdkpaintable
-GdkPaintable
-GdkPaintable
-GdkPaintableInterface
-GdkPaintableFlags
-gdk_paintable_get_current_image
-gdk_paintable_snapshot
-gdk_paintable_get_flags
-gdk_paintable_get_intrinsic_width
-gdk_paintable_get_intrinsic_height
-gdk_paintable_get_intrinsic_aspect_ratio
-gdk_paintable_compute_concrete_size
-
-
-gdk_paintable_invalidate_contents
-gdk_paintable_invalidate_size
-gdk_paintable_new_empty
-
-
-GdkSnapshot
-
-
-GDK_SNAPSHOT
-GDK_TYPE_PAINTABLE
-GDK_TYPE_SNAPSHOT
-GDK_IS_SNAPSHOT
-
-
-GdkSnapshotClass
-gdk_paintable_get_type
-gdk_snapshot_get_type
-
-
-
-
-gdkpopuplayout
-GdkPopupLayout
-GdkPopupLayout
-GdkAnchorHints
-gdk_popup_layout_new
-gdk_popup_layout_ref
-gdk_popup_layout_unref
-gdk_popup_layout_copy
-gdk_popup_layout_equal
-gdk_popup_layout_set_anchor_rect
-gdk_popup_layout_get_anchor_rect
-gdk_popup_layout_set_rect_anchor
-gdk_popup_layout_get_rect_anchor
-gdk_popup_layout_set_surface_anchor
-gdk_popup_layout_get_surface_anchor
-gdk_popup_layout_set_anchor_hints
-gdk_popup_layout_get_anchor_hints
-gdk_popup_layout_set_offset
-gdk_popup_layout_get_offset
-gdk_popup_layout_set_shadow_width
-gdk_popup_layout_get_shadow_width
-
-GDK_TYPE_POPUP_LAYOUT
-gdk_popup_layout_get_type
-
-
-
-gdkpopup
-GdkPopup
-GdkPopup
-gdk_popup_present
-gdk_popup_get_surface_anchor
-gdk_popup_get_rect_anchor
-gdk_popup_get_parent
-gdk_popup_get_position_x
-gdk_popup_get_position_y
-gdk_popup_get_autohide
-
-GDK_TYPE_POPUP
-
-
-
-gdktoplevellayout
-GdkToplevelLayout
-GdkToplevelLayout
-gdk_toplevel_layout_new
-gdk_toplevel_layout_ref
-gdk_toplevel_layout_unref
-gdk_toplevel_layout_copy
-gdk_toplevel_layout_equal
-gdk_toplevel_layout_set_maximized
-gdk_toplevel_layout_get_maximized
-gdk_toplevel_layout_set_fullscreen
-gdk_toplevel_layout_get_fullscreen
-gdk_toplevel_layout_get_fullscreen_monitor
-gdk_toplevel_layout_set_resizable
-gdk_toplevel_layout_get_resizable
-
-GDK_TYPE_TOPLEVEL_LAYOUT
-gdk_toplevel_layout_get_type
-
-
-
-gdktoplevelsize
-GdkToplevelSize
-GdkToplevelSize
-gdk_toplevel_size_get_bounds
-gdk_toplevel_size_set_size
-gdk_toplevel_size_set_min_size
-gdk_toplevel_size_set_shadow_width
-
-GDK_TYPE_TOPLEVEL_SIZE
-gdk_toplevel_size_get_type
-
-
-
-gdktoplevel
-GdkToplevel
-GdkToplevel
-GdkToplevelState
-GdkFullscreenMode
-GdkSurfaceEdge
-gdk_toplevel_present
-gdk_toplevel_minimize
-gdk_toplevel_lower
-gdk_toplevel_focus
-gdk_toplevel_get_state
-gdk_toplevel_set_title
-gdk_toplevel_set_startup_id
-gdk_toplevel_set_transient_for
-gdk_toplevel_set_modal
-gdk_toplevel_set_icon_list
-gdk_toplevel_show_window_menu
-gdk_toplevel_set_decorated
-gdk_toplevel_set_deletable
-gdk_toplevel_supports_edge_constraints
-gdk_toplevel_inhibit_system_shortcuts
-gdk_toplevel_restore_system_shortcuts
-gdk_toplevel_begin_resize
-gdk_toplevel_begin_move
-
-GDK_TYPE_TOPLEVEL
-gdk_toplevel_get_type
-
-
-
-Textures
-textures
-GdkTexture
-GdkMemoryTexture
-GdkGLTexture
-gdk_texture_new_for_pixbuf
-gdk_texture_new_from_resource
-gdk_texture_new_from_file
-gdk_texture_get_width
-gdk_texture_get_height
-gdk_texture_download
-gdk_texture_save_to_png
-GdkMemoryFormat
-GDK_MEMORY_DEFAULT
-gdk_memory_texture_new
-gdk_gl_texture_new
-gdk_gl_texture_release
-
-
-GdkTextureClass
-gdk_texture_get_type
-GDK_TYPE_TEXTURE
-GDK_IS_TEXTURE
-GDK_TEXTURE
-GdkGLTextureClass
-gdk_gl_texture_get_type
-GDK_TYPE_GL_TEXTURE
-GDK_IS_GL_TEXTURE
-GDK_GL_TEXTURE
-GdkMemoryTextureClass
-gdk_memory_texture_get_type
-GDK_TYPE_MEMORY_TEXTURE
-GDK_IS_MEMORY_TEXTURE
-GDK_MEMORY_TEXTURE
-
-
-
-Cursors
-cursors
-GdkCursor
-gdk_cursor_new_from_texture
-gdk_cursor_new_from_name
-gdk_cursor_get_fallback
-gdk_cursor_get_name
-gdk_cursor_get_texture
-gdk_cursor_get_hotspot_x
-gdk_cursor_get_hotspot_y
-
-
-GDK_TYPE_CURSOR
-GDK_CURSOR
-GDK_IS_CURSOR
-
-
-gdk_cursor_get_type
-
-
-
-
-Drag and Drop
-dnd
-GdkDrag
-GdkDrop
-GdkDragCancelReason
-gdk_drag_drop_done
-gdk_drag_begin
-GdkDragAction
-GDK_ACTION_ALL
-
-gdk_drag_get_display
-gdk_drag_get_content
-gdk_drag_get_actions
-gdk_drag_get_selected_action
-gdk_drag_get_formats
-gdk_drag_get_device
-gdk_drag_get_surface
-gdk_drag_get_drag_surface
-gdk_drag_set_hotspot
-
-
-gdk_drag_action_is_unique
-
-
-GdkDragSurface
-GdkDragSurfaceInterface
-gdk_drag_surface_present
-
-
-gdk_drop_get_display
-gdk_drop_get_device
-gdk_drop_get_surface
-gdk_drop_get_formats
-gdk_drop_get_actions
-gdk_drop_get_drag
-gdk_drop_status
-gdk_drop_finish
-gdk_drop_read_async
-gdk_drop_read_finish
-gdk_drop_read_value_async
-gdk_drop_read_value_finish
-
-
-GDK_DRAG
-GDK_TYPE_DRAG
-GDK_IS_DRAG
-GDK_DRAG_CLASS
-GDK_DRAG_GET_CLASS
-GDK_IS_DRAG_CLASS
-GDK_TYPE_DRAG_ACTION
-GDK_TYPE_DRAG_PROTOCOL
-GDK_TYPE_DROP
-GDK_DROP
-GDK_IS_DROP
-GDK_TYPE_DRAG_SURFACE
-
-
-GdkDragClass
-gdk_drag_get_type
-GdkDropClass
-gdk_drop_get_type
-
-
-
-x_interaction
-GDK_SURFACE_XID
-GDK_DISPLAY_XDISPLAY
-GDK_POINTER_TO_XID
-GDK_XID_TO_POINTER
-gdk_x11_lookup_xdisplay
-gdk_x11_get_server_time
-gdk_x11_device_get_id
-gdk_x11_device_manager_lookup
-gdk_x11_display_open
-gdk_x11_display_set_program_class
-gdk_x11_display_get_user_time
-gdk_x11_display_broadcast_startup_message
-gdk_x11_display_get_startup_notification_id
-gdk_x11_display_set_startup_notification_id
-gdk_x11_display_get_xdisplay
-gdk_x11_display_get_xscreen
-gdk_x11_display_get_xrootwindow
-gdk_x11_display_get_xcursor
-gdk_x11_display_grab
-gdk_x11_display_ungrab
-gdk_x11_display_get_default_group
-gdk_x11_display_error_trap_push
-gdk_x11_display_error_trap_pop
-gdk_x11_display_error_trap_pop_ignored
-gdk_x11_display_set_cursor_theme
-gdk_x11_display_set_surface_scale
-gdk_x11_display_get_glx_version
-gdk_x11_display_get_primary_monitor
-gdk_x11_display_get_screen
-gdk_x11_monitor_get_output
-gdk_x11_monitor_get_workarea
-gdk_x11_screen_get_screen_number
-gdk_x11_screen_get_xscreen
-gdk_x11_screen_get_window_manager_name
-gdk_x11_screen_get_monitor_output
-gdk_x11_screen_supports_net_wm_hint
-gdk_x11_screen_get_number_of_desktops
-gdk_x11_screen_get_current_desktop
-gdk_x11_surface_lookup_for_display
-gdk_x11_surface_get_xid
-gdk_x11_surface_set_theme_variant
-gdk_x11_surface_set_user_time
-gdk_x11_surface_move_to_current_desktop
-gdk_x11_surface_move_to_desktop
-gdk_x11_surface_get_desktop
-gdk_x11_surface_set_utf8_property
-gdk_x11_surface_set_frame_sync_enabled
-gdk_x11_surface_set_group
-gdk_x11_surface_get_group
-gdk_x11_surface_set_skip_pager_hint
-gdk_x11_surface_set_skip_taskbar_hint
-gdk_x11_surface_set_urgency_hint
-gdk_x11_get_xatom_by_name_for_display
-gdk_x11_get_xatom_name_for_display
-gdk_x11_set_sm_client_id
-gdk_x11_display_text_property_to_text_list
-gdk_x11_free_text_list
-gdk_x11_display_string_to_compound_text
-gdk_x11_display_utf8_to_compound_text
-gdk_x11_free_compound_text
-
-
-GDK_TYPE_X11_APP_LAUNCH_CONTEXT
-GDK_X11_APP_LAUNCH_CONTEXT
-GDK_X11_APP_LAUNCH_CONTEXT_CLASS
-GDK_IS_X11_APP_LAUNCH_CONTEXT
-GDK_IS_X11_APP_LAUNCH_CONTEXT_CLASS
-GDK_X11_APP_LAUNCH_CONTEXT_GET_CLASS
-GDK_TYPE_X11_DEVICE_MANAGER_XI2
-GDK_X11_DEVICE_MANAGER_XI2
-GDK_X11_DEVICE_MANAGER_XI2_CLASS
-GDK_IS_X11_DEVICE_MANAGER_XI2
-GDK_IS_X11_DEVICE_MANAGER_XI2_CLASS
-GDK_X11_DEVICE_MANAGER_XI2_GET_CLASS
-GDK_TYPE_X11_DEVICE_MANAGER_XI
-GDK_X11_DEVICE_MANAGER_XI
-GDK_X11_DEVICE_MANAGER_XI_CLASS
-GDK_IS_X11_DEVICE_MANAGER_XI
-GDK_IS_X11_DEVICE_MANAGER_XI_CLASS
-GDK_X11_DEVICE_MANAGER_XI_GET_CLASS
-GDK_TYPE_X11_DEVICE_XI2
-GDK_X11_DEVICE_XI2
-GDK_X11_DEVICE_XI2_CLASS
-GDK_IS_X11_DEVICE_XI2
-GDK_IS_X11_DEVICE_XI2_CLASS
-GDK_X11_DEVICE_XI2_GET_CLASS
-GDK_TYPE_X11_DEVICE_XI
-GDK_X11_DEVICE_XI
-GDK_X11_DEVICE_XI_CLASS
-GDK_IS_X11_DEVICE_XI
-GDK_IS_X11_DEVICE_XI_CLASS
-GDK_X11_DEVICE_XI_GET_CLASS
-GDK_TYPE_X11_DISPLAY
-GDK_X11_DISPLAY
-GDK_X11_DISPLAY_CLASS
-GDK_IS_X11_DISPLAY
-GDK_IS_X11_DISPLAY_CLASS
-GDK_X11_DISPLAY_GET_CLASS
-GDK_TYPE_X11_DRAG_CONTEXT
-GDK_X11_DRAG_CONTEXT
-GDK_X11_DRAG_CONTEXT_CLASS
-GDK_IS_X11_DRAG_CONTEXT
-GDK_IS_X11_DRAG_CONTEXT_CLASS
-GDK_X11_DRAG_CONTEXT_GET_CLASS
-GDK_TYPE_X11_GL_CONTEXT
-GDK_X11_GL_CONTEXT
-GDK_X11_GL_CONTEXT_CLASS
-GDK_IS_X11_GL_CONTEXT
-GDK_IS_X11_GL_CONTEXT_CLASS
-GDK_TYPE_X11_DRAG
-GDK_X11_DRAG
-GDK_IS_X11_DRAG
-GDK_IS_X11_DRAG_CLASS
-GDK_TYPE_X11_MONITOR
-GDK_X11_MONITOR
-GDK_IS_X11_MONITOR
-GDK_TYPE_X11_SURFACE
-GDK_X11_SURFACE
-GDK_X11_SURFACE_CLASS
-GDK_IS_X11_SURFACE
-GDK_IS_X11_SURFACE_CLASS
-GDK_X11_SURFACE_GET_CLASS
-
-
-gdk_x11_app_launch_context_get_type
-gdk_x11_cursor_get_type
-gdk_x11_device_manager_xi2_get_type
-gdk_x11_device_manager_xi_get_type
-gdk_x11_device_xi2_get_type
-gdk_x11_device_xi_get_type
-gdk_x11_display_get_type
-gdk_x11_display_manager_get_type
-gdk_x11_drag_context_get_type
-gdk_x11_drag_get_type
-gdk_x11_gl_context_get_type
-gdk_x11_monitor_get_type
-gdk_x11_screen_get_type
-gdk_x11_surface_get_type
-gdk_surface_impl_x11_get_type
-
-
-
-wayland_interaction
-
-
-gdk_wayland_display_get_wl_display
-gdk_wayland_display_get_wl_compositor
-gdk_wayland_display_query_registry
-gdk_wayland_display_set_cursor_theme
-gdk_wayland_display_get_startup_notification_id
-gdk_wayland_display_set_startup_notification_id
-
-
-gdk_wayland_seat_get_wl_seat
-gdk_wayland_device_get_wl_seat
-gdk_wayland_device_get_wl_pointer
-gdk_wayland_device_get_wl_keyboard
-gdk_wayland_device_get_node_path
-
-
-gdk_wayland_monitor_get_wl_output
-
-
-gdk_wayland_surface_get_wl_surface
-GdkWaylandToplevelExported
-gdk_wayland_toplevel_export_handle
-gdk_wayland_toplevel_unexport_handle
-gdk_wayland_toplevel_set_transient_for_exported
-gdk_wayland_toplevel_set_application_id
-
-
-GDK_TYPE_WAYLAND_DEVICE
-GDK_WAYLAND_DEVICE
-GDK_WAYLAND_DEVICE_CLASS
-GDK_WAYLAND_DEVICE_GET_CLASS
-GDK_IS_WAYLAND_DEVICE
-GDK_IS_WAYLAND_DEVICE_CLASS
-GDK_TYPE_WAYLAND_DISPLAY
-GDK_WAYLAND_DISPLAY
-GDK_WAYLAND_DISPLAY_CLASS
-GDK_WAYLAND_DISPLAY_GET_CLASS
-GDK_IS_WAYLAND_DISPLAY
-GDK_IS_WAYLAND_DISPLAY_CLASS
-GDK_TYPE_WAYLAND_DISPLAY_MANAGER
-GDK_WAYLAND_DISPLAY_MANAGER
-GDK_WAYLAND_DISPLAY_MANAGER_CLASS
-GDK_WAYLAND_DISPLAY_MANAGER_GET_CLASS
-GDK_IS_WAYLAND_DISPLAY_MANAGER
-GDK_IS_WAYLAND_DISPLAY_MANAGER_CLASS
-GDK_TYPE_WAYLAND_SURFACE
-GDK_WAYLAND_SURFACE
-GDK_WAYLAND_SURFACE_CLASS
-GDK_WAYLAND_SURFACE_GET_CLASS
-GDK_IS_WAYLAND_SURFACE
-GDK_IS_WAYLAND_SURFACE_CLASS
-
-
-gdk_wayland_device_get_type
-gdk_wayland_display_get_type
-gdk_wayland_display_manager_get_type
-gdk_wayland_gl_context_get_type
-gdk_wayland_monitor_get_type
-gdk_wayland_popup_get_type
-gdk_wayland_seat_get_type
-gdk_wayland_surface_get_type
-gdk_wayland_toplevel_get_type
-
-
-
-Application launching
-gdkapplaunchcontext
-GdkAppLaunchContext
-gdk_app_launch_context_get_display
-gdk_app_launch_context_set_desktop
-gdk_app_launch_context_set_timestamp
-gdk_app_launch_context_set_icon
-gdk_app_launch_context_set_icon_name
-
-GDK_APP_LAUNCH_CONTEXT
-GDK_APP_LAUNCH_CONTEXT_CLASS
-GDK_APP_LAUNCH_CONTEXT_GET_CLASS
-GDK_IS_APP_LAUNCH_CONTEXT
-GDK_IS_APP_LAUNCH_CONTEXT_CLASS
-GDK_TYPE_APP_LAUNCH_CONTEXT
-GdkAppLaunchContextClass
-
-gdk_app_launch_context_get_type
-
-
-
-GdkFrameClock
-gdkframeclock
-GdkFrameClock
-gdk_frame_clock_get_frame_time
-GdkFrameClockPhase
-gdk_frame_clock_request_phase
-gdk_frame_clock_begin_updating
-gdk_frame_clock_end_updating
-gdk_frame_clock_get_frame_counter
-gdk_frame_clock_get_history_start
-gdk_frame_clock_get_timings
-gdk_frame_clock_get_current_timings
-gdk_frame_clock_get_refresh_info
-gdk_frame_clock_get_fps
-
-
-GDK_FRAME_CLOCK
-GDK_FRAME_CLOCK_CLASS
-GDK_FRAME_CLOCK_GET_CLASS
-GDK_FRAME_CLOCK_IDLE
-GDK_FRAME_CLOCK_IDLE_CLASS
-GDK_FRAME_CLOCK_IDLE_GET_CLASS
-GDK_IS_FRAME_CLOCK
-GDK_IS_FRAME_CLOCK_CLASS
-GDK_IS_FRAME_CLOCK_IDLE
-GDK_IS_FRAME_CLOCK_IDLE_CLASS
-GdkFrameClockPrivate
-gdk_frame_clock_get_type
-gdk_frame_clock_idle_get_type
-
-
-
-GdkFrameTimings
-gdkframetimings
-GdkFrameTimings
-gdk_frame_timings_ref
-gdk_frame_timings_unref
-gdk_frame_timings_get_frame_counter
-gdk_frame_timings_get_complete
-gdk_frame_timings_get_frame_time
-gdk_frame_timings_get_presentation_time
-gdk_frame_timings_get_refresh_interval
-gdk_frame_timings_get_predicted_presentation_time
-
-gdk_frame_timings_get_type
-
-
-
-gdkdrawcontext
-GdkDrawContext
-gdk_draw_context_get_display
-gdk_draw_context_get_surface
-gdk_draw_context_begin_frame
-gdk_draw_context_end_frame
-gdk_draw_context_is_in_frame
-gdk_draw_context_get_frame_region
-
-
-GDK_DRAW_CONTEXT
-GDK_IS_DRAW_CONTEXT
-GDK_TYPE_DRAW_CONTEXT
-GDK_DRAW_CONTEXT_CLASS
-GDK_DRAW_CONTEXT_GET_CLASS
-GDK_IS_DRAW_CONTEXT_CLASS
-gdk_draw_context_get_type
-
-
-
-gdkglcontext
-GdkGLContext
-gdk_gl_context_get_display
-gdk_gl_context_get_surface
-gdk_gl_context_get_shared_context
-gdk_gl_context_get_version
-
-
-gdk_gl_context_set_required_version
-gdk_gl_context_get_required_version
-gdk_gl_context_set_debug_enabled
-gdk_gl_context_get_debug_enabled
-gdk_gl_context_set_forward_compatible
-gdk_gl_context_get_forward_compatible
-gdk_gl_context_set_use_es
-gdk_gl_context_get_use_es
-gdk_gl_context_is_legacy
-
-
-GdkGLError
-gdk_gl_context_realize
-gdk_gl_context_make_current
-gdk_gl_context_get_current
-gdk_gl_context_clear_current
-
-
-GDK_GL_CONTEXT
-GDK_IS_GL_CONTEXT
-GDK_TYPE_GL_CONTEXT
-GDK_GL_CONTEXT_CLASS
-GDK_GL_CONTEXT_GET_CLASS
-GDK_IS_GL_CONTEXT_CLASS
-gdk_gl_context_get_type
-gdk_gl_error_quark
-GDK_GL_ERROR
-GDK_TYPE_GL_ERROR
-GDK_TYPE_GL_PROFILE
-
-
-
-gdkmonitor
-GdkMonitor
-gdk_monitor_get_display
-gdk_monitor_get_geometry
-gdk_monitor_get_width_mm
-gdk_monitor_get_height_mm
-gdk_monitor_get_manufacturer
-gdk_monitor_get_model
-gdk_monitor_get_connector
-gdk_monitor_get_scale_factor
-gdk_monitor_get_refresh_rate
-GdkSubpixelLayout
-gdk_monitor_get_subpixel_layout
-gdk_monitor_is_valid
-
-
-gdk_monitor_get_type
-GdkMonitorClass
-GDK_TYPE_MONITOR
-GDK_MONITOR
-GDK_IS_MONITOR
-
-
-
-gdkcairocontext
-GdkCairoContext
-gdk_cairo_context_cairo_create
-
-
-GDK_CAIRO_CONTEXT
-GDK_IS_CAIRO_CONTEXT
-GDK_TYPE_CAIRO_CONTEXT
-GDK_CAIRO_ERROR
-gdk_cairo_context_get_type
-
-
-
-gdkvulkancontext
-GdkVulkanContext
-GdkVulkanError
-gdk_vulkan_context_get_device
-gdk_vulkan_context_get_draw_index
-gdk_vulkan_context_get_draw_semaphore
-gdk_vulkan_context_get_image
-gdk_vulkan_context_get_image_format
-gdk_vulkan_context_get_instance
-gdk_vulkan_context_get_n_images
-gdk_vulkan_context_get_physical_device
-gdk_vulkan_context_get_queue
-gdk_vulkan_context_get_queue_family_index
-
-
-GDK_VULKAN_CONTEXT
-GDK_IS_VULKAN_CONTEXT
-GDK_TYPE_VULKAN_CONTEXT
-GDK_RENDERING_VULKAN
-GDK_VULKAN_ERROR
-gdk_vulkan_context_get_type
-gdk_vulkan_error_quark
-gdk_vulkan_strerror
-
-
-
-gdkclipboard
-GdkClipboard
-gdk_clipboard_get_display
-gdk_clipboard_get_formats
-gdk_clipboard_is_local
-gdk_clipboard_get_content
-gdk_clipboard_store_async
-gdk_clipboard_store_finish
-gdk_clipboard_read_async
-gdk_clipboard_read_finish
-gdk_clipboard_read_value_async
-gdk_clipboard_read_value_finish
-gdk_clipboard_read_texture_async
-gdk_clipboard_read_texture_finish
-gdk_clipboard_read_text_async
-gdk_clipboard_read_text_finish
-gdk_clipboard_set_content
-gdk_clipboard_set
-gdk_clipboard_set_valist
-gdk_clipboard_set_value
-gdk_clipboard_set_text
-gdk_clipboard_set_texture
-
-
-GDK_TYPE_CLIPBOARD
-GDK_CLIPBOARD
-GDK_IS_CLIPBOARD
-gdk_clipboard_get_type
-
-
-
-gdkcontentprovider
-GdkContentProvider
-GdkContentProviderClass
-gdk_content_provider_new_for_value
-gdk_content_provider_new_typed
-gdk_content_provider_new_for_bytes
-gdk_content_provider_new_union
-gdk_content_provider_ref_formats
-gdk_content_provider_ref_storable_formats
-gdk_content_provider_content_changed
-gdk_content_provider_write_mime_type_async
-gdk_content_provider_write_mime_type_finish
-gdk_content_provider_get_value
-
-
-GDK_CONTENT_PROVIDER
-GDK_CONTENT_PROVIDER_CLASS
-GDK_CONTENT_PROVIDER_GET_CLASS
-GDK_IS_CONTENT_PROVIDER
-GDK_IS_CONTENT_PROVIDER_CLASS
-gdk_content_provider_get_type
-
-
-
-gdkcontentserializer
-GdkContentSerializer
-GdkContentSerializeFunc
-gdk_content_serializer_get_mime_type
-gdk_content_serializer_get_gtype
-gdk_content_serializer_get_value
-gdk_content_serializer_get_output_stream
-gdk_content_serializer_get_priority
-gdk_content_serializer_get_cancellable
-gdk_content_serializer_get_user_data
-gdk_content_serializer_set_task_data
-gdk_content_serializer_get_task_data
-gdk_content_serializer_return_success
-gdk_content_serializer_return_error
-
-
-gdk_content_register_serializer
-gdk_content_serialize_async
-gdk_content_serialize_finish
-
-
-GDK_TYPE_CONTENT_SERIALIZER
-GDK_CONTENT_SERIALIZER
-GDK_IS_CONTENT_SERIALIZER
-gdk_content_serializer_get_type
-
-
-
-gdkcontentdeserializer
-GdkContentDeserializer
-GdkContentDeserializeFunc
-gdk_content_deserializer_get_mime_type
-gdk_content_deserializer_get_gtype
-gdk_content_deserializer_get_value
-gdk_content_deserializer_get_input_stream
-gdk_content_deserializer_get_priority
-gdk_content_deserializer_get_cancellable
-gdk_content_deserializer_get_user_data
-gdk_content_deserializer_set_task_data
-gdk_content_deserializer_get_task_data
-gdk_content_deserializer_return_success
-gdk_content_deserializer_return_error
-
-
-gdk_content_register_deserializer
-gdk_content_deserialize_async
-gdk_content_deserialize_finish
-
-
-GDK_TYPE_CONTENT_DESERIALIZER
-GDK_CONTENT_DESERIALIZER
-GDK_IS_CONTENT_DESERIALIZER
-gdk_content_deserializer_get_type
-
diff --git a/docs/reference/gdk/gdk4-wayland.toml.in b/docs/reference/gdk/gdk4-wayland.toml.in
new file mode 100644
index 0000000000000000000000000000000000000000..ba47b9dc11903bccf7ee7920f6becd6e0dc63117
--- /dev/null
+++ b/docs/reference/gdk/gdk4-wayland.toml.in
@@ -0,0 +1,23 @@
+[library]
+version = "@version@"
+browse_url = "https://gitlab.gnome.org/GNOME/gtk/"
+repository_url = "https://gitlab.gnome.org/GNOME/gtk.git"
+website_url = "https://www.gtk.org"
+authors = "GTK Development Team"
+logo_url = "gtk-logo.svg"
+license = "GPL-2.1-or-later"
+description = "The GTK toolkit"
+dependencies = [ "GObject-2.0" ]
+devhelp = true
+
+ [dependencies."GObject-2.0"]
+ name = "GObject"
+ description = "The base type system library"
+ docs_url = "https://developer.gnome.org/gobject/stable"
+
+[theme]
+name = "basic"
+show_index_summary = true
+
+[source-location]
+base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/master/"
diff --git a/docs/reference/gdk/gdk4-x11.toml.in b/docs/reference/gdk/gdk4-x11.toml.in
new file mode 100644
index 0000000000000000000000000000000000000000..ba47b9dc11903bccf7ee7920f6becd6e0dc63117
--- /dev/null
+++ b/docs/reference/gdk/gdk4-x11.toml.in
@@ -0,0 +1,23 @@
+[library]
+version = "@version@"
+browse_url = "https://gitlab.gnome.org/GNOME/gtk/"
+repository_url = "https://gitlab.gnome.org/GNOME/gtk.git"
+website_url = "https://www.gtk.org"
+authors = "GTK Development Team"
+logo_url = "gtk-logo.svg"
+license = "GPL-2.1-or-later"
+description = "The GTK toolkit"
+dependencies = [ "GObject-2.0" ]
+devhelp = true
+
+ [dependencies."GObject-2.0"]
+ name = "GObject"
+ description = "The base type system library"
+ docs_url = "https://developer.gnome.org/gobject/stable"
+
+[theme]
+name = "basic"
+show_index_summary = true
+
+[source-location]
+base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/master/"
diff --git a/docs/reference/gdk/gdk4.toml.in b/docs/reference/gdk/gdk4.toml.in
new file mode 100644
index 0000000000000000000000000000000000000000..f720744f9f4fde5ddcfde80bec1960c26099382a
--- /dev/null
+++ b/docs/reference/gdk/gdk4.toml.in
@@ -0,0 +1,97 @@
+[library]
+version = "@version@"
+browse_url = "https://gitlab.gnome.org/GNOME/gtk/"
+repository_url = "https://gitlab.gnome.org/GNOME/gtk.git"
+website_url = "https://www.gtk.org"
+authors = "GTK Development Team"
+logo_url = "gtk-logo.svg"
+license = "GPL-2.1-or-later"
+description = "The GTK toolkit"
+dependencies = [ "GObject-2.0", "cairo-1.0", "Pango-1.0", "GdkWayland-4.0", "GdkX11-4.0" ]
+devhelp = true
+search_index = true
+
+ [dependencies."GObject-2.0"]
+ name = "GObject"
+ description = "The base type system library"
+ docs_url = "https://developer.gnome.org/gobject/stable"
+
+ [dependencies."cairo-1.0"]
+ name = "Cairo"
+ description = "A 2D graphics library with support for multiple output devices"
+ docs_url = "https://www.cairographics.org/manual/"
+
+ [dependencies."Pango-1.0"]
+ name = "Pango"
+ description = "Text shaping and rendering"
+ docs_url = "https://developer.gnome.org/pango/stable"
+
+ [dependencies."GdkWayland-4.0"]
+ name = "GdkWayland"
+ description = "GDK Wayland Backend"
+ docs_url = "https://developer.gnome.org/gtk4/stable" # fixme
+
+ [dependencies."GdkX11-4.0"]
+ name = "GdkX11"
+ description = "GDK X11 Backend"
+ docs_url = "https://developer.gnome.org/gtk4/stable" # fixme
+
+[theme]
+name = "basic"
+show_index_summary = true
+show_class_hierarchy = true
+
+[source-location]
+base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/master/"
+
+[extra]
+content_files = [
+ "keys.md",
+ "cairo.md",
+ "pango.md",
+ "wayland.md",
+ "x11.md",
+ "macos.md",
+]
+content_images = [
+ "images/gtk-logo.svg",
+ "images/rotated-text.png",
+ "images/default_cursor.png",
+ "images/help_cursor.png",
+ "images/pointer_cursor.png",
+ "images/context_menu_cursor.png",
+ "images/progress_cursor.png",
+ "images/wait_cursor.png",
+ "images/cell_cursor.png",
+ "images/crosshair_cursor.png",
+ "images/text_cursor.png",
+ "images/vertical_text_cursor.png",
+ "images/alias_cursor.png",
+ "images/copy_cursor.png",
+ "images/no_drop_cursor.png",
+ "images/move_cursor.png",
+ "images/not_allowed_cursor.png",
+ "images/grab_cursor.png",
+ "images/grabbing_cursor.png",
+ "images/all_scroll_cursor.png",
+ "images/col_resize_cursor.png",
+ "images/row_resize_cursor.png",
+ "images/n_resize_cursor.png",
+ "images/e_resize_cursor.png",
+ "images/s_resize_cursor.png",
+ "images/w_resize_cursor.png",
+ "images/ne_resize_cursor.png",
+ "images/nw_resize_cursor.png",
+ "images/sw_resize_cursor.png",
+ "images/se_resize_cursor.png",
+ "images/ew_resize_cursor.png",
+ "images/ns_resize_cursor.png",
+ "images/nesw_resize_cursor.png",
+ "images/nwse_resize_cursor.png",
+ "images/zoom_in_cursor.png",
+ "images/zoom_out_cursor.png",
+ "images/popup-anchors.png",
+ "images/popup-flip.png",
+ "images/popup-slide.png",
+]
+urlmap_file = "urlmap.js"
diff --git a/docs/reference/gdk/gdk4.types b/docs/reference/gdk/gdk4.types
deleted file mode 100644
index 3127e63a5c2a4fe814f223c62e2c1bd92b47f9c7..0000000000000000000000000000000000000000
--- a/docs/reference/gdk/gdk4.types
+++ /dev/null
@@ -1,32 +0,0 @@
-gdk_app_launch_context_get_type
-gdk_clipboard_get_type
-gdk_content_deserializer_get_type
-gdk_content_formats_get_type
-gdk_content_provider_get_type
-gdk_content_serializer_get_type
-gdk_cursor_get_type
-gdk_device_get_type
-gdk_device_pad_get_type
-gdk_device_tool_get_type
-gdk_display_get_type
-gdk_display_manager_get_type
-gdk_drag_get_type
-gdk_drag_surface_get_type
-gdk_drop_get_type
-gdk_event_get_type
-gdk_frame_clock_get_type
-gdk_gl_context_get_type
-gdk_gl_texture_get_type
-gdk_memory_texture_get_type
-gdk_monitor_get_type
-gdk_paintable_get_type
-gdk_popup_get_type
-gdk_popup_layout_get_type
-gdk_rgba_get_type
-gdk_seat_get_type
-gdk_snapshot_get_type
-gdk_surface_get_type
-gdk_texture_get_type
-gdk_toplevel_get_type
-gdk_toplevel_layout_get_type
-gdk_vulkan_context_get_type
diff --git a/docs/reference/gdk/general.md b/docs/reference/gdk/general.md
new file mode 100644
index 0000000000000000000000000000000000000000..6e8243b6ccc0c49d1c951bbcc318e1e74d8ca6ee
--- /dev/null
+++ b/docs/reference/gdk/general.md
@@ -0,0 +1,16 @@
+Title: Library initialization and versioning
+
+The GDK and GTK headers annotate deprecated APIs in a way that produces
+compiler warnings if these deprecated APIs are used. The warnings
+can be turned off by defining the macro `GDK_DISABLE_DEPRECATION_WARNINGS`
+before including the `gdk.h` header.
+
+GDK and GTK also provide support for building applications against defined
+subsets of deprecated or new APIs. You can define the macro
+`GDK_VERSION_MIN_REQUIRED` to specify up to what version you want to receive
+warnings about deprecated APIs; and the macro `GDK_VERSION_MAX_ALLOWED` to
+specify the newest version whose API you want to use. If you attempt to use
+a function deprecated before the version of GTK specified in
+`GDK_VERSION_MIN_REQUIRED`, or a function introduced after the version of
+GTK specified in `GDK_VERSION_MAX_ALLOWED`, the compiler will warn you when
+building your code.
diff --git a/docs/reference/gdk/images/gtk-logo.svg b/docs/reference/gdk/images/gtk-logo.svg
new file mode 100644
index 0000000000000000000000000000000000000000..9edbe2da97d767814b289ffea337fc9034653d73
--- /dev/null
+++ b/docs/reference/gdk/images/gtk-logo.svg
@@ -0,0 +1,138 @@
+
+
+
+
diff --git a/docs/reference/gdk/keys.md b/docs/reference/gdk/keys.md
new file mode 100644
index 0000000000000000000000000000000000000000..e44d0e13ce0cdcaa01b38e16e235775431de9a21
--- /dev/null
+++ b/docs/reference/gdk/keys.md
@@ -0,0 +1,113 @@
+Title: Key Values
+
+## Functions for manipulating keyboard codes
+
+Key values are the codes which are sent whenever a key is pressed or released.
+They are included in the data contained in a key press or release #GdkEvent.
+The complete list of key values can be found in the `gdk/gdkkeysyms.h` header
+file.
+
+Key values are regularly updated from the upstream X.org X11 implementation,
+so new values are added regularly. They will be prefixed with GDK_KEY_ rather
+than XF86XK_ or XK_ (for older symbols).
+
+Key values can be converted into a string representation using
+gdk_keyval_name(). The reverse function, converting a string to a key value,
+is provided by gdk_keyval_from_name().
+
+The case of key values can be determined using gdk_keyval_is_upper() and
+gdk_keyval_is_lower(). Key values can be converted to upper or lower case
+using gdk_keyval_to_upper() and gdk_keyval_to_lower().
+
+When it makes sense, key values can be converted to and from
+Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
+
+## Key groups
+
+At the lowest level, physical keys on the keyboard are represented by
+numeric keycodes, and GDK knows how to translate these keycodes into
+key values according to the configured keyboard layout and the current
+state of the keyboard. In the GDK api, the mapping from keycodes to key
+values is available via [`method@Gdk.Display.map_keycode`], and the reverse
+mapping is available via [`method@Gdk.Display.map_keyval`]. The results of
+these functions are returned in [struct@Gdk.KeymapKey] structures.
+
+You can think of a [struct@Gdk.KeymapKey] as a representation of a symbol
+printed on a physical keyboard key. That is, it contains three pieces of
+information:
+
+ 1. first, it contains the hardware keycode; this is an identifying number
+ for a physical key
+ 1. second, it contains the “level” of the key. The level indicates which
+ symbol on the key will be used, in a vertical direction. So on a standard
+ US keyboard, the key with the number “1“ on it also has the exclamation
+ point (”!”) character on it. The level indicates whether to use the “1”
+ or the “!” symbol. The letter keys are considered to have a lowercase
+ letter at level 0, and an uppercase letter at level 1, though normally
+ only the uppercase letter is printed on the key
+ 1. third, the #GdkKeymapKey contains a group; groups are not used on
+ standard US keyboards, but are used in many other countries. On a
+ keyboard with groups, there can be 3 or 4 symbols printed on a single
+ key. The group indicates movement in a horizontal direction. Usually
+ groups are used for two different languages. In group 0, a key might
+ have two English characters, and in group 1 it might have two Hebrew
+ characters. The Hebrew characters will be printed on the key next to
+ the English characters.
+
+When GDK creates a key event in order to deliver a key press or release,
+it first converts the current keyboard state into an effective group and
+level. This is done via a set of rules that varies widely according to
+type of keyboard and user configuration. The input to this translation
+consists of the hardware keycode pressed, the active modifiers, and the
+active group. It then applies the appropriate rules, and returns the
+group/level to be used to index the keymap, along with the modifiers
+which did not affect the group and level. i.e. it returns “unconsumed
+modifiers.” The keyboard group may differ from the effective group used
+for lookups because some keys don't have multiple groups - e.g. the
+Enter key is always in group 0 regardless of keyboard state.
+
+The results of the translation, including the keyval, are all included
+in the key event and can be obtained via [class@Gdk.KeyEvent] getters.
+
+### Consumed modifiers
+
+The `consumed_modifiers` in a key event are modifiers that should be masked
+out from @state when comparing this key press to a hot key. For instance,
+on a US keyboard, the `plus` symbol is shifted, so when comparing a key
+press to a `plus` accelerator `` should be masked out.
+
+```c
+// We want to ignore irrelevant modifiers like ScrollLock
+#define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_ALT_MASK)
+state = gdk_event_get_modifier_state (event);
+gdk_keymap_translate_keyboard_state (keymap,
+ gdk_key_event_get_keycode (event),
+ state,
+ gdk_key_event_get_group (event),
+ &keyval, NULL, NULL, &consumed);
+if (keyval == GDK_PLUS &&
+ (state & ~consumed & ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
+ // Control was pressed
+```
+
+An older interpretation of `consumed_modifiers` was that it contained
+all modifiers that might affect the translation of the key;
+this allowed accelerators to be stored with irrelevant consumed
+modifiers, by doing:
+
+```c
+// XXX Don’t do this XXX
+if (keyval == accel_keyval &&
+ (state & ~consumed & ALL_ACCELS_MASK) == (accel_mods & ~consumed))
+ // Accelerator was pressed
+```
+
+However, this did not work if multi-modifier combinations were
+used in the keymap, since, for instance, `` would be
+masked out even if only `` was used in
+the keymap. To support this usage as well as well as possible, all single
+modifier combinations that could affect the key for any combination
+of modifiers will be returned in `consumed_modifiers`; multi-modifier
+combinations are returned only when actually found in `state`. When
+you store accelerators, you should always store them with consumed
+modifiers removed. Store `plus`, not `plus`.
diff --git a/docs/reference/gdk/macos.md b/docs/reference/gdk/macos.md
new file mode 100644
index 0000000000000000000000000000000000000000..1a0429be9dcaf76e9480db51c5ec8730ea2d4ba9
--- /dev/null
+++ b/docs/reference/gdk/macos.md
@@ -0,0 +1,58 @@
+Title: macOS Interaction
+
+## macOS backend-specific functions
+
+The functions in this section are specific to the GDK macOS backend.
+To use them, you need to include the `` header and
+use the macOS-specific pkg-config `gtk4-macos` file to build your
+application.
+
+## Checking for the macOS backend
+
+GDK can be built with support for multiple backends, which means you will
+need to perform both compile time *and* run time checks if you wish to call
+backend-specific API; for instance, the code sample below will guard the
+calls to different backends, and error out on unsupported windowing systems:
+
+```c
+#ifdef GDK_WINDOWING_MACOS
+#include
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+#include
+#endif
+#ifdef GDK_WINDOWING_X11
+#include
+#endif
+
+#ifdef GDK_WINDOWING_MACOS
+ if (GDK_IS_MACOS_DISPLAY (display))
+ {
+ // make macOS-specific calls here
+ }
+ else
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+ if (GTK_IS_WAYLAND_DISPLAY (display))
+ {
+ // make Wayland-specific calls here
+ }
+ else
+#endif
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_DISPLAY (display))
+ {
+ // make X11-specific calls here
+ }
+ else
+#endif
+ g_error ("Unsupported GDK backend");
+```
+
+The compile time check is performed by using the `GDK_WINDOWING_*`
+pre-processor symbols; there is one defined for each windowing system
+backend built into GDK. For Wayland, the symbol is `GDK_WINDOWING_MACOS`.
+
+The run time check is performed by looking at the type of the
+[class@Gdk.Display] object. For Wayland, the display objects will be of type
+`GdkMacosDisplay`.
diff --git a/docs/reference/gdk/meson.build b/docs/reference/gdk/meson.build
index cdd018def9537b416bffe4366606aa96985c2b4c..66b0d150fc0a25e0e0ab829f9335d8135d265890 100644
--- a/docs/reference/gdk/meson.build
+++ b/docs/reference/gdk/meson.build
@@ -1,190 +1,68 @@
-private_headers = [
- 'gdk-autocleanup.h',
- 'gdk-private.h',
- 'gdkapplaunchcontextprivate.h',
- 'gdkcairocontextprivate.h',
- 'gdkcairoprivate.h',
- 'gdkclipboardprivate.h',
- 'gdkcontentformatsprivate.h',
- 'gdkcontentproviderprivate.h',
- 'gdkcursorprivate.h',
- 'gdkdebug.h',
- 'gdkdevicepadprivate.h',
- 'gdkdeviceprivate.h',
- 'gdkdevicetoolprivate.h',
- 'gdkdisplaymanagerprivate.h',
- 'gdkdisplayprivate.h',
- 'gdkdndprivate.h',
- 'gdkdragprivate.h',
- 'gdkdragsurfaceprivate.h',
- 'gdkdrawcontextprivate.h',
- 'gdkdropprivate.h',
- 'gdkeventsprivate.h',
- 'gdkframeclockidleprivate.h',
- 'gdkframeclockprivate.h',
- 'gdkglcontextprivate.h',
- 'gdkgltextureprivate.h',
- 'gdkinternals.h',
- 'gdkintl.h',
- 'gdkkeysprivate.h',
- 'gdkkeysyms.h',
- 'gdkmarshalers.h',
- 'gdkmemorytextureprivate.h',
- 'gdkmonitorprivate.h',
- 'gdkpipeiostreamprivate.h',
- 'gdkpopupprivate.h',
- 'gdkprofilerprivate.h',
- 'gdkrgbaprivate.h',
- 'gdkscreenprivate.h',
- 'gdkseatdefaultprivate.h',
- 'gdkseatprivate.h',
- 'gdksnapshotprivate.h',
- 'gdksurfaceimpl.h',
- 'gdksurfaceprivate.h',
- 'gdktextureprivate.h',
- 'gdktoplevelprivate.h',
- 'gdktoplevelsizeprivate.h',
- 'gdkvulkancontextprivate.h',
-
- 'filetransferportalprivate.h',
- 'gdkconstructor.h',
- 'keyname-table.h',
-
- # gdk/x11
- 'gdkasync.h',
- 'gdkcairocontext-x11.h',
- 'gdkclipboard-x11.h',
- 'gdkdevice-xi2-private.h',
- 'gdkdevicemanagerprivate-core.h',
- 'gdkdisplay-x11.h',
- 'gdkeventsource.h',
- 'gdkeventtranslator.h',
- 'gdkglcontext-x11.h',
- 'gdkkeys-x11.h',
- 'gdkmonitor-x11.h',
- 'gdkprivate-x11.h',
- 'gdkscreen-x11.h',
- 'gdkselectioninputstream-x11.h',
- 'gdkselectionoutputstream-x11.h',
- 'gdksurface-x11.h',
- 'gdktextlistconverter-x11.h',
- 'gdkvisual-x11.h',
- 'gdkvulkancontext-x11.h',
- 'gdkx-autocleanups.h',
- 'MwmUtil.h',
- 'xsettings-client.h',
-
- # gdk/wayland
- 'gdkcairocontext-wayland.h',
- 'gdkclipboard-wayland.h',
- 'gdkdevice-wayland-private.h',
- 'gdkdisplay-wayland.h',
- 'gdkglcontext-wayland.h',
- 'gdkmonitor-wayland.h',
- 'gdkprimary-wayland.h',
- 'gdkprivate-wayland.h',
- 'gdkseat-wayland.h',
- 'gdksurface-wayland.h',
- 'gdkvulkancontext-wayland.h',
- 'wm-button-layout-translation.h',
- 'gtk-primary-selection-client-protocol.h',
- 'gtk-shell-client-protocol.h',
- 'idle-inhibit-unstable-v1-client-protocol.h',
- 'keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h',
- 'pointer-gestures-unstable-v1-client-protocol.h',
- 'primary-selection-unstable-v1-client-protocol.h',
- 'server-decoration-client-protocol.h',
- 'tablet-unstable-v2-client-protocol.h',
- 'xdg-foreign-unstable-v1-client-protocol.h',
- 'xdg-shell-unstable-v6-client-protocol.h',
- 'xdg-output-unstable-v1-client-protocol.h',
- 'xdg-shell-client-protocol.h',
- 'xdg-shell-unstable-v6-client-protocol.h',
- 'wayland-cursor.h',
- 'os-compatibility.h',
- 'xcursor.h',
-
- 'broadway',
- 'wayland/cursor',
- 'macos',
- 'win32',
+expand_content_md_files = [
]
-images = [
- 'images/rotated-text.png',
- 'images/default_cursor.png',
- 'images/help_cursor.png',
- 'images/pointer_cursor.png',
- 'images/context_menu_cursor.png',
- 'images/progress_cursor.png',
- 'images/wait_cursor.png',
- 'images/cell_cursor.png',
- 'images/crosshair_cursor.png',
- 'images/text_cursor.png',
- 'images/vertical_text_cursor.png',
- 'images/alias_cursor.png',
- 'images/copy_cursor.png',
- 'images/no_drop_cursor.png',
- 'images/move_cursor.png',
- 'images/not_allowed_cursor.png',
- 'images/grab_cursor.png',
- 'images/grabbing_cursor.png',
- 'images/all_scroll_cursor.png',
- 'images/col_resize_cursor.png',
- 'images/row_resize_cursor.png',
- 'images/n_resize_cursor.png',
- 'images/e_resize_cursor.png',
- 'images/s_resize_cursor.png',
- 'images/w_resize_cursor.png',
- 'images/ne_resize_cursor.png',
- 'images/nw_resize_cursor.png',
- 'images/sw_resize_cursor.png',
- 'images/se_resize_cursor.png',
- 'images/ew_resize_cursor.png',
- 'images/ns_resize_cursor.png',
- 'images/nesw_resize_cursor.png',
- 'images/nwse_resize_cursor.png',
- 'images/zoom_in_cursor.png',
- 'images/zoom_out_cursor.png',
- 'images/popup-anchors.png',
- 'images/popup-flip.png',
- 'images/popup-slide.png',
-]
-
-src_dir = [ gdkinc ]
-
-if x11_enabled
- src_dir += [ gdkx11_inc ]
-endif
-
-if wayland_enabled
- src_dir += [ gdkwayland_inc ]
-endif
+gdk4_toml = configure_file(input: 'gdk4.toml.in', output: 'gdk4.toml', configuration: toml_conf)
+gdk4x11_toml = configure_file(input: 'gdk4-x11.toml.in', output: 'gdk4-x11.toml', configuration: toml_conf)
+gdk4wayland_toml = configure_file(input: 'gdk4-wayland.toml.in', output: 'gdk4-wayland.toml', configuration: toml_conf)
if get_option('gtk_doc')
- configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
-
- gnome.gtkdoc('gdk4',
- mode: 'none',
- main_xml: 'gdk4-docs.xml',
- src_dir: src_dir,
- dependencies: libgtk_dep,
- gobject_typesfile: join_paths(meson.current_source_dir(), 'gdk4.types'),
- scan_args: [
- '--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
- '--ignore-headers=' + ' '.join(private_headers),
- ],
- mkdb_args: [
- '--ignore-files=' + ' '.join(private_headers),
+ custom_target('gdk4-doc',
+ input: [ gdk4_toml, gdk_gir[0] ],
+ output: 'gdk4',
+ command: [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@',
],
- fixxref_args: [
- '--html-dir=@0@'.format(docpath),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
- '--extra-dir=@0@'.format(cairo_docpath),
- ],
- html_assets: images,
- install: true,
+ depend_files: [ expand_content_md_files ],
+ build_by_default: true,
)
+
+ if x11_enabled
+ custom_target('gdk4-x11-doc',
+ input: [ gdk4x11_toml, gdk_x11_gir[0] ],
+ output: 'gdk4-x11',
+ command: [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@',
+ ],
+ depends: [ gdk_gir[0] ],
+ depend_files: [ ],
+ build_by_default: true,
+ )
+ endif
+
+ if wayland_enabled
+ custom_target('gdk4-wayland-doc',
+ input: [ gdk4wayland_toml, gdk_wayland_gir[0] ],
+ output: 'gdk4-wayland',
+ command: [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@',
+ ],
+ depends: [ gdk_gir[0] ],
+ depend_files: [ ],
+ build_by_default: true,
+ )
+ endif
endif
diff --git a/docs/reference/gdk/pango.md b/docs/reference/gdk/pango.md
new file mode 100644
index 0000000000000000000000000000000000000000..98ada407809e264a1a97bc5eb356243c92c0d04c
--- /dev/null
+++ b/docs/reference/gdk/pango.md
@@ -0,0 +1,94 @@
+ Title: Pango Interaction
+
+Pango is the text layout system used by GDK and GTK. The functions
+and types in this section are used to obtain clip regions for
+`PangoLayout`s, and to get `PangoContext`s that can be used with
+GDK.
+
+## Using Pango in GDK
+
+Creating a `PangoLayout` object is the first step in rendering text,
+and requires getting a handle to a `PangoContext`. For GTK programs,
+you’ll usually want to use [method@Gtk.Widget.get_pango_context], or
+[method@Gtk.Widget.create_pango_layout]. Once you have a `PangoLayout`,
+you can set the text and attributes of it with Pango functions like
+[method@Pango.Layout.set_text] and get its size with
+[method@Pango.Layout.get_size].
+
+*Note*: Pango uses a fixed point system internally, so converting
+between Pango units and pixels using `PANGO_SCALE` or the `PANGO_PIXELS()`
+macro.
+
+Rendering a Pango layout is done most simply with [func@PangoCairo.show_layout];
+you can also draw pieces of the layout with [func@PangoCairo.show_layout_line].
+
+### Draw transformed text with Pango and cairo
+
+```c
+#define RADIUS 100
+#define N_WORDS 10
+#define FONT "Sans Bold 18"
+
+PangoContext *context;
+PangoLayout *layout;
+PangoFontDescription *desc;
+
+double radius;
+int width, height;
+int i;
+
+// Set up a transformation matrix so that the user space coordinates for
+// where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
+// We first center, then change the scale
+
+width = gdk_surface_get_width (surface);
+height = gdk_surface_get_height (surface);
+radius = MIN (width, height) / 2.;
+
+cairo_translate (cr,
+ radius + (width - 2 * radius) / 2,
+ radius + (height - 2 * radius) / 2);
+ cairo_scale (cr, radius / RADIUS, radius / RADIUS);
+
+// Create a PangoLayout, set the font and text
+context = gdk_pango_context_get_for_display (display);
+layout = pango_layout_new (context);
+pango_layout_set_text (layout, "Text", -1);
+desc = pango_font_description_from_string (FONT);
+pango_layout_set_font_description (layout, desc);
+pango_font_description_free (desc);
+
+// Draw the layout N_WORDS times in a circle
+for (i = 0; i < N_WORDS; i++)
+ {
+ double red, green, blue;
+ double angle = 2 * G_PI * i / n_words;
+
+ cairo_save (cr);
+
+ // Gradient from red at angle == 60 to blue at angle == 300
+ red = (1 + cos (angle - 60)) / 2;
+ green = 0;
+ blue = 1 - red;
+
+ cairo_set_source_rgb (cr, red, green, blue);
+ cairo_rotate (cr, angle);
+
+ // Inform Pango to re-layout the text with the new transformation matrix
+ pango_cairo_update_layout (cr, layout);
+
+ pango_layout_get_size (layout, &width, &height);
+
+ cairo_move_to (cr, - width / 2 / PANGO_SCALE, - DEFAULT_TEXT_RADIUS);
+ pango_cairo_show_layout (cr, layout);
+
+ cairo_restore (cr);
+ }
+
+g_object_unref (layout);
+g_object_unref (context);
+```
+
+The example code above will yield the following result:
+
+
diff --git a/docs/reference/gdk/urlmap.js b/docs/reference/gdk/urlmap.js
new file mode 100644
index 0000000000000000000000000000000000000000..eaf2de9886ce7c2b07624c98fefe7f4ea7756d8f
--- /dev/null
+++ b/docs/reference/gdk/urlmap.js
@@ -0,0 +1,13 @@
+// SPDX-FileCopyrightText: 2021 GNOME Foundation
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+// A map between namespaces and base URLs for their online documentation
+baseURLs = [
+ [ 'Gdk', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4/' ],
+ [ 'GdkWayland', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-wayland/' ],
+ [ 'GdkX11', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-x11/' ],
+ [ 'Gsk', 'https://gnome.pages.gitlab.gnome.org/gtk/gsk4/' ],
+ [ 'Gtk', 'https://gnome.pages.gitlab.gnome.org/gtk/gtk4/' ],
+ [ 'Pango', 'https://gnome.pages/gitlab.gnome.org/pango/pango/' ],
+ [ 'PangoCairo', 'https://gnome.pages.gitlab.gnome.org/pango/pangocairo/' ],
+]
diff --git a/docs/reference/gdk/version.xml.in b/docs/reference/gdk/version.xml.in
deleted file mode 100644
index 3bb59ac105c26591aa3ac4ee9d344185fb263e20..0000000000000000000000000000000000000000
--- a/docs/reference/gdk/version.xml.in
+++ /dev/null
@@ -1 +0,0 @@
-@GTK_VERSION@
diff --git a/docs/reference/gdk/wayland.md b/docs/reference/gdk/wayland.md
new file mode 100644
index 0000000000000000000000000000000000000000..040e96a4e9c68e68719826a5b907f277352cf919
--- /dev/null
+++ b/docs/reference/gdk/wayland.md
@@ -0,0 +1,48 @@
+Title: Wayland Interaction
+
+## Wayland backend-specific functions
+
+The functions in this section are specific to the GDK Wayland backend.
+To use them, you need to include the `` header and
+use the Wayland-specific pkg-config `gtk4-wayland` file to build your
+application.
+
+## Checking for the Wayland backend
+
+GDK can be built with support for multiple backends, which means you will
+need to perform both compile time *and* run time checks if you wish to call
+backend-specific API; for instance, the code sample below will guard the
+calls to different backends, and error out on unsupported windowing systems:
+
+```c
+#ifdef GDK_WINDOWING_WAYLAND
+#include
+#endif
+#ifdef GDK_WINDOWING_X11
+#include
+#endif
+
+#ifdef GDK_WINDOWING_WAYLAND
+ if (GTK_IS_WAYLAND_DISPLAY (display))
+ {
+ // make Wayland-specific calls here
+ }
+ else
+#endif
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_DISPLAY (display))
+ {
+ // make X11-specific calls here
+ }
+ else
+#endif
+ g_error ("Unsupported GDK backend");
+```
+
+The compile time check is performed by using the `GDK_WINDOWING_*`
+pre-processor symbols; there is one defined for each windowing system
+backend built into GDK. For Wayland, the symbol is `GDK_WINDOWING_WAYLAND`.
+
+The run time check is performed by looking at the type of the
+[class@Gdk.Display] object. For Wayland, the display objects will be of type
+`GdkWaylandDisplay`.
diff --git a/docs/reference/gdk/x11.md b/docs/reference/gdk/x11.md
new file mode 100644
index 0000000000000000000000000000000000000000..6602e24b820ba076f60f0a89e9d3c3db2e1b8c75
--- /dev/null
+++ b/docs/reference/gdk/x11.md
@@ -0,0 +1,47 @@
+Title: X Window System Interaction
+
+## X backend-specific functions
+
+The functions in this section are specific to the GDK X11 backend.
+To use them, you need to include the `` header and use
+the X11-specific pkg-config file `gtk4-x11` to build your application.
+
+## Checking for the X11 backend
+
+GDK can be built with support for multiple backends, which means you will
+need to perform both compile time *and* run time checks if you wish to call
+backend-specific API; for instance, the code sample below will guard the
+calls to different backends, and error out on unsupported windowing systems:
+
+```c
+#ifdef GDK_WINDOWING_X11
+#include
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+#include
+#endif
+
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_DISPLAY (display))
+ {
+ // make X11-specific calls here
+ }
+ else
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+ if (GTK_IS_WAYLAND_DISPLAY (display))
+ {
+ // make Wayland-specific calls here
+ }
+ else
+#endif
+ g_error ("Unsupported GDK backend");
+```
+
+The compile time check is performed by using the `GDK_WINDOWING_*`
+pre-processor symbols; there is one defined for each windowing system
+backend built into GDK. For X11, the symbol is `GDK_WINDOWING_X11`.
+
+The run time check is performed by looking at the type of the
+[class@Gdk.Display] object. For X11, the display objects will be of type
+`GdkX11Display`.
diff --git a/docs/reference/gsk/gsk4-docs.xml b/docs/reference/gsk/gsk4-docs.xml
deleted file mode 100644
index 2bfecbf2903a700e6abe0f9dbd902ed6048d392c..0000000000000000000000000000000000000000
--- a/docs/reference/gsk/gsk4-docs.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-]>
-
-
- GSK 4 Reference Manual
-
- This document is for the GSK 4 library, version &version;
- The latest versions can be found online at
- https://developer.gnome.org/gsk4/.
-
-
-
-
- API Reference
-
-
-
-
-
-
-
-
- Index of all symbols
-
-
-
-
-
-
diff --git a/docs/reference/gsk/gsk4-sections.txt b/docs/reference/gsk/gsk4-sections.txt
deleted file mode 100644
index e4a10930ae1ab6ec338be36698c5fbc6c7b0f327..0000000000000000000000000000000000000000
--- a/docs/reference/gsk/gsk4-sections.txt
+++ /dev/null
@@ -1,399 +0,0 @@
-
-GskRenderer
-GskRenderer
-gsk_renderer_get_surface
-gsk_renderer_realize
-gsk_renderer_unrealize
-gsk_renderer_is_realized
-gsk_renderer_render
-gsk_renderer_render_texture
-
-gsk_renderer_new_for_surface
-gsk_gl_renderer_new
-gsk_cairo_renderer_new
-gsk_vulkan_renderer_new
-gsk_broadway_renderer_new
-
-GSK_IS_RENDERER
-GSK_RENDERER
-GSK_TYPE_RENDERER
-GskRendererClass
-gsk_renderer_get_type
-GSK_TYPE_SCALING_FILTER
-GSK_BROADWAY_RENDERER
-GSK_BROADWAY_RENDERER_CLASS
-GSK_BROADWAY_RENDERER_GET_CLASS
-GSK_IS_BROADWAY_RENDERER
-GSK_IS_BROADWAY_RENDERER_CLASS
-GSK_TYPE_BROADWAY_RENDERER
-GskBroadwayRenderer
-GskBroadwayRendererClass
-GSK_CAIRO_RENDERER
-GSK_CAIRO_RENDERER_CLASS
-GSK_CAIRO_RENDERER_GET_CLASS
-GSK_IS_CAIRO_RENDERER
-GSK_IS_CAIRO_RENDERER_CLASS
-GSK_TYPE_CAIRO_RENDERER
-GskCairoRenderer
-GskCairoRendererClass
-GSK_GL_RENDERER
-GSK_GL_RENDERER_CLASS
-GSK_GL_RENDERER_GET_CLASS
-GSK_IS_GL_RENDERER
-GSK_IS_GL_RENDERER_CLASS
-GSK_TYPE_GL_RENDERER
-GskGLRenderer
-GskGLRendererClass
-gsk_gl_renderer_get_type
-GSK_VULKAN_RENDERER
-GSK_VULKAN_RENDERER_CLASS
-GSK_VULKAN_RENDERER_GET_CLASS
-GSK_IS_VULKAN_RENDERER
-GSK_IS_VULKAN_RENDERER_CLASS
-GSK_TYPE_VULKAN_RENDERER
-GskVulkanRenderer
-GskVulkanRendererClass
-gsk_vulkan_renderer_get_type
-
-
-
-GskRenderNode
-GskRenderNode
-GskBlendNode
-GskBlurNode
-GskBorderNode
-GskCairoNode
-GskClipNode
-GskColorMatrixNode
-GskColorNode
-GskConicGradientNode
-GskContainerNode
-GskCrossFadeNode
-GskDebugNode
-GskInsetShadowNode
-GskLinearGradientNode
-GskRadialGradientNode
-GskOpacityNode
-GskOutsetShadowNode
-GskRepeatingLinearGradientNode
-GskRepeatingRadialGradientNode
-GskRepeatNode
-GskRoundedClipNode
-GskShadowNode
-GskTextNode
-GskTextureNode
-GskTransformNode
-GskGLShaderNode
-gsk_render_node_ref
-gsk_render_node_unref
-GskRenderNodeType
-gsk_render_node_get_node_type
-gsk_render_node_draw
-GskSerializationError
-GskParseErrorFunc
-GskParseLocation
-gsk_render_node_serialize
-gsk_render_node_deserialize
-gsk_render_node_write_to_file
-GskScalingFilter
-gsk_render_node_get_bounds
-
-
-gsk_color_node_new
-gsk_color_node_get_color
-gsk_texture_node_new
-gsk_texture_node_get_texture
-
-GskColorStop
-gsk_linear_gradient_node_new
-gsk_repeating_linear_gradient_node_new
-gsk_linear_gradient_node_get_start
-gsk_linear_gradient_node_get_end
-gsk_linear_gradient_node_get_n_color_stops
-gsk_linear_gradient_node_get_color_stops
-
-gsk_radial_gradient_node_new
-gsk_repeating_radial_gradient_node_new
-gsk_radial_gradient_node_get_n_color_stops
-gsk_radial_gradient_node_get_color_stops
-gsk_radial_gradient_node_get_start
-gsk_radial_gradient_node_get_end
-gsk_radial_gradient_node_get_hradius
-gsk_radial_gradient_node_get_vradius
-gsk_radial_gradient_node_get_center
-
-gsk_conic_gradient_node_new
-gsk_conic_gradient_node_get_n_color_stops
-gsk_conic_gradient_node_get_color_stops
-gsk_conic_gradient_node_get_center
-gsk_conic_gradient_node_get_rotation
-
-gsk_border_node_new
-gsk_border_node_get_outline
-gsk_border_node_get_widths
-gsk_border_node_get_colors
-
-gsk_inset_shadow_node_new
-gsk_inset_shadow_node_get_outline
-gsk_inset_shadow_node_get_color
-gsk_inset_shadow_node_get_dx
-gsk_inset_shadow_node_get_dy
-gsk_inset_shadow_node_get_spread
-gsk_inset_shadow_node_get_blur_radius
-
-gsk_outset_shadow_node_new
-gsk_outset_shadow_node_get_outline
-gsk_outset_shadow_node_get_color
-gsk_outset_shadow_node_get_dx
-gsk_outset_shadow_node_get_dy
-gsk_outset_shadow_node_get_spread
-gsk_outset_shadow_node_get_blur_radius
-
-gsk_cairo_node_new
-gsk_cairo_node_get_draw_context
-gsk_cairo_node_get_surface
-
-gsk_container_node_new
-gsk_container_node_get_n_children
-gsk_container_node_get_child
-
-gsk_transform_node_new
-gsk_transform_node_get_child
-gsk_transform_node_get_transform
-
-gsk_opacity_node_new
-gsk_opacity_node_get_child
-gsk_opacity_node_get_opacity
-
-gsk_color_matrix_node_new
-gsk_color_matrix_node_get_child
-gsk_color_matrix_node_get_color_matrix
-gsk_color_matrix_node_get_color_offset
-
-gsk_repeat_node_new
-gsk_repeat_node_get_child
-gsk_repeat_node_get_child_bounds
-
-gsk_clip_node_new
-gsk_clip_node_get_child
-gsk_clip_node_get_clip
-
-gsk_rounded_clip_node_new
-gsk_rounded_clip_node_get_child
-gsk_rounded_clip_node_get_clip
-
-GskShadow
-gsk_shadow_node_new
-gsk_shadow_node_get_shadow
-gsk_shadow_node_get_n_shadows
-gsk_shadow_node_get_child
-
-GskBlendMode
-gsk_blend_node_new
-gsk_blend_node_get_bottom_child
-gsk_blend_node_get_top_child
-gsk_blend_node_get_blend_mode
-
-gsk_cross_fade_node_new
-gsk_cross_fade_node_get_start_child
-gsk_cross_fade_node_get_end_child
-gsk_cross_fade_node_get_progress
-
-gsk_text_node_new
-gsk_text_node_get_font
-gsk_text_node_get_glyphs
-gsk_text_node_get_color
-gsk_text_node_has_color_glyphs
-gsk_text_node_get_num_glyphs
-gsk_text_node_get_offset
-
-gsk_blur_node_new
-gsk_blur_node_get_child
-gsk_blur_node_get_radius
-
-gsk_debug_node_new
-gsk_debug_node_get_child
-gsk_debug_node_get_message
-
-gsk_gl_shader_node_new
-gsk_gl_shader_node_get_n_children
-gsk_gl_shader_node_get_child
-gsk_gl_shader_node_get_args
-gsk_gl_shader_node_get_shader
-
-GSK_IS_RENDER_NODE
-GSK_RENDER_NODE
-GSK_TYPE_RENDER_NODE
-GSK_TYPE_BLEND_NODE
-GSK_TYPE_BLUR_NODE
-GSK_TYPE_BORDER_NODE
-GSK_TYPE_CAIRO_NODE
-GSK_TYPE_CLIP_NODE
-GSK_TYPE_COLOR_MATRIX_NODE
-GSK_TYPE_COLOR_NODE
-GSK_TYPE_CONTAINER_NODE
-GSK_TYPE_CONIC_GRADIENT_NODE
-GSK_TYPE_CROSS_FADE_NODE
-GSK_TYPE_DEBUG_NODE
-GSK_TYPE_GL_SHADER_NODE
-GSK_TYPE_INSET_SHADOW_NODE
-GSK_TYPE_LINEAR_GRADIENT_NODE
-GSK_TYPE_OPACITY_NODE
-GSK_TYPE_OUTSET_SHADOW_NODE
-GSK_TYPE_RADIAL_GRADIENT_NODE
-GSK_TYPE_REPEATING_LINEAR_GRADIENT_NODE
-GSK_TYPE_REPEATING_RADIAL_GRADIENT_NODE
-GSK_TYPE_REPEAT_NODE
-GSK_TYPE_ROUNDED_CLIP_NODE
-GSK_TYPE_SHADOW_NODE
-GSK_TYPE_TEXT_NODE
-GSK_TYPE_TEXTURE_NODE
-GSK_TYPE_TRANSFORM_NODE
-GSK_TYPE_GLSHADER_NODE
-GSK_TYPE_RENDER_NODE_TYPE
-GskRenderNodeClass
-gsk_blend_node_get_type
-gsk_blur_node_get_type
-gsk_border_node_get_type
-gsk_broadway_renderer_get_type
-gsk_cairo_node_get_type
-gsk_cairo_renderer_get_type
-gsk_clip_node_get_type
-gsk_color_matrix_node_get_type
-gsk_color_node_get_type
-gsk_conic_gradient_node_get_type
-gsk_container_node_get_type
-gsk_cross_fade_node_get_type
-gsk_debug_node_get_type
-gsk_gl_shader_node_get_type
-gsk_inset_shadow_node_get_type
-gsk_linear_gradient_node_get_type
-gsk_opacity_node_get_type
-gsk_outset_shadow_node_get_type
-gsk_radial_gradient_node_get_type
-gsk_render_node_get_type
-gsk_repeating_linear_gradient_node_get_type
-gsk_repeating_radial_gradient_node_get_type
-gsk_repeat_node_get_type
-gsk_rounded_clip_node_get_type
-gsk_shadow_node_get_type
-gsk_text_node_get_type
-gsk_texture_node_get_type
-gsk_transform_node_get_type
-GSK_TYPE_BLEND_MODE
-
-gsk_serialization_error_quark
-GSK_SERIALIZATION_ERROR
-GSK_TYPE_SERIALIZATION_ERROR
-
-
-
-GskRoundedRect
-GskCorner
-GskRoundedRect
-GSK_ROUNDED_RECT_INIT
-gsk_rounded_rect_init
-gsk_rounded_rect_init_copy
-gsk_rounded_rect_init_from_rect
-gsk_rounded_rect_normalize
-gsk_rounded_rect_offset
-gsk_rounded_rect_shrink
-gsk_rounded_rect_is_rectilinear
-gsk_rounded_rect_contains_point
-gsk_rounded_rect_contains_rect
-gsk_rounded_rect_intersects_rect
-
-GSK_TYPE_CORNER
-
-
-
-GskTransform
-GskTransform
-gsk_transform_ref
-gsk_transform_unref
-
-GskTransformCategory
-gsk_transform_get_category
-
-gsk_transform_print
-gsk_transform_to_string
-gsk_transform_parse
-
-gsk_transform_to_matrix
-gsk_transform_to_2d
-gsk_transform_to_affine
-gsk_transform_to_translate
-
-gsk_transform_transform
-gsk_transform_invert
-gsk_transform_matrix
-gsk_transform_translate
-gsk_transform_translate_3d
-gsk_transform_rotate
-gsk_transform_rotate_3d
-gsk_transform_scale
-gsk_transform_scale_3d
-gsk_transform_perspective
-
-gsk_transform_equal
-
-gsk_transform_transform_bounds
-gsk_transform_transform_point
-
-GSK_TYPE_TRANSFORM
-GSK_TYPE_TRANSFORM_CATEGORY
-gsk_transform_get_type
-gsk_transform_new
-
-
-
-GskGLShader
-GskGLShader
-gsk_gl_shader_new_from_bytes
-gsk_gl_shader_new_from_resource
-gsk_gl_shader_compile
-gsk_gl_shader_get_source
-gsk_gl_shader_get_resource
-gsk_gl_shader_get_n_textures
-gsk_gl_shader_get_n_uniforms
-gsk_gl_shader_get_uniform_name
-gsk_gl_shader_find_uniform_by_name
-GskGLUniformType
-gsk_gl_shader_get_uniform_type
-gsk_gl_shader_get_uniform_offset
-gsk_gl_shader_get_args_size
-
-
-gsk_gl_shader_get_arg_float
-gsk_gl_shader_get_arg_int
-gsk_gl_shader_get_arg_uint
-gsk_gl_shader_get_arg_bool
-gsk_gl_shader_get_arg_vec2
-gsk_gl_shader_get_arg_vec3
-gsk_gl_shader_get_arg_vec4
-gsk_gl_shader_format_args_va
-gsk_gl_shader_format_args
-
-
-GskShaderArgsBuilder
-
-gsk_shader_args_builder_new
-gsk_shader_args_builder_to_args
-gsk_shader_args_builder_free_to_args
-gsk_shader_args_builder_unref
-gsk_shader_args_builder_ref
-
-gsk_shader_args_builder_set_float
-gsk_shader_args_builder_set_int
-gsk_shader_args_builder_set_uint
-gsk_shader_args_builder_set_bool
-gsk_shader_args_builder_set_vec2
-gsk_shader_args_builder_set_vec3
-gsk_shader_args_builder_set_vec4
-
-
-GSK_TYPE_GL_SHADER
-GSK_TYPE_GL_UNIFORM_TYPE
-GSK_TYPE_SHADER_ARGS_BUILDER
-gsk_shader_args_builder_get_type
-
diff --git a/docs/reference/gsk/gsk4.toml.in b/docs/reference/gsk/gsk4.toml.in
new file mode 100644
index 0000000000000000000000000000000000000000..44d11c9d9b308e9efef48e10c8dccdda43b2c8c7
--- /dev/null
+++ b/docs/reference/gsk/gsk4.toml.in
@@ -0,0 +1,46 @@
+[library]
+version = "@version@"
+browse_url = "https://gitlab.gnome.org/GNOME/gtk/"
+repository_url = "https://gitlab.gnome.org/GNOME/gtk.git"
+website_url = "https://www.gtk.org"
+authors = "GTK Development Team"
+logo_url = "gtk-logo.svg"
+license = "GPL-2.1-or-later"
+description = "The GTK toolkit"
+dependencies = [ "GObject-2.0", "Graphene-1.0", "Pango-1.0", "Gdk-4.0" ]
+devhelp = true
+search_index = true
+
+ [dependencies."GObject-2.0"]
+ name = "GObject"
+ description = "The base type system library"
+ docs_url = "https://developer.gnome.org/gobject/stable"
+
+ [dependencies."Graphene-1.0"]
+ name = "Graphene"
+ description = "A thin layer of mathematical types for 3D libraries"
+ docs_url = "https://ebassi.github.io/graphene/docs"
+
+ [dependencies."Pango-1.0"]
+ name = "Pango"
+ description = "Text shaping and rendering"
+ docs_url = "https://developer.gnome.org/pango/stable"
+
+ [dependencies."Gdk-4.0"]
+ name = "GDK"
+ description = "The GTK windowing system abstraction"
+ docs_url = "../../Gdk/4.0/"
+
+[theme]
+name = "basic"
+show_index_summary = true
+show_class_hierarchy = true
+
+[source-location]
+base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/master/"
+
+[extra]
+content_images = [
+ "gtk-logo.svg",
+]
+urlmap_file = "urlmap.js"
diff --git a/docs/reference/gsk/gsk4.types b/docs/reference/gsk/gsk4.types
deleted file mode 100644
index 94eeabf270f1620a573e115b4bbe8debfed4ac53..0000000000000000000000000000000000000000
--- a/docs/reference/gsk/gsk4.types
+++ /dev/null
@@ -1,3 +0,0 @@
-gsk_render_node_get_type
-gsk_renderer_get_type
-gsk_gl_shader_get_type
diff --git a/docs/reference/gsk/gtk-logo.svg b/docs/reference/gsk/gtk-logo.svg
new file mode 100644
index 0000000000000000000000000000000000000000..9edbe2da97d767814b289ffea337fc9034653d73
--- /dev/null
+++ b/docs/reference/gsk/gtk-logo.svg
@@ -0,0 +1,138 @@
+
+
+
+
diff --git a/docs/reference/gsk/meson.build b/docs/reference/gsk/meson.build
index bf54aa1dcbe0f4230c94747fed8d08eb81260748..1e34799280bab26ee3aeb1cd0bbb88ade7cc92c5 100644
--- a/docs/reference/gsk/meson.build
+++ b/docs/reference/gsk/meson.build
@@ -1,91 +1,22 @@
-private_headers = [
- 'gsk-autocleanup.h',
-
- 'gskcairoblurprivate.h',
- 'gskcairorendererprivate.h',
- 'gskdebugprivate.h',
- 'gskdiffprivate.h',
- 'gskglshaderprivate.h',
- 'gskprivate.h',
- 'gskprofilerprivate.h',
- 'gskrendererprivate.h',
- 'gskrendernodeprivate.h',
- 'gskrendernodeparserprivate.h',
- 'gskroundedrectprivate.h',
- 'gsktransformprivate.h',
-
- # gsk/gl
- 'glutilsprivate.h',
- 'gskgldriverprivate.h',
- 'gskglglyphcacheprivate.h',
- 'gskgliconcacheprivate.h',
- 'gskglimageprivate.h',
- 'gskglnodesampleprivate.h',
- 'gskglprofilerprivate.h',
- 'gskglrendererprivate.h',
- 'gskglrenderopsprivate.h',
- 'gskglshaderbuilderprivate.h',
- 'gskglshadowcacheprivate.h',
- 'gskgltextureatlasprivate.h',
- 'opbuffer.h',
- 'stb_rect_pack.h',
-
- # gsk/vulkan
- 'gskvulkanblendmodepipelineprivate.h',
- 'gskvulkanblurpipelineprivate.h',
- 'gskvulkanborderpipelineprivate.h',
- 'gskvulkanboxshadowpipelineprivate.h',
- 'gskvulkanbufferprivate.h',
- 'gskvulkanclipprivate.h',
- 'gskvulkancolorpipelineprivate.h',
- 'gskvulkancolortextpipelineprivate.h',
- 'gskvulkancommandpoolprivate.h',
- 'gskvulkancrossfadepipelineprivate.h',
- 'gskvulkaneffectpipelineprivate.h',
- 'gskvulkanglyphcacheprivate.h',
- 'gskvulkanimageprivate.h',
- 'gskvulkanlineargradientpipelineprivate.h',
- 'gskvulkanmemoryprivate.h',
- 'gskvulkanpipelineprivate.h',
- 'gskvulkanpushconstantsprivate.h',
- 'gskvulkanrendererprivate.h',
- 'gskvulkanrenderpassprivate.h',
- 'gskvulkanrenderprivate.h',
- 'gskvulkanshaderprivate.h',
- 'gskvulkantextpipelineprivate.h',
- 'gskvulkantexturepipelineprivate.h',
-]
-
-images = [
-]
+gsk4_toml = configure_file(input: 'gsk4.toml.in', output: 'gsk4.toml', configuration: toml_conf)
if get_option('gtk_doc')
- configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
-
- gnome.gtkdoc('gsk4',
- mode: 'none',
- main_xml: 'gsk4-docs.xml',
- src_dir: [
- gskinc,
- ],
- dependencies: libgtk_dep,
- gobject_typesfile: join_paths(meson.current_source_dir(), 'gsk4.types'),
- scan_args: [
- '--ignore-decorators=_GDK_EXTERN',
- '--ignore-headers=' + ' '.join(private_headers),
- ],
- mkdb_args: [
- '--ignore-files=' + ' '.join(private_headers),
- ],
- fixxref_args: [
- '--html-dir=@0@'.format(docpath),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
- '--extra-dir=@0@'.format(cairo_docpath),
- '--extra-dir=../gdk',
+ custom_target('gsk4-doc',
+ input: [ gsk4_toml, gsk_gir[0] ],
+ output: 'gsk4',
+ command: [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@',
],
- html_assets: images,
- install: true,
+ depends: [ gdk_gir[0] ],
+ depend_files: [ expand_content_md_files ],
+ build_by_default: true,
)
endif
diff --git a/docs/reference/gsk/urlmap.js b/docs/reference/gsk/urlmap.js
new file mode 100644
index 0000000000000000000000000000000000000000..eaf2de9886ce7c2b07624c98fefe7f4ea7756d8f
--- /dev/null
+++ b/docs/reference/gsk/urlmap.js
@@ -0,0 +1,13 @@
+// SPDX-FileCopyrightText: 2021 GNOME Foundation
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+// A map between namespaces and base URLs for their online documentation
+baseURLs = [
+ [ 'Gdk', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4/' ],
+ [ 'GdkWayland', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-wayland/' ],
+ [ 'GdkX11', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-x11/' ],
+ [ 'Gsk', 'https://gnome.pages.gitlab.gnome.org/gtk/gsk4/' ],
+ [ 'Gtk', 'https://gnome.pages.gitlab.gnome.org/gtk/gtk4/' ],
+ [ 'Pango', 'https://gnome.pages/gitlab.gnome.org/pango/pango/' ],
+ [ 'PangoCairo', 'https://gnome.pages.gitlab.gnome.org/pango/pangocairo/' ],
+]
diff --git a/docs/reference/gsk/version.xml.in b/docs/reference/gsk/version.xml.in
deleted file mode 100644
index 3bb59ac105c26591aa3ac4ee9d344185fb263e20..0000000000000000000000000000000000000000
--- a/docs/reference/gsk/version.xml.in
+++ /dev/null
@@ -1 +0,0 @@
-@GTK_VERSION@
diff --git a/docs/reference/gtk/actions.md b/docs/reference/gtk/actions.md
index 61433ccc19460eb1c09d5649ada1ad24bbef7e07..2482c5c0b98922485f8ddf0cc5ac2cb9decc9520 100644
--- a/docs/reference/gtk/actions.md
+++ b/docs/reference/gtk/actions.md
@@ -1,13 +1,14 @@
-# Overview of actions in GTK {#actions-overview}
+Title: Overview of actions in GTK
+Slug: actions
This chapter describes in detail how GTK uses actions to connect
activatable UI elements to callbacks. GTK inherits the underlying
-architecture of GAction and GMe:u for describing abstract actions
+architecture of `GAction` and `GMenu` for describing abstract actions
and menus from the GIO library.
## Basics about actions
-A GAction is essentially a way to tell the toolkit about a piece of
+A `GAction` is essentially a way to tell the toolkit about a piece of
functionality in your program, and to give it a name.
Actions are purely functional. They do not contain any presentational
@@ -76,7 +77,7 @@ state type, and activating them with a particular parameter value is
equivalent to changing their state to that value.
This approach to handling radio buttons is different than many other
-action systems such as GtkAction. With GAction, there is only one action
+action systems such as `GtkAction`. With `GAction`, there is only one action
for "text-justify" and "left", "center" and "right" are possible states on
that action. There are not three separate "justify-left", "justify-center"
and "justify-right" actions.
@@ -96,7 +97,7 @@ Even though toggle actions have a state, they do not have a parameter.
Therefore, a target value is not needed when referring to them — they
will always be toggled on activation.
-Most APIs that allow using a GAction (such as GMenuModel and GtkActionable)
+Most APIs that allow using a `GAction` (such as `GMenuModel` and `GtkActionable`)
allow use of detailed action names. This is a convenient way of specifying
an action name and an action target with a single string.
@@ -140,7 +141,7 @@ separate state for each instance of the action as well as being able to
control the enabled state of the action on a per-window basis.
Actions are added to their relevant scope (application, window or widget)
-either using the GActionMap interface, or by using
+either using the `GActionMap` interface, or by using
gtk_widget_insert_action_group(). Actions that will be the same for all
instances of a widget class can be added globally using
gtk_widget_class_install_action().
@@ -149,7 +150,7 @@ gtk_widget_class_install_action().
Actions rarely occurs in isolation. It is common to have groups
of related actions, which are represented by instances of the
-GActionGroup interface.
+`GActionGroup` interface.
Action maps are a variant of action groups that allow to change
the name of the action as it is looked up. In GTK, the convention
@@ -160,46 +161,46 @@ or "win." for those with window scope.
When referring to actions on a GActionMap only the name of the
action itself is used (ie: "quit", not "app.quit"). The
"app.quit" form is only used when referring to actions from
-places like a GMenu or GtkActionable widget where the scope
+places like a `GMenu` or `GtkActionable` widget where the scope
of the action is not already known.
-GtkApplication and GtkApplicationWindow implement the GActionMap
+`GtkApplication` and `GtkApplicationWindow` implement the `GActionMap`
interface, so you can just add actions directly to them. For
other widgets, use gtk_widget_insert_action_group() to add
actions to it.
If you want to insert several actions at the same time, it is
-typically faster and easier to use GActionEntry.
+typically faster and easier to use `GActionEntry`.
## Connecting actions to widgets
-Any widget that implements the GtkActionable interface can
+Any widget that implements the `GtkActionable` interface can
be connected to an action just by setting the ::action-name
property. If the action has a parameter, you will also need
-to set the ::action-target property.
-Widgets that implement GtkActionable include GtkSwitch, GtkButton,
-and their respective subclasses.
+to set the ::action-target property. Widgets that implement
+`GtkActionable` include `GtkSwitch`, `GtkButton`, and their
+respective subclasses.
Another way of obtaining widgets that are connected to actions
-is to create a menu using a GMenu menu model. GMenu provides an
+is to create a menu using a `GMenu` menu model. `GMenu` provides an
abstract way to describe typical menus: nested groups of items
where each item can have a label, and icon, and an action.
-A typical use of GMenu inside GTK is to set up an application
+A typical use of `GMenu` inside GTK is to set up an application
menubar with gtk_application_set_menubar(). Another, maybe more
common use is to create a popover for a menubutton, using
gtk_menu_button_set_menu_model().
Unlike traditional menus, those created from menu models don't
have keyboard accelerators associated with menu items. Instead,
-GtkApplication offers the gtk_application_set_accels_for_action()
+`GtkApplication` offers the gtk_application_set_accels_for_action()
API to associate keyboard shortcuts with actions.
## Activation
When a widget with a connected action is activated, GTK finds
the action to activate by walking up the widget hierarchy,
-looking for a matching action, ending up at the GtkApplication.
+looking for a matching action, ending up at the `GtkApplication`.
## Built-in Actions
@@ -209,13 +210,16 @@ you should avoid naming conflicts with them when creating your
own actions.
default.activate
- : Activates the default widget in a context (typically a GtkWindow,
- GtkDialog or GtkPopover)
+: Activates the default widget in a context (typically a `GtkWindow`,
+ `GtkDialog` or `GtkPopover`)
+
clipboard.cut, clipboard.copy, clipboard.paste
- : Clipboard operations on entries, text view and labels, typically
- used in the context menu
+: Clipboard operations on entries, text view and labels, typically
+ used in the context menu
+
selection.delete, selection.select-all
- : Selection operations on entries, text view and labels
+: Selection operations on entries, text view and labels
+
color.select, color.customize:
- : Operate on colors in a #GtkColorChooserWidget. These actions are
- unusual in that they have the non-trivial parameter type (dddd):
+: Operate on colors in a `GtkColorChooserWidget`. These actions are
+ unusual in that they have the non-trivial parameter type (dddd):
diff --git a/docs/reference/gtk/broadway.md b/docs/reference/gtk/broadway.md
index 53d6d3d33454ae6a9eb65604ec93dacce6259022..8bf24c43c1d593f037b7ab8ee67bc5f098c614f7 100644
--- a/docs/reference/gtk/broadway.md
+++ b/docs/reference/gtk/broadway.md
@@ -1,4 +1,7 @@
-# Using GTK with Broadway {#gtk-broadway}
+Title: The Broadway windowing system
+Slug: broadway
+
+## Using GTK with Broadway
The GDK Broadway backend provides support for displaying GTK
applications in a web browser, using HTML5 and web sockets. To run
@@ -26,9 +29,9 @@ Start your applications like this:
GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk4-demo
```
-## Broadway-specific environment variables {#broadway-envar}
+## Broadway-specific environment variables
-### BROADWAY_DISPLAY
+### BROADWAY\_DISPLAY
Specifies the Broadway display number. The default display is 0.
The display number determines the port to use when connecting
diff --git a/docs/reference/gtk/building.md b/docs/reference/gtk/building.md
index 51c8802168653b517513eced3b65f7c7b8745b8d..31073d1d049a944aba33dcd06f2b3f5964d32c6a 100644
--- a/docs/reference/gtk/building.md
+++ b/docs/reference/gtk/building.md
@@ -1,4 +1,5 @@
-# Compiling the GTK Libraries {#gtk-building}
+Title: Compiling the GTK Libraries
+Slug: gtk-building
## Building GTK
@@ -75,7 +76,7 @@ PATH="/opt/gtk/bin:$PATH"
export LD_LIBRARY_PATH PATH
```
-## Build types {#build-types}
+## Build types
Meson has different build types, exposed by the `buildtype`
configuration option. GTK enables and disables functionality
@@ -111,7 +112,7 @@ linker flags. Note that with the plain build type, you are also
responsible for controlling the debugging features of GTK with
`-DG_ENABLE_DEBUG` and `-DG_DISABLE_CAST_CHECKS`.
-## Dependencies {#dependencies}
+## Dependencies
Before you can compile the GTK widget toolkit, you need to have
various other tools and libraries installed on your
@@ -179,7 +180,7 @@ Other libraries are maintained separately.
`XDG_DATA_DIRS` set accordingly at configure time. Otherwise,
gdk-pixbuf falls back to its built-in mime type detection.
-## Building and testing GTK {#building}
+## Building and testing GTK
First make sure that you have the necessary external
dependencies installed: `pkg-config`, Meson, Ninja,
@@ -207,7 +208,7 @@ log that can help you understand the issue you're encountering. If
all else fails, you can ask for help on the
[GTK forums](#gtk-resources).
-## Extra Configuration Options {#extra-configuration-options}
+## Extra Configuration Options
In addition to the normal options provided by Meson, GTK defines various
arguments that modify what should be built. All of these options are passed
diff --git a/docs/reference/gtk/compiling.md b/docs/reference/gtk/compiling.md
index 1cceedded1761e69799e8d834edf1390aeb71fd4..f73207d446fcc025ae85acbfe8764ea57e3aa245 100644
--- a/docs/reference/gtk/compiling.md
+++ b/docs/reference/gtk/compiling.md
@@ -1,4 +1,5 @@
-# Compiling GTK Applications on UNIX {#gtk-compiling}
+Title: Compiling GTK Applications on UNIX
+Slug: gtk-compiling
To compile a GTK application, you need to tell the compiler where to
find the GTK header files and libraries. This is done with the
diff --git a/docs/reference/gtk/css-overview.md b/docs/reference/gtk/css-overview.md
index 0070c7e4f3b1e769280d124c44db7d8c44635092..a9518dd428c5273ff15938ce5d1dd7bc99d8a9af 100644
--- a/docs/reference/gtk/css-overview.md
+++ b/docs/reference/gtk/css-overview.md
@@ -1,4 +1,5 @@
-# CSS in GTK {#css}
+Title: CSS in GTK
+Slug: css
This chapter describes how GTK uses CSS for styling and layout.
It is not meant to be an explanation of CSS from first principles,
diff --git a/docs/reference/gtk/css-properties.md b/docs/reference/gtk/css-properties.md
index 8fa9819fc7e56ba4320ebeedd5a3ff64a2d74b9b..d09141a3956360c2f113db20897df73c2a595048 100644
--- a/docs/reference/gtk/css-properties.md
+++ b/docs/reference/gtk/css-properties.md
@@ -1,4 +1,5 @@
-# GTK CSS Properties
+Title: GTK CSS Properties
+Slug: css-properties
GTK supports CSS properties and shorthands as far as they can be applied
in the context of widgets, and adds its own properties only when needed.
@@ -14,13 +15,16 @@ spec.
The following units are supported for basic datatypes:
Length
- : px, pt, em, ex, rem, pc, in, cm, mm, calc()
+: px, pt, em, ex, rem, pc, in, cm, mm, calc()
+
Percentage
- : %, calc()
+: %, calc()
+
Angle
- : deg, grad, turn, calc()
+: deg, grad, turn, calc()
+
Time
- : s, ms, calc()
+: s, ms, calc()
Length values with the em or ex units are resolved using the font
size value, unless they occur in setting the font-size itself, in
@@ -41,13 +45,16 @@ side of an area. In this case, the specified values are interpreted as
follows:
4 values:
- : top right bottom left
+: top right bottom left
+
3 values:
- : top horizontal bottom
+: top horizontal bottom
+
2 values:
- : vertical horizontal
+: vertical horizontal
+
1 value:
- : all
+: all
## Colors
diff --git a/docs/reference/gtk/drawing-model.md b/docs/reference/gtk/drawing-model.md
index fb3ad74690f1342bd5d505852c100a7f11661230..0921989842338bb36411caff92ac523fed6fc4d5 100644
--- a/docs/reference/gtk/drawing-model.md
+++ b/docs/reference/gtk/drawing-model.md
@@ -1,13 +1,14 @@
-# Overview of the drawing model {#drawing-overview}
+Title: Overview of the drawing model
+Slug: drawing-overview
-This chapter describes the GTK drawing model in detail. If you
+This chapter describes the GTK drawing model in detail. If you
are interested in the procedure which GTK follows to draw its
widgets and windows, you should read this chapter; this will be
-useful to know if you decide to implement your own widgets. This
+useful to know if you decide to implement your own widgets. This
chapter will also clarify the reasons behind the ways certain
things are done in GTK.
-## Windows and events {#drawing-windows}
+## Windows and events
Applications that use a windowing system generally create
rectangular regions in the screen called _surfaces_ (GTK is
@@ -27,14 +28,14 @@ windowing system surface. Child widgets such as buttons or
entries don't have their own surface; they use the surface
of their toplevel.
-Generally, the drawing cycle begins when GTK receives
-a frame event from the underlying windowing system: if the
-user drags a window over another one, the windowing system will
-tell the underlying surface that it needs to repaint itself. The
-drawing cycle can also be initiated when a widget itself decides
-that it needs to update its display. For example, when the user
-types a character in an entry widget, the entry asks GTK to queue
-a redraw operation for itself.
+Generally, the drawing cycle begins when GTK receives a frame event
+from the underlying windowing system: if the user drags a window
+over another one, the windowing system will tell the underlying
+surface that it needs to repaint itself. The drawing cycle can
+also be initiated when a widget itself decides that it needs to
+update its display. For example, when the user types a character
+in an entry widget, the entry asks GTK to queue a redraw operation
+for itself.
The windowing system generates frame events for surfaces. The GDK
interface to the windowing system translates such events into
@@ -46,7 +47,7 @@ need to be repainted in response to such events, and how widgets
work internally in terms of the resources they use from the
windowing system.
-## The frame clock {#frameclock}
+## The frame clock
All GTK applications are mainloop-driven, which means that most
of the time the app is idle inside a loop that just waits for
@@ -112,7 +113,7 @@ happen at higher levels:
There are also a lot of implicit triggers of these from the
CSS layer (which does animations, resizes and repaints as needed).
-## The scene graph {#scene-graph}
+## The scene graph
The first step in “drawing” a window is that GTK creates
_render nodes_ for all the widgets in the window. The render
@@ -133,15 +134,15 @@ rendering commands for the drawing API it targets, and arranges
for the resulting drawing to be associated with the right surface.
GSK has renderers for OpenGL, Vulkan and cairo.
-## Hierarchical drawing {#hierarchical-drawing}
+## Hierarchical drawing
-During the Paint phase GTK receives a single #GdkSurface::render
-signal on the toplevel surface. The signal handler will create a
-snapshot object (which is a helper for creating a scene graph) and
-call the #GtkWidget::snapshot() vfunc, which will propagate down
-the widget hierarchy. This lets each widget snapshot its content
-at the right place and time, correctly handling things like partial
-transparencies and overlapping widgets.
+During the Paint phase GTK receives a single ::render signal on the
+toplevel surface. The signal handler will create a snapshot object
+(which is a helper for creating a scene graph) and call the
+GtkWidget snapshot() vfunc, which will propagate down the widget
+hierarchy. This lets each widget snapshot its content at the right
+place and time, correctly handling things like partial transparencies
+and overlapping widgets.
During the snapshotting of each widget, GTK automatically handles
the CSS rendering according to the CSS box model. It snapshots first
diff --git a/docs/reference/gtk/getting_started.md b/docs/reference/gtk/getting_started.md
index 3196bef7024bfcd0d84cb57965e4bab62430cebf..9daba55a232567c5a6e5ea3c198e220ac77e1163 100644
--- a/docs/reference/gtk/getting_started.md
+++ b/docs/reference/gtk/getting_started.md
@@ -1,4 +1,5 @@
-# Getting Started with GTK {#gtk-getting-started}
+Title: Getting Started with GTK
+Slug: gtk-getting-started
GTK is a [widget toolkit](http://en.wikipedia.org/wiki/Widget_toolkit).
Each user interface created by GTK consists of widgets. This is implemented
@@ -29,7 +30,7 @@ window.
Create a new file with the following content named `example-0.c`.
-``` {.c source=examples/window-default.c }
+```c
#include
static void
@@ -63,7 +64,7 @@ main (int argc,
You can compile the program above with GCC using:
```
-gcc `pkg-config --cflags gtk4` -o example-0 example-0.c `pkg-config --libs gtk4`
+gcc $( pkg-config --cflags gtk4 ) -o example-0 example-0.c $( pkg-config --libs gtk4 )
```
For more information on how to compile a GTK application, please
@@ -77,49 +78,51 @@ Even if GTK installs multiple header files, only the top-level `gtk/gtk.h`
header can be directly included by third-party code. The compiler will abort
with an error if any other header is directly included.
-In a GTK application, the purpose of the main() function is to create a
-GtkApplication object and run it. In this example a GtkApplication pointer
-named `app` is declared and then initialized using gtk_application_new().
+In a GTK application, the purpose of the `main()` function is to create a
+[class@Gtk.Application] object and run it. In this example a
+[class@Gtk.Application] pointer named `app` is declared and then initialized
+using `gtk_application_new()`.
-When creating a GtkApplication, you need to pick an application identifier
-(a name) and pass it to gtk_application_new() as parameter. For this example
-`org.gtk.example` is used. For choosing an identifier for your application, see
-[this guide](https://wiki.gnome.org/HowDoI/ChooseApplicationID). Lastly,
-gtk_application_new() takes GApplicationFlags as input for your application,
-if your application would have special needs.
+When creating a [class@Gtk.Application], you need to pick an application
+identifier (a name) and pass it to [ctor@Gtk.Application.new] as parameter. For
+this example `org.gtk.example` is used. For choosing an identifier for your
+application, see [this guide](https://wiki.gnome.org/HowDoI/ChooseApplicationID).
+Lastly, [ctor@Gtk.Application.new] takes `GApplicationFlags` as input
+for your application, if your application would have special needs.
Next the [activate signal](https://wiki.gnome.org/HowDoI/GtkApplication) is
-connected to the activate() function above the main() function. The `activate`
-signal will be emitted when your application is launched with g_application_run()
-on the line below. The g_application_run() call also takes as arguments the
+connected to the activate() function above the `main()` function. The `activate`
+signal will be emitted when your application is launched with `g_application_run()`
+on the line below. The `g_application_run()` call also takes as arguments the
command line arguments (the `argc` count and the `argv` string array).
Your application can override the command line handling, e.g. to open
files passed on the commandline.
-Within g_application_run() the activate signal is sent and we then proceed
+Within `g_application_run()` the activate signal is sent and we then proceed
into the activate() function of the application. This is where we construct
our GTK window, so that a window is shown when the application is launched.
-The call to gtk_application_window_new() will create a new GtkWindow and
-store it inside the `window` pointer. The window will have a frame, a title
-bar, and window controls depending on the platform.
-
-A window title is set using gtk_window_set_title(). This function takes a
-GtkWindow* pointer and a string as input. As our `window` pointer is a
-GtkWidget pointer, we need to cast it to GtkWindow*. But instead of casting
-`window` via `(GtkWindow*)`, `window` can be cast using the macro
-`GTK_WINDOW()`. `GTK_WINDOW()` will check if the pointer is an instance of
-the GtkWindow class, before casting, and emit a warning if the check fails.
-More information about this convention can be found
-[here](https://developer.gnome.org/gobject/stable/gtype-conventions.html).
-
-Finally the window size is set using gtk_window_set_default_size()
-and the window is then shown by GTK via gtk_widget_show().
-
-When you close the window, by for example pressing the X, the g_application_run()
-call returns with a number which is saved inside an integer variable named
-`status`. Afterwards, the GtkApplication object is freed from memory with
-g_object_unref(). Finally the status integer is returned and the application
-exits.
+The call to [ctor@Gtk.ApplicationWindow.new] will create a new
+[class@Gtk.ApplicationWindow] and store it inside the `window` pointer. The
+window will have a frame, a title bar, and window controls depending on the
+platform.
+
+A window title is set using [`method@Gtk.Window.set_title`]. This function
+takes a `GtkWindow` pointer and a string as input. As our `window` pointer
+is a `GtkWidget` pointer, we need to cast it to `GtkWindow`; instead of
+casting `window` via a typical C cast like `(GtkWindow*)`, `window` can be
+cast using the macro `GTK_WINDOW()`. `GTK_WINDOW()` will check if the
+pointer is an instance of the `GtkWindow` class, before casting, and emit a
+warning if the check fails. More information about this convention can be
+found [here](https://developer.gnome.org/gobject/stable/gtype-conventions.html).
+
+Finally the window size is set using [`method@Gtk.Window.set_default_size`]
+and the window is then shown by GTK via [method@Gtk.Widget.show].
+
+When you close the window, by (for example) pressing the X button, the
+`g_application_run()` call returns with a number which is saved inside an
+integer variable named `status`. Afterwards, the `GtkApplication` object is
+freed from memory with `g_object_unref()`. Finally the status integer is
+returned and the application exits.
While the program is running, GTK is receiving _events_. These are typically
input events caused by the user interacting with your program, but also things
@@ -138,11 +141,11 @@ this example is called *Hello, World*.

-### Hello World in C {#gtk-getting-started-hello-world}
+### Hello World in C
Create a new file with the following content named `example-1.c`.
-``` {.c source=examples/hello-world.c }
+```c
#include
static void
@@ -195,43 +198,44 @@ main (int argc,
You can compile the program above with GCC using:
```
-gcc `pkg-config --cflags gtk4` -o example-1 example-1.c `pkg-config --libs gtk4`
+gcc $( pkg-config --cflags gtk4 ) -o example-1 example-1.c $( pkg-config --libs gtk4 )
```
-As seen above, example-1.c builds further upon example-0.c by adding a
-button to our window, with the label "Hello World". Two new GtkWidget
+As seen above, `example-1.c` builds further upon `example-0.c` by adding a
+button to our window, with the label "Hello World". Two new `GtkWidget`
pointers are declared to accomplish this, `button` and `box`. The box
-variable is created to store a GtkBox, which is GTK's way of controlling
-the size and layout of buttons.
+variable is created to store a [class@Gtk.Box], which is GTK's way of
+controlling the size and layout of buttons.
-The GtkBox is created with gtk_box_new() which takes a GtkOrientation
-enum as parameter. The buttons which this box will contain can either be laid
-out horizontally or vertically. This does not matter in this particular case,
-as we are dealing with only one button. After initializing box with the newly
-created GtkBox, the code adds the box widget to the window widget using
-gtk_window_set_child().
+The `GtkBox` widget is created with [ctor@Gtk.Box.new], which takes a
+[enum@Gtk.Orientation] enumeration value as parameter. The buttons which
+this box will contain can either be laid out horizontally or vertically.
+This does not matter in this particular case, as we are dealing with only
+one button. After initializing box with the newly created `GtkBox`, the code
+adds the box widget to the window widget using [`method@Gtk.Window.set_child`].
Next the `button` variable is initialized in similar manner.
-gtk_button_new_with_label() is called which returns a GtkButton to be
-stored in `button`. Afterwards `button` is added to our `box`.
-
-Using g_signal_connect(), the button is connected to a function in our app called
-print_hello(), so that when the button is clicked, GTK will call this function.
-As the print_hello() function does not use any data as input, NULL is passed
-to it. print_hello() calls g_print() with the string "Hello World" which will
+[`ctor@Gtk.Button.new_with_label`] is called which returns a
+[class@Gtk.Button] to be stored in `button`. Afterwards `button` is added to
+our `box`.
+
+Using `g_signal_connect()`, the button is connected to a function in our app called
+`print_hello()`, so that when the button is clicked, GTK will call this function.
+As the `print_hello()` function does not use any data as input, `NULL` is passed
+to it. `print_hello()` calls `g_print()` with the string "Hello World" which will
print Hello World in a terminal if the GTK application was started from one.
-After connecting print_hello(), another signal is connected to the "clicked"
-state of the button using g_signal_connect_swapped(). This functions is similar
-to a g_signal_connect() with the difference lying in how the callback function
-is treated. g_signal_connect_swapped() allows you to specify what the callback
+After connecting `print_hello()`, another signal is connected to the "clicked"
+state of the button using `g_signal_connect_swapped()`. This functions is similar
+to a `g_signal_connect()`, with the difference lying in how the callback function
+is treated; `g_signal_connect_swapped()` allows you to specify what the callback
function should take as parameter by letting you pass it as data. In this case
-the function being called back is gtk_window_destroy() and the `window` pointer
+the function being called back is [method@Gtk.Window.destroy] and the `window` pointer
is passed to it. This has the effect that when the button is clicked, the whole
-GTK window is destroyed. In contrast if a normal g_signal_connect() were used
-to connect the "clicked" signal with gtk_window_destroy(), then the function
+GTK window is destroyed. In contrast if a normal `g_signal_connect()` were used
+to connect the "clicked" signal with [method@Gtk.Window.destroy], then the function
would be called on `button` (which would not go well, since the function expects
-a GtkWindow as argument).
+a `GtkWindow` as argument).
More information about creating buttons can be found
[here](https://wiki.gnome.org/HowDoI/Buttons).
@@ -255,11 +259,11 @@ arrange several buttons:

-### Packing buttons {#gtk-getting-started-grid-packing}
+### Packing buttons
Create a new file with the following content named `example-2.c`.
-``` {.c source=examples/grid-packing.c }
+```c
#include
static void
@@ -334,7 +338,7 @@ main (int argc,
You can compile the program above with GCC using:
```
-gcc `pkg-config --cflags gtk4` -o example-2 example-2.c `pkg-config --libs gtk4`
+gcc $( pkg-config --cflags gtk4 ) -o example-2 example-2.c $( pkg-config --libs gtk4 )
```
## Custom Drawing
@@ -342,14 +346,14 @@ gcc `pkg-config --cflags gtk4` -o example-2 example-2.c `pkg-config --libs gtk4`
Many widgets, like buttons, do all their drawing themselves. You just tell
them the label you want to see, and they figure out what font to use, draw
the button outline and focus rectangle, etc. Sometimes, it is necessary to
-do some custom drawing. In that case, a GtkDrawingArea might be the right
+do some custom drawing. In that case, a [class@Gtk.DrawingArea] might be the right
widget to use. It offers a canvas on which you can draw by setting its
draw function.
-The contents of a widget often need to be partially or fully redrawn,
-e.g. when another window is moved and uncovers part of the widget, or
-when the window containing it is resized. It is also possible to explicitly
-cause a widget to be redrawn, by calling gtk_widget_queue_draw(). GTK takes
+The contents of a widget often need to be partially or fully redrawn, e.g.
+when another window is moved and uncovers part of the widget, or when the
+window containing it is resized. It is also possible to explicitly cause a
+widget to be redrawn, by calling [`method@Gtk.Widget.queue_draw`]. GTK takes
care of most of the details by providing a ready-to-use cairo context to the
draw function.
@@ -359,11 +363,11 @@ demonstrates input event handling with event controllers.

-### Drawing in response to input {#gtk-getting-started-drawing}
+### Drawing in response to input
Create a new file with the following content named `example-4.c`.
-``` {.c source=examples/drawing.c }
+```c
#include
/* Surface to store current scribbles */
@@ -556,7 +560,7 @@ main (int argc,
You can compile the program above with GCC using:
```
-gcc `pkg-config --cflags gtk4` -o example-4 example-4.c `pkg-config --libs gtk4`
+gcc $( pkg-config --cflags gtk4 ) -o example-4 example-4.c $( pkg-config --libs gtk4 )
```
## Building user interfaces
@@ -567,13 +571,13 @@ cumbersome, and making changes becomes next to impossible.
Thankfully, GTK supports the separation of user interface
layout from your business logic, by using UI descriptions in an
-XML format that can be parsed by the GtkBuilder class.
+XML format that can be parsed by the [class@Gtk.Builder] class.
### Packing buttons with GtkBuilder
Create a new file with the following content named `example-3.c`.
-``` {.c source=examples/builder.c }
+```c
#include
#include
@@ -637,7 +641,7 @@ main (int argc,
Create a new file with the following content named `builder.ui`.
-``` {.xml source=examples/builder.ui }
+```xml
- * ]|
+ * ```
*
- * GtkWidget allows defining accessibility information, such as properties,
+ * `GtkWidget` allows defining accessibility information, such as properties,
* relations, and states, using the custom `` element:
*
- * |[
+ * ```xml
*
- * ]|
+ * ```
*
- * # Building composite widgets from template XML ## {#composite-templates}
+ * ### Building composite widgets from template XML
*
- * GtkWidget exposes some facilities to automate the procedure
- * of creating composite widgets using #GtkBuilder interface description
- * language.
+ * `GtkWidget `exposes some facilities to automate the procedure
+ * of creating composite widgets using "templates".
*
- * To create composite widgets with #GtkBuilder XML, one must associate
+ * To create composite widgets with `GtkBuilder` XML, one must associate
* the interface description with the widget class at class initialization
- * time using gtk_widget_class_set_template().
+ * time using [method@Gtk.WidgetClass.set_template].
*
* The interface description semantics expected in composite template descriptions
- * is slightly different from regular #GtkBuilder XML.
+ * is slightly different from regular [class@Gtk.Builder] XML.
*
- * Unlike regular interface descriptions, gtk_widget_class_set_template() will
+ * Unlike regular interface descriptions, [method@Gtk.WidgetClass.set_template] will
* expect a `` tag as a direct child of the toplevel ``
* tag. The `` tag must specify the “class” attribute which must be
* the type name of the widget. Optionally, the “parent” attribute may be
* specified to specify the direct parent type of the widget type, this is
- * ignored by the GtkBuilder but required for Glade to introspect what kind
- * of properties and internal children exist for a given type when the actual
- * type does not exist.
+ * ignored by `GtkBuilder` but required for UI design tools like
+ * [Glade](https://glade.gnome.org/) to introspect what kind of properties and
+ * internal children exist for a given type when the actual type does not exist.
*
* The XML which is contained inside the `` tag behaves as if it were
- * added to the `
- * ]|
+ * ```
*
* Typically, you'll place the template fragment into a file that is
- * bundled with your project, using #GResource. In order to load the
- * template, you need to call gtk_widget_class_set_template_from_resource()
- * from the class initialization of your #GtkWidget type:
+ * bundled with your project, using `GResource`. In order to load the
+ * template, you need to call [method@Gtk.WidgetClass.set_template_from_resource]
+ * from the class initialization of your `GtkWidget` type:
*
- * |[
+ * ```c
* static void
* foo_widget_class_init (FooWidgetClass *klass)
* {
@@ -375,27 +376,29 @@
* gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
* "/com/example/ui/foowidget.ui");
* }
- * ]|
+ * ```
*
- * You will also need to call gtk_widget_init_template() from the instance
- * initialization function:
+ * You will also need to call [method@Gtk.Widget.init_template] from the
+ * instance initialization function:
*
- * |[
+ * ```c
* static void
* foo_widget_init (FooWidget *self)
* {
* // ...
* gtk_widget_init_template (GTK_WIDGET (self));
* }
- * ]|
+ * ```
*
* You can access widgets defined in the template using the
- * gtk_widget_get_template_child() function, but you will typically declare
+ * [id@gtk_widget_get_template_child] function, but you will typically declare
* a pointer in the instance private data structure of your type using the same
* name as the widget in the template definition, and call
- * gtk_widget_class_bind_template_child_private() with that name, e.g.
+ * [method@Gtk.WidgetClass.bind_template_child_full] (or one of its wrapper macros
+ * [func@Gtk.widget_class_bind_template_child] and [func@Gtk.widget_class_bind_template_child_private])
+ * with that name, e.g.
*
- * |[
+ * ```c
* typedef struct {
* GtkWidget *hello_button;
* GtkWidget *goodbye_button;
@@ -420,13 +423,14 @@
* {
*
* }
- * ]|
+ * ```
*
- * You can also use gtk_widget_class_bind_template_callback() to connect a signal
- * callback defined in the template with a function visible in the scope of the
- * class, e.g.
+ * You can also use [method@Gtk.WidgetClass.bind_template_callback_full] (or
+ * is wrapper macro [func@Gtk.widget_class_bind_template_callback]) to connect
+ * a signal callback defined in the template with a function visible in the
+ * scope of the class, e.g.
*
- * |[
+ * ```c
* // the signal handler has the instance and user data swapped
* // because of the swapped="yes" attribute in the template XML
* static void
@@ -444,7 +448,7 @@
* "/com/example/ui/foowidget.ui");
* gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), hello_button_clicked);
* }
- * ]|
+ * ```
*/
#define GTK_STATE_FLAGS_DO_SET_PROPAGATE (GTK_STATE_FLAG_INSENSITIVE | \
@@ -743,13 +747,13 @@ gtk_widget_real_contains (GtkWidget *widget,
&GRAPHENE_POINT_INIT (x, y));
}
-/**
+/*
* _gtk_widget_grab_notify:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @was_grabbed: whether a grab is now in effect
*
- * Emits the #GtkWidget::grab-notify signal on @widget.
- **/
+ * Emits the `GtkWidget`::grab-notify signal on @widget.
+ */
void
_gtk_widget_grab_notify (GtkWidget *widget,
gboolean was_grabbed)
@@ -1205,6 +1209,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
klass->system_setting_changed = gtk_widget_real_system_setting_changed;
klass->contains = gtk_widget_real_contains;
+ /**
+ * GtkWidget:name: (attributes org.gtk.Property.get=gtk_widget_get_name org.gtk.Property.set=gtk_widget_set_name)
+ *
+ * The name of the widget.
+ */
widget_props[PROP_NAME] =
g_param_spec_string ("name",
P_("Widget name"),
@@ -1212,6 +1221,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
NULL,
GTK_PARAM_READWRITE);
+ /**
+ * GtkWidget:parent: (attributes org.gtk.Property.get=gtk_widget_get_parent)
+ *
+ * The parent widget of this widget.
+ */
widget_props[PROP_PARENT] =
g_param_spec_object ("parent",
P_("Parent widget"),
@@ -1220,10 +1234,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:root:
+ * GtkWidget:root: (attributes org.gtk.Property.get=gtk_widget_get_root)
+ *
+ * The `GtkRoot` widget of the widget tree containing this widget.
*
- * The #GtkRoot widget of the widget tree containing this widget or %NULL if
- * the widget is not contained in a root widget.
+ * This will be %NULL if the widget is not contained in a root widget.
*/
widget_props[PROP_ROOT] =
g_param_spec_object ("root",
@@ -1232,6 +1247,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_TYPE_ROOT,
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:width-request:
+ *
+ * Override for width request of the widget.
+ *
+ * If this is -1, the natural request will be used.
+ */
widget_props[PROP_WIDTH_REQUEST] =
g_param_spec_int ("width-request",
P_("Width request"),
@@ -1240,6 +1262,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
-1,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:height-request:
+ *
+ * Override for height request of the widget.
+ *
+ * If this is -1, the natural request will be used.
+ */
widget_props[PROP_HEIGHT_REQUEST] =
g_param_spec_int ("height-request",
P_("Height request"),
@@ -1248,6 +1277,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
-1,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:visible: (attributes org.gtk.Property.get=gtk_widget_get_visible org.gtk.Property.set=gtk_widget_set_visible)
+ *
+ * Whether the widget is visible.
+ */
widget_props[PROP_VISIBLE] =
g_param_spec_boolean ("visible",
P_("Visible"),
@@ -1255,6 +1289,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:sensitive: (attributes org.gtk.Property.get=gtk_widget_get_sensitive org.gtk.Property.set=gtk_widget_set_sensitive)
+ *
+ * Whether the widget responds to input.
+ */
widget_props[PROP_SENSITIVE] =
g_param_spec_boolean ("sensitive",
P_("Sensitive"),
@@ -1263,7 +1302,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:can-focus:
+ * GtkWidget:can-focus: (attributes org.gtk.Property.get=gtk_widget_get_can_focus org.gtk.Property.set=gtk_widget_set_can_focus)
*
* Whether the widget or any of its descendents can accept
* the input focus.
@@ -1279,7 +1318,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:focusable:
+ * GtkWidget:focusable: (attributes org.gtk.Property.get=gtk_widget_get_focusable org.gtk.Property.set=gtk_widget_set_focusable)
*
* Whether this widget itself will accept the input focus.
*/
@@ -1290,6 +1329,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:has-focus: (attributes org.gtk.Property.get=gtk_widget_has_focus)
+ *
+ * Whether the widget has the input focus.
+ */
widget_props[PROP_HAS_FOCUS] =
g_param_spec_boolean ("has-focus",
P_("Has focus"),
@@ -1297,6 +1341,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
FALSE,
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:can-target: (attributes org.gtk.Property.get=gtk_widget_get_can_target org.gtk.Property.set=gtk_widget_set_can_target)
+ *
+ * Whether the widget can receive pointer events.
+ */
widget_props[PROP_CAN_TARGET] =
g_param_spec_boolean ("can-target",
P_("Can target"),
@@ -1305,7 +1354,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:focus-on-click:
+ * GtkWidget:focus-on-click: (attributes org.gtk.Property.get=gtk_widget_get_focus_on_click org.gtk.Property.set=gtk_widget_set_focus_on_click)
*
* Whether the widget should grab focus when it is clicked with the mouse.
*
@@ -1318,6 +1367,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:has-default: (attributes org.gtk.Property.get=gtk_widget_has_default)
+ *
+ * Whether the widget is the default widget.
+ */
widget_props[PROP_HAS_DEFAULT] =
g_param_spec_boolean ("has-default",
P_("Has default"),
@@ -1325,6 +1379,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
FALSE,
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWidget:receives-default: (attributes org.gtk.Property.get=gtk_widget_get_receives_default org.gtk.Property.set=gtk_widget_set_receives_default)
+ *
+ * Whether the widget will receive the default action when it is focused.
+ */
widget_props[PROP_RECEIVES_DEFAULT] =
g_param_spec_boolean ("receives-default",
P_("Receives default"),
@@ -1333,9 +1392,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:cursor:
+ * GtkWidget:cursor: (attributes org.gtk.Property.get=gtk_widget_get_cursor org.gtk.Property.set=gtk_widget_set_cursor)
*
- * The cursor used by @widget. See gtk_widget_set_cursor() for details.
+ * The cursor used by @widget.
*/
widget_props[PROP_CURSOR] =
g_param_spec_object("cursor",
@@ -1345,12 +1404,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:has-tooltip:
+ * GtkWidget:has-tooltip: (attributes org.gtk.Property.get=gtk_widget_get_has_tooltip org.gtk.Property.set=gtk_widget_set_has_tooltip)
+ *
+ * Enables or disables the emission of the ::query-tooltip signal on @widget.
*
- * Enables or disables the emission of #GtkWidget::query-tooltip on @widget.
* A value of %TRUE indicates that @widget can have a tooltip, in this case
- * the widget will be queried using #GtkWidget::query-tooltip to determine
- * whether it will provide a tooltip or not.
+ * the widget will be queried using [signal@Gtk.Widget::query-tooltip] to
+ * determine whether it will provide a tooltip or not.
*/
widget_props[PROP_HAS_TOOLTIP] =
g_param_spec_boolean ("has-tooltip",
@@ -1360,19 +1420,20 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:tooltip-text:
+ * GtkWidget:tooltip-text: (attributes org.gtk.Property.get=gtk_widget_get_tooltip_text org.gtk.Property.set=gtk_widget_set_tooltip_text)
*
* Sets the text of tooltip to be the given string.
*
- * Also see gtk_tooltip_set_text().
+ * Also see [method@Gtk.Tooltip.set_text].
*
* This is a convenience property which will take care of getting the
- * tooltip shown if the given string is not %NULL: #GtkWidget:has-tooltip
- * will automatically be set to %TRUE and there will be taken care of
- * #GtkWidget::query-tooltip in the default signal handler.
+ * tooltip shown if the given string is not %NULL:
+ * [property@Gtk.Widget:has-tooltip] will automatically be set to %TRUE
+ * and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
+ * the default signal handler.
*
- * Note that if both #GtkWidget:tooltip-text and #GtkWidget:tooltip-markup
- * are set, the last one wins.
+ * Note that if both [property@Gtk.Widget:tooltip-text] and
+ * [property@Gtk.Widget:tooltip-markup] are set, the last one wins.
*/
widget_props[PROP_TOOLTIP_TEXT] =
g_param_spec_string ("tooltip-text",
@@ -1382,19 +1443,21 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:tooltip-markup:
+ * GtkWidget:tooltip-markup: (attributes org.gtk.Property.get=gtk_widget_get_tooltip_markup org.gtk.Property.set=gtk_widget_set_tooltip_markup)
*
* Sets the text of tooltip to be the given string, which is marked up
- * with the [Pango text markup language][PangoMarkupFormat].
- * Also see gtk_tooltip_set_markup().
+ * with Pango markup.
+ *
+ * Also see [method@Gtk.Tooltip.set_markup].
*
* This is a convenience property which will take care of getting the
- * tooltip shown if the given string is not %NULL: #GtkWidget:has-tooltip
- * will automatically be set to %TRUE and there will be taken care of
- * #GtkWidget::query-tooltip in the default signal handler.
+ * tooltip shown if the given string is not %NULL:
+ * [property@Gtk.Widget:has-tooltip] will automatically be set to %TRUE
+ * and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
+ * the default signal handler.
*
- * Note that if both #GtkWidget:tooltip-text and #GtkWidget:tooltip-markup
- * are set, the last one wins.
+ * Note that if both [property@Gtk.Widget:tooltip-text] and
+ * [property@Gtk.Widget:tooltip-markup] are set, the last one wins.
*/
widget_props[PROP_TOOLTIP_MARKUP] =
g_param_spec_string ("tooltip-markup",
@@ -1404,9 +1467,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:halign:
+ * GtkWidget:halign: (attributes org.gtk.Property.get=gtk_widget_get_halign org.gtk.Property.set=gtk_widget_set_halign)
*
- * How to distribute horizontal space if widget gets extra space, see #GtkAlign
+ * How to distribute horizontal space if widget gets extra space.
*/
widget_props[PROP_HALIGN] =
g_param_spec_enum ("halign",
@@ -1417,9 +1480,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:valign:
+ * GtkWidget:valign: (attributes org.gtk.Property.get=gtk_widget_get_valign org.gtk.Property.set=gtk_widget_set_valign)
*
- * How to distribute vertical space if widget gets extra space, see #GtkAlign
+ * How to distribute vertical space if widget gets extra space.
*/
widget_props[PROP_VALIGN] =
g_param_spec_enum ("valign",
@@ -1430,14 +1493,16 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:margin-start:
+ * GtkWidget:margin-start: (attributes org.gtk.Property.get=gtk_widget_get_margin_start org.gtk.Property.set=gtk_widget_set_margin_start)
*
- * Margin on start of widget, horizontally. This property supports
- * left-to-right and right-to-left text directions.
+ * Margin on start of widget, horizontally.
+ *
+ * This property supports left-to-right and right-to-left text
+ * directions.
*
* This property adds margin outside of the widget's normal size
* request, the margin will be added in addition to the size from
- * gtk_widget_set_size_request() for example.
+ * [method@Gtk.Widget.set_size_request] for example.
*/
widget_props[PROP_MARGIN_START] =
g_param_spec_int ("margin-start",
@@ -1448,14 +1513,16 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:margin-end:
+ * GtkWidget:margin-end: (attributes org.gtk.Property.get=gtk_widget_get_margin_end org.gtk.Property.set=gtk_widget_set_margin_end)
+ *
+ * Margin on end of widget, horizontally.
*
- * Margin on end of widget, horizontally. This property supports
- * left-to-right and right-to-left text directions.
+ * This property supports left-to-right and right-to-left text
+ * directions.
*
* This property adds margin outside of the widget's normal size
* request, the margin will be added in addition to the size from
- * gtk_widget_set_size_request() for example.
+ * [method@Gtk.Widget.set_size_request] for example.
*/
widget_props[PROP_MARGIN_END] =
g_param_spec_int ("margin-end",
@@ -1466,13 +1533,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:margin-top:
+ * GtkWidget:margin-top: (attributes org.gtk.Property.get=gtk_widget_get_margin_top org.gtk.Property.set=gtk_widget_set_margin_top)
*
* Margin on top side of widget.
*
* This property adds margin outside of the widget's normal size
* request, the margin will be added in addition to the size from
- * gtk_widget_set_size_request() for example.
+ * [method@Gtk.Widget.set_size_request] for example.
*/
widget_props[PROP_MARGIN_TOP] =
g_param_spec_int ("margin-top",
@@ -1483,13 +1550,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:margin-bottom:
+ * GtkWidget:margin-bottom: (attributes org.gtk.Property.get=gtk_widget_get_margin_bottom org.gtk.Property.set=gtk_widget_set_margin_bottom)
*
* Margin on bottom side of widget.
*
* This property adds margin outside of the widget's normal size
* request, the margin will be added in addition to the size from
- * gtk_widget_set_size_request() for example.
+ * [method@Gtk.Widget.set_size_request] for example.
*/
widget_props[PROP_MARGIN_BOTTOM] =
g_param_spec_int ("margin-bottom",
@@ -1500,9 +1567,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:hexpand:
+ * GtkWidget:hexpand: (attributes org.gtk.Property.get=gtk_widget_get_hexpand org.gtk.Property.set=gtk_widget_set_hexpand)
*
- * Whether to expand horizontally. See gtk_widget_set_hexpand().
+ * Whether to expand horizontally.
*/
widget_props[PROP_HEXPAND] =
g_param_spec_boolean ("hexpand",
@@ -1512,9 +1579,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:hexpand-set:
+ * GtkWidget:hexpand-set: (attributes org.gtk.Property.get=gtk_widget_get_hexpand_set org.gtk.Property.set=gtk_widget_set_hexpand_set)
*
- * Whether to use the #GtkWidget:hexpand property. See gtk_widget_get_hexpand_set().
+ * Whether to use the `hexpand` property.
*/
widget_props[PROP_HEXPAND_SET] =
g_param_spec_boolean ("hexpand-set",
@@ -1524,9 +1591,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:vexpand:
+ * GtkWidget:vexpand: (attributes org.gtk.Property.get=gtk_widget_get_vexpand org.gtk.Property.set=gtk_widget_set_vexpand)
*
- * Whether to expand vertically. See gtk_widget_set_vexpand().
+ * Whether to expand vertically.
*/
widget_props[PROP_VEXPAND] =
g_param_spec_boolean ("vexpand",
@@ -1536,9 +1603,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:vexpand-set:
+ * GtkWidget:vexpand-set: (attributes org.gtk.Property.get=gtk_widget_get_vexpand_set org.gtk.Property.set=gtk_widget_set_vexpand_set)
*
- * Whether to use the #GtkWidget:vexpand property. See gtk_widget_get_vexpand_set().
+ * Whether to use the `vexpand` property.
*/
widget_props[PROP_VEXPAND_SET] =
g_param_spec_boolean ("vexpand-set",
@@ -1548,10 +1615,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:opacity:
+ * GtkWidget:opacity: (attributes org.gtk.Property.get=gtk_widget_get_opacity org.gtk.Widget.set=gtk_widget_set_opacity)
*
- * The requested opacity of the widget. See gtk_widget_set_opacity() for
- * more details about window opacity.
+ * The requested opacity of the widget.
*/
widget_props[PROP_OPACITY] =
g_param_spec_double ("opacity",
@@ -1562,7 +1628,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:overflow:
+ * GtkWidget:overflow: (attributes org.gtk.Property.get=gtk_widget_get_overflow org.gtk.Property.set=gtk_widget_set_overflow)
*
* How content outside the widget's content area is treated.
*
@@ -1578,10 +1644,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:scale-factor:
+ * GtkWidget:scale-factor: (attributes org.gtk.Property.get=gtk_widget_get_scale_factor)
*
- * The scale factor of the widget. See gtk_widget_get_scale_factor() for
- * more details about widget scaling.
+ * The scale factor of the widget.
*/
widget_props[PROP_SCALE_FACTOR] =
g_param_spec_int ("scale-factor",
@@ -1592,7 +1657,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READABLE);
/**
- * GtkWidget:css-name:
+ * GtkWidget:css-name: (attributes org.gtk.Property.get=gtk_widget_get_css_name)
*
* The name of this widget in the CSS tree.
*
@@ -1607,7 +1672,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkWidget:css-classes:
+ * GtkWidget:css-classes: (attributes org.gtk.Property.get=gtk_widget_get_css_classes org.gtk.Property.set=gtk_widget_set_css_classes)
*
* A list of css classes applied to this widget.
*/
@@ -1619,9 +1684,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE);
/**
- * GtkWidget:layout-manager:
+ * GtkWidget:layout-manager: (attributes org.gtk.Property.get=gtk_widget_get_layout_manager org.gtk.Property.set=gtk_widget_set_layout_manager)
*
- * The #GtkLayoutManager instance to use to compute the preferred size
+ * The `GtkLayoutManager` instance to use to compute the preferred size
* of the widget, and allocate its children.
*
* This property is meant to be set by widget implementations,
@@ -1643,8 +1708,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* @object: the object which received the signal
*
* Signals that all holders of a reference to the widget should release
- * the reference that they hold. May result in finalization of the widget
- * if all references are released.
+ * the reference that they hold.
+ *
+ * May result in finalization of the widget if all references are released.
*
* This signal is not suitable for saving widget state.
*/
@@ -1661,8 +1727,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* GtkWidget::show:
* @widget: the object which received the signal.
*
- * The ::show signal is emitted when @widget is shown, for example with
- * gtk_widget_show().
+ * Emitted when @widget is shown.
*/
widget_signals[SHOW] =
g_signal_new (I_("show"),
@@ -1677,8 +1742,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* GtkWidget::hide:
* @widget: the object which received the signal.
*
- * The ::hide signal is emitted when @widget is hidden, for example with
- * gtk_widget_hide().
+ * Emitted when @widget is hidden.
*/
widget_signals[HIDE] =
g_signal_new (I_("hide"),
@@ -1693,14 +1757,15 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* GtkWidget::map:
* @widget: the object which received the signal.
*
- * The ::map signal is emitted when @widget is going to be mapped, that is
- * when the widget is visible (which is controlled with
- * gtk_widget_set_visible()) and all its parents up to the toplevel widget
+ * Emitted when @widget is going to be mapped.
+ *
+ * A widget is mapped when the widget is visible (which is controlled with
+ * [property@Gtk.Widget:visible]) and all its parents up to the toplevel widget
* are also visible.
*
* The ::map signal can be used to determine whether a widget will be drawn,
* for instance it can resume an animation that was stopped during the
- * emission of #GtkWidget::unmap.
+ * emission of [signal@Gtk.Widget::unmap].
*/
widget_signals[MAP] =
g_signal_new (I_("map"),
@@ -1715,12 +1780,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* GtkWidget::unmap:
* @widget: the object which received the signal.
*
- * The ::unmap signal is emitted when @widget is going to be unmapped, which
- * means that either it or any of its parents up to the toplevel widget have
- * been set as hidden.
+ * Emitted when @widget is going to be unmapped.
+ *
+ * A widget is unmapped when either it or any of its parents up to the
+ * toplevel widget have been set as hidden.
*
- * As ::unmap indicates that a widget will not be shown any longer, it can be
- * used to, for example, stop an animation on the widget.
+ * As ::unmap indicates that a widget will not be shown any longer,
+ * it can be used to, for example, stop an animation on the widget.
*/
widget_signals[UNMAP] =
g_signal_new (I_("unmap"),
@@ -1735,9 +1801,10 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* GtkWidget::realize:
* @widget: the object which received the signal.
*
- * The ::realize signal is emitted when @widget is associated with a
- * #GdkSurface, which means that gtk_widget_realize() has been called or the
- * widget has been mapped (that is, it is going to be drawn).
+ * Emitted when @widget is associated with a `GdkSurface`.
+ *
+ * This means that [method@Gtk.Widget.realize] has been called
+ * or the widget has been mapped (that is, it is going to be drawn).
*/
widget_signals[REALIZE] =
g_signal_new (I_("realize"),
@@ -1752,10 +1819,10 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* GtkWidget::unrealize:
* @widget: the object which received the signal.
*
- * The ::unrealize signal is emitted when the #GdkSurface associated with
- * @widget is destroyed, which means that gtk_widget_unrealize() has been
- * called or the widget has been unmapped (that is, it is going to be
- * hidden).
+ * Emitted when the `GdkSurface` associated with @widget is destroyed.
+ *
+ * This means that [method@Gtk.Widget.unrealize] has been called
+ * or the widget has been unmapped (that is, it is going to be hidden).
*/
widget_signals[UNREALIZE] =
g_signal_new (I_("unrealize"),
@@ -1771,8 +1838,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* @widget: the object which received the signal.
* @flags: The previous state flags.
*
- * The ::state-flags-changed signal is emitted when the widget state
- * changes, see gtk_widget_get_state_flags().
+ * Emitted when the widget state changes.
+ *
+ * See [method@Gtk.Widget.get_state_flags].
*/
widget_signals[STATE_FLAGS_CHANGED] =
g_signal_new (I_("state-flags-changed"),
@@ -1789,8 +1857,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* @widget: the object on which the signal is emitted
* @previous_direction: the previous text direction of @widget
*
- * The ::direction-changed signal is emitted when the text direction
- * of a widget changes.
+ * Emitted when the text direction of a widget changes.
*/
widget_signals[DIRECTION_CHANGED] =
g_signal_new (I_("direction-changed"),
@@ -1807,6 +1874,8 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* @widget: the object which received the signal.
* @group_cycling: %TRUE if there are other widgets with the same mnemonic
*
+ * Emitted when a widget is activated via a mnemonic.
+ *
* The default handler for this signal activates @widget if @group_cycling
* is %FALSE, or just makes @widget grab focus if @group_cycling is %TRUE.
*
@@ -1849,13 +1918,14 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* @widget: the object which received the signal
* @direction: the direction of movement
*
- * Gets emitted if keyboard navigation fails.
- * See gtk_widget_keynav_failed() for details.
+ * Emitted if keyboard navigation fails.
+ *
+ * See [method@Gtk.Widget.keynav_failed] for details.
*
* Returns: %TRUE if stopping keyboard navigation is fine, %FALSE
- * if the emitting widget should try to handle the keyboard
- * navigation attempt in its parent widget(s).
- **/
+ * if the emitting widget should try to handle the keyboard
+ * navigation attempt in its parent widget(s).
+ */
widget_signals[KEYNAV_FAILED] =
g_signal_new (I_("keynav-failed"),
G_TYPE_FROM_CLASS (klass),
@@ -1879,9 +1949,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* @keyboard_mode: %TRUE if the tooltip was triggered using the keyboard
* @tooltip: a #GtkTooltip
*
- * Emitted when #GtkWidget:has-tooltip is %TRUE and the hover timeout
- * has expired with the cursor hovering "above" @widget; or emitted when @widget got
- * focus in keyboard mode.
+ * Emitted when the widgets tooltip is about to be shown.
+ *
+ * This happens when the [property@Gtk.Widget:has-tooltip] property
+ * is %TRUE and the hover timeout has expired with the cursor hovering
+ * "above" @widget; or emitted when @widget got focus in keyboard mode.
*
* Using the given coordinates, the signal handler should determine
* whether a tooltip should be shown for @widget. If this is the case
@@ -2483,12 +2555,13 @@ gtk_widget_unroot (GtkWidget *widget)
/**
* gtk_widget_unparent:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * This function is only for use in widget implementations.
- * It should be called by parent widgets to dissociate @widget
- * from the parent, typically in dispose.
- **/
+ * Dissociate @widget from its parent.
+ *
+ * This function is only for use in widget implementations,
+ * typically in dispose.
+ */
void
gtk_widget_unparent (GtkWidget *widget)
{
@@ -2625,10 +2698,11 @@ gtk_widget_pop_paintables (GtkWidget *widget)
/**
* gtk_widget_show:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Flags a widget to be displayed.
*
- * Flags a widget to be displayed. Any widget that isn’t shown will
- * not appear on the screen.
+ * Any widget that isn’t shown will not appear on the screen.
*
* Remember that you have to show the containers containing a widget,
* in addition to the widget itself, before it will appear onscreen.
@@ -2636,7 +2710,7 @@ gtk_widget_pop_paintables (GtkWidget *widget)
* When a toplevel container is shown, it is immediately realized and
* mapped; other shown widgets are realized and mapped when their
* toplevel container is realized and mapped.
- **/
+ */
void
gtk_widget_show (GtkWidget *widget)
{
@@ -2697,11 +2771,12 @@ gtk_widget_real_show (GtkWidget *widget)
/**
* gtk_widget_hide:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Reverses the effects of gtk_widget_show(), causing the widget to be
- * hidden (invisible to the user).
- **/
+ * Reverses the effects of gtk_widget_show().
+ *
+ * This is causing the widget to be hidden (invisible to the user).
+ */
void
gtk_widget_hide (GtkWidget *widget)
{
@@ -2783,11 +2858,12 @@ update_cursor_on_state_change (GtkWidget *widget)
/**
* gtk_widget_map:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * This function is only for use in widget implementations. Causes
- * a widget to be mapped if it isn’t already.
- **/
+ * Causes a widget to be mapped if it isn’t already.
+ *
+ * This function is only for use in widget implementations.
+ */
void
gtk_widget_map (GtkWidget *widget)
{
@@ -2814,11 +2890,12 @@ gtk_widget_map (GtkWidget *widget)
/**
* gtk_widget_unmap:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * This function is only for use in widget implementations. Causes
- * a widget to be unmapped if it’s currently mapped.
- **/
+ * Causes a widget to be unmapped if it’s currently mapped.
+ *
+ * This function is only for use in widget implementations.
+ */
void
gtk_widget_unmap (GtkWidget *widget)
{
@@ -2949,35 +3026,37 @@ static guint tick_callback_id;
/**
* gtk_widget_add_tick_callback:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @callback: function to call for updating animations
* @user_data: (closure): data to pass to @callback
* @notify: function to call to free @user_data when the callback is removed.
*
* Queues an animation frame update and adds a callback to be called
- * before each frame. Until the tick callback is removed, it will be
- * called frequently (usually at the frame rate of the output device
- * or as quickly as the application can be repainted, whichever is
- * slower). For this reason, is most suitable for handling graphics
- * that change every frame or every few frames. The tick callback does
- * not automatically imply a relayout or repaint. If you want a
- * repaint or relayout, and aren’t changing widget properties that
- * would trigger that (for example, changing the text of a #GtkLabel),
- * then you will have to call gtk_widget_queue_resize() or
- * gtk_widget_queue_draw() yourself.
- *
- * gdk_frame_clock_get_frame_time() should generally be used for timing
- * continuous animations and
- * gdk_frame_timings_get_predicted_presentation_time() if you are
+ * before each frame.
+ *
+ * Until the tick callback is removed, it will be called frequently
+ * (usually at the frame rate of the output device or as quickly as
+ * the application can be repainted, whichever is slower). For this
+ * reason, is most suitable for handling graphics that change every
+ * frame or every few frames. The tick callback does not automatically
+ * imply a relayout or repaint. If you want a repaint or relayout, and
+ * aren’t changing widget properties that would trigger that (for example,
+ * changing the text of a #GtkLabel), then you will have to call
+ * [method@Gtk.Widget.queue_resize] or [method@Gtk.Widget.queue_draw]
+ * yourself.
+ *
+ * [method@Gdk.FrameClock.get_frame_time] should generally be used
+ * for timing continuous animations and
+ * [method@Gdk.FrameTimings.get_predicted_presentation_time] if you are
* trying to display isolated frames at particular times.
*
* This is a more convenient alternative to connecting directly to the
- * #GdkFrameClock::update signal of #GdkFrameClock, since you don't
- * have to worry about when a #GdkFrameClock is assigned to a widget.
+ * [signal@Gdk.FrameClock::update] signal of `GdkFrameClock`, since you
+ * don't have to worry about when a `GdkFrameClock` is assigned to a widget.
*
* Returns: an id for the connection of this callback. Remove the callback
- * by passing the id returned from this function to
- * gtk_widget_remove_tick_callback()
+ * by passing the id returned from this function to
+ * [method@Gtk.Widget.remove_tick_callback]
*/
guint
gtk_widget_add_tick_callback (GtkWidget *widget,
@@ -3020,8 +3099,8 @@ gtk_widget_add_tick_callback (GtkWidget *widget,
/**
* gtk_widget_remove_tick_callback:
- * @widget: a #GtkWidget
- * @id: an id returned by gtk_widget_add_tick_callback()
+ * @widget: a `GtkWidget`
+ * @id: an id returned by [method@Gtk.Widget.add_tick_callback]
*
* Removes a tick callback previously registered with
* gtk_widget_add_tick_callback().
@@ -3230,7 +3309,7 @@ ensure_surface_transform_data (GtkWidget *widget)
/**
* gtk_widget_add_surface_transform_changed_callback:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @callback: a function to call when the surface transform changes
* @user_data: (closure): data to pass to @callback
* @notify: function to call to free @user_data when the callback is removed
@@ -3239,8 +3318,8 @@ ensure_surface_transform_data (GtkWidget *widget)
* changes.
*
* Returns: an id for the connection of this callback. Remove the callback by
- * passing the id returned from this funcction to
- * gtk_widget_remove_surface_transform_changed_callback()
+ * passing the id returned from this function to
+ * [method@Gtk.Widget.remove_surface_transform_changed_callback]
*/
guint
gtk_widget_add_surface_transform_changed_callback (GtkWidget *widget,
@@ -3280,8 +3359,8 @@ gtk_widget_add_surface_transform_changed_callback (GtkWidget
/**
* gtk_widget_remove_surface_transform_changed_callback:
- * @widget: a #GtkWidget
- * @id: an id returned by gtk_widget_add_surface_transform_changed_callback()
+ * @widget: a `GtkWidget`
+ * @id: an id returned by [method@Gtk.Widget.add_surface_transform_changed_callback]
*
* Removes a surface transform changed callback previously registered with
* gtk_widget_add_surface_transform_changed_callback().
@@ -3338,25 +3417,25 @@ gtk_widget_get_surface (GtkWidget *widget)
/**
* gtk_widget_realize:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Creates the GDK (windowing system) resources associated with a
- * widget. Normally realization happens implicitly; if you show
- * a widget and all its parent containers, then the widget will be
- * realized and mapped automatically.
+ * Creates the GDK resources associated with a widget.
*
- * Realizing a widget requires all
- * the widget’s parent widgets to be realized; calling
- * gtk_widget_realize() realizes the widget’s parents in addition to
- * @widget itself. If a widget is not yet inside a toplevel window
- * when you realize it, bad things will happen.
+ * Normally realization happens implicitly; if you show a widget
+ * and all its parent containers, then the widget will be realized
+ * and mapped automatically.
+ *
+ * Realizing a widget requires all the widget’s parent widgets to be
+ * realized; calling this function realizes the widget’s parents
+ * in addition to @widget itself. If a widget is not yet inside a
+ * toplevel window when you realize it, bad things will happen.
*
* This function is primarily used in widget implementations, and
* isn’t very useful otherwise. Many times when you think you might
* need it, a better approach is to connect to a signal that will be
* called after the widget is realized automatically, such as
- * #GtkWidget::realize.
- **/
+ * [signal@Gtk.Widget::realize].
+ */
void
gtk_widget_realize (GtkWidget *widget)
{
@@ -3394,12 +3473,13 @@ gtk_widget_realize (GtkWidget *widget)
/**
* gtk_widget_unrealize:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * This function is only useful in widget implementations.
* Causes a widget to be unrealized (frees all GDK resources
* associated with the widget).
- **/
+ *
+ * This function is only useful in widget implementations.
+ */
void
gtk_widget_unrealize (GtkWidget *widget)
{
@@ -3454,12 +3534,14 @@ gtk_widget_get_surface_allocation (GtkWidget *widget,
/**
* gtk_widget_queue_draw:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Schedules this widget to be redrawn in paint phase of the
- * current or the next frame. This means @widget's GtkWidgetClass.snapshot()
+ * current or the next frame.
+ *
+ * This means @widget's GtkWidgetClass.snapshot()
* implementation will be called.
- **/
+ */
void
gtk_widget_queue_draw (GtkWidget *widget)
{
@@ -3485,18 +3567,21 @@ gtk_widget_queue_draw (GtkWidget *widget)
static void
gtk_widget_set_alloc_needed (GtkWidget *widget);
+
/**
* gtk_widget_queue_allocate:
- * @widget: a #GtkWidget
- *
- * This function is only for use in widget implementations.
+ * @widget: a `GtkWidget`
*
* Flags the widget for a rerun of the GtkWidgetClass::size_allocate
- * function. Use this function instead of gtk_widget_queue_resize()
+ * function.
+ *
+ * Use this function instead of [method@Gtk.Widget.queue_resize]
* when the @widget's size request didn't change but it wants to
* reposition its contents.
*
- * An example user of this function is gtk_widget_set_halign().
+ * An example user of this function is [method@Gtk.Widget.set_halign].
+ *
+ * This function is only for use in widget implementations.
*/
void
gtk_widget_queue_allocate (GtkWidget *widget)
@@ -3519,9 +3604,10 @@ gtk_widget_get_resize_needed (GtkWidget *widget)
/*
* gtk_widget_queue_resize_internal:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Queue a resize on a widget, and on all other widgets grouped with this widget.
+ * Queue a resize on a widget, and on all other widgets
+ * grouped with this widget.
*/
static void
gtk_widget_queue_resize_internal (GtkWidget *widget)
@@ -3561,19 +3647,22 @@ gtk_widget_queue_resize_internal (GtkWidget *widget)
/**
* gtk_widget_queue_resize:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * This function is only for use in widget implementations.
- * Flags a widget to have its size renegotiated; should
- * be called when a widget for some reason has a new size request.
- * For example, when you change the text in a #GtkLabel, #GtkLabel
- * queues a resize to ensure there’s enough space for the new text.
+ * Flags a widget to have its size renegotiated.
+ *
+ * This should be called when a widget for some reason has a new
+ * size request. For example, when you change the text in a
+ * [class@Gtk.Label], the label queues a resize to ensure there’s
+ * enough space for the new text.
*
* Note that you cannot call gtk_widget_queue_resize() on a widget
* from inside its implementation of the GtkWidgetClass::size_allocate
* virtual method. Calls to gtk_widget_queue_resize() from inside
* GtkWidgetClass::size_allocate will be silently ignored.
- **/
+ *
+ * This function is only for use in widget implementations.
+ */
void
gtk_widget_queue_resize (GtkWidget *widget)
{
@@ -3587,20 +3676,21 @@ gtk_widget_queue_resize (GtkWidget *widget)
/**
* gtk_widget_get_frame_clock:
- * @widget: a #GtkWidget
- *
- * Obtains the frame clock for a widget. The frame clock is a global
- * “ticker” that can be used to drive animations and repaints. The
- * most common reason to get the frame clock is to call
- * gdk_frame_clock_get_frame_time(), in order to get a time to use for
- * animating. For example you might record the start of the animation
- * with an initial value from gdk_frame_clock_get_frame_time(), and
- * then update the animation by calling
- * gdk_frame_clock_get_frame_time() again during each repaint.
- *
- * gdk_frame_clock_request_phase() will result in a new frame on the
+ * @widget: a `GtkWidget`
+ *
+ * Obtains the frame clock for a widget.
+ *
+ * The frame clock is a global “ticker” that can be used to drive
+ * animations and repaints. The most common reason to get the frame
+ * clock is to call [method@Gdk.FrameClock.get_frame_time], in order
+ * to get a time to use for animating. For example you might record
+ * the start of the animation with an initial value from
+ * [method@Gdk.FrameClock.get_frame_time], and then update the animation
+ * by calling [method@Gdk.FrameClock.get_frame_time] again during each repaint.
+ *
+ * [method@Gdk.FrameClock.request_phase] will result in a new frame on the
* clock, but won’t necessarily repaint any widgets. To repaint a
- * widget, you have to use gtk_widget_queue_draw() which invalidates
+ * widget, you have to use [method@Gtk.Widget.queue_draw] which invalidates
* the widget (thus scheduling it to receive a draw on the next
* frame). gtk_widget_queue_draw() will also end up requesting a frame
* on the appropriate frame clock.
@@ -3611,8 +3701,8 @@ gtk_widget_queue_resize (GtkWidget *widget)
*
* Unrealized widgets do not have a frame clock.
*
- * Returns: (nullable) (transfer none): a #GdkFrameClock,
- * or %NULL if widget is unrealized
+ * Returns: (nullable) (transfer none): a `GdkFrameClock`,
+ * or %NULL if widget is unrealized
*/
GdkFrameClock*
gtk_widget_get_frame_clock (GtkWidget *widget)
@@ -3676,12 +3766,14 @@ get_box_padding (GtkCssStyle *style,
/**
* gtk_widget_size_allocate:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @allocation: position and size to be allocated to @widget
* @baseline: The baseline of the child, or -1
*
- * This is a simple form of gtk_widget_allocate() that takes the new position
- * of @widget as part of @allocation.
+ * Allocates widget with a transformation that translates
+ * the origin to the position in @allocation.
+ *
+ * This is a simple form of [method@Gtk.Widget.allocate].
*/
void
gtk_widget_size_allocate (GtkWidget *widget,
@@ -3816,20 +3908,22 @@ gtk_widget_adjust_size_allocation (GtkWidget *widget,
/**
* gtk_widget_allocate:
- * @widget: A #GtkWidget
+ * @widget: A `GtkWidget`
* @width: New width of @widget
* @height: New height of @widget
* @baseline: New baseline of @widget, or -1
* @transform: (transfer full) (allow-none): Transformation to be applied to @widget
*
- * This function is only used by #GtkWidget subclasses, to assign a size,
- * position and (optionally) baseline to their child widgets.
+ * This function is only used by `GtkWidget` subclasses, to
+ * assign a size, position and (optionally) baseline to their
+ * child widgets.
*
- * In this function, the allocation and baseline may be adjusted. The given
- * allocation will be forced to be bigger than the widget's minimum size,
- * as well as at least 0×0 in size.
+ * In this function, the allocation and baseline may be adjusted.
+ * The given allocation will be forced to be bigger than the
+ * widget's minimum size, as well as at least 0×0 in size.
*
- * For a version that does not take a transform, see gtk_widget_size_allocate()
+ * For a version that does not take a transform, see
+ * [method@Gtk.Widget.size_allocate].
*/
void
gtk_widget_allocate (GtkWidget *widget,
@@ -4033,8 +4127,8 @@ out:
/**
* gtk_widget_common_ancestor:
- * @widget_a: a #GtkWidget
- * @widget_b: a #GtkWidget
+ * @widget_a: a `GtkWidget`
+ * @widget_b: a `GtkWidget`
*
* Find the common ancestor of @widget_a and @widget_b that
* is closest to the two widgets.
@@ -4042,7 +4136,7 @@ out:
* Returns: (nullable): the closest common ancestor of @widget_a and
* @widget_b or %NULL if @widget_a and @widget_b do not
* share a common ancestor.
- **/
+ */
GtkWidget *
gtk_widget_common_ancestor (GtkWidget *widget_a,
GtkWidget *widget_b)
@@ -4092,20 +4186,22 @@ gtk_widget_common_ancestor (GtkWidget *widget_a,
/**
* gtk_widget_translate_coordinates:
- * @src_widget: a #GtkWidget
- * @dest_widget: a #GtkWidget
+ * @src_widget: a `GtkWidget`
+ * @dest_widget: a `GtkWidget`
* @src_x: X position relative to @src_widget
* @src_y: Y position relative to @src_widget
* @dest_x: (out) (optional): location to store X position relative to @dest_widget
* @dest_y: (out) (optional): location to store Y position relative to @dest_widget
*
- * Translate coordinates relative to @src_widget’s allocation to coordinates
- * relative to @dest_widget’s allocations. In order to perform this
- * operation, both widget must share a common toplevel.
+ * Translate coordinates relative to @src_widget’s allocation
+ * to coordinates relative to @dest_widget’s allocations.
+ *
+ * In order to perform this operation, both widget must share
+ * a common ancestor.
*
* Returns: %FALSE if @src_widget and @dest_widget have no common
- * ancestor. In this case, 0 is stored in
- * *@dest_x and *@dest_y. Otherwise %TRUE.
+ * ancestor. In this case, 0 is stored in *@dest_x and *@dest_y.
+ * Otherwise %TRUE.
**/
gboolean
gtk_widget_translate_coordinates (GtkWidget *src_widget,
@@ -4133,15 +4229,17 @@ gtk_widget_translate_coordinates (GtkWidget *src_widget,
/**
* gtk_widget_compute_point:
- * @widget: the #GtkWidget to query
- * @target: the #GtkWidget to transform into
+ * @widget: the `GtkWidget` to query
+ * @target: the `GtkWidget` to transform into
* @point: a point in @widget's coordinate system
* @out_point: (out caller-allocates): Set to the corresponding coordinates in
* @target's coordinate system
*
* Translates the given @point in @widget's coordinates to coordinates
- * relative to @target’s coordinate system. In order to perform this
- * operation, both widgets must share a common root.
+ * relative to @target’s coordinate system.
+ *
+ * In order to perform this operation, both widgets must share a
+ * common ancestor.
*
* Returns: %TRUE if the point could be determined, %FALSE on failure.
* In this case, 0 is stored in @out_point.
@@ -4180,6 +4278,7 @@ gtk_widget_compute_point (GtkWidget *widget,
*
* Creates a new shortcut for @widget_class that calls the given @callback
* with arguments read according to @format_string.
+ *
* The arguments and format string must be provided in the same way as
* with g_variant_new().
*
@@ -4188,7 +4287,7 @@ gtk_widget_compute_point (GtkWidget *widget,
* initialization. It does not provide for user_data, if you need that,
* you will have to use gtk_widget_class_add_shortcut() with a custom
* shortcut.
- **/
+ */
void
gtk_widget_class_add_binding (GtkWidgetClass *widget_class,
guint keyval,
@@ -4229,6 +4328,7 @@ gtk_widget_class_add_binding (GtkWidgetClass *widget_class,
*
* Creates a new shortcut for @widget_class that emits the given action
* @signal with arguments read according to @format_string.
+ *
* The arguments and format string must be provided in the same way as
* with g_variant_new().
*
@@ -4278,6 +4378,7 @@ gtk_widget_class_add_binding_signal (GtkWidgetClass *widget_class,
*
* Creates a new shortcut for @widget_class that activates the given
* @action_name with arguments read according to @format_string.
+ *
* The arguments and format string must be provided in the same way as
* with g_variant_new().
*
@@ -4319,16 +4420,17 @@ gtk_widget_class_add_binding_action (GtkWidgetClass *widget_class,
* @widget_class: the class to add the shortcut to
* @shortcut: (transfer none): the #GtkShortcut to add
*
- * Installs a shortcut in @widget_class. Every instance created for
- * @widget_class or its subclasses will inherit this shortcut and
- * trigger it.
+ * Installs a shortcut in @widget_class.
*
- * Shortcuts added this way will be triggered in the @GTK_PHASE_BUBBLE
+ * Every instance created for @widget_class or its subclasses will
+ * inherit this shortcut and trigger it.
+ *
+ * Shortcuts added this way will be triggered in the %GTK_PHASE_BUBBLE
* phase, which means they may also trigger if child widgets have focus.
*
* This function must only be used in class initialization functions
* otherwise it is not guaranteed that the shortcut will be installed.
- **/
+ */
void
gtk_widget_class_add_shortcut (GtkWidgetClass *widget_class,
GtkShortcut *shortcut)
@@ -4345,10 +4447,10 @@ gtk_widget_class_add_shortcut (GtkWidgetClass *widget_class,
/**
* gtk_widget_mnemonic_activate:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @group_cycling: %TRUE if there are other widgets with the same mnemonic
*
- * Emits the #GtkWidget::mnemonic-activate signal.
+ * Emits the `GtkWidget`::mnemonic-activate signal.
*
* Returns: %TRUE if the signal has been handled
*/
@@ -4374,9 +4476,9 @@ gtk_widget_mnemonic_activate (GtkWidget *widget,
/*< private >
* gtk_widget_can_activate:
- * @self: a #GtkWidget
+ * @self: a `GtkWidget`
*
- * Checks whether a #GtkWidget can be activated using
+ * Checks whether a `GtkWidget` can be activated using
* gtk_widget_activate().
*/
gboolean
@@ -4668,7 +4770,7 @@ gtk_widget_event (GtkWidget *widget,
/**
* gtk_widget_class_get_activate_signal:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidgetClass`
*
* Retrieves the signal id for the activation signal set using
* gtk_widget_class_set_activate_signal().
@@ -4686,10 +4788,10 @@ gtk_widget_class_get_activate_signal (GtkWidgetClass *widget_class)
/**
* gtk_widget_class_set_activate_signal:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidgetClass`
* @signal_id: the id for the activate signal
*
- * Sets the #GtkWidgetClass.activate_signal field with the
+ * Sets the GtkWidgetClass.activate_signal field with the
* given @signal_id; the signal will be emitted when calling
* gtk_widget_activate().
*
@@ -4708,10 +4810,10 @@ gtk_widget_class_set_activate_signal (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_set_activate_signal_from_name:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidgetClass`
* @signal_name: the name of the activate signal of @widget_type
*
- * Sets the #GtkWidgetClass.activate_signal field with the signal id for
+ * Sets the GtkWidgetClass.activate_signal field with the signal id for
* the given @signal_name; the signal will be emitted when calling
* gtk_widget_activate().
*
@@ -4741,12 +4843,13 @@ gtk_widget_class_set_activate_signal_from_name (GtkWidgetClass *widget_class,
/**
* gtk_widget_activate:
- * @widget: a #GtkWidget that’s activatable
+ * @widget: a `GtkWidget` that’s activatable
*
* For widgets that can be “activated” (buttons, menu items, etc.)
- * this function activates them. The activation will emit the signal
- * set using gtk_widget_class_set_activate_signal() during class
- * initialization.
+ * this function activates them.
+ *
+ * The activation will emit the signal set using
+ * gtk_widget_class_set_activate_signal() during class initialization.
*
* Activation is what happens when you press Enter on a widget during
* key navigation.
@@ -4758,7 +4861,7 @@ gtk_widget_class_set_activate_signal_from_name (GtkWidgetClass *widget_class,
* If @widget isn't activatable, the function returns %FALSE.
*
* Returns: %TRUE if the widget was activatable
- **/
+ */
gboolean
gtk_widget_activate (GtkWidget *widget)
{
@@ -4778,20 +4881,19 @@ gtk_widget_activate (GtkWidget *widget)
/**
* gtk_widget_grab_focus:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Causes @widget (or one of its descendents) to have the keyboard focus
- * for the #GtkWindow it's inside.
+ * Causes @widget to have the keyboard focus for the `GtkWindow` it's inside.
*
* If @widget is not focusable, or its ::grab_focus implementation cannot
* transfer the focus to a descendant of @widget that is focusable, it will
* not take focus and %FALSE will be returned.
*
- * Calling gtk_widget_grab_focus() on an already focused widget is allowed,
- * should not have an effect, and return %TRUE.
+ * Calling [method@Gtk.Widget.grab_focus] on an already focused widget
+ * is allowed, should not have an effect, and return %TRUE.
*
* Returns: %TRUE if focus is now inside @widget.
- **/
+ */
gboolean
gtk_widget_grab_focus (GtkWidget *widget)
{
@@ -5041,8 +5143,8 @@ gtk_widget_real_keynav_failed (GtkWidget *widget,
}
/**
- * gtk_widget_set_can_focus:
- * @widget: a #GtkWidget
+ * gtk_widget_set_can_focus: (attributes org.gtk.Method.set_property=can-focus)
+ * @widget: a `GtkWidget`
* @can_focus: whether or not the input focus can enter
* the widget or any of its children
*
@@ -5058,9 +5160,9 @@ gtk_widget_real_keynav_failed (GtkWidget *widget,
* that is marked as not can-focus in order to receive input
* focus.
*
- * See gtk_widget_grab_focus() for actually setting the input
- * focus on a widget.
- **/
+ * See [method@Gtk.Widget.grab_focus] for actually setting
+ * the input focus on a widget.
+ */
void
gtk_widget_set_can_focus (GtkWidget *widget,
gboolean can_focus)
@@ -5079,16 +5181,16 @@ gtk_widget_set_can_focus (GtkWidget *widget,
}
/**
- * gtk_widget_get_can_focus:
- * @widget: a #GtkWidget
+ * gtk_widget_get_can_focus: (attributes org.gtk.Method.get_property=can-focus)
+ * @widget: a `GtkWidget`
*
* Determines whether the input focus can enter @widget or any
* of its children.
*
- * See gtk_widget_set_focusable().
+ * See [method@Gtk.Widget.set_focusable].
*
* Returns: %TRUE if the input focus can enter @widget, %FALSE otherwise
- **/
+ */
gboolean
gtk_widget_get_can_focus (GtkWidget *widget)
{
@@ -5100,8 +5202,8 @@ gtk_widget_get_can_focus (GtkWidget *widget)
}
/**
- * gtk_widget_set_focusable:
- * @widget: a #GtkWidget
+ * gtk_widget_set_focusable: (attributes org.gtk.Method.set_property=focusable)
+ * @widget: a `GtkWidget`
* @focusable: whether or not @widget can own the input focus
*
* Specifies whether @widget can own the input focus.
@@ -5115,9 +5217,9 @@ gtk_widget_get_can_focus (GtkWidget *widget)
* that is marked as not can-focus in order to receive input
* focus.
*
- * See gtk_widget_grab_focus() for actually setting the input
- * focus on a widget.
- **/
+ * See [method@Gtk.Widget.grab_focus] for actually setting
+ * the input focus on a widget.
+ */
void
gtk_widget_set_focusable (GtkWidget *widget,
gboolean focusable)
@@ -5139,14 +5241,15 @@ gtk_widget_set_focusable (GtkWidget *widget,
}
/**
- * gtk_widget_get_focusable:
- * @widget: a #GtkWidget
+ * gtk_widget_get_focusable: (attributes org.gtk.Method.get_property=focusable)
+ * @widget: a `GtkWidget`
*
* Determines whether @widget can own the input focus.
- * See gtk_widget_set_focusable().
+ *
+ * See [method@Gtk.Widget.set_focusable].
*
* Returns: %TRUE if @widget can own the input focus, %FALSE otherwise
- **/
+ */
gboolean
gtk_widget_get_focusable (GtkWidget *widget)
{
@@ -5158,15 +5261,17 @@ gtk_widget_get_focusable (GtkWidget *widget)
}
/**
- * gtk_widget_has_focus:
- * @widget: a #GtkWidget
+ * gtk_widget_has_focus: (attributes org.gtk.Method.get_property=has-focus)
+ * @widget: a `GtkWidget`
*
- * Determines if the widget has the global input focus. See
- * gtk_widget_is_focus() for the difference between having the global
- * input focus, and only having the focus within a toplevel.
+ * Determines if the widget has the global input focus.
+ *
+ * See [method@Gtk.Widget.is_focus] for the difference between
+ * having the global input focus, and only having the focus
+ * within a toplevel.
*
* Returns: %TRUE if the widget has the global input focus.
- **/
+ */
gboolean
gtk_widget_has_focus (GtkWidget *widget)
{
@@ -5179,17 +5284,18 @@ gtk_widget_has_focus (GtkWidget *widget)
/**
* gtk_widget_has_visible_focus:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Determines if the widget should show a visible indication that
- * it has the global input focus. This is a convenience function
- * that takes into account whether focus indication should currently
- * be shown in the toplevel window of @widget.
- * See gtk_window_get_focus_visible() for more information
- * about focus indication.
+ * it has the global input focus.
+ *
+ * This is a convenience function that takes into account whether
+ * focus indication should currently be shown in the toplevel window
+ * of @widget. See [method@Gtk.Window.get_focus_visible] for more
+ * information about focus indication.
*
* To find out if the widget has the global input focus, use
- * gtk_widget_has_focus().
+ * [method@Gtk.Widget.has_focus].
*
* Returns: %TRUE if the widget should display a “focus rectangle”
*/
@@ -5218,15 +5324,18 @@ gtk_widget_has_visible_focus (GtkWidget *widget)
/**
* gtk_widget_is_focus:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Determines if the widget is the focus widget within its
- * toplevel. (This does not mean that the #GtkWidget:has-focus property is
- * necessarily set; #GtkWidget:has-focus will only be set if the
- * toplevel widget additionally has the global input focus.)
+ * toplevel.
+ *
+ * This does not mean that the [property@Gtk.Widget:has-focus]
+ * property is necessarily set; [property@Gtk,Widget:has-focus]
+ * will only be set if the toplevel widget additionally has the
+ * global input focus.)
*
* Returns: %TRUE if the widget is the focus widget.
- **/
+ */
gboolean
gtk_widget_is_focus (GtkWidget *widget)
{
@@ -5241,15 +5350,18 @@ gtk_widget_is_focus (GtkWidget *widget)
}
/**
- * gtk_widget_set_focus_on_click:
- * @widget: a #GtkWidget
- * @focus_on_click: whether the widget should grab focus when clicked with the mouse
+ * gtk_widget_set_focus_on_click: (attributes org.gtk.Method.set_property=focus-on-click)
+ * @widget: a `GtkWidget`
+ * @focus_on_click: whether the widget should grab focus when clicked
+ * with the mouse
*
- * Sets whether the widget should grab focus when it is clicked with the mouse.
- * Making mouse clicks not grab focus is useful in places like toolbars where
- * you don’t want the keyboard focus removed from the main area of the
- * application.
- **/
+ * Sets whether the widget should grab focus when it is clicked
+ * with the mouse.
+ *
+ * Making mouse clicks not grab focus is useful in places like
+ * toolbars where you don’t want the keyboard focus removed from
+ * the main area of the application.
+ */
void
gtk_widget_set_focus_on_click (GtkWidget *widget,
gboolean focus_on_click)
@@ -5269,15 +5381,17 @@ gtk_widget_set_focus_on_click (GtkWidget *widget,
}
/**
- * gtk_widget_get_focus_on_click:
- * @widget: a #GtkWidget
+ * gtk_widget_get_focus_on_click: (attributes org.gtk.Method.get_property=focus-on-click)
+ * @widget: a `GtkWidget`
*
- * Returns whether the widget should grab focus when it is clicked with the mouse.
- * See gtk_widget_set_focus_on_click().
+ * Returns whether the widget should grab focus when it is clicked
+ * with the mouse.
*
- * Returns: %TRUE if the widget should grab focus when it is clicked with
- * the mouse.
- **/
+ * See [method@Gtk.Widget.set_focus_on_click].
+ *
+ * Returns: %TRUE if the widget should grab focus when it is
+ * clicked with the mouse
+ */
gboolean
gtk_widget_get_focus_on_click (GtkWidget *widget)
{
@@ -5289,14 +5403,14 @@ gtk_widget_get_focus_on_click (GtkWidget *widget)
}
/**
- * gtk_widget_has_default:
- * @widget: a #GtkWidget
+ * gtk_widget_has_default: (attributes org.gtk.Method.get_property=has-default)
+ * @widget: a `GtkWidget`
*
- * Determines whether @widget is the current default widget within its
- * toplevel.
+ * Determines whether @widget is the current default widget
+ * within its toplevel.
*
- * Returns: %TRUE if @widget is the current default widget within
- * its toplevel, %FALSE otherwise
+ * Returns: %TRUE if @widget is the current default widget
+ * within its toplevel, %FALSE otherwise
*/
gboolean
gtk_widget_has_default (GtkWidget *widget)
@@ -5323,14 +5437,14 @@ _gtk_widget_set_has_default (GtkWidget *widget,
}
/**
- * gtk_widget_set_receives_default:
- * @widget: a #GtkWidget
+ * gtk_widget_set_receives_default: (attributes org.gtk.Method.set_property=receives-default)
+ * @widget: a `GtkWidget`
* @receives_default: whether or not @widget can be a default widget.
*
* Specifies whether @widget will be treated as the default
* widget within its toplevel when it has the focus, even if
* another widget is the default.
- **/
+ */
void
gtk_widget_set_receives_default (GtkWidget *widget,
gboolean receives_default)
@@ -5348,18 +5462,18 @@ gtk_widget_set_receives_default (GtkWidget *widget,
}
/**
- * gtk_widget_get_receives_default:
- * @widget: a #GtkWidget
+ * gtk_widget_get_receives_default: (attributes org.gtk.Method.get_property=receives-default)
+ * @widget: a `GtkWidget`
*
* Determines whether @widget is always treated as the default widget
* within its toplevel when it has the focus, even if another widget
* is the default.
*
- * See gtk_widget_set_receives_default().
+ * See [method@Gtk.Widget.set_receives_default].
*
* Returns: %TRUE if @widget acts as the default widget when focused,
- * %FALSE otherwise
- **/
+ * %FALSE otherwise
+ */
gboolean
gtk_widget_get_receives_default (GtkWidget *widget)
{
@@ -5372,7 +5486,7 @@ gtk_widget_get_receives_default (GtkWidget *widget)
/*< private >
* gtk_widget_has_grab:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Determines whether the widget is currently grabbing events, so it
* is the only widget receiving input events (keyboard and mouse).
@@ -5401,14 +5515,16 @@ _gtk_widget_set_has_grab (GtkWidget *widget,
}
/**
- * gtk_widget_set_name:
- * @widget: a #GtkWidget
+ * gtk_widget_set_name: (attributes org.gtk.Method.set_property=name)
+ * @widget: a `GtkWidget`
* @name: name for the widget
*
- * Widgets can be named, which allows you to refer to them from a
+ * Sets a widgets name.
+ *
+ * Setting a name allows you to refer to the widget from a
* CSS file. You can apply a style to widgets with a particular name
* in the CSS file. See the documentation for the CSS syntax (on the
- * same page as the docs for #GtkStyleContext).
+ * same page as the docs for [class@Gtk.StyleContext].
*
* Note that the CSS syntax has certain special characters to delimit
* and represent elements in a selector (period, #, >, *...), so using
@@ -5432,15 +5548,16 @@ gtk_widget_set_name (GtkWidget *widget,
}
/**
- * gtk_widget_get_name:
- * @widget: a #GtkWidget
+ * gtk_widget_get_name: (attributes org.gtk.Method.get_property=name)
+ * @widget: a `GtkWidget`
+ *
+ * Retrieves the name of a widget.
*
- * Retrieves the name of a widget. See gtk_widget_set_name() for the
- * significance of widget names.
+ * See [method@Gtk.Widget.set_name] for the significance of widget names.
*
* Returns: name of the widget. This string is owned by GTK and
- * should not be modified or freed
- **/
+ * should not be modified or freed
+ */
const char *
gtk_widget_get_name (GtkWidget *widget)
{
@@ -5485,17 +5602,20 @@ gtk_widget_update_state_flags (GtkWidget *widget,
/**
* gtk_widget_set_state_flags:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @flags: State flags to turn on
* @clear: Whether to clear state before turning on @flags
*
- * This function is for use in widget implementations. Turns on flag
- * values in the current widget state (insensitive, prelighted, etc.).
+ * Turns on flag values in the current widget state.
+ *
+ * Typical widget states are insensitive, prelighted, etc.
*
* This function accepts the values %GTK_STATE_FLAG_DIR_LTR and
* %GTK_STATE_FLAG_DIR_RTL but ignores them. If you want to set
- * the widget's direction, use gtk_widget_set_direction().
- **/
+ * the widget's direction, use [method@Gtk.Widget.set_direction].
+ *
+ * This function is for use in widget implementations.
+ */
void
gtk_widget_set_state_flags (GtkWidget *widget,
GtkStateFlags flags,
@@ -5521,13 +5641,15 @@ gtk_widget_set_state_flags (GtkWidget *widget,
/**
* gtk_widget_unset_state_flags:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @flags: State flags to turn off
*
- * This function is for use in widget implementations. Turns off flag
- * values for the current widget state (insensitive, prelighted, etc.).
- * See gtk_widget_set_state_flags().
- **/
+ * Turns off flag values for the current widget state.
+ *
+ * See [method@Gtk.Widget.set_state_flags].
+ *
+ * This function is for use in widget implementations.
+ */
void
gtk_widget_unset_state_flags (GtkWidget *widget,
GtkStateFlags flags)
@@ -5544,19 +5666,20 @@ gtk_widget_unset_state_flags (GtkWidget *widget,
/**
* gtk_widget_get_state_flags:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Returns the widget state as a flag set.
*
- * Returns the widget state as a flag set. It is worth mentioning
- * that the effective %GTK_STATE_FLAG_INSENSITIVE state will be
- * returned, that is, also based on parent insensitivity, even if
- * @widget itself is sensitive.
+ * It is worth mentioning that the effective %GTK_STATE_FLAG_INSENSITIVE
+ * state will be returned, that is, also based on parent insensitivity,
+ * even if @widget itself is sensitive.
*
* Also note that if you are looking for a way to obtain the
- * #GtkStateFlags to pass to a #GtkStyleContext method, you
- * should look at gtk_style_context_get_state().
+ * [flags@Gtk.StateFlags] to pass to a [class@Gtk.StyleContext]
+ * method, you should look at [method@Gtk.StyleContext.get_state].
*
* Returns: The state flags for widget
- **/
+ */
GtkStateFlags
gtk_widget_get_state_flags (GtkWidget *widget)
{
@@ -5568,18 +5691,19 @@ gtk_widget_get_state_flags (GtkWidget *widget)
}
/**
- * gtk_widget_set_visible:
- * @widget: a #GtkWidget
+ * gtk_widget_set_visible: (attributes org.gtk.Method.set_property=visible)
+ * @widget: a `GtkWidget`
* @visible: whether the widget should be shown or not
*
- * Sets the visibility state of @widget. Note that setting this to
- * %TRUE doesn’t mean the widget is actually viewable, see
- * gtk_widget_get_visible().
+ * Sets the visibility state of @widget.
*
- * This function simply calls gtk_widget_show() or gtk_widget_hide()
- * but is nicer to use when the visibility of the widget depends on
- * some condition.
- **/
+ * Note that setting this to %TRUE doesn’t mean the widget is
+ * actually viewable, see [method@Gtk.Widget.get_visible].
+ *
+ * This function simply calls [method@Gtk.Widget.show] or
+ * [method@Gtk.Widget.hide] but is nicer to use when the
+ * visibility of the widget depends on some condition.
+ */
void
gtk_widget_set_visible (GtkWidget *widget,
gboolean visible)
@@ -5614,19 +5738,22 @@ _gtk_widget_set_visible_flag (GtkWidget *widget,
}
/**
- * gtk_widget_get_visible:
- * @widget: a #GtkWidget
+ * gtk_widget_get_visible: (attributes org.gtk.Method.get_property=visible)
+ * @widget: a `GtkWidget`
*
- * Determines whether the widget is visible. If you want to
- * take into account whether the widget’s parent is also marked as
- * visible, use gtk_widget_is_visible() instead.
+ * Determines whether the widget is visible.
*
- * This function does not check if the widget is obscured in any way.
+ * If you want to take into account whether the widget’s
+ * parent is also marked as visible, use
+ * [method@Gtk.Widget.is_visible] instead.
+ *
+ * This function does not check if the widget is
+ * obscured in any way.
*
- * See gtk_widget_set_visible().
+ * See [method@Gtk.Widget.set_visible].
*
* Returns: %TRUE if the widget is visible
- **/
+ */
gboolean
gtk_widget_get_visible (GtkWidget *widget)
{
@@ -5639,17 +5766,18 @@ gtk_widget_get_visible (GtkWidget *widget)
/**
* gtk_widget_is_visible:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Determines whether the widget and all its parents are marked as
* visible.
*
* This function does not check if the widget is obscured in any way.
*
- * See also gtk_widget_get_visible() and gtk_widget_set_visible()
+ * See also [method@Gtk.Widget.get_visible] and
+ * [method@Gtk.Widget.set_visible].
*
* Returns: %TRUE if the widget and all its parents are visible
- **/
+ */
gboolean
gtk_widget_is_visible (GtkWidget *widget)
{
@@ -5670,13 +5798,14 @@ gtk_widget_is_visible (GtkWidget *widget)
/**
* gtk_widget_is_drawable:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Determines whether @widget can be drawn to.
*
- * Determines whether @widget can be drawn to. A widget can be drawn
- * if it is mapped and visible.
+ * A widget can be drawn if it is mapped and visible.
*
* Returns: %TRUE if @widget is drawable, %FALSE otherwise
- **/
+ */
gboolean
gtk_widget_is_drawable (GtkWidget *widget)
{
@@ -5688,12 +5817,12 @@ gtk_widget_is_drawable (GtkWidget *widget)
/**
* gtk_widget_get_realized:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Determines whether @widget is realized.
*
* Returns: %TRUE if @widget is realized, %FALSE otherwise
- **/
+ */
gboolean
gtk_widget_get_realized (GtkWidget *widget)
{
@@ -5706,7 +5835,7 @@ gtk_widget_get_realized (GtkWidget *widget)
/**
* gtk_widget_get_mapped:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Whether the widget is mapped.
*
@@ -5723,15 +5852,17 @@ gtk_widget_get_mapped (GtkWidget *widget)
}
/**
- * gtk_widget_set_sensitive:
- * @widget: a #GtkWidget
+ * gtk_widget_set_sensitive: (attributes org.gtk.Method.set_property=sensitive)
+ * @widget: a `GtkWidget`
* @sensitive: %TRUE to make the widget sensitive
*
- * Sets the sensitivity of a widget. A widget is sensitive if the user
- * can interact with it. Insensitive widgets are “grayed out” and the
- * user can’t interact with them. Insensitive widgets are known as
+ * Sets the sensitivity of a widget.
+ *
+ * A widget is sensitive if the user can interact with it.
+ * Insensitive widgets are “grayed out” and the user can’t
+ * interact with them. Insensitive widgets are known as
* “inactive”, “disabled”, or “ghosted” in some other toolkits.
- **/
+ */
void
gtk_widget_set_sensitive (GtkWidget *widget,
gboolean sensitive)
@@ -5786,14 +5917,17 @@ gtk_widget_set_sensitive (GtkWidget *widget,
}
/**
- * gtk_widget_get_sensitive:
- * @widget: a #GtkWidget
+ * gtk_widget_get_sensitive: (attributes org.gtk.Method.get_property=sensitive)
+ * @widget: a `GtkWidget`
*
- * Returns the widget’s sensitivity (in the sense of returning
- * the value that has been set using gtk_widget_set_sensitive()).
+ * Returns the widget’s sensitivity.
*
- * The effective sensitivity of a widget is however determined by both its
- * own and its parent widget’s sensitivity. See gtk_widget_is_sensitive().
+ * This function returns the value that has been set using
+ * [method@Gtk.Widget.set_sensitive]).
+ *
+ * The effective sensitivity of a widget is however determined
+ * by both its own and its parent widget’s sensitivity.
+ * See [method@Gtk.Widget.is_sensitive].
*
* Returns: %TRUE if the widget is sensitive
*/
@@ -5809,10 +5943,12 @@ gtk_widget_get_sensitive (GtkWidget *widget)
/**
* gtk_widget_is_sensitive:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Returns the widget’s effective sensitivity.
*
- * Returns the widget’s effective sensitivity, which means
- * it is sensitive itself and also its parent widget is sensitive
+ * This means it is sensitive itself and also its
+ * parent widget is sensitive.
*
* Returns: %TRUE if the widget is effectively sensitive
*/
@@ -5978,18 +6114,19 @@ gtk_widget_reposition_after (GtkWidget *widget,
}
/**
- * gtk_widget_set_parent:
- * @widget: a #GtkWidget
+ * gtk_widget_set_parent: (attributes org.gtk.Method.set_property=parent)
+ * @widget: a `GtkWidget`
* @parent: parent widget
*
- * This function is useful only when implementing subclasses of
- * #GtkWidget.
+ * Sets @parent as the parent widget of @widget.
*
- * Sets @parent as the parent widget of @widget, and takes care of
- * some details such as updating the state and style of the child
- * to reflect its new location and resizing the parent. The opposite
- * function is gtk_widget_unparent().
- **/
+ * This takes care of details such as updating the state and style
+ * of the child to reflect its new location and resizing the parent.
+ * The opposite function is [method@Gtk.Widget.unparent].
+ *
+ * This function is useful only when implementing subclasses of
+ * `GtkWidget`.
+ */
void
gtk_widget_set_parent (GtkWidget *widget,
GtkWidget *parent)
@@ -6004,13 +6141,14 @@ gtk_widget_set_parent (GtkWidget *widget,
}
/**
- * gtk_widget_get_parent:
- * @widget: a #GtkWidget
+ * gtk_widget_get_parent: (attributes org.gtk.Method.get_property=parent)
+ * @widget: a `GtkWidget`
*
* Returns the parent widget of @widget.
*
- * Returns: (transfer none) (nullable): the parent widget of @widget, or %NULL
- **/
+ * Returns: (transfer none) (nullable): the parent widget of @widget,
+ * or %NULL
+ */
GtkWidget *
gtk_widget_get_parent (GtkWidget *widget)
{
@@ -6022,16 +6160,19 @@ gtk_widget_get_parent (GtkWidget *widget)
}
/**
- * gtk_widget_get_root:
- * @widget: a #GtkWidget
+ * gtk_widget_get_root: (attributes org.gtk.Method.get_property=root)
+ * @widget: a `GtkWidget`
*
- * Returns the #GtkRoot widget of @widget or %NULL if the widget is not contained
+ * Returns the `GtkRoot` widget of @widget.
+ *
+ * This function will return %NULL if the widget is not contained
* inside a widget tree with a root widget.
*
- * #GtkRoot widgets will return themselves here.
+ * `GtkRoot` widgets will return themselves here.
*
- * Returns: (transfer none) (nullable): the root widget of @widget, or %NULL
- **/
+ * Returns: (transfer none) (nullable): the root widget of @widget,
+ * or %NULL
+ */
GtkRoot *
gtk_widget_get_root (GtkWidget *widget)
{
@@ -6042,15 +6183,16 @@ gtk_widget_get_root (GtkWidget *widget)
/**
* gtk_widget_get_native:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Returns the `GtkNative` widget that contains @widget.
*
- * Returns the GtkNative widget that contains @widget,
- * or %NULL if the widget is not contained inside a
- * widget tree with a native ancestor.
+ * This function will return %NULL if the widget is not
+ * contained inside a widget tree with a native ancestor.
*
- * #GtkNative widgets will return themselves here.
+ * `GtkNative` widgets will return themselves here.
*
- * Returns: (transfer none) (nullable): the #GtkNative
+ * Returns: (transfer none) (nullable): the `GtkNative`
* widget of @widget, or %NULL
*/
GtkNative *
@@ -6249,18 +6391,20 @@ gtk_widget_peek_pango_context (GtkWidget *widget)
/**
* gtk_widget_get_pango_context:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Gets a #PangoContext with the appropriate font map, font description,
- * and base direction for this widget. Unlike the context returned
- * by gtk_widget_create_pango_context(), this context is owned by
- * the widget (it can be used until the screen for the widget changes
- * or the widget is removed from its toplevel), and will be updated to
- * match any changes to the widget’s attributes. This can be tracked
- * by listening to changes of the #GtkWidget:root property on the widget.
+ * Gets a `PangoContext` with the appropriate font map, font description,
+ * and base direction for this widget.
*
- * Returns: (transfer none): the #PangoContext for the widget.
- **/
+ * Unlike the context returned by [method@Gtk.Widget.create_pango_context],
+ * this context is owned by the widget (it can be used until the screen
+ * for the widget changes or the widget is removed from its toplevel),
+ * and will be updated to match any changes to the widget’s attributes.
+ * This can be tracked by listening to changes of the
+ * [property@Gtk.Widget:root] property on the widget.
+ *
+ * Returns: (transfer none): the `PangoContext` for the widget.
+ */
PangoContext *
gtk_widget_get_pango_context (GtkWidget *widget)
{
@@ -6350,13 +6494,16 @@ gtk_widget_update_pango_context (GtkWidget *widget)
/**
* gtk_widget_set_font_options:
- * @widget: a #GtkWidget
- * @options: (allow-none): a #cairo_font_options_t, or %NULL to unset any
- * previously set default font options.
+ * @widget: a `GtkWidget`
+ * @options: (allow-none): a #cairo_font_options_t, or %NULL
+ * to unset any previously set default font options.
*
- * Sets the #cairo_font_options_t used for Pango rendering in this widget.
- * When not set, the default font options for the #GdkDisplay will be used.
- **/
+ * Sets the `cairo_font_options_t` used for Pango rendering
+ * in this widget.
+ *
+ * When not set, the default font options for the `GdkDisplay`
+ * will be used.
+ */
void
gtk_widget_set_font_options (GtkWidget *widget,
const cairo_font_options_t *options)
@@ -6379,13 +6526,16 @@ gtk_widget_set_font_options (GtkWidget *widget,
/**
* gtk_widget_get_font_options:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Returns the #cairo_font_options_t used for Pango rendering. When not set,
- * the defaults font options for the #GdkDisplay will be used.
+ * Returns the `cairo_font_options_t` used for Pango rendering.
*
- * Returns: (transfer none) (nullable): the #cairo_font_options_t or %NULL if not set
- **/
+ * When not set, the defaults font options for the `GdkDisplay`
+ * will be used.
+ *
+ * Returns: (transfer none) (nullable): the `cairo_font_options_t`
+ * or %NULL if not set
+ */
const cairo_font_options_t *
gtk_widget_get_font_options (GtkWidget *widget)
{
@@ -6407,14 +6557,16 @@ gtk_widget_set_font_map_recurse (GtkWidget *widget, gpointer user_data)
/**
* gtk_widget_set_font_map:
- * @widget: a #GtkWidget
- * @font_map: (allow-none): a #PangoFontMap, or %NULL to unset any previously
- * set font map
+ * @widget: a `GtkWidget`
+ * @font_map: (allow-none): a `PangoFontMap`, or %NULL to unset any
+ * previously set font map
+ *
+ * Sets the font map to use for Pango rendering.
*
- * Sets the font map to use for Pango rendering. The font map is the
- * object that is used to look up fonts. Setting a custom font map
- * can be useful in special situations, e.g. when you need to add
- * application-specific fonts to the set of available fonts.
+ * The font map is the object that is used to look up fonts.
+ * Setting a custom font map can be useful in special situations,
+ * e.g. when you need to add application-specific fonts to the set
+ * of available fonts.
*
* When not set, the widget will inherit the font map from its parent.
*/
@@ -6442,11 +6594,13 @@ gtk_widget_set_font_map (GtkWidget *widget,
/**
* gtk_widget_get_font_map:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Gets the font map that has been set with gtk_widget_set_font_map().
+ * Gets the font map of @widget.
*
- * Returns: (transfer none) (nullable): A #PangoFontMap, or %NULL
+ * See [method@Gtk.Widget.set_font_map].
+ *
+ * Returns: (transfer none) (nullable): A `PangoFontMap`, or %NULL
*/
PangoFontMap *
gtk_widget_get_font_map (GtkWidget *widget)
@@ -6458,14 +6612,16 @@ gtk_widget_get_font_map (GtkWidget *widget)
/**
* gtk_widget_create_pango_context:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Creates a new #PangoContext with the appropriate font map,
+ * Creates a new `PangoContext` with the appropriate font map,
* font options, font description, and base direction for drawing
- * text for this widget. See also gtk_widget_get_pango_context().
+ * text for this widget.
*
- * Returns: (transfer full): the new #PangoContext
- **/
+ * See also [method@Gtk.Widget.get_pango_context].
+ *
+ * Returns: (transfer full): the new `PangoContext`
+ */
PangoContext *
gtk_widget_create_pango_context (GtkWidget *widget)
{
@@ -6482,19 +6638,19 @@ gtk_widget_create_pango_context (GtkWidget *widget)
/**
* gtk_widget_create_pango_layout:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @text: (nullable): text to set on the layout (can be %NULL)
*
- * Creates a new #PangoLayout with the appropriate font map,
+ * Creates a new `PangoLayout` with the appropriate font map,
* font description, and base direction for drawing text for
* this widget.
*
- * If you keep a #PangoLayout created in this way around, you need
- * to re-create it when the widget #PangoContext is replaced.
- * This can be tracked by listening to changes of the #GtkWidget:root property
- * on the widget.
+ * If you keep a `PangoLayout` created in this way around,
+ * you need to re-create it when the widget `PangoContext`
+ * is replaced. This can be tracked by listening to changes
+ * of the [property@Gtk.Widget:root] property on the widget.
*
- * Returns: (transfer full): the new #PangoLayout
+ * Returns: (transfer full): the new `PangoLayout`
**/
PangoLayout *
gtk_widget_create_pango_layout (GtkWidget *widget,
@@ -6516,17 +6672,17 @@ gtk_widget_create_pango_layout (GtkWidget *widget,
/**
* gtk_widget_set_child_visible:
- * @widget: a #GtkWidget
- * @child_visible: if %TRUE, @widget should be mapped along with its parent.
+ * @widget: a `GtkWidget`
+ * @child_visible: if %TRUE, @widget should be mapped along
+ * with its parent.
*
- * Sets whether @widget should be mapped along with its when its parent
- * is mapped and @widget has been shown with gtk_widget_show().
+ * Sets whether @widget should be mapped along with its parent.
*
- * The child visibility can be set for widget before it is added to
- * a container with gtk_widget_set_parent(), to avoid mapping
- * children unnecessary before immediately unmapping them. However
- * it will be reset to its default state of %TRUE when the widget
- * is removed from a container.
+ * The child visibility can be set for widget before it is added
+ * to a container with [method@Gtk.Widget.set_parent], to avoid
+ * mapping children unnecessary before immediately unmapping them.
+ * However it will be reset to its default state of %TRUE when the
+ * widget is removed from a container.
*
* Note that changing the child visibility of a widget does not
* queue a resize on the widget. Most of the time, the size of
@@ -6534,9 +6690,9 @@ gtk_widget_create_pango_layout (GtkWidget *widget,
* not they are mapped. If this is not the case, the container
* can queue a resize itself.
*
- * This function is only useful for container implementations and
- * never should be called by an application.
- **/
+ * This function is only useful for container implementations
+ * and should never be called by an application.
+ */
void
gtk_widget_set_child_visible (GtkWidget *widget,
gboolean child_visible)
@@ -6583,17 +6739,18 @@ gtk_widget_set_child_visible (GtkWidget *widget,
/**
* gtk_widget_get_child_visible:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Gets the value set with gtk_widget_set_child_visible().
+ *
* If you feel a need to use this function, your code probably
* needs reorganization.
*
- * This function is only useful for container implementations and
- * never should be called by an application.
+ * This function is only useful for container implementations
+ * and should never be called by an application.
*
* Returns: %TRUE if the widget is mapped with the parent.
- **/
+ */
gboolean
gtk_widget_get_child_visible (GtkWidget *widget)
{
@@ -6622,14 +6779,16 @@ _gtk_widget_scale_changed (GtkWidget *widget)
}
/**
- * gtk_widget_get_scale_factor:
- * @widget: a #GtkWidget
+ * gtk_widget_get_scale_factor: (attributes org.gtk.Method.get_property=scale-factor)
+ * @widget: a `GtkWidget`
*
- * Retrieves the internal scale factor that maps from window coordinates
- * to the actual device pixels. On traditional systems this is 1, on
- * high density outputs, it can be a higher value (typically 2).
+ * Retrieves the internal scale factor that maps from window
+ * coordinates to the actual device pixels.
*
- * See gdk_surface_get_scale_factor().
+ * On traditional systems this is 1, on high density outputs,
+ * it can be a higher value (typically 2).
+ *
+ * See [method@Gdk.Surface.get_scale_factor].
*
* Returns: the scale factor for @widget
*/
@@ -6674,19 +6833,22 @@ gtk_widget_get_scale_factor (GtkWidget *widget)
/**
* gtk_widget_get_display:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Get the `GdkDisplay` for the toplevel window associated with
+ * this widget.
*
- * Get the #GdkDisplay for the toplevel window associated with
- * this widget. This function can only be called after the widget
- * has been added to a widget hierarchy with a #GtkWindow at the top.
+ * This function can only be called after the widget has been
+ * added to a widget hierarchy with a `GtkWindow` at the top.
*
* In general, you should only create display specific
* resources when a widget has been realized, and you should
* free those resources when the widget is unrealized.
*
- * Returns: (transfer none): the #GdkDisplay for the toplevel for this widget.
- **/
-GdkDisplay*
+ * Returns: (transfer none): the `GdkDisplay` for the toplevel
+ * for this widget.
+ */
+GdkDisplay *
gtk_widget_get_display (GtkWidget *widget)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
@@ -6696,29 +6858,32 @@ gtk_widget_get_display (GtkWidget *widget)
/**
* gtk_widget_child_focus:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @direction: direction of focus movement
*
+ * Called by widgets as the user moves around the window using
+ * keyboard shortcuts.
+ *
+ * The @direction argument indicates what kind of motion is taking place (up,
+ * down, left, right, tab forward, tab backward).
+ *
+ * This function calls the [vfunc@Gtk.Widget.focus] virtual function; widgets
+ * can override the virtual function in order to implement appropriate focus
+ * behavior.
+ *
+ * The default `focus()` virtual function for a widget should return `TRUE` if
+ * moving in @direction left the focus on a focusable location inside that
+ * widget, and `FALSE` if moving in @direction moved the focus outside the
+ * widget. When returning `TRUE`, widgets normallycall [method@Gtk.Widget.grab_focus]
+ * to place the focus accordingly; when returning `FALSE`, they don’t modify
+ * the current focus location.
+ *
* This function is used by custom widget implementations; if you're
- * writing an app, you’d use gtk_widget_grab_focus() to move the focus
- * to a particular widget.
- *
- * gtk_widget_child_focus() is called by widgets as the user moves
- * around the window using keyboard shortcuts. @direction indicates
- * what kind of motion is taking place (up, down, left, right, tab
- * forward, tab backward). gtk_widget_child_focus() calls the
- * #GtkWidgetClass.focus() vfunc; widgets override this vfunc
- * in order to implement appropriate focus behavior.
- *
- * The default focus() vfunc for a widget should return %TRUE if
- * moving in @direction left the focus on a focusable location inside
- * that widget, and %FALSE if moving in @direction moved the focus
- * outside the widget. If returning %TRUE, widgets normally
- * call gtk_widget_grab_focus() to place the focus accordingly;
- * if returning %FALSE, they don’t modify the current focus location.
+ * writing an app, you’d use [method@Gtk.Widget.grab_focus] to move
+ * the focus to a particular widget.
*
* Returns: %TRUE if focus ended up inside @widget
- **/
+ */
gboolean
gtk_widget_child_focus (GtkWidget *widget,
GtkDirectionType direction)
@@ -6740,41 +6905,41 @@ gtk_widget_child_focus (GtkWidget *widget,
/**
* gtk_widget_keynav_failed:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @direction: direction of focus movement
*
- * This function should be called whenever keyboard navigation within
- * a single widget hits a boundary. The function emits the
- * #GtkWidget::keynav-failed signal on the widget and its return
- * value should be interpreted in a way similar to the return value of
- * gtk_widget_child_focus():
+ * Emits the `::keynav-failed` signal on the widget.
*
- * When %TRUE is returned, stay in the widget, the failed keyboard
- * navigation is OK and/or there is nowhere we can/should move the
- * focus to.
+ * This function should be called whenever keyboard navigation
+ * within a single widget hits a boundary.
*
- * When %FALSE is returned, the caller should continue with keyboard
- * navigation outside the widget, e.g. by calling
- * gtk_widget_child_focus() on the widget’s toplevel.
+ * The return value of this function should be interpreted
+ * in a way similar to the return value of
+ * [method@Gtk.Widget.child_focus]. When %TRUE is returned,
+ * stay in the widget, the failed keyboard navigation is OK
+ * and/or there is nowhere we can/should move the focus to.
+ * When %FALSE is returned, the caller should continue with
+ * keyboard navigation outside the widget, e.g. by calling
+ * [method@Gtk.Widget.child_focus] on the widget’s toplevel.
*
- * The default ::keynav-failed handler returns %FALSE for
- * %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD. For the other
- * values of #GtkDirectionType it returns %TRUE.
+ * The default [signal@Gtk.Widget::keynav-failed] handler returns
+ * %FALSE for %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD.
+ * For the other values of #GtkDirectionType it returns %TRUE.
*
* Whenever the default handler returns %TRUE, it also calls
- * gtk_widget_error_bell() to notify the user of the failed keyboard
- * navigation.
+ * [method@Gtk.Widget.error_bell] to notify the user of the
+ * failed keyboard navigation.
*
* A use case for providing an own implementation of ::keynav-failed
* (either by connecting to it or by overriding it) would be a row of
- * #GtkEntry widgets where the user should be able to navigate the
- * entire row with the cursor keys, as e.g. known from user interfaces
- * that require entering license keys.
+ * [class@Gtk.Entry] widgets where the user should be able to navigate
+ * the entire row with the cursor keys, as e.g. known from user
+ * interfaces that require entering license keys.
*
* Returns: %TRUE if stopping keyboard navigation is fine, %FALSE
- * if the emitting widget should try to handle the keyboard
- * navigation attempt in its parent container(s).
- **/
+ * if the emitting widget should try to handle the keyboard
+ * navigation attempt in its parent container(s).
+ */
gboolean
gtk_widget_keynav_failed (GtkWidget *widget,
GtkDirectionType direction)
@@ -6791,16 +6956,17 @@ gtk_widget_keynav_failed (GtkWidget *widget,
/**
* gtk_widget_error_bell:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Notifies the user about an input-related error on this widget.
- * If the #GtkSettings:gtk-error-bell setting is %TRUE, it calls
- * gdk_surface_beep(), otherwise it does nothing.
*
- * Note that the effect of gdk_surface_beep() can be configured in many
- * ways, depending on the windowing backend and the desktop environment
- * or window manager that is used.
- **/
+ * If the [property@Gtk.Settings:gtk-error-bell] setting is %TRUE,
+ * it calls [method@Gdk.Surface.beep], otherwise it does nothing.
+ *
+ * Note that the effect of [method@Gdk.Surface.beep] can be configured
+ * in many ways, depending on the windowing backend and the desktop
+ * environment or window manager that is used.
+ */
void
gtk_widget_error_bell (GtkWidget *widget)
{
@@ -6857,20 +7023,21 @@ gtk_widget_set_usize_internal (GtkWidget *widget,
/**
* gtk_widget_set_size_request:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @width: width @widget should request, or -1 to unset
* @height: height @widget should request, or -1 to unset
*
- * Sets the minimum size of a widget; that is, the widget’s size
- * request will be at least @width by @height. You can use this
- * function to force a widget to be larger than it normally would be.
+ * Sets the minimum size of a widget.
+ *
+ * That is, the widget’s size request will be at least @width
+ * by @height. You can use this function to force a widget to
+ * be larger than it normally would be.
*
- * In most cases, gtk_window_set_default_size() is a better choice for
- * toplevel windows than this function; setting the default size will
- * still allow users to shrink the window. Setting the size request
- * will force them to leave the window at least as large as the size
- * request. When dealing with window sizes,
- * gtk_window_set_geometry_hints() can be a useful function as well.
+ * In most cases, [method@Gtk.Window.set_default_size] is a better
+ * choice for toplevel windows than this function; setting the default
+ * size will still allow users to shrink the window. Setting the size
+ * request will force them to leave the window at least as large as
+ * the size request.
*
* Note the inherent danger of setting any fixed size - themes,
* translations into other languages, different fonts, and user action
@@ -6888,10 +7055,14 @@ gtk_widget_set_usize_internal (GtkWidget *widget,
* the “natural” size request of the widget will be used instead.
*
* The size request set here does not include any margin from the
- * #GtkWidget properties margin-left, margin-right, margin-top, and
- * margin-bottom, but it does include pretty much all other padding
- * or border properties set by any subclass of #GtkWidget.
- **/
+ * properties
+ * [property@Gtk.Widget:margin-start],
+ * [property@Gtk.Widget:margin-end],
+ * [property@Gtk.Widget:margin-top], and
+ * [property@Gtk.Widget:margin-bottom], but it does include pretty
+ * much all other padding or border properties set by any subclass
+ * of `GtkWidget`.
+ */
void
gtk_widget_set_size_request (GtkWidget *widget,
int width,
@@ -6907,18 +7078,20 @@ gtk_widget_set_size_request (GtkWidget *widget,
/**
* gtk_widget_get_size_request:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @width: (out) (allow-none): return location for width, or %NULL
* @height: (out) (allow-none): return location for height, or %NULL
*
* Gets the size request that was explicitly set for the widget using
- * gtk_widget_set_size_request(). A value of -1 stored in @width or
- * @height indicates that that dimension has not been set explicitly
- * and the natural requisition of the widget will be used instead. See
- * gtk_widget_set_size_request(). To get the size a widget will
- * actually request, call gtk_widget_measure() instead of
+ * gtk_widget_set_size_request().
+ *
+ * A value of -1 stored in @width or @height indicates that that
+ * dimension has not been set explicitly and the natural requisition
+ * of the widget will be used instead. See
+ * [method@Gtk.Widget.set_size_request]. To get the size a widget will
+ * actually request, call [method@Gtk.Widget.measure] instead of
* this function.
- **/
+ */
void
gtk_widget_get_size_request (GtkWidget *widget,
int *width,
@@ -6937,7 +7110,7 @@ gtk_widget_get_size_request (GtkWidget *widget,
/*< private >
* gtk_widget_has_size_request:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns if the widget has a size request set (anything besides -1 for height
* or width)
@@ -6952,19 +7125,22 @@ gtk_widget_has_size_request (GtkWidget *widget)
/**
* gtk_widget_get_ancestor:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @widget_type: ancestor type
*
- * Gets the first ancestor of @widget with type @widget_type. For example,
- * `gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)` gets
- * the first #GtkBox that’s an ancestor of @widget. No reference will be
- * added to the returned widget; it should not be unreferenced.
+ * Gets the first ancestor of @widget with type @widget_type.
+ *
+ * For example, `gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)`
+ * gets the first `GtkBox` that’s an ancestor of @widget. No
+ * reference will be added to the returned widget; it should
+ * not be unreferenced.
*
- * Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor()
+ * Note that unlike [method@Gtk.Widget.is_ancestor], this function
* considers @widget to be an ancestor of itself.
*
- * Returns: (transfer none) (nullable): the ancestor widget, or %NULL if not found
- **/
+ * Returns: (transfer none) (nullable): the ancestor widget,
+ * or %NULL if not found
+ */
GtkWidget*
gtk_widget_get_ancestor (GtkWidget *widget,
GType widget_type)
@@ -6983,13 +7159,13 @@ gtk_widget_get_ancestor (GtkWidget *widget,
/**
* gtk_widget_get_settings:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Gets the settings object holding the settings used for this widget.
*
- * Note that this function can only be called when the #GtkWidget
+ * Note that this function can only be called when the `GtkWidget`
* is attached to a toplevel, since the settings object is specific
- * to a particular #GdkDisplay. If you want to monitor the widget for
+ * to a particular `GdkDisplay`. If you want to monitor the widget for
* changes in its settings, connect to notify::display.
*
* Returns: (transfer none): the relevant #GtkSettings object
@@ -7004,15 +7180,15 @@ gtk_widget_get_settings (GtkWidget *widget)
/**
* gtk_widget_is_ancestor:
- * @widget: a #GtkWidget
- * @ancestor: another #GtkWidget
+ * @widget: a `GtkWidget`
+ * @ancestor: another `GtkWidget`
*
- * Determines whether @widget is somewhere inside @ancestor, possibly with
- * intermediate containers.
+ * Determines whether @widget is somewhere inside @ancestor,
+ * possibly with intermediate containers.
*
* Returns: %TRUE if @ancestor contains @widget as a child,
* grandchild, great grandchild, etc.
- **/
+ */
gboolean
gtk_widget_is_ancestor (GtkWidget *widget,
GtkWidget *ancestor)
@@ -7069,22 +7245,23 @@ gtk_widget_emit_direction_changed (GtkWidget *widget,
/**
* gtk_widget_set_direction:
- * @widget: a #GtkWidget
- * @dir: the new direction
- *
- * Sets the reading direction on a particular widget. This direction
- * controls the primary direction for widgets containing text,
- * and also the direction in which the children of a container are
- * packed. The ability to set the direction is present in order
- * so that correct localization into languages with right-to-left
- * reading directions can be done. Generally, applications will
- * let the default reading direction present, except for containers
+ * @widget: a `GtkWidget`
+ * @dir: the new direction
+ *
+ * Sets the reading direction on a particular widget.
+ *
+ * This direction controls the primary direction for widgets
+ * containing text, and also the direction in which the children
+ * of a container are packed. The ability to set the direction is
+ * present in order so that correct localization into languages with
+ * right-to-left reading directions can be done. Generally, applications
+ * will let the default reading direction present, except for containers
* where the containers are arranged in an order that is explicitly
* visual rather than logical (such as buttons for text justification).
*
* If the direction is set to %GTK_TEXT_DIR_NONE, then the value
- * set by gtk_widget_set_default_direction() will be used.
- **/
+ * set by [func@Gtk.Widget.set_default_direction] will be used.
+ */
void
gtk_widget_set_direction (GtkWidget *widget,
GtkTextDirection dir)
@@ -7105,13 +7282,14 @@ gtk_widget_set_direction (GtkWidget *widget,
/**
* gtk_widget_get_direction:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Gets the reading direction for a particular widget.
*
- * Gets the reading direction for a particular widget. See
- * gtk_widget_set_direction().
+ * See [method@Gtk.Widget.set_direction].
*
* Returns: the reading direction for the widget.
- **/
+ */
GtkTextDirection
gtk_widget_get_direction (GtkWidget *widget)
{
@@ -7149,12 +7327,12 @@ gtk_widget_set_default_direction_recurse (GtkWidget *widget,
/**
* gtk_widget_set_default_direction:
- * @dir: the new default direction. This cannot be
- * %GTK_TEXT_DIR_NONE.
+ * @dir: the new default direction. This cannot be %GTK_TEXT_DIR_NONE.
*
- * Sets the default reading direction for widgets where the
- * direction has not been explicitly set by gtk_widget_set_direction().
- **/
+ * Sets the default reading direction for widgets.
+ *
+ * See [method@Gtk.Widget.set_direction].
+ */
void
gtk_widget_set_default_direction (GtkTextDirection dir)
{
@@ -7184,11 +7362,12 @@ gtk_widget_set_default_direction (GtkTextDirection dir)
/**
* gtk_widget_get_default_direction:
*
- * Obtains the current default reading direction. See
- * gtk_widget_set_default_direction().
+ * Obtains the current default reading direction.
+ *
+ * See [func@Gtk.Widget.set_default_direction].
*
* Returns: the current default direction.
- **/
+ */
GtkTextDirection
gtk_widget_get_default_direction (void)
{
@@ -7457,14 +7636,6 @@ gtk_widget_finalize (GObject *object)
G_OBJECT_CLASS (gtk_widget_parent_class)->finalize (object);
}
-/*****************************************
- * gtk_widget_real_map:
- *
- * arguments:
- *
- * results:
- *****************************************/
-
static void
gtk_widget_real_map (GtkWidget *widget)
{
@@ -7489,14 +7660,6 @@ gtk_widget_real_map (GtkWidget *widget)
}
}
-/*****************************************
- * gtk_widget_real_unmap:
- *
- * arguments:
- *
- * results:
- *****************************************/
-
static void
gtk_widget_real_unmap (GtkWidget *widget)
{
@@ -7522,14 +7685,6 @@ gtk_widget_real_unmap (GtkWidget *widget)
}
}
-/*****************************************
- * gtk_widget_real_realize:
- *
- * arguments:
- *
- * results:
- *****************************************/
-
static void
gtk_widget_real_realize (GtkWidget *widget)
{
@@ -7551,14 +7706,6 @@ gtk_widget_real_realize (GtkWidget *widget)
gtk_css_node_invalidate_frame_clock (priv->cssnode, FALSE);
}
-/*****************************************
- * gtk_widget_real_unrealize:
- *
- * arguments:
- *
- * results:
- *****************************************/
-
static void
gtk_widget_real_unrealize (GtkWidget *widget)
{
@@ -7642,7 +7789,7 @@ gtk_widget_adjust_baseline_request (GtkWidget *widget,
/*
* _gtk_widget_list_devices:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns the list of pointer #GdkDevices that are currently
* on top of @widget. Free the list
@@ -7677,8 +7824,8 @@ _gtk_widget_list_devices (GtkWidget *widget,
/*
* _gtk_widget_synthesize_crossing:
- * @from: the #GtkWidget the virtual pointer is leaving.
- * @to: the #GtkWidget the virtual pointer is moving to.
+ * @from: the `GtkWidget` the virtual pointer is leaving.
+ * @to: the `GtkWidget` the virtual pointer is moving to.
* @mode: the #GdkCrossingMode to place on the synthesized events.
*
* Generate crossing event(s) on widget state (sensitivity) or GTK grab change.
@@ -7824,10 +7971,13 @@ gtk_widget_propagate_state (GtkWidget *widget,
/**
* gtk_requisition_new:
*
- * Allocates a new #GtkRequisition-struct and initializes its elements to zero.
+ * Allocates a new `GtkRequisition`.
+ *
+ * The struct is initialized to zero.
*
- * Returns: a new empty #GtkRequisition. The newly allocated #GtkRequisition should
- * be freed with gtk_requisition_free().
+ * Returns: a new empty `GtkRequisition`. The newly
+ * allocated `GtkRequisition` should be freed with
+ * [method@Gtk.Requisition.free]
*/
GtkRequisition *
gtk_requisition_new (void)
@@ -7837,12 +7987,12 @@ gtk_requisition_new (void)
/**
* gtk_requisition_copy:
- * @requisition: a #GtkRequisition
+ * @requisition: a `GtkRequisition`
*
- * Copies a #GtkRequisition.
+ * Copies a `GtkRequisition`.
*
* Returns: a copy of @requisition
- **/
+ */
GtkRequisition *
gtk_requisition_copy (const GtkRequisition *requisition)
{
@@ -7851,10 +8001,10 @@ gtk_requisition_copy (const GtkRequisition *requisition)
/**
* gtk_requisition_free:
- * @requisition: a #GtkRequisition
+ * @requisition: a `GtkRequisition`
*
- * Frees a #GtkRequisition.
- **/
+ * Frees a `GtkRequisition`.
+ */
void
gtk_requisition_free (GtkRequisition *requisition)
{
@@ -7911,13 +8061,14 @@ gtk_widget_update_computed_expand (GtkWidget *widget)
/**
* gtk_widget_queue_compute_expand:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Mark @widget as needing to recompute its expand flags. Call
- * this function when setting legacy expand child properties
- * on the child of a container.
+ * Mark @widget as needing to recompute its expand flags.
*
- * See gtk_widget_compute_expand().
+ * Call this function when setting legacy expand child
+ * properties on the child of a container.
+ *
+ * See [method@Gtk.Widget.compute_expand].
*/
static void
gtk_widget_queue_compute_expand (GtkWidget *widget)
@@ -7963,9 +8114,11 @@ gtk_widget_queue_compute_expand (GtkWidget *widget)
* @widget: the widget
* @orientation: expand direction
*
- * Computes whether a container should give this widget extra space
- * when possible. Containers should check this, rather than
- * looking at gtk_widget_get_hexpand() or gtk_widget_get_vexpand().
+ * Computes whether a container should give this widget
+ * extra space when possible.
+ *
+ * Containers should check this, rather than looking at
+ * [method@Gtk.Widget.get_hexpand] or [method@Gtk.Widget.get_vexpand].
*
* This function already checks whether the widget is visible, so
* visibility does not need to be checked separately. Non-visible
@@ -8076,17 +8229,19 @@ gtk_widget_set_expand_set (GtkWidget *widget,
}
/**
- * gtk_widget_get_hexpand:
+ * gtk_widget_get_hexpand: (attributes org.gtk.Method.get_property=hexpand)
* @widget: the widget
*
* Gets whether the widget would like any available extra horizontal
- * space. When a user resizes a #GtkWindow, widgets with expand=TRUE
+ * space.
+ *
+ * When a user resizes a `GtkWindow`, widgets with expand=TRUE
* generally receive the extra space. For example, a list or
* scrollable area or document in your window would often be set to
* expand.
*
- * Containers should use gtk_widget_compute_expand() rather than
- * this function, to see whether a widget, or any of its children,
+ * Containers should use [method@Gtk.Widget.compute_expand] rather
+ * than this function, to see whether a widget, or any of its children,
* has the expand flag set. If any child of a widget wants to
* expand, the parent may ask to expand also.
*
@@ -8107,12 +8262,14 @@ gtk_widget_get_hexpand (GtkWidget *widget)
}
/**
- * gtk_widget_set_hexpand:
+ * gtk_widget_set_hexpand: (attributes org.gtk.Method.set_property=hexpand)
* @widget: the widget
* @expand: whether to expand
*
* Sets whether the widget would like any available extra horizontal
- * space. When a user resizes a #GtkWindow, widgets with expand=TRUE
+ * space.
+ *
+ * When a user resizes a `GtkWindow`, widgets with expand=TRUE
* generally receive the extra space. For example, a list or
* scrollable area or document in your window would often be set to
* expand.
@@ -8123,18 +8280,18 @@ gtk_widget_get_hexpand (GtkWidget *widget)
*
* By default, widgets automatically expand if any of their children
* want to expand. (To see if a widget will automatically expand given
- * its current children and state, call gtk_widget_compute_expand(). A
- * container can decide how the expandability of children affects the
+ * its current children and state, call [method@Gtk.Widget.compute_expand].
+ * A container can decide how the expandability of children affects the
* expansion of the container by overriding the compute_expand virtual
- * method on #GtkWidget.).
+ * method on `GtkWidget`.).
*
* Setting hexpand explicitly with this function will override the
* automatic expand behavior.
*
* This function forces the widget to expand or not to expand,
* regardless of children. The override occurs because
- * gtk_widget_set_hexpand() sets the hexpand-set property (see
- * gtk_widget_set_hexpand_set()) which causes the widget’s hexpand
+ * [method@Gtk.Widget.set_hexpand] sets the hexpand-set property (see
+ * [method@Gtk.Widget.set_hexpand_set]) which causes the widget’s hexpand
* value to be used, rather than looking at children and widget state.
*/
void
@@ -8147,16 +8304,16 @@ gtk_widget_set_hexpand (GtkWidget *widget,
}
/**
- * gtk_widget_get_hexpand_set:
+ * gtk_widget_get_hexpand_set: (attributes org.gtk.Method.get_property=hexpand-set)
* @widget: the widget
*
- * Gets whether gtk_widget_set_hexpand() has been used to
- * explicitly set the expand flag on this widget.
+ * Gets whether gtk_widget_set_hexpand() has been used
+ * to explicitly set the expand flag on this widget.
*
- * If hexpand is set, then it overrides any computed
- * expand value based on child widgets. If hexpand is not
- * set, then the expand value depends on whether any
- * children of the widget would like to expand.
+ * If [property@Gtk.Widget:hexpand] property is set, then it
+ * overrides any computed expand value based on child widgets.
+ * If `hexpand` is not set, then the expand value depends on
+ * whether any children of the widget would like to expand.
*
* There are few reasons to use this function, but it’s here
* for completeness and consistency.
@@ -8174,17 +8331,16 @@ gtk_widget_get_hexpand_set (GtkWidget *widget)
}
/**
- * gtk_widget_set_hexpand_set:
+ * gtk_widget_set_hexpand_set: (attributes org.gtk.Method.set_property=hexpand-set)
* @widget: the widget
* @set: value for hexpand-set property
*
- * Sets whether the hexpand flag (see gtk_widget_get_hexpand()) will
- * be used.
+ * Sets whether the hexpand flag will be used.
*
- * The hexpand-set property will be set automatically when you call
- * gtk_widget_set_hexpand() to set hexpand, so the most likely
- * reason to use this function would be to unset an explicit expand
- * flag.
+ * The [property@Gtk.Widget:hexpand-set] property will be set
+ * automatically when you call [method@Gtk.Widget.set_hexpand]
+ * to set hexpand, so the most likely reason to use this function
+ * would be to unset an explicit expand flag.
*
* If hexpand is set, then it overrides any computed
* expand value based on child widgets. If hexpand is not
@@ -8205,13 +8361,13 @@ gtk_widget_set_hexpand_set (GtkWidget *widget,
/**
- * gtk_widget_get_vexpand:
+ * gtk_widget_get_vexpand: (attributes org.gtk.Method.get_property=vexpand)
* @widget: the widget
*
* Gets whether the widget would like any available extra vertical
* space.
*
- * See gtk_widget_get_hexpand() for more detail.
+ * See [method@Gtk.Widget.get_hexpand] for more detail.
*
* Returns: whether vexpand flag is set
*/
@@ -8226,14 +8382,14 @@ gtk_widget_get_vexpand (GtkWidget *widget)
}
/**
- * gtk_widget_set_vexpand:
+ * gtk_widget_set_vexpand: (attributes org.gtk.Method.set_property=vexpand)
* @widget: the widget
* @expand: whether to expand
*
* Sets whether the widget would like any available extra vertical
* space.
*
- * See gtk_widget_set_hexpand() for more detail.
+ * See [method@Gtk.Widget.set_hexpand] for more detail.
*/
void
gtk_widget_set_vexpand (GtkWidget *widget,
@@ -8245,13 +8401,13 @@ gtk_widget_set_vexpand (GtkWidget *widget,
}
/**
- * gtk_widget_get_vexpand_set:
+ * gtk_widget_get_vexpand_set: (attributes org.gtk.Method.get_property=vexpand-set)
* @widget: the widget
*
* Gets whether gtk_widget_set_vexpand() has been used to
* explicitly set the expand flag on this widget.
*
- * See gtk_widget_get_hexpand_set() for more detail.
+ * See [method@Gtk.Widget.get_hexpand_set] for more detail.
*
* Returns: whether vexpand has been explicitly set
*/
@@ -8266,14 +8422,13 @@ gtk_widget_get_vexpand_set (GtkWidget *widget)
}
/**
- * gtk_widget_set_vexpand_set:
+ * gtk_widget_set_vexpand_set: (attributes org.gtk.Method.set_property=vexpand-set)
* @widget: the widget
* @set: value for vexpand-set property
*
- * Sets whether the vexpand flag (see gtk_widget_get_vexpand()) will
- * be used.
+ * Sets whether the vexpand flag will be used.
*
- * See gtk_widget_set_hexpand_set() for more detail.
+ * See [method@Gtk.Widget.set_hexpand_set] for more detail.
*/
void
gtk_widget_set_vexpand_set (GtkWidget *widget,
@@ -9137,10 +9292,10 @@ gtk_widget_buildable_custom_finished (GtkBuildable *buildable,
}
/**
- * gtk_widget_get_halign:
- * @widget: a #GtkWidget
+ * gtk_widget_get_halign: (attributes org.gtk.Method.get_property=halign)
+ * @widget: a `GtkWidget`
*
- * Gets the value of the #GtkWidget:halign property.
+ * Gets the horizontal alignment of @widget.
*
* For backwards compatibility reasons this method will never return
* %GTK_ALIGN_BASELINE, but instead it will convert it to
@@ -9162,12 +9317,11 @@ gtk_widget_get_halign (GtkWidget *widget)
}
/**
- * gtk_widget_set_halign:
- * @widget: a #GtkWidget
+ * gtk_widget_set_halign: (attributes org.gtk.Method.set_property=halign)
+ * @widget: a `GtkWidget`
* @align: the horizontal alignment
*
* Sets the horizontal alignment of @widget.
- * See the #GtkWidget:halign property.
*/
void
gtk_widget_set_halign (GtkWidget *widget,
@@ -9186,10 +9340,10 @@ gtk_widget_set_halign (GtkWidget *widget,
}
/**
- * gtk_widget_get_valign:
- * @widget: a #GtkWidget
+ * gtk_widget_get_valign: (attributes org.gtk.Method.get_property=valign)
+ * @widget: a `GtkWidget`
*
- * Gets the value of the #GtkWidget:valign property.
+ * Gets the vertical alignment of @widget.
*
* Returns: the vertical alignment of @widget
*/
@@ -9204,12 +9358,11 @@ gtk_widget_get_valign (GtkWidget *widget)
}
/**
- * gtk_widget_set_valign:
- * @widget: a #GtkWidget
+ * gtk_widget_set_valign: (attributes org.gtk.Method.set_property=valign)
+ * @widget: a `GtkWidget`
* @align: the vertical alignment
*
* Sets the vertical alignment of @widget.
- * See the #GtkWidget:valign property.
*/
void
gtk_widget_set_valign (GtkWidget *widget,
@@ -9228,10 +9381,10 @@ gtk_widget_set_valign (GtkWidget *widget,
}
/**
- * gtk_widget_get_margin_start:
- * @widget: a #GtkWidget
+ * gtk_widget_get_margin_start: (attributes org.gtk.Method.get_property=margin-start)
+ * @widget: a `GtkWidget`
*
- * Gets the value of the #GtkWidget:margin-start property.
+ * Gets the start margin of @widget.
*
* Returns: The start margin of @widget
*/
@@ -9246,12 +9399,11 @@ gtk_widget_get_margin_start (GtkWidget *widget)
}
/**
- * gtk_widget_set_margin_start:
- * @widget: a #GtkWidget
+ * gtk_widget_set_margin_start: (attributes org.gtk.Method.set_property=margin-start)
+ * @widget: a `GtkWidget`
* @margin: the start margin
*
* Sets the start margin of @widget.
- * See the #GtkWidget:margin-start property.
*/
void
gtk_widget_set_margin_start (GtkWidget *widget,
@@ -9273,10 +9425,10 @@ gtk_widget_set_margin_start (GtkWidget *widget,
}
/**
- * gtk_widget_get_margin_end:
- * @widget: a #GtkWidget
+ * gtk_widget_get_margin_end: (attributes org.gtk.Method.get_property=margin-end)
+ * @widget: a `GtkWidget`
*
- * Gets the value of the #GtkWidget:margin-end property.
+ * Gets the end margin of @widget.
*
* Returns: The end margin of @widget
*/
@@ -9291,12 +9443,11 @@ gtk_widget_get_margin_end (GtkWidget *widget)
}
/**
- * gtk_widget_set_margin_end:
- * @widget: a #GtkWidget
+ * gtk_widget_set_margin_end: (attributes org.gtk.Method.set_property=margin-end)
+ * @widget: a `GtkWidget`
* @margin: the end margin
*
* Sets the end margin of @widget.
- * See the #GtkWidget:margin-end property.
*/
void
gtk_widget_set_margin_end (GtkWidget *widget,
@@ -9318,10 +9469,10 @@ gtk_widget_set_margin_end (GtkWidget *widget,
}
/**
- * gtk_widget_get_margin_top:
- * @widget: a #GtkWidget
+ * gtk_widget_get_margin_top: (attributes org.gtk.Method.get_property=margin-top)
+ * @widget: a `GtkWidget`
*
- * Gets the value of the #GtkWidget:margin-top property.
+ * Gets the top margin of @widget.
*
* Returns: The top margin of @widget
*/
@@ -9336,12 +9487,11 @@ gtk_widget_get_margin_top (GtkWidget *widget)
}
/**
- * gtk_widget_set_margin_top:
- * @widget: a #GtkWidget
+ * gtk_widget_set_margin_top: (attributes org.gtk.Method.set_property=margin-top)
+ * @widget: a `GtkWidget`
* @margin: the top margin
*
* Sets the top margin of @widget.
- * See the #GtkWidget:margin-top property.
*/
void
gtk_widget_set_margin_top (GtkWidget *widget,
@@ -9361,10 +9511,10 @@ gtk_widget_set_margin_top (GtkWidget *widget,
}
/**
- * gtk_widget_get_margin_bottom:
- * @widget: a #GtkWidget
+ * gtk_widget_get_margin_bottom: (attributes org.gtk.Method.get_property=margin-bottom)
+ * @widget: a `GtkWidget`
*
- * Gets the value of the #GtkWidget:margin-bottom property.
+ * Gets the bottom margin of @widget.
*
* Returns: The bottom margin of @widget
*/
@@ -9379,12 +9529,11 @@ gtk_widget_get_margin_bottom (GtkWidget *widget)
}
/**
- * gtk_widget_set_margin_bottom:
- * @widget: a #GtkWidget
+ * gtk_widget_set_margin_bottom: (attributes org.gtk.Method.set_property=margin-bottom)
+ * @widget: a `GtkWidget`
* @margin: the bottom margin
*
* Sets the bottom margin of @widget.
- * See the #GtkWidget:margin-bottom property.
*/
void
gtk_widget_set_margin_bottom (GtkWidget *widget,
@@ -9405,16 +9554,18 @@ gtk_widget_set_margin_bottom (GtkWidget *widget,
/**
* gtk_widget_get_clipboard:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Gets the clipboard object for @widget.
*
* This is a utility function to get the clipboard object for the
- * #GdkDisplay that @widget is using.
+ * `GdkDisplay` that @widget is using.
*
* Note that this function always works, even when @widget is not
* realized yet.
*
* Returns: (transfer none): the appropriate clipboard object.
- **/
+ */
GdkClipboard *
gtk_widget_get_clipboard (GtkWidget *widget)
{
@@ -9425,10 +9576,12 @@ gtk_widget_get_clipboard (GtkWidget *widget)
/**
* gtk_widget_get_primary_clipboard:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Gets the primary clipboard of @widget.
*
* This is a utility function to get the primary clipboard object
- * for the #GdkDisplay that @widget is using.
+ * for the `GdkDisplay` that @widget is using.
*
* Note that this function always works, even when @widget is not
* realized yet.
@@ -9445,23 +9598,24 @@ gtk_widget_get_primary_clipboard (GtkWidget *widget)
/**
* gtk_widget_list_mnemonic_labels:
- * @widget: a #GtkWidget
- *
- * Returns a newly allocated list of the widgets, normally labels, for
- * which this widget is the target of a mnemonic (see for example,
- * gtk_label_set_mnemonic_widget()).
-
- * The widgets in the list are not individually referenced. If you
- * want to iterate through the list and perform actions involving
- * callbacks that might destroy the widgets, you
- * must call `g_list_foreach (result,
- * (GFunc)g_object_ref, NULL)` first, and then unref all the
- * widgets afterwards.
-
- * Returns: (element-type GtkWidget) (transfer container): the list of
- * mnemonic labels; free this list
- * with g_list_free() when you are done with it.
- **/
+ * @widget: a `GtkWidget`
+ *
+ * Returns the widgets for which this widget is the target of a
+ * mnemonic.
+ *
+ * Typically, these widgets will be labels. See, for example,
+ * [method@Gtk.Label.set_mnemonic_widget].
+
+ * The widgets in the list are not individually referenced.
+ * If you want to iterate through the list and perform actions
+ * involving callbacks that might destroy the widgets, you
+ * must call `g_list_foreach (result, (GFunc)g_object_ref, NULL)`
+ * first, and then unref all the widgets afterwards.
+
+ * Returns: (element-type GtkWidget) (transfer container): the list
+ * of mnemonic labels; free this list with g_list_free() when you
+ * are done with it.
+ */
GList *
gtk_widget_list_mnemonic_labels (GtkWidget *widget)
{
@@ -9478,16 +9632,17 @@ gtk_widget_list_mnemonic_labels (GtkWidget *widget)
/**
* gtk_widget_add_mnemonic_label:
- * @widget: a #GtkWidget
- * @label: a #GtkWidget that acts as a mnemonic label for @widget
+ * @widget: a `GtkWidget`
+ * @label: a `GtkWidget` that acts as a mnemonic label for @widget
*
- * Adds a widget to the list of mnemonic labels for
- * this widget. (See gtk_widget_list_mnemonic_labels()). Note the
+ * Adds a widget to the list of mnemonic labels for this widget.
+ *
+ * See [method@Gtk.Widget.list_mnemonic_labels]. Note the
* list of mnemonic labels for the widget is cleared when the
* widget is destroyed, so the caller must make sure to update
* its internal state at this point as well, by using a connection
- * to the #GtkWidget::destroy signal or a weak notifier.
- **/
+ * to the [signal@Gtk.Widget::destroy] signal or a weak notifier.
+ */
void
gtk_widget_add_mnemonic_label (GtkWidget *widget,
GtkWidget *label)
@@ -9516,15 +9671,16 @@ gtk_widget_add_mnemonic_label (GtkWidget *widget,
/**
* gtk_widget_remove_mnemonic_label:
- * @widget: a #GtkWidget
- * @label: a #GtkWidget that was previously set as a mnemonic label for
- * @widget with gtk_widget_add_mnemonic_label().
- *
- * Removes a widget from the list of mnemonic labels for
- * this widget. (See gtk_widget_list_mnemonic_labels()). The widget
- * must have previously been added to the list with
- * gtk_widget_add_mnemonic_label().
- **/
+ * @widget: a `GtkWidget`
+ * @label: a `GtkWidget` that was previously set as a mnemonic
+ * label for @widget with [method@Gtk.Widget.add_mnemonic_label]
+ *
+ * Removes a widget from the list of mnemonic labels for this widget.
+ *
+ * See [method@Gtk.Widget.list_mnemonic_labels]. The widget must
+ * have previously been added to the list with
+ * [method@Gtk.Widget.add_mnemonic_label].
+ */
void
gtk_widget_remove_mnemonic_label (GtkWidget *widget,
GtkWidget *label)
@@ -9563,7 +9719,7 @@ gtk_widget_remove_mnemonic_label (GtkWidget *widget,
/**
* gtk_widget_trigger_tooltip_query:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Triggers a tooltip query on the display where the toplevel
* of @widget is located.
@@ -9575,20 +9731,20 @@ gtk_widget_trigger_tooltip_query (GtkWidget *widget)
}
/**
- * gtk_widget_set_tooltip_text:
- * @widget: a #GtkWidget
+ * gtk_widget_set_tooltip_text: (attributes org.gtk.Method.set_property=tooltip-text)
+ * @widget: a `GtkWidget`
* @text: (nullable): the contents of the tooltip for @widget
*
* Sets @text as the contents of the tooltip.
*
* If @text contains any markup, it will be escaped.
*
- * This function will take care of setting #GtkWidget:has-tooltip
- * as a side effect, and of the default handler for the
- * #GtkWidget::query-tooltip signal.
+ * This function will take care of setting
+ * [property@Gtk.Widget:has-tooltip] as a side effect,
+ * and of the default handler for the
+ * [signal@Gtk.Widget::query-tooltip] signal.
*
- * See also the #GtkWidget:tooltip-text property and
- * gtk_tooltip_set_text().
+ * See also [method@Gtk.Tooltip.set_text].
*/
void
gtk_widget_set_tooltip_text (GtkWidget *widget,
@@ -9638,12 +9794,13 @@ gtk_widget_set_tooltip_text (GtkWidget *widget,
}
/**
- * gtk_widget_get_tooltip_text:
- * @widget: a #GtkWidget
+ * gtk_widget_get_tooltip_text: (attributes org.gtk.Method.get_property=tooltip-text)
+ * @widget: a `GtkWidget`
*
* Gets the contents of the tooltip for @widget.
*
- * If the @widget's tooltip was set using gtk_widget_set_tooltip_markup(),
+ * If the @widget's tooltip was set using
+ * [method@Gtk.Widget.set_tooltip_markup],
* this function will return the escaped text.
*
* Returns: (nullable): the tooltip text
@@ -9659,18 +9816,18 @@ gtk_widget_get_tooltip_text (GtkWidget *widget)
}
/**
- * gtk_widget_set_tooltip_markup:
- * @widget: a #GtkWidget
+ * gtk_widget_set_tooltip_markup: (attributes org.gtk.Method.set_property=tooltip-markup)
+ * @widget: a `GtkWidget`
* @markup: (nullable): the contents of the tooltip for @widget
*
- * Sets @markup as the contents of the tooltip, which is marked up with
- * the [Pango text markup language][PangoMarkupFormat].
+ * Sets @markup as the contents of the tooltip, which is marked
+ * up with Pango markup.
*
- * This function will take care of setting the #GtkWidget:has-tooltip as
- * a side effect, and of the default handler for the #GtkWidget::query-tooltip signal.
+ * This function will take care of setting the
+ * [property@Gtk.Widget:has-tooltip] as a side effect, and of the
+ * default handler for the [signal@Gtk.Widget::query-tooltip] signal.
*
- * See also the #GtkWidget:tooltip-markup property and
- * gtk_tooltip_set_markup().
+ * See also [method@Gtk.Tooltip.set_markup].
*/
void
gtk_widget_set_tooltip_markup (GtkWidget *widget,
@@ -9724,11 +9881,14 @@ gtk_widget_set_tooltip_markup (GtkWidget *widget,
}
/**
- * gtk_widget_get_tooltip_markup:
- * @widget: a #GtkWidget
+ * gtk_widget_get_tooltip_markup: (attributes org.gtk.Method.get_property=tooltip-markup)
+ * @widget: a `GtkWidget`
+ *
+ * Gets the contents of the tooltip for @widget.
*
- * Gets the contents of the tooltip for @widget set using
- * gtk_widget_set_tooltip_markup().
+ * If the tooltip has not been set using
+ * [method@Gtk.Widget.set_tooltip_markup], this
+ * function returns %NULL.
*
* Returns: (nullable): the tooltip text
*/
@@ -9743,12 +9903,11 @@ gtk_widget_get_tooltip_markup (GtkWidget *widget)
}
/**
- * gtk_widget_set_has_tooltip:
- * @widget: a #GtkWidget
+ * gtk_widget_set_has_tooltip: (attributes org.gtk.Method.set_property=has-tooltip)
+ * @widget: a `GtkWidget`
* @has_tooltip: whether or not @widget has a tooltip.
*
- * Sets the has-tooltip property on @widget to @has_tooltip. See
- * #GtkWidget:has-tooltip for more information.
+ * Sets the `has-tooltip` property on @widget to @has_tooltip.
*/
void
gtk_widget_set_has_tooltip (GtkWidget *widget,
@@ -9769,13 +9928,12 @@ gtk_widget_set_has_tooltip (GtkWidget *widget,
}
/**
- * gtk_widget_get_has_tooltip:
- * @widget: a #GtkWidget
+ * gtk_widget_get_has_tooltip: (attributes org.gtk.Method.get_property=has-tooltip)
+ * @widget: a `GtkWidget`
*
- * Returns the current value of the has-tooltip property. See
- * #GtkWidget:has-tooltip for more information.
+ * Returns the current value of the `has-tooltip` property.
*
- * Returns: current value of has-tooltip on @widget.
+ * Returns: current value of `has-tooltip` on @widget.
*/
gboolean
gtk_widget_get_has_tooltip (GtkWidget *widget)
@@ -9789,20 +9947,20 @@ gtk_widget_get_has_tooltip (GtkWidget *widget)
/**
* gtk_widget_get_allocation:
- * @widget: a #GtkWidget
- * @allocation: (out): a pointer to a #GtkAllocation to copy to
+ * @widget: a `GtkWidget`
+ * @allocation: (out): a pointer to a `GtkAllocation` to copy to
*
* Retrieves the widget’s allocation.
*
* Note, when implementing a layout container: a widget’s allocation
* will be its “adjusted” allocation, that is, the widget’s parent
- * typically calls gtk_widget_size_allocate() with an allocation,
+ * typically calls [method@Gtk.Widget.size_allocate] with an allocation,
* and that allocation is then adjusted (to handle margin
* and alignment for example) before assignment to the widget.
- * gtk_widget_get_allocation() returns the adjusted allocation that
+ * [method@Gtk.Widget.get_allocation] returns the adjusted allocation that
* was actually assigned to the widget. The adjusted allocation is
* guaranteed to be completely contained within the
- * gtk_widget_size_allocate() allocation, however.
+ * [method@Gtk.Widget.size_allocate] allocation, however.
*
* So a layout container is guaranteed that its children stay inside
* the assigned bounds, but not that they have exactly the bounds the
@@ -9846,7 +10004,7 @@ gtk_widget_get_allocation (GtkWidget *widget,
* (0, 0) is assumed to be the top left of @widget's content area.
*
* Returns: %TRUE if @widget contains (@x, @y).
- **/
+ */
gboolean
gtk_widget_contains (GtkWidget *widget,
double x,
@@ -9970,22 +10128,25 @@ gtk_widget_do_pick (GtkWidget *widget,
* @y: Y coordinate to test, relative to @widget's origin
* @flags: Flags to influence what is picked
*
- * Finds the descendant of @widget (including @widget itself) closest
- * to the screen at the point (@x, @y). The point must be given in
- * widget coordinates, so (0, 0) is assumed to be the top left of
- * @widget's content area.
+ * Finds the descendant of @widget closest
+ * to the screen at the point (@x, @y).
+ *
+ * The point must be given in widget coordinates, so (0, 0) is assumed
+ * to be the top left of @widget's content area.
*
* Usually widgets will return %NULL if the given coordinate is not
- * contained in @widget checked via gtk_widget_contains(). Otherwise
- * they will recursively try to find a child that does not return %NULL.
- * Widgets are however free to customize their picking algorithm.
+ * contained in @widget checked via [method@Gtk.Widget.contains].
+ * Otherwise they will recursively try to find a child that does
+ * not return %NULL. Widgets are however free to customize their
+ * picking algorithm.
*
- * This function is used on the toplevel to determine the widget below
- * the mouse cursor for purposes of hover highlighting and delivering events.
+ * This function is used on the toplevel to determine the widget
+ * below the mouse cursor for purposes of hover highlighting and
+ * delivering events.
*
- * Returns: (nullable) (transfer none): The widget descendant at the given
- * coordinate or %NULL if none.
- **/
+ * Returns: (nullable) (transfer none): The widget descendant at
+ * the given coordinate or %NULL if none.
+ */
GtkWidget *
gtk_widget_pick (GtkWidget *widget,
double x,
@@ -10002,7 +10163,7 @@ gtk_widget_pick (GtkWidget *widget,
/**
* gtk_widget_compute_transform:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @target: the target widget that the matrix will transform to
* @out_transform: (out caller-allocates): location to
* store the final transformation
@@ -10081,11 +10242,12 @@ gtk_widget_compute_transform (GtkWidget *widget,
/**
* gtk_widget_compute_bounds:
- * @widget: the #GtkWidget to query
- * @target: the #GtkWidget
+ * @widget: the `GtkWidget` to query
+ * @target: the `GtkWidget`
* @out_bounds: (out caller-allocates): the rectangle taking the bounds
*
* Computes the bounds for @widget in the coordinate space of @target.
+ *
* FIXME: Explain what "bounds" are.
*
* If the operation is successful, %TRUE is returned. If @widget has no
@@ -10096,7 +10258,7 @@ gtk_widget_compute_transform (GtkWidget *widget,
* It is valid for @widget and @target to be the same widget.
*
* Returns: %TRUE if the bounds could be computed
- **/
+ */
gboolean
gtk_widget_compute_bounds (GtkWidget *widget,
GtkWidget *target,
@@ -10130,7 +10292,7 @@ gtk_widget_compute_bounds (GtkWidget *widget,
* Returns the width that has currently been allocated to @widget.
*
* Returns: the width of the @widget
- **/
+ */
int
gtk_widget_get_allocated_width (GtkWidget *widget)
{
@@ -10150,7 +10312,7 @@ gtk_widget_get_allocated_width (GtkWidget *widget)
* Returns the height that has currently been allocated to @widget.
*
* Returns: the height of the @widget
- **/
+ */
int
gtk_widget_get_allocated_height (GtkWidget *widget)
{
@@ -10168,12 +10330,13 @@ gtk_widget_get_allocated_height (GtkWidget *widget)
* @widget: the widget to query
*
* Returns the baseline that has currently been allocated to @widget.
+ *
* This function is intended to be used when implementing handlers
- * for the #GtkWidgetClass.snapshot() function, and when allocating child
- * widgets in #GtkWidgetClass.size_allocate().
+ * for the `GtkWidget`Class.snapshot() function, and when allocating
+ * child widgets in `GtkWidget`Class.size_allocate().
*
* Returns: the baseline of the @widget, or -1 if none
- **/
+ */
int
gtk_widget_get_allocated_baseline (GtkWidget *widget)
{
@@ -10195,13 +10358,14 @@ gtk_widget_get_allocated_baseline (GtkWidget *widget)
}
/**
- * gtk_widget_set_opacity:
- * @widget: a #GtkWidget
+ * gtk_widget_set_opacity: (attributes org.gtk.Method.set_property=opacity)
+ * @widget: a `GtkWidget`
* @opacity: desired opacity, between 0 and 1
*
- * Request the @widget to be rendered partially transparent, with
- * opacity 0 being fully transparent and 1 fully opaque. (Opacity
- * values are clamped to the [0,1] range).
+ * Request the @widget to be rendered partially transparent.
+ *
+ * An opacity of 0 is fully transparent and an opacity of 1
+ * is fully opaque.
*
* Opacity works on both toplevel widgets and child widgets, although
* there are some limitations: For toplevel widgets, applying opacity
@@ -10216,8 +10380,8 @@ gtk_widget_get_allocated_baseline (GtkWidget *widget)
* appear translucent, since it is ultimatively rendered on that
* toplevel. The opacity value itself is not inherited by child
* widgets (since that would make widgets deeper in the hierarchy
- * progressively more translucent). As a consequence, #GtkPopovers
- * and other #GtkNative widgets with their own surface will use their
+ * progressively more translucent). As a consequence, [class@Gtk.Popover]s
+ * and other [class@Gtk.Native] widgets with their own surface will use their
* own opacity value, and thus by default appear non-translucent,
* even if they are attached to a toplevel that is translucent.
*/
@@ -10245,14 +10409,15 @@ gtk_widget_set_opacity (GtkWidget *widget,
}
/**
- * gtk_widget_get_opacity:
- * @widget: a #GtkWidget
+ * gtk_widget_get_opacity: (attributes org.gtk.Method.get_property=opacity)
+ * @widget: a `GtkWidget`
+ *
+ * #Fetches the requested opacity for this widget.
*
- * Fetches the requested opacity for this widget.
- * See gtk_widget_set_opacity().
+ * See [method@Gtk.Widget.set_opacity].
*
* Returns: the requested opacity for this widget.
- **/
+ */
double
gtk_widget_get_opacity (GtkWidget *widget)
{
@@ -10264,18 +10429,20 @@ gtk_widget_get_opacity (GtkWidget *widget)
}
/**
- * gtk_widget_set_overflow:
- * @widget: a #GtkWidget
+ * gtk_widget_set_overflow: (attributes org.gtk.Method.set_property=overflow)
+ * @widget: a `GtkWidget`
* @overflow: desired overflow
*
- * Sets how @widget treats content that is drawn outside the widget's content area.
- * See the definition of #GtkOverflow for details.
+ * Sets how @widget treats content that is drawn outside the
+ * widget's content area.
+ *
+ * See the definition of [enum@Gtk.Overflow] for details.
*
- * This setting is provided for widget implementations and should not be used by
- * application code.
+ * This setting is provided for widget implementations and
+ * should not be used by application code.
*
* The default value is %GTK_OVERFLOW_VISIBLE.
- **/
+ */
void
gtk_widget_set_overflow (GtkWidget *widget,
GtkOverflow overflow)
@@ -10295,10 +10462,10 @@ gtk_widget_set_overflow (GtkWidget *widget,
}
/**
- * gtk_widget_get_overflow:
- * @widget: a #GtkWidget
+ * gtk_widget_get_overflow: (attributes org.gtk.Method.get_property=overflow)
+ * @widget: a `GtkWidget`
*
- * Returns the value set via gtk_widget_set_overflow().
+ * Returns the widgets overflow value.
*
* Returns: The widget's overflow.
**/
@@ -10330,9 +10497,10 @@ gtk_widget_set_has_focus (GtkWidget *widget,
/**
* gtk_widget_in_destruction:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns whether the widget is currently being destroyed.
+ *
* This information can sometimes be used to avoid doing
* unnecessary work.
*
@@ -10499,8 +10667,8 @@ _gtk_widget_get_sizegroups (GtkWidget *widget)
* Sets the name to be used for CSS matching of widgets.
*
* If this function is not called for a given class, the name
- * set on the parent class is used. By default, GtkWidget uses
- * the name "widget".
+ * set on the parent class is used. By default, `GtkWidget`
+ * uses the name "widget".
*/
void
gtk_widget_class_set_css_name (GtkWidgetClass *widget_class,
@@ -10520,8 +10688,9 @@ gtk_widget_class_set_css_name (GtkWidgetClass *widget_class,
* gtk_widget_class_get_css_name:
* @widget_class: class to set the name on
*
- * Gets the name used by this class for matching in CSS code. See
- * gtk_widget_class_set_css_name() for details.
+ * Gets the name used by this class for matching in CSS code.
+ *
+ * See gtk_widget_class_set_css_name() for details.
*
* Returns: the CSS name of the given class
*/
@@ -10585,14 +10754,16 @@ _gtk_widget_peek_style_context (GtkWidget *widget)
/**
* gtk_widget_get_style_context:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Returns the style context associated to @widget. The returned object is
- * guaranteed to be the same for the lifetime of @widget.
+ * Returns the style context associated to @widget.
*
- * Returns: (transfer none): a #GtkStyleContext. This memory is owned by @widget and
- * must not be freed.
- **/
+ * The returned object is guaranteed to be the same
+ * for the lifetime of @widget.
+ *
+ * Returns: (transfer none): a `GtkStyleContext`. This memory
+ * is owned by @widget and must not be freed.
+ */
GtkStyleContext *
gtk_widget_get_style_context (GtkWidget *widget)
{
@@ -10680,13 +10851,15 @@ _gtk_widget_get_action_muxer (GtkWidget *widget,
/**
* gtk_widget_insert_action_group:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @name: the prefix for actions in @group
* @group: (allow-none): a #GActionGroup, or %NULL
*
- * Inserts @group into @widget. Children of @widget that implement
- * #GtkActionable can then be associated with actions in @group by
- * setting their “action-name” to @prefix.`action-name`.
+ * Inserts @group into @widget.
+ *
+ * Children of @widget that implement [iface@Gtk.Actionable] can
+ * then be associated with actions in @group by setting their
+ * “action-name” to @prefix.`action-name`.
*
* Note that inheritance is defined for individual actions. I.e.
* even if you insert a group with prefix @prefix, actions with
@@ -10774,24 +10947,28 @@ get_auto_child_hash (GtkWidget *widget,
/**
* gtk_widget_init_template:
- * @widget: a #GtkWidget
- *
- * Creates and initializes child widgets defined in templates. This
- * function must be called in the instance initializer for any
- * class which assigned itself a template using gtk_widget_class_set_template()
+ * @widget: a `GtkWidget`
*
- * It is important to call this function in the instance initializer
- * of a #GtkWidget subclass and not in #GObject.constructed() or
- * #GObject.constructor() for two reasons.
+ * Creates and initializes child widgets defined in templates.
*
- * One reason is that generally derived widgets will assume that parent
- * class composite widgets have been created in their instance
- * initializers.
+ * This function must be called in the instance initializer
+ * for any class which assigned itself a template using
+ * [method@Gtk.WidgetClass.set_template].
*
- * Another reason is that when calling g_object_new() on a widget with
- * composite templates, it’s important to build the composite widgets
- * before the construct properties are set. Properties passed to g_object_new()
- * should take precedence over properties set in the private template XML.
+ * It is important to call this function in the instance initializer
+ * of a `GtkWidget` subclass and not in `GObject.constructed()` or
+ * `GObject.constructor()` for two reasons:
+ *
+ * - derived widgets will assume that the composite widgets
+ * defined by its parent classes have been created in their
+ * relative instance initializers
+ * - when calling `g_object_new()` on a widget with composite templates,
+ * it’s important to build the composite widgets before the construct
+ * properties are set. Properties passed to `g_object_new()` should
+ * take precedence over properties set in the private template XML
+ *
+ * A good rule of thumb is to call this function as the first thing in
+ * an instance initialization function.
*/
void
gtk_widget_init_template (GtkWidget *widget)
@@ -10877,16 +11054,17 @@ out:
/**
* gtk_widget_class_set_template:
- * @widget_class: A #GtkWidgetClass
+ * @widget_class: A `GtkWidgetClass`
* @template_bytes: A #GBytes holding the #GtkBuilder XML
*
* This should be called at class initialization time to specify
- * the GtkBuilder XML to be used to extend a widget.
+ * the `GtkBuilder` XML to be used to extend a widget.
*
- * For convenience, gtk_widget_class_set_template_from_resource() is also provided.
+ * For convenience, [method@Gtk.WidgetClass.set_template_from_resource]
+ * is also provided.
*
- * Note that any class that installs templates must call gtk_widget_init_template()
- * in the widget’s instance initializer.
+ * Note that any class that installs templates must call
+ * [method@Gtk.Widget.init_template] in the widget’s instance initializer.
*/
void
gtk_widget_class_set_template (GtkWidgetClass *widget_class,
@@ -10923,13 +11101,15 @@ gtk_widget_class_set_template (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_set_template_from_resource:
- * @widget_class: A #GtkWidgetClass
+ * @widget_class: A `GtkWidgetClass`
* @resource_name: The name of the resource to load the template from
*
- * A convenience function to call gtk_widget_class_set_template().
+ * A convenience function that calls [method@Gtk.WidgetClass.set_template]
+ * with the contents of a `GResource`.
*
- * Note that any class that installs templates must call gtk_widget_init_template()
- * in the widget’s instance initializer.
+ * Note that any class that installs templates must call
+ * [method@Gtk.Widget.init_template] in the widget’s instance
+ * initializer.
*/
void
gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class,
@@ -10964,17 +11144,18 @@ gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_bind_template_callback_full:
- * @widget_class: A #GtkWidgetClass
+ * @widget_class: A `GtkWidgetClass`
* @callback_name: The name of the callback as expected in the template XML
* @callback_symbol: (scope async): The callback symbol
*
- * Declares a @callback_symbol to handle @callback_name from the template XML
- * defined for @widget_type. This function is not supported after
- * gtk_widget_class_set_template_scope() has been used on @widget_class.
- * See gtk_builder_cscope_add_callback_symbol().
+ * Declares a @callback_symbol to handle @callback_name from
+ * the template XML defined for @widget_type.
*
- * Note that this must be called from a composite widget classes class
- * initializer after calling gtk_widget_class_set_template().
+ * This function is not supported after [method@Gtk.WidgetClass.set_template_scope]
+ * has been used on @widget_class. See [method@Gtk.BuilderCScope.add_callback_symbol].
+ *
+ * Note that this must be called from a composite widget classes
+ * class initializer after calling [method@Gtk.WidgetClass.set_template].
*/
void
gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class,
@@ -11006,11 +11187,13 @@ gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_set_template_scope:
- * @widget_class: A #GtkWidgetClass
- * @scope: (transfer none): The #GtkBuilderScope to use when loading the class template
+ * @widget_class: A `GtkWidgetClass`
+ * @scope: (transfer none): The `GtkBuilderScope` to use when loading
+ * the class template
*
- * For use in language bindings, this will override the default #GtkBuilderScope to be
- * used when parsing GtkBuilder XML from this class’s template data.
+ * For use in language bindings, this will override the default
+ * `GtkBuilderScope` to be used when parsing GtkBuilder XML from
+ * this class’s template data.
*
* Note that this must be called from a composite widget classes class
* initializer after calling gtk_widget_class_set_template().
@@ -11029,35 +11212,41 @@ gtk_widget_class_set_template_scope (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_bind_template_child_full:
- * @widget_class: A #GtkWidgetClass
+ * @widget_class: A `GtkWidgetClass`
* @name: The “id” of the child defined in the template XML
* @internal_child: Whether the child should be accessible as an “internal-child”
- * when this class is used in GtkBuilder XML
+ * when this class is used in GtkBuilder XML
* @struct_offset: The structure offset into the composite widget’s instance public or private structure
- * where the automated child pointer should be set, or 0 to not assign the pointer.
- *
- * Automatically assign an object declared in the class template XML to be set to a location
- * on a freshly built instance’s private data, or alternatively accessible via gtk_widget_get_template_child().
- *
- * The struct can point either into the public instance, then you should use G_STRUCT_OFFSET(WidgetType, member)
- * for @struct_offset, or in the private struct, then you should use G_PRIVATE_OFFSET(WidgetType, member).
- *
- * An explicit strong reference will be held automatically for the duration of your
- * instance’s life cycle, it will be released automatically when #GObjectClass.dispose() runs
- * on your instance and if a @struct_offset that is != 0 is specified, then the automatic location
- * in your instance public or private data will be set to %NULL. You can however access an automated child
- * pointer the first time your classes #GObjectClass.dispose() runs, or alternatively in
- * #GtkWidgetClass.destroy().
- *
- * If @internal_child is specified, #GtkBuildableIface.get_internal_child() will be automatically
- * implemented by the #GtkWidget class so there is no need to implement it manually.
- *
- * The wrapper macros gtk_widget_class_bind_template_child(), gtk_widget_class_bind_template_child_internal(),
- * gtk_widget_class_bind_template_child_private() and gtk_widget_class_bind_template_child_internal_private()
+ * where the automated child pointer should be set, or 0 to not assign the pointer.
+ *
+ * Automatically assign an object declared in the class template XML to be
+ * set to a location on a freshly built instance’s private data, or
+ * alternatively accessible via [method@Gtk.Widget.get_template_child].
+ *
+ * The struct can point either into the public instance, then you should
+ * use `G_STRUCT_OFFSET(WidgetType, member)` for @struct_offset, or in the
+ * private struct, then you should use `G_PRIVATE_OFFSET(WidgetType, member)`.
+ *
+ * An explicit strong reference will be held automatically for the duration
+ * of your instance’s life cycle, it will be released automatically when
+ * `GObjectClass.dispose()` runs on your instance and if a @struct_offset
+ * that is `!= 0` is specified, then the automatic location in your instance
+ * public or private data will be set to %NULL. You can however access an
+ * automated child pointer the first time your classes `GObjectClass.dispose()`
+ * runs, or alternatively in [signal@Gtk.Widget::destroy].
+ *
+ * If @internal_child is specified, [vfunc@Gtk.Buildable.get_internal_child]
+ * will be automatically implemented by the `GtkWidget` class so there is no
+ * need to implement it manually.
+ *
+ * The wrapper macros [func@Gtk.widget_class_bind_template_child],
+ * [func@Gtk.widget_class_bind_template_child_internal],
+ * [func@Gtk.widget_class_bind_template_child_private] and
+ * [func@Gtk.widget_class_bind_template_child_internal_private]
* might be more convenient to use.
*
* Note that this must be called from a composite widget classes class
- * initializer after calling gtk_widget_class_set_template().
+ * initializer after calling [method@Gtk.WidgetClass.set_template].
*/
void
gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class,
@@ -11080,21 +11269,23 @@ gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class,
/**
* gtk_widget_get_template_child:
- * @widget: A #GtkWidget
+ * @widget: A `GtkWidget`
* @widget_type: The #GType to get a template child for
* @name: The “id” of the child defined in the template XML
*
- * Fetch an object build from the template XML for @widget_type in this @widget instance.
+ * Fetch an object build from the template XML for @widget_type in
+ * this @widget instance.
*
- * This will only report children which were previously declared with
- * gtk_widget_class_bind_template_child_full() or one of its
+ * This will only report children which were previously declared
+ * with [method@Gtk.WidgetClass.bind_template_child_full] or one of its
* variants.
*
- * This function is only meant to be called for code which is private to the @widget_type which
- * declared the child and is meant for language bindings which cannot easily make use
- * of the GObject structure offsets.
+ * This function is only meant to be called for code which is private
+ * to the @widget_type which declared the child and is meant for language
+ * bindings which cannot easily make use of the GObject structure offsets.
*
- * Returns: (transfer none): The object built in the template XML with the id @name
+ * Returns: (transfer none): The object built in the template XML with
+ * the id @name
*/
GObject *
gtk_widget_get_template_child (GtkWidget *widget,
@@ -11118,23 +11309,23 @@ gtk_widget_get_template_child (GtkWidget *widget,
/**
* gtk_widget_activate_action_variant: (rename-to gtk_widget_activate_action)
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @name: the name of the action to activate
* @args: (allow-none): parameters to use, or %NULL
*
- * Looks up the action in the action groups associated
- * with @widget and its ancestors, and activates it.
+ * Looks up the action in the action groups associated with
+ * @widget and its ancestors, and activates it.
*
* If the action is in an action group added with
- * gtk_widget_insert_action_group(), the @name is
- * expected to be prefixed with the prefix that was
- * used when the group was inserted.
+ * [method@Gtk.Widget.insert_action_group], the @name is expected
+ * to be prefixed with the prefix that was used when the group was
+ * inserted.
*
- * The arguments must match the actions expected parameter
- * type, as returned by g_action_get_parameter_type().
+ * The arguments must match the actions expected parameter type,
+ * as returned by `g_action_get_parameter_type()`.
*
- * Returns: %TRUE if the action was activated, %FALSE if the action does
- * not exist.
+ * Returns: %TRUE if the action was activated, %FALSE if the
+ * action does not exist.
*/
gboolean
gtk_widget_activate_action_variant (GtkWidget *widget,
@@ -11157,7 +11348,7 @@ gtk_widget_activate_action_variant (GtkWidget *widget,
/**
* gtk_widget_activate_action:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @name: the name of the action to activate
* @format_string: GVariant format string for arguments or %NULL
* for no arguments
@@ -11166,11 +11357,11 @@ gtk_widget_activate_action_variant (GtkWidget *widget,
* Looks up the action in the action groups associated
* with @widget and its ancestors, and activates it.
*
- * This is a wrapper around gtk_widget_activate_action_variant()
+ * This is a wrapper around [method@Gtk.Widget.activate_action_variant]
* that constructs the @args variant according to @format_string.
*
- * Returns: %TRUE if the action was activated, %FALSE if the action does
- * not exist.
+ * Returns: %TRUE if the action was activated, %FALSE if the action
+ * does not exist
*/
gboolean
gtk_widget_activate_action (GtkWidget *widget,
@@ -11201,9 +11392,9 @@ gtk_widget_activate_action (GtkWidget *widget,
/**
* gtk_widget_activate_default:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Activate the default.activate action from @widget.
+ * Activates the `default.activate` action from @widget.
*/
void
gtk_widget_activate_default (GtkWidget *widget)
@@ -11251,14 +11442,15 @@ gtk_widget_cancel_event_sequence (GtkWidget *widget,
/**
* gtk_widget_add_controller:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @controller: (transfer full): a #GtkEventController that hasn't been
* added to a widget yet
*
- * Adds @controller to @widget so that it will receive events. You will
- * usually want to call this function right after creating any kind of
- * #GtkEventController.
- **/
+ * Adds @controller to @widget so that it will receive events.
+ *
+ * You will usually want to call this function right after
+ * creating any kind of [class@Gtk.EventController].
+ */
void
gtk_widget_add_controller (GtkWidget *widget,
GtkEventController *controller)
@@ -11279,15 +11471,17 @@ gtk_widget_add_controller (GtkWidget *widget,
/**
* gtk_widget_remove_controller:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @controller: (transfer none): a #GtkEventController
*
* Removes @controller from @widget, so that it doesn't process
- * events anymore. It should not be used again.
+ * events anymore.
+ *
+ * It should not be used again.
*
* Widgets will remove all event controllers automatically when they
* are destroyed, there is normally no need to call this function.
- **/
+ */
void
gtk_widget_remove_controller (GtkWidget *widget,
GtkEventController *controller)
@@ -11519,20 +11713,20 @@ gtk_widget_child_observer_destroyed (gpointer widget)
/**
* gtk_widget_observe_children:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Returns a #GListModel to track the children of @widget.
+ * Returns a `GListModel` to track the children of @widget.
*
- * Calling this function will enable extra internal bookkeeping to track
- * children and emit signals on the returned listmodel. It may slow down
- * operations a lot.
+ * Calling this function will enable extra internal bookkeeping
+ * to track children and emit signals on the returned listmodel.
+ * It may slow down operations a lot.
*
- * Applications should try hard to avoid calling this function because of
- * the slowdowns.
+ * Applications should try hard to avoid calling this function
+ * because of the slowdowns.
*
- * Returns: (transfer full) (attributes element-type=GtkWidget): a #GListModel
- * tracking @widget's children
- **/
+ * Returns: (transfer full) (attributes element-type=GtkWidget):
+ * a `GListModel` tracking @widget's children
+ */
GListModel *
gtk_widget_observe_children (GtkWidget *widget)
{
@@ -11591,20 +11785,21 @@ gtk_widget_controller_list_get_item (gpointer item,
/**
* gtk_widget_observe_controllers:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Returns a #GListModel to track the #GtkEventControllers of @widget.
+ * Returns a `GListModel` to track the [class@Gtk.EventController]s
+ * of @widget.
*
- * Calling this function will enable extra internal bookkeeping to track
- * controllers and emit signals on the returned listmodel. It may slow down
- * operations a lot.
+ * Calling this function will enable extra internal bookkeeping
+ * to track controllers and emit signals on the returned listmodel.
+ * It may slow down operations a lot.
*
- * Applications should try hard to avoid calling this function because of
- * the slowdowns.
+ * Applications should try hard to avoid calling this function
+ * because of the slowdowns.
*
- * Returns: (transfer full) (attributes element-type=GtkEventController): a
- * #GListModel tracking @widget's controllers
- **/
+ * Returns: (transfer full) (attributes element-type=GtkEventController):
+ * a `GListModel` tracking @widget's controllers
+ */
GListModel *
gtk_widget_observe_controllers (GtkWidget *widget)
{
@@ -11628,7 +11823,7 @@ gtk_widget_observe_controllers (GtkWidget *widget)
/**
* gtk_widget_get_first_child:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns the widgets first child.
*
@@ -11648,7 +11843,7 @@ gtk_widget_get_first_child (GtkWidget *widget)
/**
* gtk_widget_get_last_child:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns the widgets last child.
*
@@ -11668,7 +11863,7 @@ gtk_widget_get_last_child (GtkWidget *widget)
/**
* gtk_widget_get_next_sibling:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns the widgets next sibling.
*
@@ -11688,7 +11883,7 @@ gtk_widget_get_next_sibling (GtkWidget *widget)
/**
* gtk_widget_get_prev_sibling:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns the widgets previous sibling.
*
@@ -11708,8 +11903,8 @@ gtk_widget_get_prev_sibling (GtkWidget *widget)
/**
* gtk_widget_insert_after:
- * @widget: a #GtkWidget
- * @parent: the parent #GtkWidget to insert @widget into
+ * @widget: a `GtkWidget`
+ * @parent: the parent `GtkWidget` to insert @widget into
* @previous_sibling: (nullable): the new previous sibling of @widget or %NULL
*
* Inserts @widget into the child widget list of @parent.
@@ -11717,11 +11912,12 @@ gtk_widget_get_prev_sibling (GtkWidget *widget)
* It will be placed after @previous_sibling, or at the beginning if
* @previous_sibling is %NULL.
*
- * After calling this function, gtk_widget_get_prev_sibling(widget) will
- * return @previous_sibling.
+ * After calling this function, `gtk_widget_get_prev_sibling(widget)`
+ * will return @previous_sibling.
*
- * If @parent is already set as the parent widget of @widget, this function
- * can also be used to reorder @widget in the child widget list of @parent.
+ * If @parent is already set as the parent widget of @widget, this
+ * function can also be used to reorder @widget in the child widget
+ * list of @parent.
*
* This API is primarily meant for widget implementations; if you are
* just using a widget, you *must* use its own API for adding children.
@@ -11750,8 +11946,8 @@ gtk_widget_insert_after (GtkWidget *widget,
/**
* gtk_widget_insert_before:
- * @widget: a #GtkWidget
- * @parent: the parent #GtkWidget to insert @widget into
+ * @widget: a `GtkWidget`
+ * @parent: the parent `GtkWidget` to insert @widget into
* @next_sibling: (nullable): the new next sibling of @widget or %NULL
*
* Inserts @widget into the child widget list of @parent.
@@ -11759,7 +11955,7 @@ gtk_widget_insert_after (GtkWidget *widget,
* It will be placed before @next_sibling, or at the end if
* @next_sibling is %NULL.
*
- * After calling this function, gtk_widget_get_next_sibling(widget)
+ * After calling this function, `gtk_widget_get_next_sibling(widget)`
* will return @next_sibling.
*
* If @parent is already set as the parent widget of @widget, this function
@@ -11811,24 +12007,27 @@ gtk_widget_forall (GtkWidget *widget,
/**
* gtk_widget_snapshot_child:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @child: a child of @widget
* @snapshot: #GtkSnapshot as passed to the widget. In particular, no
* calls to gtk_snapshot_translate() or other transform calls should
* have been made.
*
- * When a widget receives a call to the snapshot function, it must send
- * synthetic #GtkWidgetClass.snapshot() calls to all children. This function
- * provides a convenient way of doing this. A widget, when it receives
- * a call to its #GtkWidgetClass.snapshot() function, calls
+ * Snapshot the a child of @widget.
+ *
+ * When a widget receives a call to the snapshot function,
+ * it must send synthetic `GtkWidget`Class.snapshot() calls
+ * to all children. This function provides a convenient way
+ * of doing this. A widget, when it receives a call to its
+ * `GtkWidget`Class.snapshot() function, calls
* gtk_widget_snapshot_child() once for each child, passing in
* the @snapshot the widget received.
*
* gtk_widget_snapshot_child() takes care of translating the origin of
* @snapshot, and deciding whether the child needs to be snapshot.
*
- * This function does nothing for children that implement #GtkNative.
- **/
+ * This function does nothing for children that implement `GtkNative`.
+ */
void
gtk_widget_snapshot_child (GtkWidget *widget,
GtkWidget *child,
@@ -11866,16 +12065,17 @@ gtk_widget_snapshot_child (GtkWidget *widget,
/**
* gtk_widget_set_focus_child:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @child: (nullable): a direct child widget of @widget or %NULL
* to unset the focus child of @widget
*
- * Set @child as the current focus child of @widget. The previous
- * focus child will be unset.
+ * Set @child as the current focus child of @widget.
+ *
+ * The previous focus child will be unset.
*
* This function is only suitable for widget implementations.
* If you want a certain widget to get the input focus, call
- * gtk_widget_grab_focus() on it.
+ * [method@Gtk.Widget.grab_focus] on it.
*/
void
gtk_widget_set_focus_child (GtkWidget *widget,
@@ -11903,12 +12103,12 @@ gtk_widget_real_set_focus_child (GtkWidget *widget,
/**
* gtk_widget_get_focus_child:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
* Returns the current focus child of @widget.
*
- * Returns: (nullable) (transfer none): The current focus child of @widget,
- * or %NULL in case the focus child is unset.
+ * Returns: (nullable) (transfer none): The current focus
+ * child of @widget, or %NULL in case the focus child is unset.
*/
GtkWidget *
gtk_widget_get_focus_child (GtkWidget *widget)
@@ -11921,16 +12121,17 @@ gtk_widget_get_focus_child (GtkWidget *widget)
}
/**
- * gtk_widget_set_cursor:
- * @widget: a #GtkWidget
- * @cursor: (allow-none): the new cursor or %NULL to use the default
- * cursor
+ * gtk_widget_set_cursor: (attributes org.gtk.Method.set_property=cursor)
+ * @widget: a `GtkWidget`
+ * @cursor: (allow-none): the new cursor or %NULL to use
+ * the default cursor
*
- * Sets the cursor to be shown when pointer devices point towards @widget.
+ * Sets the cursor to be shown when pointer devices point
+ * towards @widget.
*
- * If the @cursor is NULL, @widget will use the cursor inherited from the
- * parent widget.
- **/
+ * If the @cursor is NULL, @widget will use the cursor
+ * inherited from the parent widget.
+ */
void
gtk_widget_set_cursor (GtkWidget *widget,
GdkCursor *cursor)
@@ -11953,19 +12154,22 @@ gtk_widget_set_cursor (GtkWidget *widget,
/**
* gtk_widget_set_cursor_from_name:
- * @widget: a #GtkWidget
- * @name: (nullable): The name of the cursor or %NULL to use the default
- * cursor
+ * @widget: a `GtkWidget`
+ * @name: (nullable): The name of the cursor or %NULL to use
+ * the default cursor
*
- * Sets a named cursor to be shown when pointer devices point towards @widget.
+ * Sets a named cursor to be shown when pointer devices point
+ * towards @widget.
*
* This is a utility function that creates a cursor via
- * gdk_cursor_new_from_name() and then sets it on @widget with
- * gtk_widget_set_cursor(). See those 2 functions for details.
+ * [ctor@Gdk.Cursor.new_from_name] and then sets it on @widget
+ * with [method@Gtk.Widget.set_cursor]. See those functions for
+ * details.
*
- * On top of that, this function allows @name to be %NULL, which will
- * do the same as calling gtk_widget_set_cursor() with a %NULL cursor.
- **/
+ * On top of that, this function allows @name to be %NULL, which
+ * will do the same as calling [method@Gtk.Widget.set_cursor]
+ * with a %NULL cursor.
+ */
void
gtk_widget_set_cursor_from_name (GtkWidget *widget,
const char *name)
@@ -11987,15 +12191,16 @@ gtk_widget_set_cursor_from_name (GtkWidget *widget,
}
/**
- * gtk_widget_get_cursor:
- * @widget: a #GtkWidget
+ * gtk_widget_get_cursor: (attributes org.gtk.Method.get_property=cursor)
+ * @widget: a `GtkWidget`
*
- * Queries the cursor set via gtk_widget_set_cursor(). See that function for
- * details.
+ * Queries the cursor set on @widget.
*
- * Returns: (nullable) (transfer none): the cursor currently in use or %NULL
- * to use the default.
- **/
+ * See [method@Gtk.Widget.set_cursor] for details.
+ *
+ * Returns: (nullable) (transfer none): the cursor
+ * currently in use or %NULL to use the default.
+ */
GdkCursor *
gtk_widget_get_cursor (GtkWidget *widget)
{
@@ -12007,9 +12212,10 @@ gtk_widget_get_cursor (GtkWidget *widget)
}
/**
- * gtk_widget_set_can_target:
- * @widget: a #GtkWidget
- * @can_target: whether this widget should be able to receive pointer events
+ * gtk_widget_set_can_target: (attributes org.gtk.Method.set_property=can-target)
+ * @widget: a `GtkWidget`
+ * @can_target: whether this widget should be able to
+ * receive pointer events
*
* Sets whether @widget can be the target of pointer events.
*/
@@ -12030,8 +12236,8 @@ gtk_widget_set_can_target (GtkWidget *widget,
}
/**
- * gtk_widget_get_can_target:
- * @widget: a #GtkWidget
+ * gtk_widget_get_can_target: (attributes org.gtk.Method.get_property=can-target)
+ * @widget: a `GtkWidget`
*
* Queries whether @widget can be the target of pointer events.
*
@@ -12047,11 +12253,15 @@ gtk_widget_get_can_target (GtkWidget *widget)
/**
* gtk_widget_get_width:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
+ *
+ * Returns the content width of the widget.
+ *
+ * This function returns the size passed to its
+ * size-allocate implementation, which is the size you
+ * should be using in GtkWidgetClass.snapshot().
*
- * Returns the content width of the widget, as passed to its size-allocate implementation.
- * This is the size you should be using in GtkWidgetClass.snapshot(). For pointer
- * events, see gtk_widget_contains().
+ * For pointer events, see [method@Gtk.Widget.contains].
*
* Returns: The width of @widget
*/
@@ -12067,11 +12277,15 @@ gtk_widget_get_width (GtkWidget *widget)
/**
* gtk_widget_get_height:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
*
- * Returns the content height of the widget, as passed to its size-allocate implementation.
- * This is the size you should be using in GtkWidgetClass.snapshot(). For pointer
- * events, see gtk_widget_contains().
+ * Returns the content height of the widget.
+ *
+ * This function returns the size passed to its
+ * size-allocate implementation, which is the size you
+ * should be using in GtkWidgetClass.snapshot().
+ *
+ * For pointer events, see [method@Gtk.Widget.contains].
*
* Returns: The height of @widget
*/
@@ -12087,14 +12301,18 @@ gtk_widget_get_height (GtkWidget *widget)
/**
* gtk_widget_get_size:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @orientation: the orientation to query
*
- * Returns the content width or height of the widget, depending on @orientation.
- * This is equivalent to calling gtk_widget_get_width() for %GTK_ORIENTATION_HORIZONTAL
- * or gtk_widget_get_height() for %GTK_ORIENTATION_VERTICAL, but can be used when
- * writing orientation-independent code, such as when implementing #GtkOrientable
- * widgets.
+ * Returns the content width or height of the widget.
+ *
+ * Which dimension is returned depends on @orientation.
+ *
+ * This is equivalent to calling [method@Gtk.Widget.get_width]
+ * for %GTK_ORIENTATION_HORIZONTAL or [method@Gtk.Widget.get_height]
+ * for %GTK_ORIENTATION_VERTICAL, but can be used when
+ * writing orientation-independent code, such as when
+ * implementing [iface@Gtk.Orientable] widgets.
*
* Returns: The size of @widget in @orientation.
*/
@@ -12112,14 +12330,18 @@ gtk_widget_get_size (GtkWidget *widget,
/**
* gtk_widget_class_set_layout_manager_type:
- * @widget_class: class to set the layout manager type for
- * @type: The object type that implements the #GtkLayoutManager for @widget_class
+ * @widget_class: a `GtkWidgetClass`
+ * @type: The object type that implements the `GtkLayoutManager`
+ * for @widget_class
*
* Sets the type to be used for creating layout managers for widgets of
- * @widget_class. The given @type must be a subtype of #GtkLayoutManager.
+ * @widget_class.
*
- * This function should only be called from class init functions of widgets.
- **/
+ * The given @type must be a subtype of [class@Gtk.LayoutManager].
+ *
+ * This function should only be called from class init functions
+ * of widgets.
+ */
void
gtk_widget_class_set_layout_manager_type (GtkWidgetClass *widget_class,
GType type)
@@ -12136,13 +12358,14 @@ gtk_widget_class_set_layout_manager_type (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_get_layout_manager_type:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidgetClass`
*
- * Retrieves the type of the #GtkLayoutManager used by the #GtkWidget class.
+ * Retrieves the type of the [class@Gtk.LayoutManager]
+ * used by the `GtkWidget` class.
*
* See also: gtk_widget_class_set_layout_manager_type()
*
- * Returns: a #GtkLayoutManager subclass, or %G_TYPE_INVALID
+ * Returns: type of a `GtkLayoutManager` subclass, or %G_TYPE_INVALID
*/
GType
gtk_widget_class_get_layout_manager_type (GtkWidgetClass *widget_class)
@@ -12157,12 +12380,13 @@ gtk_widget_class_get_layout_manager_type (GtkWidgetClass *widget_class)
}
/**
- * gtk_widget_set_layout_manager:
- * @widget: a #GtkWidget
- * @layout_manager: (nullable) (transfer full): a #GtkLayoutManager
+ * gtk_widget_set_layout_manager: (attributes org.gtk.Method.set_property=layout-manager)
+ * @widget: a `GtkWidget`
+ * @layout_manager: (nullable) (transfer full): a `GtkLayoutManager`
*
- * Sets the layout manager delegate instance that provides an implementation
- * for measuring and allocating the children of @widget.
+ * Sets the layout manager delegate instance that
+ * provides an implementation for measuring and
+ * allocating the children of @widget.
*/
void
gtk_widget_set_layout_manager (GtkWidget *widget,
@@ -12193,12 +12417,14 @@ gtk_widget_set_layout_manager (GtkWidget *widget,
}
/**
- * gtk_widget_get_layout_manager:
- * @widget: a #GtkWidget
+ * gtk_widget_get_layout_manager: (attributes org.gtk.Method.get_property=layout-manager)
+ * @widget: a `GtkWidget`
+ *
+ * Retrieves the layout manager used by @widget
*
- * Retrieves the layout manager set using gtk_widget_set_layout_manager().
+ * See [method@Gtk.Widget.set_layout_manager].
*
- * Returns: (transfer none) (nullable): a #GtkLayoutManager
+ * Returns: (transfer none) (nullable): a `GtkLayoutManager`
*/
GtkLayoutManager *
gtk_widget_get_layout_manager (GtkWidget *widget)
@@ -12216,6 +12442,7 @@ gtk_widget_get_layout_manager (GtkWidget *widget)
*
* Returns whether @widget should contribute to
* the measuring and allocation of its parent.
+ *
* This is %FALSE for invisible children, but also
* for children that have their own surface.
*
@@ -12250,7 +12477,7 @@ gtk_widget_class_add_action (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_install_action:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidgetClass`
* @action_name: a prefixed action name, such as "clipboard.paste"
* @parameter_type: (nullable): the parameter type, or %NULL
* @activate: (scope call): callback to use when the action is activated
@@ -12314,13 +12541,13 @@ determine_type (GParamSpec *pspec)
/**
* gtk_widget_class_install_property_action:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidgetClass`
* @action_name: name of the action
* @property_name: name of the property in instances of @widget_class
* or any parent class.
*
- * Installs an action called @action_name on @widget_class and binds its
- * state to the value of the @property_name property.
+ * Installs an action called @action_name on @widget_class and
+ * binds its state to the value of the @property_name property.
*
* This function will perform a few santity checks on the property selected
* via @property_name. Namely, the property must exist, must be readable,
@@ -12383,7 +12610,7 @@ gtk_widget_class_install_property_action (GtkWidgetClass *widget_class,
/**
* gtk_widget_action_set_enabled:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @action_name: action name, such as "clipboard.paste"
* @enabled: whether the action is now enabled
*
@@ -12405,7 +12632,7 @@ gtk_widget_action_set_enabled (GtkWidget *widget,
/**
* gtk_widget_class_query_action:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidget`Class
* @index_: position of the action to query
* @owner: (out): return location for the type where the action was defined
* @action_name: (out): return location for the action name
@@ -12454,8 +12681,8 @@ gtk_widget_class_query_action (GtkWidgetClass *widget_class,
}
/**
- * gtk_widget_get_css_name:
- * @self: a #GtkWidget
+ * gtk_widget_get_css_name: (attributes org.gtk.Method.get_property=css-name)
+ * @self: a `GtkWidget`
*
* Returns the CSS name that is used for @self.
*
@@ -12473,12 +12700,17 @@ gtk_widget_get_css_name (GtkWidget *self)
/**
* gtk_widget_add_css_class:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @css_class: The style class to add to @widget, without
* the leading '.' used for notation of style classes
*
- * Adds @css_class to @widget. After calling this function, @widget's
- * style will match for @css_class, after the CSS matching rules.
+ * Adds a style class to @widget.
+ *
+ * After calling this function, the widgets style will match
+ * for @css_class, according to CSS matching rules.
+ *
+ * Use [method@Gtk.Widget.remove_css_class] to remove the
+ * style again.
*/
void
gtk_widget_add_css_class (GtkWidget *widget,
@@ -12497,12 +12729,13 @@ gtk_widget_add_css_class (GtkWidget *widget,
/**
* gtk_widget_remove_css_class:
- * @widget: a #GtkWidget
+ * @widget: a `GtkWidget`
* @css_class: The style class to remove from @widget, without
* the leading '.' used for notation of style classes
*
- * Removes @css_class from @widget. After this, the style of @widget
- * will stop matching for @css_class.
+ * Removes a style from @widget.
+ *
+ * After this, the style of @widget will stop matching for @css_class.
*/
void
gtk_widget_remove_css_class (GtkWidget *widget,
@@ -12526,8 +12759,8 @@ gtk_widget_remove_css_class (GtkWidget *widget,
/**
* gtk_widget_has_css_class:
- * @widget: a #GtkWidget
- * @css_class: A CSS style class, without the leading '.'
+ * @widget: a `GtkWidget`
+ * @css_class: A style class, without the leading '.'
* used for notation of style classes
*
* Returns whether @css_class is currently applied to @widget.
@@ -12555,10 +12788,10 @@ gtk_widget_has_css_class (GtkWidget *widget,
}
/**
- * gtk_widget_get_css_classes:
- * @widget: a #GtkWidget
+ * gtk_widget_get_css_classes: (attributes org.gtk.Method.get_property=css-classes)
+ * @widget: a `GtkWidget`
*
- * Returns the list of css classes applied to @widget.
+ * Returns the list of style classes applied to @widget.
*
* Returns: (transfer full): a %NULL-terminated list of
* css classes currently applied to @widget. The returned
@@ -12587,12 +12820,12 @@ gtk_widget_get_css_classes (GtkWidget *widget)
}
/**
- * gtk_widget_set_css_classes:
- * @widget: a #GtkWidget
- * @classes: (transfer none) (array zero-terminated=1): %NULL-terminated list
- * of css classes to apply to @widget.
+ * gtk_widget_set_css_classes: (attributes org.gtk.Method.set_property=css-classes)
+ * @widget: a `GtkWidget`
+ * @classes: (transfer none) (array zero-terminated=1):
+ * %NULL-terminated list of style classes to apply to @widget.
*
- * Will clear all css classes applied to @widget
+ * Will clear all style classes applied to @widget
* and replace them with @classes.
*/
void
@@ -12609,11 +12842,11 @@ gtk_widget_set_css_classes (GtkWidget *widget,
/*< private >
* gtk_widget_update_orientation:
- * @widget: a #GtkWidget implementing #GtkOrientable
+ * @widget: a `GtkWidget` implementing `GtkOrientable`
* @orientation: the orientation
*
- * Update the internal state associated to the given @orientation of a
- * #GtkWidget.
+ * Update the internal state associated to the given
+ * @orientation of a `GtkWidget`.
*/
void
gtk_widget_update_orientation (GtkWidget *widget,
@@ -12639,13 +12872,13 @@ gtk_widget_update_orientation (GtkWidget *widget,
/**
* gtk_widget_class_set_accessible_role:
- * @widget_class: a #GtkWidgetClass
- * @accessible_role: the #GtkAccessibleRole used by the @widget_class
+ * @widget_class: a `GtkWidgetClass`
+ * @accessible_role: the `GtkAccessibleRole` used by the @widget_class
*
- * Sets the accessible role used by the given #GtkWidget class.
+ * Sets the accessible role used by the given `GtkWidget` class.
*
- * Different accessible roles have different states, and are rendered
- * differently by assistive technologies.
+ * Different accessible roles have different states, and are
+ * rendered differently by assistive technologies.
*/
void
gtk_widget_class_set_accessible_role (GtkWidgetClass *widget_class,
@@ -12661,14 +12894,14 @@ gtk_widget_class_set_accessible_role (GtkWidgetClass *widget_class,
/**
* gtk_widget_class_get_accessible_role:
- * @widget_class: a #GtkWidgetClass
+ * @widget_class: a `GtkWidgetClass`
*
- * Retrieves the accessible role used by the given #GtkWidget class.
+ * Retrieves the accessible role used by the given `GtkWidget` class.
*
* Different accessible roles have different states, and are rendered
* differently by assistive technologies.
*
- * See also: gtk_accessible_get_accessible_role()
+ * See also: [method@Gtk.Accessible.get_accessible_role].
*
* Returns: the accessible role for the widget class
*/
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 765cb207c369ce9276321d4d5c0032b8d0b3ceb6..53f218b133bb213fac0b855118d9975fb8ba9015 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -62,11 +62,7 @@ typedef struct _GtkWidgetClassPrivate GtkWidgetClassPrivate;
* @width: the width of the widget’s allocated area.
* @height: the height of the widget’s allocated area.
*
- * A #GtkAllocation-struct of a widget represents region
- * which has been allocated to the widget by its parent. It is a subregion
- * of its parents allocation. See
- * [GtkWidget’s geometry management section][geometry-management] for
- * more information.
+ * The rectangle representing the area allocated for a widget by its parent.
*/
typedef GdkRectangle GtkAllocation;
diff --git a/gtk/gtkwidgetpaintable.c b/gtk/gtkwidgetpaintable.c
index 1ed017db9e87b814f50d6a1067e7c3e61120d804..dbea4abe15422637e4e45095e450912e5e27dd5d 100644
--- a/gtk/gtkwidgetpaintable.c
+++ b/gtk/gtkwidgetpaintable.c
@@ -27,31 +27,28 @@
#include "gtkwidgetprivate.h"
/**
- * SECTION:gtkwidgetpaintable
- * @Short_description: Drawing a widget elsewhere
- * @Title: GtkWidgetPaintable
- * @see_also: #GtkWidget, #GdkPaintable
+ * GtkWidgetPaintable:
*
- * GtkWidgetPaintable is an implementation of the #GdkPaintable interface
- * that allows displaying the contents of a #GtkWidget.
+ * `GtkWidgetPaintable` is a `GdkPaintable` that displays the contents
+ * of a widget.
*
- * GtkWidgetPaintable will also take care of the widget not being in a
+ * `GtkWidgetPaintable` will also take care of the widget not being in a
* state where it can be drawn (like when it isn't shown) and just draw
* nothing or where it does not have a size (like when it is hidden) and
* report no size in that case.
*
- * Of course, GtkWidgetPaintable allows you to monitor widgets for size
- * changes by emitting the #GdkPaintable::invalidate-size signal whenever
- * the size of the widget changes as well as for visual changes by
- * emitting the #GdkPaintable::invalidate-contents signal whenever the
- * widget changes.
+ * Of course, `GtkWidgetPaintable` allows you to monitor widgets for size
+ * changes by emitting the [signal@Gdk.Paintable::invalidate-size] signal
+ * whenever the size of the widget changes as well as for visual changes by
+ * emitting the [signal@Gdk.Paintable::invalidate-contents] signal whenever
+ * the widget changes.
*
- * You can of course use a GtkWidgetPaintable everywhere a
- * #GdkPaintable is allowed, including using it on a #GtkPicture (or one
- * of its parents) that it was set on itself via gtk_picture_set_paintable().
- * The paintable will take care of recursion when this happens. If you do
- * this however, ensure the #GtkPicture:can-shrink property is set to
- * %TRUE or you might end up with an infinitely growing widget.
+ * You can use a `GtkWidgetPaintable` everywhere a `GdkPaintable` is allowed,
+ * including using it on a `GtkPicture` (or one of its parents) that it was
+ * set on itself via gtk_picture_set_paintable(). The paintable will take care
+ * of recursion when this happens. If you do this however, ensure that the
+ * [property@Gtk.Picture:can-shrink] property is set to %TRUE or you might
+ * end up with an infinitely growing widget.
*/
struct _GtkWidgetPaintable
{
@@ -241,7 +238,7 @@ gtk_widget_paintable_class_init (GtkWidgetPaintableClass *klass)
gobject_class->finalize = gtk_widget_paintable_finalize;
/**
- * GtkWidgetPaintable:widget
+ * GtkWidgetPaintable:widget: (attributes org.gtk.Property.get=gtk_widget_paintable_get_widget org.gtk.Property.set=gtk_widget_paintable_set_widget)
*
* The observed widget or %NULL if none.
*/
@@ -263,12 +260,12 @@ gtk_widget_paintable_init (GtkWidgetPaintable *self)
/**
* gtk_widget_paintable_new:
- * @widget: (allow-none) (transfer none): a #GtkWidget or %NULL
+ * @widget: (allow-none) (transfer none): a `GtkWidget` or %NULL
*
* Creates a new widget paintable observing the given widget.
*
- * Returns: (transfer full) (type GtkWidgetPaintable): a new #GtkWidgetPaintable
- **/
+ * Returns: (transfer full) (type GtkWidgetPaintable): a new `GtkWidgetPaintable`
+ */
GdkPaintable *
gtk_widget_paintable_new (GtkWidget *widget)
{
@@ -297,14 +294,13 @@ gtk_widget_paintable_snapshot_widget (GtkWidgetPaintable *self)
}
/**
- * gtk_widget_paintable_get_widget:
- * @self: a #GtkWidgetPaintable
+ * gtk_widget_paintable_get_widget: (attributes org.gtk.Method.get_property=widget)
+ * @self: a `GtkWidgetPaintable`
*
- * Returns the widget that is observed or %NULL
- * if none.
+ * Returns the widget that is observed or %NULL if none.
*
* Returns: (transfer none) (nullable): the observed widget.
- **/
+ */
GtkWidget *
gtk_widget_paintable_get_widget (GtkWidgetPaintable *self)
{
@@ -314,12 +310,12 @@ gtk_widget_paintable_get_widget (GtkWidgetPaintable *self)
}
/**
- * gtk_widget_paintable_set_widget:
- * @self: a #GtkWidgetPaintable
+ * gtk_widget_paintable_set_widget: (attributes org.gtk.Method.set_property=widget)
+ * @self: a `GtkWidgetPaintable`
* @widget: (allow-none): the widget to observe or %NULL
*
* Sets the widget that should be observed.
- **/
+ */
void
gtk_widget_paintable_set_widget (GtkWidgetPaintable *self,
GtkWidget *widget)
@@ -408,4 +404,3 @@ gtk_widget_paintable_pop_snapshot_count (GtkWidgetPaintable *self)
{
self->snapshot_count--;
}
-
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b4de2cc97c9f23799986d9d3069a0db62656f73d..4b03d18044c73b0d34e2c54eb1a570ed4377fd69 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -96,30 +96,31 @@
#endif
/**
- * SECTION:gtkwindow
- * @title: GtkWindow
- * @short_description: Toplevel which can contain other widgets
+ * GtkWindow:
+ *
+ * A `GtkWindow` is a toplevel window which can contain other widgets.
+ *
+ * 
*
- * A GtkWindow is a toplevel window which can contain other widgets.
* Windows normally have decorations that are under the control
* of the windowing system and allow the user to manipulate the window
* (resize it, move it, close it,...).
*
* # GtkWindow as GtkBuildable
*
- * The GtkWindow implementation of the #GtkBuildable interface supports
+ * The `GtkWindow` implementation of the [iface@Gtk.Buildable] interface supports
* setting a child as the titlebar by specifying “titlebar” as the “type”
* attribute of a element.
*
* # CSS nodes
*
- * |[
+ * ```
* window.background [.csd / .solid-csd / .ssd] [.maximized / .fullscreen / .tiled]
* ├──
* ╰── .titlebar [.default-decoration]
- * ]|
+ * ```
*
- * GtkWindow has a main CSS node with name window and style class .background.
+ * `GtkWindow` has a main CSS node with name window and style class .background.
*
* Style classes that are typically used with the main CSS node are .csd (when
* client-side decorations are in use), .solid-csd (for client-side decorations
@@ -128,7 +129,7 @@
* style classes on the main node: .maximized, .fullscreen, .tiled (when supported,
* also .tiled-top, .tiled-left, .tiled-right, .tiled-bottom).
*
- * GtkWindow subclasses often add their own discriminating style classes,
+ * `GtkWindow` subclasses often add their own discriminating style classes,
* such as .dialog, .popup or .tooltip.
*
* Generally, some CSS properties don't make sense on the toplevel window node,
@@ -138,12 +139,12 @@
* resize drags. In the .csd case, the shadow area outside of the window
* can be used to resize it.
*
- * GtkWindow adds the .titlebar and .default-decoration style classes to the
+ * `GtkWindow` adds the .titlebar and .default-decoration style classes to the
* widget that is added as a titlebar child.
*
* # Accessibility
*
- * GtkWindow uses the %GTK_ACCESSIBLE_ROLE_WINDOW role.
+ * `GtkWindow` uses the %GTK_ACCESSIBLE_ROLE_WINDOW role.
*/
#define MENU_BAR_ACCEL GDK_KEY_F10
@@ -707,6 +708,11 @@ gtk_window_class_init (GtkWindowClass *klass)
klass->enable_debugging = gtk_window_enable_debugging;
klass->close_request = gtk_window_close_request;
+ /**
+ * GtkWindow:title: (attributes org.gtk.Property.get=gtk_window_get_title org.gtk.Property.set=gtk_window_set_title)
+ *
+ * The title of the window.
+ */
window_props[PROP_TITLE] =
g_param_spec_string ("title",
P_("Window Title"),
@@ -715,11 +721,9 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE);
/**
- * GtkWindow:startup-id:
+ * GtkWindow:startup-id: (attributes org.gtk.Property.set=gtk_window_set_startup_id)
*
- * The :startup-id is a write-only property for setting window's
- * startup notification identifier. See gtk_window_set_startup_id()
- * for more details.
+ * A write-only property for setting window's startup notification identifier.
*/
window_props[PROP_STARTUP_ID] =
g_param_spec_string ("startup-id",
@@ -728,6 +732,11 @@ gtk_window_class_init (GtkWindowClass *klass)
NULL,
GTK_PARAM_WRITABLE);
+ /**
+ * GtkWindow:resizable: (attributes org.gtk.Property.get=gtk_window_get_resizable org.gtk.Property.set=gtk_window_set_resizable)
+ *
+ * If %TRUE, users can resize the window.
+ */
window_props[PROP_RESIZABLE] =
g_param_spec_boolean ("resizable",
P_("Resizable"),
@@ -735,6 +744,11 @@ gtk_window_class_init (GtkWindowClass *klass)
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:modal: (attributes org.gtk.Property.get=gtk_window_get_modal org.gtk.Property.set=gtk_window_set_modal)
+ *
+ * If %TRUE, the window is modal.
+ */
window_props[PROP_MODAL] =
g_param_spec_boolean ("modal",
P_("Modal"),
@@ -742,6 +756,11 @@ gtk_window_class_init (GtkWindowClass *klass)
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:default-width:
+ *
+ * The default width of the window.
+ */
window_props[PROP_DEFAULT_WIDTH] =
g_param_spec_int ("default-width",
P_("Default Width"),
@@ -750,6 +769,11 @@ gtk_window_class_init (GtkWindowClass *klass)
0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:default-height:
+ *
+ * The default height of the window.
+ */
window_props[PROP_DEFAULT_HEIGHT] =
g_param_spec_int ("default-height",
P_("Default Height"),
@@ -758,6 +782,11 @@ gtk_window_class_init (GtkWindowClass *klass)
0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:destroy-with-parent: (attributes org.gtk.Property.get=gtk_window_get_destroy_with_parent org.gtk.Property.set=gtk_window_set_destroy_with_parent)
+ *
+ * If this window should be destroyed when the parent is destroyed.
+ */
window_props[PROP_DESTROY_WITH_PARENT] =
g_param_spec_boolean ("destroy-with-parent",
P_("Destroy with Parent"),
@@ -765,14 +794,20 @@ gtk_window_class_init (GtkWindowClass *klass)
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:hide-on-close: (attributes org.gtk.Property.get=gtk_window_get_hide_on_close org.gtk.Property.set=gtk_window_set_hide_on_close)
+ *
+ * If this window should be hidden when the users clicks the close button.
+ */
window_props[PROP_HIDE_ON_CLOSE] =
g_param_spec_boolean ("hide-on-close",
P_("Hide on close"),
P_("If this window should be hidden when the user clicks the close button"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+
/**
- * GtkWindow:mnemonics-visible:
+ * GtkWindow:mnemonics-visible: (attributes org.gtk.Property.get=gtk_window_get_mnemonics_visible org.gtk.Property.set=gtk_window_set_mnemonics_visible)
*
* Whether mnemonics are currently visible in this window.
*
@@ -787,7 +822,7 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:focus-visible:
+ * GtkWindow:focus-visible: (attributes org.gtk.Property.get=gtk_window_get_focus_visible org.gtk.Property.set=gtk_window_set_focus_visible)
*
* Whether 'focus rectangles' are currently visible in this window.
*
@@ -802,10 +837,11 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:icon-name:
+ * GtkWindow:icon-name: (attributes org.gtk.Property.get=gtk_window_get_icon_name org.gtk.Property.set=gtk_window_set_icon_name)
+ *
+ * Specifies the name of the themed icon to use as the window icon.
*
- * The :icon-name property specifies the name of the themed icon to
- * use as the window icon. See #GtkIconTheme for more details.
+ * See [class@Gtk.IconTheme] for more details.
*/
window_props[PROP_ICON_NAME] =
g_param_spec_string ("icon-name",
@@ -814,6 +850,11 @@ gtk_window_class_init (GtkWindowClass *klass)
NULL,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:display: (attributes org.gtk.Property.set=gtk_window_set_display)
+ *
+ * The display that will display this window.
+ */
window_props[PROP_DISPLAY] =
g_param_spec_object ("display",
P_("Display"),
@@ -821,6 +862,11 @@ gtk_window_class_init (GtkWindowClass *klass)
GDK_TYPE_DISPLAY,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:is-active: (attributes org.gtk.Property.get=gtk_window_is_active)
+ *
+ * Whether the toplevel is the currently active window.
+ */
window_props[PROP_IS_ACTIVE] =
g_param_spec_boolean ("is-active",
P_("Is Active"),
@@ -829,9 +875,9 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READABLE);
/**
- * GtkWindow:decorated:
+ * GtkWindow:decorated: (attributes org.gtk.Property.get=gtk_window_get_decorated org.gtk.Property.set=gtk_window_set_decorated)
*
- * Whether the window should be decorated by the window manager.
+ * Whether the window should have a frame (also known as *decorations*).
*/
window_props[PROP_DECORATED] =
g_param_spec_boolean ("decorated",
@@ -841,7 +887,7 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:deletable:
+ * GtkWindow:deletable: (attributes org.gtk.Property.get=gtk_window_get_deletable org.gtk.Property.set=gtk_window_set_deletable)
*
* Whether the window frame should have a close button.
*/
@@ -853,10 +899,9 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:transient-for:
+ * GtkWindow:transient-for: (attributes org.gtk.Property.get=gtk_window_get_transient_for org.gtk.Property.set=gtk_window_set_transient_for)
*
- * The transient parent of the window. See gtk_window_set_transient_for() for
- * more details about transient windows.
+ * The transient parent of the window.
*/
window_props[PROP_TRANSIENT_FOR] =
g_param_spec_object ("transient-for",
@@ -866,14 +911,15 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:maximized:
+ * GtkWindow:maximized: (attributes org.gtk.Property.get=gtk_window_is_maximized)
*
* Whether the window is maximized.
*
- * Setting this property is the equivalent of calling gtk_window_maximize()
- * and gtk_window_unmaximize(); either operation is asynchronous, which
- * means you will need to connect to the #GObject::notify signal in order to
- * know whether the operation was successful.
+ * Setting this property is the equivalent of calling
+ * [method@Gtk.Window.maximize] or [method@Gtk.Window.unmaximize];
+ * either operation is asynchronous, which means you will need to
+ * connect to the ::notify signal in order to know whether the
+ * operation was successful.
*/
window_props[PROP_MAXIMIZED] =
g_param_spec_boolean ("maximized",
@@ -883,14 +929,15 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:fullscreened:
+ * GtkWindow:fullscreened: (attributes org.gtk.Property.get=gtk_window_is_fullscreen)
*
* Whether the window is fullscreen.
*
- * Setting this property is the equivalent of calling gtk_window_fullscreen()
- * and gtk_window_unfullscreen(); either operation is asynchronous, which
- * means you will need to connect to the #GObject::notify signal in order to
- * know whether the operation was successful.
+ * Setting this property is the equivalent of calling
+ * [method@Gtk.Window.fullscreen] or [method@Gtk.Window.unfullscreen];
+ * either operation is asynchronous, which means you will need to
+ * connect to the ::notify signal in order to know whether the
+ * operation was successful.
*/
window_props[PROP_FULLSCREENED] =
g_param_spec_boolean ("fullscreened",
@@ -900,9 +947,9 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:application:
+ * GtkWindow:application: (attributes org.gtk.Property.get=gtk_window_get_application org.gtk.Property.set=gtk_window_set_application)
*
- * The #GtkApplication associated with the window.
+ * The `GtkApplication` associated with the window.
*
* The application will be kept alive for at least as long as it
* has any windows associated with it (see g_application_hold()
@@ -919,6 +966,11 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_TYPE_APPLICATION,
GTK_PARAM_READWRITE|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:default-widget: (attributes org.gtk.Property.get=gtk_window_get_default_widget org.gtk.Property.set=gtk_window_set_default_widget)
+ *
+ * The default widget.
+ */
window_props[PROP_DEFAULT_WIDGET] =
g_param_spec_object ("default-widget",
P_("Default widget"),
@@ -926,6 +978,11 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:focus-widget: (attributes org.gtk.Property.get=gtk_window_get_focus org.gtk.Property.set=gtk_window_set_focus)
+ *
+ * The focus widget.
+ */
window_props[PROP_FOCUS_WIDGET] =
g_param_spec_object ("focus-widget",
P_("Focus widget"),
@@ -933,6 +990,11 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkWindow:child: (attributes org.gtk.Property.get=gtk_window_get_child org.gtk.Property.set=gtk_window_set_child)
+ *
+ * The child widget.
+ */
window_props[PROP_CHILD] =
g_param_spec_object ("child",
P_("Child"),
@@ -947,10 +1009,10 @@ gtk_window_class_init (GtkWindowClass *klass)
* GtkWindow::activate-focus:
* @window: the window which received the signal
*
- * The ::activate-focus signal is a
- * [keybinding signal][GtkSignalAction]
- * which gets emitted when the user activates the currently
- * focused widget of @window.
+ * Emitted when the user activates the currently focused
+ * widget of @window.
+ *
+ * This is a [keybinding signal](class.SignalAction.html).
*/
window_signals[ACTIVATE_FOCUS] =
g_signal_new (I_("activate-focus"),
@@ -966,10 +1028,10 @@ gtk_window_class_init (GtkWindowClass *klass)
* GtkWindow::activate-default:
* @window: the window which received the signal
*
- * The ::activate-default signal is a
- * [keybinding signal][GtkSignalAction]
- * which gets emitted when the user activates the default widget
+ * Emitted when the user activates the default widget
* of @window.
+ *
+ * This is a [keybinding signal](class.SignalAction.html).
*/
window_signals[ACTIVATE_DEFAULT] =
g_signal_new (I_("activate-default"),
@@ -985,8 +1047,8 @@ gtk_window_class_init (GtkWindowClass *klass)
* GtkWindow::keys-changed:
* @window: the window which received the signal
*
- * The ::keys-changed signal gets emitted when the set of accelerators
- * or mnemonics that are associated with @window changes.
+ * emitted when the set of accelerators or mnemonics that
+ * are associated with @window changes.
*/
window_signals[KEYS_CHANGED] =
g_signal_new (I_("keys-changed"),
@@ -1003,11 +1065,13 @@ gtk_window_class_init (GtkWindowClass *klass)
* @window: the window on which the signal is emitted
* @toggle: toggle the debugger
*
- * The ::enable-debugging signal is a [keybinding signal][GtkSignalAction]
- * which gets emitted when the user enables or disables interactive
- * debugging. When @toggle is %TRUE, interactive debugging is toggled
- * on or off, when it is %FALSE, the debugger will be pointed at the
- * widget under the pointer.
+ * Emitted when the user enables or disables interactive debugging.
+ *
+ * When @toggle is %TRUE, interactive debugging is toggled on or off,
+ * when it is %FALSE, the debugger will be pointed at the widget
+ * under the pointer.
+ *
+ * This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are Ctrl-Shift-I
* and Ctrl-Shift-D.
@@ -1028,8 +1092,7 @@ gtk_window_class_init (GtkWindowClass *klass)
* GtkWindow::close-request:
* @window: the window on which the signal is emitted
*
- * The ::close-request signal is emitted when the user clicks on the close
- * button of the window.
+ * Emitted when the user clicks on the close button of the window.
*
* Return: %TRUE to stop other handlers from being invoked for the signal
*/
@@ -1112,8 +1175,8 @@ gtk_window_class_init (GtkWindowClass *klass)
}
/**
- * gtk_window_is_maximized:
- * @window: a #GtkWindow
+ * gtk_window_is_maximized: (attributes org.gtk.Method.get_property=maximized)
+ * @window: a `GtkWindow`
*
* Retrieves the current maximized state of @window.
*
@@ -1121,7 +1184,7 @@ gtk_window_class_init (GtkWindowClass *klass)
* manager and happens asynchronously to an application request, you
* shouldn’t assume the return value of this function changing
* immediately (or at all), as an effect of calling
- * gtk_window_maximize() or gtk_window_unmaximize().
+ * [method@Gtk.Window.maximize] or [method@Gtk.Window.unmaximize].
*
* If the window isn't yet mapped, the value returned will whether the
* initial requested state is maximized.
@@ -1139,8 +1202,8 @@ gtk_window_is_maximized (GtkWindow *window)
}
/**
- * gtk_window_is_fullscreen:
- * @window: a #GtkWindow
+ * gtk_window_is_fullscreen: (attributes org.gtk.Property.get=fullscreened)
+ * @window: a `GtkWindow`
*
* Retrieves the current fullscreen state of @window.
*
@@ -1148,7 +1211,7 @@ gtk_window_is_maximized (GtkWindow *window)
* manager and happens asynchronously to an application request, you
* shouldn’t assume the return value of this function changing
* immediately (or at all), as an effect of calling
- * gtk_window_fullscreen() or gtk_window_unfullscreen().
+ * [method@Gtk.Window.fullscreen] or [method@Gtk.Window.unfullscreen].
*
* If the window isn't yet mapped, the value returned will whether the
* initial requested state is fullscreen.
@@ -1178,10 +1241,12 @@ _gtk_window_toggle_maximized (GtkWindow *window)
/**
* gtk_window_close:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
+ *
+ * Requests that the window is closed.
*
- * Requests that the window is closed, similar to what happens
- * when a window manager close button is clicked.
+ * This is similar to what happens when a window manager
+ * close button is clicked.
*
* This function can be used with close buttons in custom
* titlebars.
@@ -2015,23 +2080,22 @@ gtk_window_native_interface_init (GtkNativeInterface *iface)
/**
* gtk_window_new:
- *
- * Creates a new #GtkWindow, which is a toplevel window that can
- * contain other widgets.
+ *
+ * Creates a new `GtkWindow`.
*
* To get an undecorated window (no window borders), use
- * gtk_window_set_decorated().
+ * [method@Gtk.Window.set_decorated].
*
- * All top-level windows created by gtk_window_new() are stored in
- * an internal top-level window list. This list can be obtained from
- * gtk_window_list_toplevels(). Due to Gtk+ keeping a reference to
- * the window internally, gtk_window_new() does not return a reference
- * to the caller.
+ * All top-level windows created by gtk_window_new() are stored
+ * in an internal top-level window list. This list can be obtained
+ * from [func@Gtk.Window.list_toplevels]. Due to GTK keeping a
+ * reference to the window internally, gtk_window_new() does not
+ * return a reference to the caller.
*
- * To delete a #GtkWindow, call gtk_window_destroy().
- *
- * Returns: a new #GtkWindow.
- **/
+ * To delete a `GtkWindow`, call [method@Gtk.Window.destroy].
+ *
+ * Returns: a new `GtkWindow`.
+ */
GtkWidget*
gtk_window_new (void)
{
@@ -2039,22 +2103,21 @@ gtk_window_new (void)
}
/**
- * gtk_window_set_title:
- * @window: a #GtkWindow
+ * gtk_window_set_title: (attributes org.gtk.Method.set_property=title)
+ * @window: a `GtkWindow`
* @title: (nullable): title of the window
- *
- * Sets the title of the #GtkWindow. The title of a window will be
- * displayed in its title bar; on the X Window System, the title bar
- * is rendered by the [window manager][gtk-X11-arch],
- * so exactly how the title appears to users may vary
- * according to a user’s exact configuration. The title should help a
- * user distinguish this window from other windows they may have
- * open. A good title might include the application name and current
- * document filename, for example.
- * document filename, for example.
-
+ *
+ * Sets the title of the `GtkWindow`.
+ *
+ * The title of a window will be displayed in its title bar; on the
+ * X Window System, the title bar is rendered by the window manager
+ * so exactly how the title appears to users may vary according to a
+ * user’s exact configuration. The title should help a user distinguish
+ * this window from other windows they may have open. A good title might
+ * include the application name and current document filename, for example.
+ *
* Passing %NULL does the same as setting the title to an empty string.
- **/
+ */
void
gtk_window_set_title (GtkWindow *window,
const char *title)
@@ -2079,15 +2142,15 @@ gtk_window_set_title (GtkWindow *window,
}
/**
- * gtk_window_get_title:
- * @window: a #GtkWindow
+ * gtk_window_get_title: (attributes org.gtk.Method.get_property=title)
+ * @window: a `GtkWindow`
*
- * Retrieves the title of the window. See gtk_window_set_title().
+ * Retrieves the title of the window.
*
* Returns: (nullable): the title of the window, or %NULL if none has
- * been set explicitly. The returned string is owned by the widget
- * and must not be modified or freed.
- **/
+ * been set explicitly. The returned string is owned by the widget
+ * and must not be modified or freed.
+ */
const char *
gtk_window_get_title (GtkWindow *window)
{
@@ -2099,21 +2162,25 @@ gtk_window_get_title (GtkWindow *window)
}
/**
- * gtk_window_set_startup_id:
- * @window: a #GtkWindow
+ * gtk_window_set_startup_id: (attributes org.gtk.Method.set_property=startup-id)
+ * @window: a `GtkWindow`
* @startup_id: a string with startup-notification identifier
*
- * Startup notification identifiers are used by desktop environment to
- * track application startup, to provide user feedback and other
+ * Sets the startup notification ID.
+ *
+ * Startup notification identifiers are used by desktop environment
+ * to track application startup, to provide user feedback and other
* features. This function changes the corresponding property on the
- * underlying GdkSurface. Normally, startup identifier is managed
- * automatically and you should only use this function in special cases
- * like transferring focus from other processes. You should use this
- * function before calling gtk_window_present() or any equivalent
- * function generating a window map event.
+ * underlying `GdkSurface`.
+ *
+ * Normally, startup identifier is managed automatically and you should
+ * only use this function in special cases like transferring focus from
+ * other processes. You should use this function before calling
+ * [method@Gtk.Window.present] or any equivalent function generating
+ * a window map event.
*
* This function is only useful on X11, not with other GTK targets.
- **/
+ */
void
gtk_window_set_startup_id (GtkWindow *window,
const char *startup_id)
@@ -2156,14 +2223,15 @@ gtk_window_set_startup_id (GtkWindow *window,
}
/**
- * gtk_window_set_default_widget:
- * @window: a #GtkWindow
+ * gtk_window_set_default_widget: (attributes org.gtk.Property.set=default-widget)
+ * @window: a `GtkWindow`
* @default_widget: (allow-none): widget to be the default, or %NULL
* to unset the default widget for the toplevel
*
- * The default widget is the widget that’s activated when the user
- * presses Enter in a dialog (for example). This function sets or
- * unsets the default widget for a #GtkWindow.
+ * Sets the default widget.
+ *
+ * The default widget is the widget that is activated when the user
+ * presses Enter in a dialog (for example).
*/
void
gtk_window_set_default_widget (GtkWindow *window,
@@ -2216,16 +2284,14 @@ gtk_window_set_default_widget (GtkWindow *window,
}
/**
- * gtk_window_get_default_widget:
- * @window: a #GtkWindow
+ * gtk_window_get_default_widget: (attributes org.gtk.Property.get=default-widget)
+ * @window: a `GtkWindow`
*
* Returns the default widget for @window.
*
- * See gtk_window_set_default_widget() for more details.
- *
* Returns: (nullable) (transfer none): the default widget, or %NULL
- * if there is none.
- **/
+ * if there is none.
+ */
GtkWidget *
gtk_window_get_default_widget (GtkWindow *window)
{
@@ -2266,18 +2332,19 @@ _gtk_window_notify_keys_changed (GtkWindow *window)
}
/**
- * gtk_window_get_focus:
- * @window: a #GtkWindow
- *
+ * gtk_window_get_focus: (attributes org.gtk.Property.get=focus-widget)
+ * @window: a `GtkWindow`
+ *
* Retrieves the current focused widget within the window.
+ *
* Note that this is the widget that would have the focus
* if the toplevel window focused; if the toplevel window
- * is not focused then `gtk_widget_has_focus (widget)` will
+ * is not focused then `gtk_widget_has_focus (widget)` will
* not be %TRUE for the widget.
*
* Returns: (nullable) (transfer none): the currently focused widget,
- * or %NULL if there is none.
- **/
+ * or %NULL if there is none.
+ */
GtkWidget *
gtk_window_get_focus (GtkWindow *window)
{
@@ -2301,17 +2368,18 @@ gtk_window_real_activate_default (GtkWindow *window)
}
/**
- * gtk_window_set_modal:
- * @window: a #GtkWindow
+ * gtk_window_set_modal: (attributes org.gtk.Method.set_property=modal)
+ * @window: a `GtkWindow`
* @modal: whether the window is modal
*
- * Sets a window modal or non-modal. Modal windows prevent interaction
- * with other windows in the same application. To keep modal dialogs
- * on top of main application windows, use
- * gtk_window_set_transient_for() to make the dialog transient for the
- * parent; most [window managers][gtk-X11-arch]
- * will then disallow lowering the dialog below the parent.
- **/
+ * Sets a window modal or non-modal.
+ *
+ * Modal windows prevent interaction with other windows in the same
+ * application. To keep modal dialogs on top of main application windows,
+ * use [method@Gtk.Window.set_transient_for] to make the dialog transient
+ * for the parent; most window managers will then disallow lowering the
+ * dialog below the parent.
+ */
void
gtk_window_set_modal (GtkWindow *window,
gboolean modal)
@@ -2349,14 +2417,14 @@ gtk_window_set_modal (GtkWindow *window,
}
/**
- * gtk_window_get_modal:
- * @window: a #GtkWindow
- *
- * Returns whether the window is modal. See gtk_window_set_modal().
+ * gtk_window_get_modal: (attributes org.gtk.Method.get_property=modal)
+ * @window: a `GtkWindow`
+ *
+ * Returns whether the window is modal.
*
* Returns: %TRUE if the window is set to be modal and
- * establishes a grab when shown
- **/
+ * establishes a grab when shown
+ */
gboolean
gtk_window_get_modal (GtkWindow *window)
{
@@ -2390,16 +2458,18 @@ gtk_window_get_toplevels (void)
/**
* gtk_window_list_toplevels:
- *
- * Returns a list of all existing toplevel windows. The widgets
- * in the list are not individually referenced. If you want
- * to iterate through the list and perform actions involving
- * callbacks that might destroy the widgets, you must call
- * `g_list_foreach (result, (GFunc)g_object_ref, NULL)` first, and
- * then unref all the widgets afterwards.
- *
- * Returns: (element-type GtkWidget) (transfer container): list of toplevel widgets
- **/
+ *
+ * Returns a list of all existing toplevel windows.
+ *
+ * The widgets in the list are not individually referenced.
+ * If you want to iterate through the list and perform actions
+ * involving callbacks that might destroy the widgets, you must
+ * call `g_list_foreach (result, (GFunc)g_object_ref, NULL)` first,
+ * and then unref all the widgets afterwards.
+ *
+ * Returns: (element-type GtkWidget) (transfer container): list of
+ * toplevel widgets
+ */
GList*
gtk_window_list_toplevels (void)
{
@@ -2517,16 +2587,15 @@ gtk_window_unset_transient_for (GtkWindow *window)
}
/**
- * gtk_window_set_transient_for:
- * @window: a #GtkWindow
+ * gtk_window_set_transient_for: (attributes org.gtk.Method.set_property=transient-for)
+ * @window: a `GtkWindow`
* @parent: (allow-none): parent window, or %NULL
*
* Dialog windows should be set transient for the main application
- * window they were spawned from. This allows
- * [window managers][gtk-X11-arch] to e.g. keep the
- * dialog on top of the main window, or center the dialog over the
- * main window. gtk_dialog_new_with_buttons() and other convenience
- * functions in GTK will sometimes call
+ * window they were spawned from. This allows window managers to e.g.
+ * keep the dialog on top of the main window, or center the dialog
+ * over the main window. [ctor@Gtk.Dialog.new_with_buttons] and other
+ * convenience functions in GTK will sometimes call
* gtk_window_set_transient_for() on your behalf.
*
* Passing %NULL for @parent unsets the current transient window.
@@ -2588,15 +2657,14 @@ gtk_window_set_transient_for (GtkWindow *window,
}
/**
- * gtk_window_get_transient_for:
- * @window: a #GtkWindow
+ * gtk_window_get_transient_for: (attributes org.gtk.Method.get_property=transient-for)
+ * @window: a `GtkWindow`
*
- * Fetches the transient parent for this window. See
- * gtk_window_set_transient_for().
+ * Fetches the transient parent for this window.
*
* Returns: (nullable) (transfer none): the transient parent for this
- * window, or %NULL if no transient parent has been set.
- **/
+ * window, or %NULL if no transient parent has been set.
+ */
GtkWindow *
gtk_window_get_transient_for (GtkWindow *window)
{
@@ -2608,13 +2676,13 @@ gtk_window_get_transient_for (GtkWindow *window)
}
/**
- * gtk_window_get_application:
- * @window: a #GtkWindow
+ * gtk_window_get_application: (attributes org.gtk.Method.get_property=application)
+ * @window: a `GtkWindow`
*
- * Gets the #GtkApplication associated with the window (if any).
+ * Gets the `GtkApplication` associated with the window.
*
- * Returns: (nullable) (transfer none): a #GtkApplication, or %NULL
- **/
+ * Returns: (nullable) (transfer none): a `GtkApplication`, or %NULL
+ */
GtkApplication *
gtk_window_get_application (GtkWindow *window)
{
@@ -2647,23 +2715,24 @@ gtk_window_release_application (GtkWindow *window)
}
/**
- * gtk_window_set_application:
- * @window: a #GtkWindow
- * @application: (allow-none): a #GtkApplication, or %NULL to unset
+ * gtk_window_set_application: (attributes org.gtk.Method.set_property=application)
+ * @window: a `GtkWindow`
+ * @application: (allow-none): a `GtkApplication`, or %NULL to unset
*
- * Sets or unsets the #GtkApplication associated with the window.
+ * Sets or unsets the `GtkApplication` associated with the window.
*
- * The application will be kept alive for at least as long as it has any windows
- * associated with it (see g_application_hold() for a way to keep it alive
- * without windows).
+ * The application will be kept alive for at least as long as it has
+ * any windows associated with it (see g_application_hold() for a way
+ * to keep it alive without windows).
*
- * Normally, the connection between the application and the window will remain
- * until the window is destroyed, but you can explicitly remove it by setting
- * the @application to %NULL.
+ * Normally, the connection between the application and the window will
+ * remain until the window is destroyed, but you can explicitly remove
+ * it by setting the @application to %NULL.
*
- * This is equivalent to calling gtk_application_remove_window() and/or
- * gtk_application_add_window() on the old/new applications as relevant.
- **/
+ * This is equivalent to calling [method@Gtk.Application.remove_window]
+ * and/or [method@Gtk.Application.add_window] on the old/new applications
+ * as relevant.
+ */
void
gtk_window_set_application (GtkWindow *window,
GtkApplication *application)
@@ -2703,15 +2772,16 @@ gtk_window_set_application (GtkWindow *window,
}
/**
- * gtk_window_set_destroy_with_parent:
- * @window: a #GtkWindow
+ * gtk_window_set_destroy_with_parent: (attributes org.gtk.Method.set_property=destroy-with-parent)
+ * @window: a `GtkWindow`
* @setting: whether to destroy @window with its transient parent
- *
+ *
* If @setting is %TRUE, then destroying the transient parent of @window
- * will also destroy @window itself. This is useful for dialogs that
- * shouldn’t persist beyond the lifetime of the main window they're
- * associated with, for example.
- **/
+ * will also destroy @window itself.
+ *
+ * This is useful for dialogs that shouldn’t persist beyond the lifetime
+ * of the main window they are associated with, for example.
+ */
void
gtk_window_set_destroy_with_parent (GtkWindow *window,
gboolean setting)
@@ -2729,14 +2799,13 @@ gtk_window_set_destroy_with_parent (GtkWindow *window,
}
/**
- * gtk_window_get_destroy_with_parent:
- * @window: a #GtkWindow
- *
- * Returns whether the window will be destroyed with its transient parent. See
- * gtk_window_set_destroy_with_parent ().
+ * gtk_window_get_destroy_with_parent: (attributes org.gtk.Method.get_property=destroy-with-parent)
+ * @window: a `GtkWindow`
+ *
+ * Returns whether the window will be destroyed with its transient parent.
*
* Returns: %TRUE if the window will be destroyed with its transient parent.
- **/
+ */
gboolean
gtk_window_get_destroy_with_parent (GtkWindow *window)
{
@@ -2748,8 +2817,8 @@ gtk_window_get_destroy_with_parent (GtkWindow *window)
}
/**
- * gtk_window_set_hide_on_close:
- * @window: a #GtkWindow
+ * gtk_window_set_hide_on_close: (attributes org.gtk.Method.set_property=hide-on-close)
+ * @window: a `GtkWindow`
* @setting: whether to hide the window when it is closed
*
* If @setting is %TRUE, then clicking the close button on the window
@@ -2772,8 +2841,8 @@ gtk_window_set_hide_on_close (GtkWindow *window,
}
/**
- * gtk_window_get_hide_on_close:
- * @window: a #GtkWindow
+ * gtk_window_get_hide_on_close: (attributes org.gtk.Method.get_property=hide-on-close)
+ * @window: a `GtkWindow`
*
* Returns whether the window will be hidden when the close button is clicked.
*
@@ -2867,19 +2936,20 @@ gtk_window_enable_csd (GtkWindow *window)
/**
* gtk_window_set_titlebar:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
* @titlebar: (allow-none): the widget to use as titlebar
*
* Sets a custom titlebar for @window.
*
- * A typical widget used here is #GtkHeaderBar, as it provides various features
- * expected of a titlebar while allowing the addition of child widgets to it.
+ * A typical widget used here is [class@Gtk.HeaderBar], as it
+ * provides various features expected of a titlebar while allowing
+ * the addition of child widgets to it.
*
* If you set a custom titlebar, GTK will do its best to convince
* the window manager not to put its own titlebar on the window.
* Depending on the system, this function may not work for a window
* that is already visible, so you set the titlebar before calling
- * gtk_widget_show().
+ * [method@Gtk.Widget.show].
*/
void
gtk_window_set_titlebar (GtkWindow *window,
@@ -2928,7 +2998,7 @@ out:
/**
* gtk_window_get_titlebar:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
* Returns the custom titlebar that has been set with
* gtk_window_set_titlebar().
@@ -2950,23 +3020,24 @@ gtk_window_get_titlebar (GtkWindow *window)
}
/**
- * gtk_window_set_decorated:
- * @window: a #GtkWindow
+ * gtk_window_set_decorated: (attributes org.gtk.Method.set_property=decorated)
+ * @window: a `GtkWindow`
* @setting: %TRUE to decorate the window
*
+ * Sets whether the window should be decorated.
+ *
* By default, windows are decorated with a title bar, resize
- * controls, etc. Some [window managers][gtk-X11-arch]
- * allow GTK to disable these decorations, creating a
- * borderless window. If you set the decorated property to %FALSE
- * using this function, GTK will do its best to convince the window
- * manager not to decorate the window. Depending on the system, this
- * function may not have any effect when called on a window that is
- * already visible, so you should call it before calling gtk_widget_show().
+ * controls, etc. Some window managers allow GTK to disable these
+ * decorations, creating a borderless window. If you set the decorated
+ * property to %FALSE using this function, GTK will do its best to
+ * convince the window manager not to decorate the window. Depending on
+ * the system, this function may not have any effect when called on a
+ * window that is already visible, so you should call it before calling
+ * [method@Gtk.Widget.show].
*
* On Windows, this function always works, since there’s no window manager
* policy involved.
- *
- **/
+ */
void
gtk_window_set_decorated (GtkWindow *window,
gboolean setting)
@@ -2992,14 +3063,13 @@ gtk_window_set_decorated (GtkWindow *window,
}
/**
- * gtk_window_get_decorated:
- * @window: a #GtkWindow
+ * gtk_window_get_decorated: (attributes org.gtk.Method.get_property=decorated)
+ * @window: a `GtkWindow`
*
- * Returns whether the window has been set to have decorations
- * such as a title bar via gtk_window_set_decorated().
+ * Returns whether the window has been set to have decorations.
*
* Returns: %TRUE if the window has been set to have decorations
- **/
+ */
gboolean
gtk_window_get_decorated (GtkWindow *window)
{
@@ -3011,20 +3081,22 @@ gtk_window_get_decorated (GtkWindow *window)
}
/**
- * gtk_window_set_deletable:
- * @window: a #GtkWindow
+ * gtk_window_set_deletable: (attributes org.gtk.Method.set_property=deletable)
+ * @window: a `GtkWindow`
* @setting: %TRUE to decorate the window as deletable
*
- * By default, windows have a close button in the window frame. Some
- * [window managers][gtk-X11-arch] allow GTK to
- * disable this button. If you set the deletable property to %FALSE
- * using this function, GTK will do its best to convince the window
- * manager not to show a close button. Depending on the system, this
- * function may not have any effect when called on a window that is
- * already visible, so you should call it before calling gtk_widget_show().
+ * Sets whether the window should be deletable.
*
- * On Windows, this function always works, since there’s no window manager
- * policy involved.
+ * By default, windows have a close button in the window frame.
+ * Some window managers allow GTK to disable this button. If you
+ * set the deletable property to %FALSE using this function, GTK
+ * will do its best to convince the window manager not to show a
+ * close button. Depending on the system, this function may not
+ * have any effect when called on a window that is already visible,
+ * so you should call it before calling [method@Gtk.Widget.show].
+ *
+ * On Windows, this function always works, since there’s no window
+ * manager policy involved.
*/
void
gtk_window_set_deletable (GtkWindow *window,
@@ -3050,14 +3122,13 @@ gtk_window_set_deletable (GtkWindow *window,
}
/**
- * gtk_window_get_deletable:
- * @window: a #GtkWindow
+ * gtk_window_get_deletable: (attributes org.gtk.Method.get_property=deletable)
+ * @window: a `GtkWindow`
*
- * Returns whether the window has been set to have a close button
- * via gtk_window_set_deletable().
+ * Returns whether the window has been set to have a close button.
*
* Returns: %TRUE if the window has been set to have a close button
- **/
+ */
gboolean
gtk_window_get_deletable (GtkWindow *window)
{
@@ -3285,19 +3356,20 @@ update_themed_icon (GtkWindow *window)
}
/**
- * gtk_window_set_icon_name:
- * @window: a #GtkWindow
+ * gtk_window_set_icon_name: (attributes org.gtk.Method.set_property=icon-name)
+ * @window: a `GtkWindow`
* @name: (allow-none): the name of the themed icon
*
* Sets the icon for the window from a named themed icon.
- * See the docs for #GtkIconTheme for more details.
+ *
+ * See the docs for [class@Gtk.IconTheme] for more details.
* On some platforms, the window icon is not used at all.
*
- * Note that this has nothing to do with the WM_ICON_NAME
+ * Note that this has nothing to do with the WM_ICON_NAME
* property which is mentioned in the ICCCM.
*/
-void
-gtk_window_set_icon_name (GtkWindow *window,
+void
+gtk_window_set_icon_name (GtkWindow *window,
const char *name)
{
GtkWindowIconInfo *info;
@@ -3320,11 +3392,10 @@ gtk_window_set_icon_name (GtkWindow *window,
}
/**
- * gtk_window_get_icon_name:
- * @window: a #GtkWindow
+ * gtk_window_get_icon_name: (attributes org.gtk.Method.get_property=icon-name)
+ * @window: a `GtkWindow`
*
- * Returns the name of the themed icon for the window,
- * see gtk_window_set_icon_name().
+ * Returns the name of the themed icon for the window.
*
* Returns: (nullable): the icon name or %NULL if the window has
* no themed icon
@@ -3345,9 +3416,12 @@ gtk_window_get_icon_name (GtkWindow *window)
* gtk_window_set_default_icon_name:
* @name: the name of the themed icon
*
- * Sets an icon to be used as fallback for windows that
- * haven't had gtk_window_set_icon_name() called on them.
- **/
+ * Sets an icon to be used as fallback.
+ *
+ * The fallback icon is used for windows that
+ * haven't had [method@Gtk.Window.set_icon_name]
+ * called on them.
+ */
void
gtk_window_set_default_icon_name (const char *name)
{
@@ -3381,12 +3455,11 @@ gtk_window_set_default_icon_name (const char *name)
/**
* gtk_window_get_default_icon_name:
*
- * Returns the fallback icon name for windows that has been set
- * with gtk_window_set_default_icon_name(), or %NULL if that function
- * has not been called.
+ * Returns the fallback icon name for windows.
*
- * The returned string is owned by GTK and should not be modified.
- * It is only valid until the next call to gtk_window_set_default_icon_name().
+ * The returned string is owned by GTK and should not
+ * be modified. It is only valid until the next call to
+ * [func@Gtk.Window.set_default_icon_name].
*
* Returns: (nullable): the fallback icon name for windows
*/
@@ -3464,20 +3537,22 @@ gtk_window_set_default_size_internal (GtkWindow *window,
/**
* gtk_window_set_default_size:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
* @width: width in pixels, or -1 to unset the default width
* @height: height in pixels, or -1 to unset the default height
*
- * Sets the default size of a window. If the window’s “natural” size
- * (its size request) is larger than the default, the default will be
- * ignored.
+ * Sets the default size of a window.
+ *
+ * If the window’s “natural” size (its size request) is larger than
+ * the default, the default will be ignored.
*
- * Unlike gtk_widget_set_size_request(), which sets a size request for
- * a widget and thus would keep users from shrinking the window, this
- * function only sets the initial size, just as if the user had
- * resized the window themselves. Users can still shrink the window
- * again as they normally would. Setting a default size of -1 means to
- * use the “natural” default size (the size request of the window).
+ * Unlike [method@Gtk.Widget.set_size_request], which sets a size
+ * request for a widget and thus would keep users from shrinking
+ * the window, this function only sets the initial size, just as
+ * if the user had resized the window themselves. Users can still
+ * shrink the window again as they normally would. Setting a default
+ * size of -1 means to use the “natural” default size (the size request
+ * of the window).
*
* The default size of a window only affects the first time a window is
* shown; if a window is hidden and re-shown, it will remember the size
@@ -3488,8 +3563,9 @@ gtk_window_set_default_size_internal (GtkWindow *window,
*
* If you use this function to reestablish a previously saved window size,
* note that the appropriate size to save is the one returned by
- * gtk_window_get_default_size(). Using the window allocation directly will not
- * work in all circumstances and can lead to growing or shrinking windows.
+ * [method@Gtk.Window.get_default_size]. Using the window allocation
+ * directly will not work in all circumstances and can lead to growing
+ * or shrinking windows.
*/
void
gtk_window_set_default_size (GtkWindow *window,
@@ -3506,15 +3582,16 @@ gtk_window_set_default_size (GtkWindow *window,
/**
* gtk_window_get_default_size:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
* @width: (out) (allow-none): location to store the default width, or %NULL
* @height: (out) (allow-none): location to store the default height, or %NULL
*
- * Gets the default size of the window. A value of 0 for the width or
- * height indicates that a default size has not been explicitly set
- * for that dimension, so the “natural” size of the window will be
- * used.
- **/
+ * Gets the default size of the window.
+ *
+ * A value of 0 for the width or height indicates that a default
+ * size has not been explicitly set for that dimension, so the
+ * “natural” size of the window will be used.
+ */
void
gtk_window_get_default_size (GtkWindow *window,
int *width,
@@ -4960,17 +5037,19 @@ synthesize_focus_change_events (GtkWindow *window,
}
/**
- * gtk_window_set_focus:
- * @window: a #GtkWindow
+ * gtk_window_set_focus: (attributes org.gtk.Method.set_property=focus-widget)
+ * @window: a `GtkWindow`
* @focus: (allow-none): widget to be the new focus widget, or %NULL to unset
* any focus widget for the toplevel window.
*
- * If @focus is not the current focus widget, and is focusable, sets
- * it as the focus widget for the window. If @focus is %NULL, unsets
- * the focus widget for this window. To set the focus to a particular
- * widget in the toplevel, it is usually more convenient to use
- * gtk_widget_grab_focus() instead of this function.
- **/
+ * Sets the focus widget.
+ *
+ * If @focus is not the current focus widget, and is focusable,
+ * sets it as the focus widget for the window. If @focus is %NULL,
+ * unsets the focus widget for this window. To set the focus to a
+ * particular widget in the toplevel, it is usually more convenient
+ * to use [method@Gtk.Widget.grab_focus] instead of this function.
+ */
void
gtk_window_set_focus (GtkWindow *window,
GtkWidget *focus)
@@ -5032,12 +5111,14 @@ _gtk_window_unset_focus_and_default (GtkWindow *window,
/**
* gtk_window_present:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
- * Presents a window to the user. This function should not be used
- * as when it is called, it is too late to gather a valid timestamp
- * to allow focus stealing prevention to work correctly.
- **/
+ * Presents a window to the user.
+ *
+ * This function should not be used as when it is called,
+ * it is too late to gather a valid timestamp to allow focus
+ * stealing prevention to work correctly.
+ */
void
gtk_window_present (GtkWindow *window)
{
@@ -5046,29 +5127,31 @@ gtk_window_present (GtkWindow *window)
/**
* gtk_window_present_with_time:
- * @window: a #GtkWindow
- * @timestamp: the timestamp of the user interaction (typically a
+ * @window: a `GtkWindow`
+ * @timestamp: the timestamp of the user interaction (typically a
* button or key press event) which triggered this call
*
- * Presents a window to the user. This may mean raising the window
- * in the stacking order, unminimizing it, moving it to the current
- * desktop, and/or giving it the keyboard focus, possibly dependent
- * on the user’s platform, window manager, and preferences.
+ * Presents a window to the user.
*
- * If @window is hidden, this function calls gtk_widget_show()
+ * This may mean raising the window in the stacking order,
+ * unminimizing it, moving it to the current desktop, and/or
+ * giving it the keyboard focus, possibly dependent on the user’s
+ * platform, window manager, and preferences.
+ *
+ * If @window is hidden, this function calls [method@Gtk.Widget.show]
* as well.
*
* This function should be used when the user tries to open a window
* that’s already open. Say for example the preferences dialog is
* currently open, and the user chooses Preferences from the menu
- * a second time; use gtk_window_present() to move the already-open dialog
- * where the user can see it.
+ * a second time; use [method@Gtk.Window.present] to move the
+ * already-open dialog where the user can see it.
*
- * Presents a window to the user in response to a user interaction. The
- * timestamp should be gathered when the window was requested to be shown
- * (when clicking a link for example), rather than once the window is
- * ready to be shown.
- **/
+ * Presents a window to the user in response to a user interaction.
+ * The timestamp should be gathered when the window was requested
+ * to be shown (when clicking a link for example), rather than once
+ * the window is ready to be shown.
+ */
void
gtk_window_present_with_time (GtkWindow *window,
guint32 timestamp)
@@ -5114,13 +5197,13 @@ gtk_window_present_with_time (GtkWindow *window,
/**
* gtk_window_minimize:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
* Asks to minimize the specified @window.
*
* Note that you shouldn’t assume the window is definitely minimized
* afterward, because the windowing system might not support this
- * functionality; other entities (e.g. the user or the [window manager][gtk-X11-arch])
+ * functionality; other entities (e.g. the user or the window manager
* could unminimize it again, or there may not be a window manager in
* which case minimization isn’t possible, etc.
*
@@ -5128,8 +5211,8 @@ gtk_window_present_with_time (GtkWindow *window,
* in which case the window will be minimized before it ever appears
* onscreen.
*
- * You can track result of this operation via the #GdkToplevel:state
- * property.
+ * You can track result of this operation via the
+ * [property@Gdk.Toplevel:state] property.
*/
void
gtk_window_minimize (GtkWindow *window)
@@ -5146,18 +5229,18 @@ gtk_window_minimize (GtkWindow *window)
/**
* gtk_window_unminimize:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
* Asks to unminimize the specified @window.
*
* Note that you shouldn’t assume the window is definitely unminimized
* afterward, because the windowing system might not support this
- * functionality; other entities (e.g. the user or the [window manager][gtk-X11-arch])
+ * functionality; other entities (e.g. the user or the window manager
* could minimize it again, or there may not be a window manager in
* which case minimization isn’t possible, etc.
*
- * You can track result of this operation via the #GdkToplevel:state
- * property.
+ * You can track result of this operation via the
+ * [property@Gdk.Toplevel:state] property.
*/
void
gtk_window_unminimize (GtkWindow *window)
@@ -5174,19 +5257,22 @@ gtk_window_unminimize (GtkWindow *window)
/**
* gtk_window_maximize:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
* Asks to maximize @window, so that it fills the screen.
*
- * Note that you shouldn’t assume the window is definitely maximized afterward,
- * because other entities (e.g. the user or [window manager][gtk-X11-arch])
- * could unmaximize it again, and not all window managers support maximization.
+ * Note that you shouldn’t assume the window is definitely maximized
+ * afterward, because other entities (e.g. the user or window manager
+ * could unmaximize it again, and not all window managers support
+ * maximization.
*
- * It’s permitted to call this function before showing a window, in which case
- * the window will be maximized when it appears onscreen initially.
+ * It’s permitted to call this function before showing a window,
+ * in which case the window will be maximized when it appears onscreen
+ * initially.
*
- * You can track the result of this operation via the #GdkToplevel:state
- * property, or by listening to notifications on the #GtkWindow:maximized
+ * You can track the result of this operation via the
+ * [property@Gdk.Toplevel:state] property, or by listening to
+ * notifications on the [property@Gtk.Window:maximized]
* property.
*/
void
@@ -5213,17 +5299,18 @@ gtk_window_maximize (GtkWindow *window)
/**
* gtk_window_unmaximize:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
* Asks to unmaximize @window.
*
- * Note that you shouldn’t assume the window is definitely unmaximized afterward,
- * because other entities (e.g. the user or [window manager][gtk-X11-arch]) could
- * maximize it again, and not all window managers honor requests to unmaximize.
+ * Note that you shouldn’t assume the window is definitely unmaximized
+ * afterward, because other entities (e.g. the user or window manager
+ * maximize it again, and not all window managers honor requests to
+ * unmaximize.
*
- * You can track the result of this operation via the #GdkToplevel:state
- * property, or by listening to notifications on the #GtkWindow:maximized
- * property.
+ * You can track the result of this operation via the
+ * [property@Gdk.Toplevel:state] property, or by listening to
+ * notifications on the [property@Gtk.Window:maximized] property.
*/
void
gtk_window_unmaximize (GtkWindow *window)
@@ -5262,17 +5349,18 @@ unset_fullscreen_monitor (GtkWindow *window)
/**
* gtk_window_fullscreen:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
* Asks to place @window in the fullscreen state.
*
- * Note that you shouldn’t assume the window is definitely full screen afterward,
- * because other entities (e.g. the user or [window manager][gtk-X11-arch]) could
- * unfullscreen it again, and not all window managers honor requests to fullscreen
- * windows.
+ * Note that you shouldn’t assume the window is definitely fullscreen
+ * afterward, because other entities (e.g. the user or window manager
+ * unfullscreen it again, and not all window managers honor requests
+ * to fullscreen windows.
*
- * You can track the result of this operation via the #GdkToplevel:state property,
- * or by listening to notifications of the #GtkWindow:fullscreened property.
+ * You can track the result of this operation via the
+ * [property@Gdk.Toplevel:state] property, or by listening to
+ * notifications of the [property@Gtk.Window:fullscreened] property.
*/
void
gtk_window_fullscreen (GtkWindow *window)
@@ -5300,18 +5388,18 @@ gtk_window_fullscreen (GtkWindow *window)
/**
* gtk_window_fullscreen_on_monitor:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
* @monitor: which monitor to go fullscreen on
*
* Asks to place @window in the fullscreen state on the given @monitor.
*
- * Note that you shouldn't assume the window is definitely full screen
+ * Note that you shouldn't assume the window is definitely fullscreen
* afterward, or that the windowing system allows fullscreen windows on
* any given monitor.
*
- * You can track the result of this operation via the #GdkToplevel:state
- * property, or by listening to notifications of the #GtkWindow:fullscreened
- * property.
+ * You can track the result of this operation via the
+ * [property@Gdk.Toplevel:state] property, or by listening to
+ * notifications of the [property@Gtk.Window:fullscreened] property.
*/
void
gtk_window_fullscreen_on_monitor (GtkWindow *window,
@@ -5348,19 +5436,21 @@ gtk_window_fullscreen_on_monitor (GtkWindow *window,
/**
* gtk_window_unfullscreen:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
- * Asks to remove the fullscreen state for @window, and return to its previous
- * state.
+ * Asks to remove the fullscreen state for @window, and return to
+ * its previous state.
*
- * Note that you shouldn’t assume the window is definitely not full screen afterward,
- * because other entities (e.g. the user or [window manager][gtk-X11-arch]) could
- * fullscreen it again, and not all window managers honor requests to unfullscreen
- * windows; normally the window will end up restored to its normal state. Just don’t
+ * Note that you shouldn’t assume the window is definitely not
+ * fullscreen afterward, because other entities (e.g. the user or
+ * window manager could fullscreen it again, and not all window
+ * managers honor requests to unfullscreen windows; normally the
+ * window will end up restored to its normal state. Just don’t
* write code that crashes if not.
*
- * You can track the result of this operation via the #GdkToplevel:state property,
- * or by listening to notifications of the #GtkWindow:fullscreened property.
+ * You can track the result of this operation via the
+ * [property@Gdk.Toplevel:state] property, or by listening to
+ * notifications of the [property@Gtk.Window:fullscreened] property.
*/
void
gtk_window_unfullscreen (GtkWindow *window)
@@ -5387,8 +5477,8 @@ gtk_window_unfullscreen (GtkWindow *window)
}
/**
- * gtk_window_set_resizable:
- * @window: a #GtkWindow
+ * gtk_window_set_resizable: (attributes org.gtk.Method.set_property=resizable)
+ * @window: a `GtkWindow`
* @resizable: %TRUE if the user can resize this window
*
* Sets whether the user can resize a window.
@@ -5418,8 +5508,8 @@ gtk_window_set_resizable (GtkWindow *window,
}
/**
- * gtk_window_get_resizable:
- * @window: a #GtkWindow
+ * gtk_window_get_resizable: (attributes org.gtk.Method.get_property=resizable)
+ * @window: a `GtkWindow`
*
* Gets the value set by gtk_window_set_resizable().
*
@@ -5436,13 +5526,14 @@ gtk_window_get_resizable (GtkWindow *window)
}
/**
- * gtk_window_set_display:
- * @window: a #GtkWindow.
- * @display: a #GdkDisplay.
+ * gtk_window_set_display: (attributes org.gtk.Method.set_property=display)
+ * @window: a `GtkWindow`
+ * @display: a `GdkDisplay`
+ *
+ * Sets the `GdkDisplay` where the @window is displayed.
*
- * Sets the #GdkDisplay where the @window is displayed; if
- * the window is already mapped, it will be unmapped, and
- * then remapped on the new display.
+ * If the window is already mapped, it will be unmapped,
+ * and then remapped on the new display.
*/
void
gtk_window_set_display (GtkWindow *window,
@@ -5524,17 +5615,19 @@ gtk_window_on_theme_variant_changed (GtkSettings *settings,
#endif
/**
- * gtk_window_is_active:
- * @window: a #GtkWindow
- *
+ * gtk_window_is_active: (attributes org.gtk.Method.get_property=is-active)
+ * @window: a `GtkWindow`
+ *
* Returns whether the window is part of the current active toplevel.
- * (That is, the toplevel window receiving keystrokes.)
+ *
+ * The active toplevel is the window receiving keystrokes.
+ *
* The return value is %TRUE if the window is active toplevel itself.
* You might use this function if you wanted to draw a widget
* differently in an active window from a widget in an inactive window.
- *
+ *
* Returns: %TRUE if the window part of the current active window.
- **/
+ */
gboolean
gtk_window_is_active (GtkWindow *window)
{
@@ -5547,13 +5640,14 @@ gtk_window_is_active (GtkWindow *window)
/**
* gtk_window_get_group:
- * @window: (allow-none): a #GtkWindow, or %NULL
+ * @window: (allow-none): a `GtkWindow`, or %NULL
+ *
+ * Returns the group for @window.
*
- * Returns the group for @window or the default group, if
- * @window is %NULL or if @window does not have an explicit
- * window group.
+ * If the window has no group, then the default group is returned.
*
- * Returns: (transfer none): the #GtkWindowGroup for a window or the default group
+ * Returns: (transfer none): the `GtkWindowGroup` for a window
+ * or the default group
*/
GtkWindowGroup *
gtk_window_get_group (GtkWindow *window)
@@ -5575,12 +5669,12 @@ gtk_window_get_group (GtkWindow *window)
/**
* gtk_window_has_group:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
*
* Returns whether @window has an explicit window group.
*
* Returns: %TRUE if @window has an explicit window group.
- **/
+ */
gboolean
gtk_window_has_group (GtkWindow *window)
{
@@ -5654,13 +5748,13 @@ gtk_window_keys_changed (GtkWindow *window)
/*
* _gtk_window_set_is_active:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
* @is_active: %TRUE if the window is in the currently active toplevel
*
- * Internal function that sets whether the #GtkWindow is part
- * of the currently active toplevel window (taking into account inter-process
- * embedding.)
- **/
+ * Internal function that sets whether the `GtkWindow` is part
+ * of the currently active toplevel window (taking into account
+ * inter-process embedding.)
+ */
static void
_gtk_window_set_is_active (GtkWindow *window,
gboolean is_active)
@@ -5693,9 +5787,11 @@ _gtk_window_set_is_active (GtkWindow *window,
* gtk_window_set_auto_startup_notification:
* @setting: %TRUE to automatically do startup notification
*
- * By default, after showing the first #GtkWindow, GTK calls
- * gdk_display_notify_startup_complete(). Call this function to
- * disable the automatic startup notification. You might do this
+ * Sets whether the window should request startup notification.
+ *
+ * By default, after showing the first `GtkWindow`, GTK calls
+ * [method@Gdk.Display.notify_startup_complete]. Call this function
+ * to disable the automatic startup notification. You might do this
* if your first window is a splash screen, and you want to delay
* notification until after your real main window has been shown,
* for example.
@@ -5703,7 +5799,7 @@ _gtk_window_set_is_active (GtkWindow *window,
* In that example, you would disable startup notification
* temporarily, show your splash screen, then re-enable it so that
* showing the main window would automatically result in notification.
- **/
+ */
void
gtk_window_set_auto_startup_notification (gboolean setting)
{
@@ -5711,13 +5807,13 @@ gtk_window_set_auto_startup_notification (gboolean setting)
}
/**
- * gtk_window_get_mnemonics_visible:
- * @window: a #GtkWindow
+ * gtk_window_get_mnemonics_visible: (attributes org.gtk.MEthod.get_property=mnemonics-visible)
+ * @window: a `GtkWindow`
*
- * Gets the value of the #GtkWindow:mnemonics-visible property.
+ * Gets whether mnemonics are supposed to be visible.
*
* Returns: %TRUE if mnemonics are supposed to be visible
- * in this window.
+ * in this window.
*/
gboolean
gtk_window_get_mnemonics_visible (GtkWindow *window)
@@ -5731,10 +5827,10 @@ gtk_window_get_mnemonics_visible (GtkWindow *window)
/**
* gtk_window_set_mnemonics_visible:
- * @window: a #GtkWindow
+ * @window: a `GtkWindow`
* @setting: the new value
*
- * Sets the #GtkWindow:mnemonics-visible property.
+ * Sets whether mnemonics are supposed to be visible.
*/
void
gtk_window_set_mnemonics_visible (GtkWindow *window,
@@ -5788,13 +5884,13 @@ _gtk_window_schedule_mnemonics_visible (GtkWindow *window)
}
/**
- * gtk_window_get_focus_visible:
- * @window: a #GtkWindow
+ * gtk_window_get_focus_visible: (attributes org.gtk.Method.get_property=focus-visible)
+ * @window: a `GtkWindow`
*
- * Gets the value of the #GtkWindow:focus-visible property.
+ * Gets whether “focus rectangles” are supposed to be visible.
*
* Returns: %TRUE if “focus rectangles” are supposed to be visible
- * in this window.
+ * in this window.
*/
gboolean
gtk_window_get_focus_visible (GtkWindow *window)
@@ -5820,11 +5916,11 @@ unset_focus_visible (gpointer data)
}
/**
- * gtk_window_set_focus_visible:
- * @window: a #GtkWindow
+ * gtk_window_set_focus_visible: (attributes org.gtk.MEthod.set_property=focus-visible)
+ * @window: a `GtkWindow`
* @setting: the new value
*
- * Sets the #GtkWindow:focus-visible property.
+ * Sets whether “focus rectangles” are supposed to be visible.
*/
void
gtk_window_set_focus_visible (GtkWindow *window,
@@ -5979,8 +6075,9 @@ gtk_window_set_debugging (GdkDisplay *display,
* gtk_window_set_interactive_debugging:
* @enable: %TRUE to enable interactive debugging
*
- * Opens or closes the [interactive debugger][interactive-debugging],
- * which offers access to the widget hierarchy of the application
+ * Opens or closes the [interactive debugger](#interactive-debugging).
+ *
+ * The debugger offers access to the widget hierarchy of the application
* and to useful debugging tools.
*/
void
@@ -6418,8 +6515,8 @@ gtk_window_maybe_update_cursor (GtkWindow *window,
}
/**
- * gtk_window_set_child:
- * @window: a #GtkWindow
+ * gtk_window_set_child: (attributes org.gtk.Method.set_property=child)
+ * @window: a `GtkWindow`
* @child: (allow-none): the child widget
*
* Sets the child widget of @window.
@@ -6445,8 +6542,8 @@ gtk_window_set_child (GtkWindow *window,
}
/**
- * gtk_window_get_child:
- * @window: a #GtkWindow
+ * gtk_window_get_child: (attributes org.gtk.Method.get_property=child)
+ * @window: a `GtkWindow`
*
* Gets the child widget of @window.
*
diff --git a/gtk/gtkwindowcontrols.c b/gtk/gtkwindowcontrols.c
index c288c4ed75264fc1bf07acb70ab943b614c014c5..cfdd0171a53dda78408098d6b3bcc999d10dd095 100644
--- a/gtk/gtkwindowcontrols.c
+++ b/gtk/gtkwindowcontrols.c
@@ -33,19 +33,20 @@
#include "gtkwindowprivate.h"
/**
- * SECTION:gtkwindowcontrols
- * @Short_description: A widget displaying window buttons
- * @Title: GtkWindowControls
- * @See_also: #GtkHeaderBar
+ * GtkWindowControls:
*
- * GtkWindowControls shows window frame controls, such as minimize, maximize
- * and close buttons, and the window icon.
+ * `GtkWindowControls` shows window frame controls.
*
- * #GtkWindowControls only displays start or end side of the controls (see
- * #GtkWindowControls:side), so it's intended to be always used in pair with
- * another #GtkWindowControls using the opposite side, for example:
+ * Typical window frame controls are minimize, maximize and close buttons,
+ * and the window icon.
*
- * |[
+ * 
+ *
+ * `GtkWindowControls` only displays start or end side of the controls (see
+ * [property@Gtk.WindowControls:side]), so it's intended to be always used
+ * in pair with another `GtkWindowControls` for the opposite side, for example:
+ *
+ * ```xml
*
*
*
@@ -61,28 +62,29 @@
*
*
*
- * ]|
+ * ```
*
* # CSS nodes
*
- * |[
+ * ```
* windowcontrols
* ├── [image.icon]
* ├── [button.minimize]
* ├── [button.maximize]
* ╰── [button.close]
- * ]|
+ * ```
*
- * A #GtkWindowControls' CSS node is called windowcontrols. It contains
+ * A `GtkWindowControls`' CSS node is called windowcontrols. It contains
* subnodes corresponding to each title button. Which of the title buttons
* exist and where they are placed exactly depends on the desktop environment
- * and #GtkWindowControls:decoration-layout value.
+ * and [property@Gtk.WindowControls:decoration-layout] value.
*
- * When #GtkWindowControls:empty is %TRUE, it gets the .empty style class.
+ * When [property@Gtk.WindowControls:empty] is %TRUE, it gets the .empty
+ * style class.
*
* # Accessibility
*
- * GtkWindowHandle uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
+ * `GtkWindowControls` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
*/
struct _GtkWindowControls {
@@ -506,11 +508,11 @@ gtk_window_controls_class_init (GtkWindowControlsClass *klass)
widget_class->unroot = gtk_window_controls_unroot;
/**
- * GtkWindowControls:side:
+ * GtkWindowControls:side: (attributes org.gtk.Property.get=gtk_window_controls_get_side org.gtk.Property.set=gtk_window_controls_set_side)
*
* Whether the widget shows start or end side of the decoration layout.
*
- * See gtk_window_controls_set_decoration_layout().
+ * See [property@Gtk.WindowControls:decoration_layout].
*/
props[PROP_SIDE] =
g_param_spec_enum ("side",
@@ -521,13 +523,12 @@ gtk_window_controls_class_init (GtkWindowControlsClass *klass)
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindowControls:decoration-layout:
+ * GtkWindowControls:decoration-layout: (attributes org.gtk.Property.get=gtk_window_controls_get_decoration_layout org.gtk.Property.set=gtk_window_controls_set_decoration_layout)
*
- * The decoration layout for window buttons. If this property is not set,
- * the #GtkSettings:gtk-decoration-layout setting is used.
+ * The decoration layout for window buttons.
*
- * See gtk_window_controls_set_decoration_layout() for information
- * about the format of this string.
+ * If this property is not set, the
+ * [property@Gtk.Settings:gtk-decoration-layout] setting is used.
*/
props[PROP_DECORATION_LAYOUT] =
g_param_spec_string ("decoration-layout",
@@ -537,7 +538,7 @@ gtk_window_controls_class_init (GtkWindowControlsClass *klass)
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindowControls:empty:
+ * GtkWindowControls:empty: (attributes org.gtk.Property.get=gtk_window_controls_get_empty)
*
* Whether the widget has any window buttons.
*/
@@ -572,9 +573,9 @@ gtk_window_controls_init (GtkWindowControls *self)
* gtk_window_controls_new:
* @side: the side
*
- * Creates a new #GtkWindowControls.
+ * Creates a new `GtkWindowControls`.
*
- * Returns: a new #GtkWindowControls.
+ * Returns: a new `GtkWindowControls`.
**/
GtkWidget *
gtk_window_controls_new (GtkPackType side)
@@ -585,10 +586,10 @@ gtk_window_controls_new (GtkPackType side)
}
/**
- * gtk_window_controls_get_side:
- * @self: a #GtkWindowControls
+ * gtk_window_controls_get_side: (attributes org.gtk.Method.get_property=side)
+ * @self: a `GtkWindowControls`
*
- * Gets the side set with gtk_window_controls_set_side().
+ * Gets the side to which this `GtkWindowControls` instance belongs.
*
* Returns: the side
*/
@@ -601,13 +602,13 @@ gtk_window_controls_get_side (GtkWindowControls *self)
}
/**
- * gtk_window_controls_set_side:
- * @self: a #GtkWindowControls
+ * gtk_window_controls_set_side: (attributes org.gtk.Method.set_property=side)
+ * @self: a `GtkWindowControls`
* @side: a side
*
- * Sets the side for @self, determining which part of decoration layout it uses.
+ * Determines which part of decoration layout the `GtkWindowControls` uses.
*
- * See gtk_window_controls_set_decoration_layout()
+ * See [property@Gtk.WindowControls:decoration-layout].
*/
void
gtk_window_controls_set_side (GtkWindowControls *self,
@@ -643,11 +644,10 @@ gtk_window_controls_set_side (GtkWindowControls *self,
}
/**
- * gtk_window_controls_get_decoration_layout:
- * @self: a #GtkWindowControls
+ * gtk_window_controls_get_decoration_layout: (attributes org.gtk.Method.get_property=decoration-layout)
+ * @self: a `GtkWindowControls`
*
- * Gets the decoration layout set with
- * gtk_window_controls_set_decoration_layout().
+ * Gets the decoration layout of this `GtkWindowControls`.
*
* Returns: (nullable): the decoration layout or %NULL if it is unset
*/
@@ -660,13 +660,15 @@ gtk_window_controls_get_decoration_layout (GtkWindowControls *self)
}
/**
- * gtk_window_controls_set_decoration_layout:
- * @self: a #GtkWindowControls
+ * gtk_window_controls_set_decoration_layout: (attributes org.gtk.Method.set_property=decoration-layout)
+ * @self: a `GtkWindowControls`
* @layout: (nullable): a decoration layout, or %NULL to
* unset the layout
*
- * Sets the decoration layout for the title buttons, overriding
- * the #GtkSettings:gtk-decoration-layout setting.
+ * Sets the decoration layout for the title buttons.
+ *
+ * This overrides the [property@Gtk.Settings:gtk-decoration-layout]
+ * setting.
*
* The format of the string is button names, separated by commas.
* A colon separates the buttons that should appear on the left
@@ -676,8 +678,8 @@ gtk_window_controls_get_decoration_layout (GtkWindowControls *self)
* For example, “icon:minimize,maximize,close” specifies a icon
* on the left, and minimize, maximize and close buttons on the right.
*
- * If #GtkWindowControls:side value is @GTK_PACK_START, @self will
- * display the part before the colon, otherwise after that.
+ * If [property@Gtk.WindowControls:side] value is @GTK_PACK_START, @self
+ * will display the part before the colon, otherwise after that.
*/
void
gtk_window_controls_set_decoration_layout (GtkWindowControls *self,
@@ -694,8 +696,8 @@ gtk_window_controls_set_decoration_layout (GtkWindowControls *self,
}
/**
- * gtk_window_controls_get_empty:
- * @self: a #GtkWindowControls
+ * gtk_window_controls_get_empty: (attributes org.gtk.Method.get_property=empty)
+ * @self: a `GtkWindowControls`
*
* Gets whether the widget has any window buttons.
*
diff --git a/gtk/gtkwindowgroup.c b/gtk/gtkwindowgroup.c
index a83e278aee9afdcf8c21f853e0fd80bb31307b7b..7bd30739c9d6a8de7f04f1e6544dd78dedca2dc0 100644
--- a/gtk/gtkwindowgroup.c
+++ b/gtk/gtkwindowgroup.c
@@ -31,20 +31,19 @@
/**
- * SECTION:gtkwindowgroup
- * @Short_description: Limit the effect of grabs
- * @Title: GtkWindowGroup
+ * GtkWindowGroup:
*
- * A #GtkWindowGroup restricts the effect of grabs to windows
- * in the same group, thereby making window groups almost behave
- * like separate applications.
+ * `GtkWindowGroup` makes group of windows behave like separate applications.
+ *
+ * It achieves this by limiting the effect of GTK grabs and modality
+ * to windows in the same group.
*
* A window can be a member in at most one window group at a time.
* Windows that have not been explicitly assigned to a group are
* implicitly treated like windows of the default window group.
*
- * GtkWindowGroup objects are referenced by each window in the group,
- * so once you have added all windows to a GtkWindowGroup, you can drop
+ * `GtkWindowGroup` objects are referenced by each window in the group,
+ * so once you have added all windows to a `GtkWindowGroup`, you can drop
* the initial reference to the window group with g_object_unref(). If the
* windows in the window group are subsequently destroyed, then they will
* be removed from the window group and drop their references on the window
@@ -81,13 +80,13 @@ gtk_window_group_class_init (GtkWindowGroupClass *klass)
/**
* gtk_window_group_new:
- *
- * Creates a new #GtkWindowGroup object.
+ *
+ * Creates a new `GtkWindowGroup` object.
*
* Modality of windows only affects windows
- * within the same #GtkWindowGroup.
+ * within the same `GtkWindowGroup`.
*
- * Returns: a new #GtkWindowGroup.
+ * Returns: a new `GtkWindowGroup`.
**/
GtkWindowGroup *
gtk_window_group_new (void)
@@ -123,11 +122,11 @@ window_group_cleanup_grabs (GtkWindowGroup *group,
/**
* gtk_window_group_add_window:
- * @window_group: a #GtkWindowGroup
- * @window: the #GtkWindow to add
- *
- * Adds a window to a #GtkWindowGroup.
- **/
+ * @window_group: a `GtkWindowGroup`
+ * @window: the `GtkWindow` to add
+ *
+ * Adds a window to a `GtkWindowGroup`.
+ */
void
gtk_window_group_add_window (GtkWindowGroup *window_group,
GtkWindow *window)
@@ -157,11 +156,11 @@ gtk_window_group_add_window (GtkWindowGroup *window_group,
/**
* gtk_window_group_remove_window:
- * @window_group: a #GtkWindowGroup
- * @window: the #GtkWindow to remove
- *
- * Removes a window from a #GtkWindowGroup.
- **/
+ * @window_group: a `GtkWindowGroup`
+ * @window: the `GtkWindow` to remove
+ *
+ * Removes a window from a `GtkWindowGroup`.
+ */
void
gtk_window_group_remove_window (GtkWindowGroup *window_group,
GtkWindow *window)
@@ -181,13 +180,13 @@ gtk_window_group_remove_window (GtkWindowGroup *window_group,
/**
* gtk_window_group_list_windows:
- * @window_group: a #GtkWindowGroup
+ * @window_group: a `GtkWindowGroup`
*
- * Returns a list of the #GtkWindows that belong to @window_group.
+ * Returns a list of the `GtkWindows` that belong to @window_group.
*
* Returns: (element-type GtkWindow) (transfer container): A
* newly-allocated list of windows inside the group.
- **/
+ */
GList *
gtk_window_group_list_windows (GtkWindowGroup *window_group)
{
diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c
index a4265df7c78b55209ba8bf665cf699127934606c..6b49fcb2d2578bfaed8b018b8a99afa456eb2bf3 100644
--- a/gtk/gtkwindowhandle.c
+++ b/gtk/gtkwindowhandle.c
@@ -38,22 +38,20 @@
/**
- * SECTION:gtkwindowhandle
- * @Short_description: A titlebar area widget
- * @Title: GtkWindowHandle
- * @See_also: #GtkWindow, #GtkHeaderBar
+ * GtkWindowHandle:
*
- * GtkWindowHandle is a titlebar area widget. When added into a window, it can
- * be dragged to move the window, and handles right click, double click and
- * middle click as expected of a titlebar.
+ * `GtkWindowHandle` is a titlebar area widget.
+ *
+ * When added into a window, it can be dragged to move the window, and handles
+ * right click, double click and middle click as expected of a titlebar.
*
* # CSS nodes
*
- * #GtkWindowHandle has a single CSS node with the name `windowhandle`.
+ * `GtkWindowHandle` has a single CSS node with the name `windowhandle`.
*
* # Accessibility
*
- * GtkWindowHandle uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
+ * `GtkWindowHandle` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
*/
struct _GtkWindowHandle {
@@ -497,6 +495,11 @@ gtk_window_handle_class_init (GtkWindowHandleClass *klass)
widget_class->unrealize = gtk_window_handle_unrealize;
+ /**
+ * GtkWindowHandle:child: (attributes org.gtk.Property.get=gtk_window_handle_get_child org.gtk.Property.set=gtk_window_handle_set_child)
+ *
+ * The child widget.
+ */
props[PROP_CHILD] =
g_param_spec_object ("child",
P_("Child"),
@@ -551,10 +554,10 @@ gtk_window_handle_buildable_iface_init (GtkBuildableIface *iface)
/**
* gtk_window_handle_new:
*
- * Creates a new #GtkWindowHandle.
+ * Creates a new `GtkWindowHandle`.
*
- * Returns: a new #GtkWindowHandle.
- **/
+ * Returns: a new `GtkWindowHandle`.
+ */
GtkWidget *
gtk_window_handle_new (void)
{
@@ -562,8 +565,8 @@ gtk_window_handle_new (void)
}
/**
- * gtk_window_handle_get_child:
- * @self: a #GtkWindowHandle
+ * gtk_window_handle_get_child: (attributes org.gtk.Method.get_property=child)
+ * @self: a `GtkWindowHandle`
*
* Gets the child widget of @self.
*
@@ -578,8 +581,8 @@ gtk_window_handle_get_child (GtkWindowHandle *self)
}
/**
- * gtk_window_handle_set_child:
- * @self: a #GtkWindowHandle
+ * gtk_window_handle_set_child: (attributes org.gtk.Method.set_property=child)
+ * @self: a `GtkWindowHandle`
* @child: (allow-none): the child widget
*
* Sets the child widget of @self.
diff --git a/gtk/meson.build b/gtk/meson.build
index 026e531b3228b3ce26e03ec6a71404918cbd509d..fe0ec456d9db3af10f7980017977371f630a80ee 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -778,6 +778,7 @@ if os_unix
endif
if os_win32
+ gtk_win32_print_headers = []
gtk_win32_print_sources = files([
'gtkprint-win32.c',
'gtkprintoperation-win32.c',
@@ -1152,8 +1153,9 @@ if build_gir
if pango_dep.type_name() == 'internal'
gdk_gir_inc += subproject('pango').get_variable('pango_gir').get(0)
+ gdk_gir_inc += subproject('pango').get_variable('pangocairo_gir').get(0)
else
- gdk_gir_inc += 'Pango-1.0'
+ gdk_gir_inc += ['Pango-1.0', 'PangoCairo-1.0']
endif
gdk_gir = gnome.generate_gir(libgtk,
@@ -1242,11 +1244,11 @@ if build_gir
]
if os_unix
- gtk_introspection_sources += gtk_unix_print_sources
+ gtk_introspection_sources += [ gtk_unix_print_headers, gtk_unix_print_sources ]
endif
if os_win32
- gtk_introspection_sources += gtk_win32_print_sources
+ gtk_introspection_sources += [ gtk_win32_print_headers, gtk_win32_print_sources ]
endif
gtk_gir = gnome.generate_gir(libgtk,
diff --git a/meson.build b/meson.build
index d8ee3b6e9a9ba3d50fa7998588eed0b025ffd5cf..d5c875acdccc12186aeb910ed20d605ac183f8ba 100644
--- a/meson.build
+++ b/meson.build
@@ -395,10 +395,9 @@ graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req,
fallback: ['graphene', 'graphene_dep'])
iso_codes_dep = dependency('iso-codes', required: false)
-gtk_doc_dep = dependency('gtk-doc', version: '>=1.33',
- fallback: ['gtk-doc', 'dummy_dep'],
- default_options: ['tests=false', 'yelp_manual=false'],
- required: get_option('gtk_doc'))
+gidocgen_dep = dependency('gi-docgen', version: '>= 2021.1',
+ fallback: ['gi-docgen', 'dummy_dep'],
+ required: get_option('gtk_doc'))
fontconfig_dep = [] # only used in x11 backend
diff --git a/subprojects/gi-docgen.wrap b/subprojects/gi-docgen.wrap
new file mode 100644
index 0000000000000000000000000000000000000000..e9c78c1e7aefeae9dc69fb85e9d5cd5dde70243b
--- /dev/null
+++ b/subprojects/gi-docgen.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+directory=gi-docgen
+url=https://gitlab.gnome.org/ebassi/gi-docgen.git
+push-url=ssh://git@gitlab.gnome.org:ebassi/gi-docgen.git
+revision=main
+depth=1