docs: Fix: gdk->gtk and gdk->gsk links

gi-docgen can only generate links for dependencies, so we have
to manually expand to a relative url here.

fixup
This commit is contained in:
Matthias Clasen 2024-01-05 14:02:32 -05:00
parent bc066de998
commit 6227592dfa
10 changed files with 29 additions and 23 deletions

View File

@ -529,8 +529,9 @@ gdk_clipboard_get_content (GdkClipboard *clipboard)
* exit. Depending on the platform, the functionality may not be available
* unless a "clipboard manager" is running.
*
* This function is called automatically when a [class@Gtk.Application] is
* shut down, so you likely don't need to call it.
* This function is called automatically when a
* [GtkApplication](../gtk4/class.Application.html)
* is shut down, so you likely don't need to call it.
*/
void
gdk_clipboard_store_async (GdkClipboard *clipboard,

View File

@ -47,7 +47,8 @@
* Cursors by themselves are not very interesting: they must be bound to a
* window for users to see them. This is done with [method@Gdk.Surface.set_cursor]
* or [method@Gdk.Surface.set_device_cursor]. Applications will typically
* use higher-level GTK functions such as [method@Gtk.Widget.set_cursor] instead.
* use higher-level GTK functions such as [gtk_widget_set_cursor()](../gtk4/method.Widget.set_cursor.html)
* instead.
*
* Cursors are not bound to a given [class@Gdk.Display], so they can be shared.
* However, the appearance of cursors may vary when used on different

View File

@ -1189,9 +1189,9 @@ _gdk_display_get_next_serial (GdkDisplay *display)
* Indicates to the GUI environment that the application has
* finished loading, using a given identifier.
*
* GTK will call this function automatically for [class@Gtk.Window]
* GTK will call this function automatically for [GtkWindow](../gtk4/class.Window.html)
* with custom startup-notification identifier unless
* [method@Gtk.Window.set_auto_startup_notification]
* [gtk_window_set_auto_startup_notification()](../gtk4/method.Window.set_auto_startup_notification.html)
* is called to disable that feature.
*
* Deprecated: 4.10: Using [method@Gdk.Toplevel.set_startup_id] is sufficient

View File

@ -305,8 +305,8 @@ gdk_draw_context_get_surface (GdkDrawContext *context)
*
* When using GTK, the widget system automatically places calls to
* gdk_draw_context_begin_frame() and gdk_draw_context_end_frame() via the
* use of [class@Gsk.Renderer]s, so application code does not need to call
* these functions explicitly.
* use of [GskRenderer](../gsk4/class.Renderer.html)s, so application code
* does not need to call these functions explicitly.
*/
void
gdk_draw_context_begin_frame (GdkDrawContext *context,

View File

@ -166,7 +166,8 @@ gdk_frame_clock_class_init (GdkFrameClockClass *klass)
*
* Animations should be updated using [method@Gdk.FrameClock.get_frame_time].
* Applications can connect directly to this signal, or use
* [method@Gtk.Widget.add_tick_callback] as a more convenient interface.
* [gtk_widget_add_tick_callback()](../gtk4/method.Widget.add_tick_callback.html)
* as a more convenient interface.
*/
signals[UPDATE] =
g_signal_new (g_intern_static_string ("update"),
@ -203,7 +204,8 @@ gdk_frame_clock_class_init (GdkFrameClockClass *klass)
*
* The frame is repainted. GDK normally handles this internally and
* emits [signal@Gdk.Surface::render] signals which are turned into
* [signal@Gtk.Widget::snapshot] signals by GTK.
* [GtkWidget::snapshot](../gtk4/signal.Widget.snapshot.html) signals
* by GTK.
*/
signals[PAINT] =
g_signal_new (g_intern_static_string ("paint"),

View File

@ -681,7 +681,8 @@ gdk_empty_paintable_init (GdkEmptyPaintable *self)
* This is often useful for implementing the
* [vfunc@Gdk.Paintable.get_current_image] virtual function
* when the paintable is in an incomplete state (like a
* [class@Gtk.MediaStream] before receiving the first frame).
* [GtkMediaStream](../gtk4/class.MediaStream.html) before receiving
* the first frame).
*
* Returns: (transfer full): a `GdkPaintable`
*/

View File

@ -56,9 +56,9 @@
* [method@Gdk.Popup.get_position_x], [method@Gdk.Popup.get_position_y],
* [method@Gdk.Popup.get_rect_anchor] and [method@Gdk.Popup.get_surface_anchor]
* after the popup has been presented. This can be used to adjust the rendering.
* For example, [class@Gtk.Popover] changes its arrow position accordingly.
* But you have to be careful avoid changing the size of the popover, or it
* has to be presented again.
* For example, [GtkPopover](../gtk4/class.Popover.html) changes its arrow position
* accordingly. But you have to be careful avoid changing the size of the popover,
* or it has to be presented again.
*/
struct _GdkPopupLayout

View File

@ -26,7 +26,7 @@
*
* Base type for snapshot operations.
*
* The subclass of `GdkSnapshot` used by GTK is [class@Gtk.Snapshot].
* The subclass of `GdkSnapshot` used by GTK is [GtkSnapshot](../gtk4/class.Snapshot.html).
*/
G_DEFINE_ABSTRACT_TYPE (GdkSnapshot, gdk_snapshot, G_TYPE_OBJECT)

View File

@ -57,7 +57,7 @@
* A `GdkSurface` is a rectangular region on the screen.
*
* Its a low-level object, used to implement high-level objects
* such as [class@Gtk.Window] or [class@Gtk.Dialog] in GTK.
* such as [GtkWindow](../gtk4/class.Window.html).
*
* The surfaces you see in practice are either [iface@Gdk.Toplevel] or
* [iface@Gdk.Popup], and those interfaces provide much of the required
@ -1716,7 +1716,7 @@ gdk_surface_get_device_position (GdkSurface *surface,
* For toplevel surfaces, withdraws them, so they will no longer be
* known to the window manager; for all surfaces, unmaps them, so
* they wont be displayed. Normally done automatically as
* part of [method@Gtk.Widget.hide].
* part of [gtk_widget_hide()](../gtk4/method.Widget.hide.html).
*/
void
gdk_surface_hide (GdkSurface *surface)
@ -2636,7 +2636,7 @@ gdk_surface_get_scale (GdkSurface *surface)
* GTK will update this property automatically if the @surface background
* is opaque, as we know where the opaque regions are. If your surface
* background is not opaque, please update this property in your
* [vfunc@Gtk.Widget.css_changed] handler.
* [GtkWidgetClass.css_changed](../gtk4/vfunc.Widget.css_changed.html) handler.
*/
void
gdk_surface_set_opaque_region (GdkSurface *surface,

View File

@ -377,8 +377,9 @@ gdk_toplevel_lower (GdkToplevel *toplevel)
*
* Sets keyboard focus to @surface.
*
* In most cases, [method@Gtk.Window.present_with_time] should be
* used on a [class@Gtk.Window], rather than calling this function.
* In most cases, [gtk_window_present_with_time()](../gtk4/method.Window.present_with_time.html)
* should be used on a [GtkWindow](../gtk4/class.Window.html), rather than
* calling this function.
*/
void
gdk_toplevel_focus (GdkToplevel *toplevel,
@ -437,8 +438,8 @@ gdk_toplevel_set_title (GdkToplevel *toplevel,
* Sets the startup notification ID.
*
* When using GTK, typically you should use
* [method@Gtk.Window.set_startup_id] instead of this
* low-level function.
* [gtk_window_set_startup_id()](../gtk4/method.Window.set_startup_id.html)
* instead of this low-level function.
*/
void
gdk_toplevel_set_startup_id (GdkToplevel *toplevel,
@ -461,8 +462,8 @@ gdk_toplevel_set_startup_id (GdkToplevel *toplevel,
* allows the window manager to do things like center @surface
* on @parent and keep @surface above @parent.
*
* See [method@Gtk.Window.set_transient_for] if youre using
* [class@Gtk.Window] or [class@Gtk.Dialog].
* See [gtk_window_set_transient_for()](../gtk4/method.Window.set_transient_for.html)
* if youre using [GtkWindow](../gtk4/class.Window.html).
*/
void
gdk_toplevel_set_transient_for (GdkToplevel *toplevel,