[gtkmm] Gdk, Gtk: Regenerate docs.xml and .defs files
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk, Gtk: Regenerate docs.xml and .defs files
- Date: Sun, 11 Sep 2022 15:03:51 +0000 (UTC)
commit 624eacf7d5020e5f5232121a52ad71a0e0c5ee4f
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Sun Sep 11 16:59:09 2022 +0200
Gdk, Gtk: Regenerate docs.xml and .defs files
using gtk files from gtk 4.8.0.
gdk/src/gdk_docs.xml | 49 ++++++++++++-
gdk/src/gdk_methods.defs | 17 +++++
gtk/src/gtk_docs.xml | 182 ++++++++++++++++++++++++++++++++++++++++++++++-
gtk/src/gtk_enums.defs | 20 ++++++
gtk/src/gtk_methods.defs | 94 ++++++++++++++++++++++++
gtk/src/gtk_signals.defs | 9 +++
6 files changed, 366 insertions(+), 5 deletions(-)
---
diff --git a/gdk/src/gdk_docs.xml b/gdk/src/gdk_docs.xml
index c3a5371f..74a535fa 100644
--- a/gdk/src/gdk_docs.xml
+++ b/gdk/src/gdk_docs.xml
@@ -1234,7 +1234,7 @@ The elements of the enumeration correspond to the signals of `GdkFrameClock`.
</parameter_description>
</parameter>
<parameter name="GDK_FRAME_CLOCK_PHASE_LAYOUT">
-<parameter_description> corresponds to GdkFrameClock::layout. Should not be handled by applicatiosn.
+<parameter_description> corresponds to GdkFrameClock::layout. Should not be handled by applications.
</parameter_description>
</parameter>
<parameter name="GDK_FRAME_CLOCK_PHASE_PAINT">
@@ -4613,7 +4613,7 @@ Creates a new `GdkContentFormats` for a given `GType`.
<function name="gdk_content_formats_parse">
<description>
Parses the given @string into `GdkContentFormats` and
-returns the formats.
+returns the formats.
Strings printed via [method@Gdk.ContentFormats.to_string]
can be read in again successfully using this function.
@@ -8073,6 +8073,51 @@ Since: 4.6
</return>
</function>
+<function name="gdk_file_list_new_from_array">
+<description>
+Creates a new `GdkFileList` for the given array of files.
+
+This function is meant to be used by language bindings.
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="files">
+<parameter_description> the files to add to the list
+</parameter_description>
+</parameter>
+<parameter name="n_files">
+<parameter_description> the number of files in the array
+</parameter_description>
+</parameter>
+</parameters>
+<return> the newly create files list
+
+</return>
+</function>
+
+<function name="gdk_file_list_new_from_list">
+<description>
+Creates a new files list container from a singly linked list of
+`GFile` instances.
+
+This function is meant to be used by language bindings
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="files">
+<parameter_description> a list of files
+</parameter_description>
+</parameter>
+</parameters>
+<return> the newly created files list
+
+</return>
+</function>
+
<function name="gdk_focus_event_get_in">
<description>
Extracts whether this event is about focus entering or
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 083c115b..1533a11d 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -1191,6 +1191,23 @@
(return-type "GSList*")
)
+(define-function gdk_file_list_new_from_list
+ (c-name "gdk_file_list_new_from_list")
+ (return-type "GdkFileList*")
+ (parameters
+ '("GSList*" "files")
+ )
+)
+
+(define-function gdk_file_list_new_from_array
+ (c-name "gdk_file_list_new_from_array")
+ (return-type "GdkFileList*")
+ (parameters
+ '("GFile**" "files")
+ '("gsize" "n_files")
+ )
+)
+
;; From gdkcontentprovider.h
diff --git a/gtk/src/gtk_docs.xml b/gtk/src/gtk_docs.xml
index 50a49233..9639bddc 100644
--- a/gtk/src/gtk_docs.xml
+++ b/gtk/src/gtk_docs.xml
@@ -4078,6 +4078,43 @@ Domain for VFL parsing errors.
</parameters>
</enum>
+<enum name="GtkContentFit">
+<description>
+Controls how a content should be made to fit inside an allocation.
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="GTK_CONTENT_FIT_FILL">
+<parameter_description> Make the content fill the entire allocation,
+without taking its aspect ratio in consideration. The resulting
+content will appear as stretched if its aspect ratio is different
+from the allocation aspect ratio.
+</parameter_description>
+</parameter>
+<parameter name="GTK_CONTENT_FIT_CONTAIN">
+<parameter_description> Scale the content to fit the allocation,
+while taking its aspect ratio in consideration. The resulting
+content will appear as letterboxed if its aspect ratio is different
+from the allocation aspect ratio.
+</parameter_description>
+</parameter>
+<parameter name="GTK_CONTENT_FIT_COVER">
+<parameter_description> Cover the entire allocation, while taking
+the content aspect ratio in consideration. The resulting content
+will appear as clipped if its aspect ratio is different from the
+allocation aspect ratio.
+</parameter_description>
+</parameter>
+<parameter name="GTK_CONTENT_FIT_SCALE_DOWN">
+<parameter_description> The content is scaled down to fit the
+allocation, if needed, otherwise its original size is used.
+</parameter_description>
+</parameter>
+</parameters>
+</enum>
+
<enum name="GtkCornerType">
<description>
Specifies which corner a child widget should be placed in when packed into
@@ -9975,6 +10012,15 @@ of text changes would be distracting, e.g. in a statusbar.
</description>
</property>
+<property name="GtkLabel:tabs">
+<description>
+Custom tabs for this label.
+
+Since: 4.8
+
+</description>
+</property>
+
<property name="GtkLabel:use-markup">
<description>
%TRUE if the text of the label includes Pango markup.
@@ -12087,6 +12133,15 @@ If the `GtkPicture` can be made smaller than the natural size of its contents.
</description>
</property>
+<property name="GtkPicture:content-fit">
+<description>
+How the content should be resized to fit inside the `GtkPicture`.
+
+Since: 4.8
+
+</description>
+</property>
+
<property name="GtkPicture:file">
<description>
The `GFile` that is displayed or %NULL if none.
@@ -12099,6 +12154,8 @@ The `GFile` that is displayed or %NULL if none.
Whether the GtkPicture will render its contents trying to preserve the aspect
ratio.
+Deprecated: 4.8: Use [property@Gtk.Picture:content-fit] instead.
+
</description>
</property>
@@ -26617,6 +26674,11 @@ custom callbacks via [method@Gtk.BuilderCScope.add_callback_symbol].
Add @object to the @builder object pool so it can be
referenced just like any other object built by builder.
+Only a single object may be added using @name. However,
+it is not an error to expose the same object under multiple
+names. `gtk_builder_get_object()` may be used to determine
+if an object has already been added with @name.
+
</description>
<parameters>
<parameter name="builder">
@@ -26640,8 +26702,8 @@ referenced just like any other object built by builder.
Main private entry point for building composite components
from template XML.
-This is exported purely to let `gtk-builder-tool` validate
-templates, applications have no need to call this function.
+Most likely you do not need to call this function in applications as
+templates are handled by `GtkWidget`.
</description>
@@ -40041,6 +40103,26 @@ performed, but other additional gesture maintenance will.
<return></return>
</function>
+<function name="gtk_event_controller_set_static_name">
+<description>
+Sets a name on the controller that can be used for debugging.
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="controller">
+<parameter_description> a `GtkEventController`
+</parameter_description>
+</parameter>
+<parameter name="name">
+<parameter_description> a name for @controller, must be a static string
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="gtk_every_filter_new">
<description>
Creates a new empty "every" filter.
@@ -50803,6 +50885,29 @@ Returns whether the label is in single line mode.
</return>
</function>
+<function name="gtk_label_get_tabs">
+<description>
+Gets the tabs for @self.
+
+The returned array will be %NULL if “standard” (8-space) tabs are used.
+Free the return value with [method Pango TabArray free].
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a `GtkLabel`
+</parameter_description>
+</parameter>
+</parameters>
+<return> copy of default tab array,
+or %NULL if standard tabs are used; must be freed with
+[method Pango TabArray free].
+
+</return>
+</function>
+
<function name="gtk_label_get_text">
<description>
Fetches the text from a label.
@@ -51343,6 +51448,26 @@ Sets whether the label is in single line mode.
<return></return>
</function>
+<function name="gtk_label_set_tabs">
+<description>
+Sets the default tab stops for paragraphs in @self.
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a `GtkLabel`
+</parameter_description>
+</parameter>
+<parameter name="tabs">
+<parameter_description> tabs as a `PangoTabArray`
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="gtk_label_set_text">
<description>
Sets the text within the `GtkLabel` widget.
@@ -60007,6 +60132,26 @@ Returns whether the `GtkPicture` respects its contents size.
</return>
</function>
+<function name="gtk_picture_get_content_fit">
+<description>
+Returns the fit mode for the content of the `GtkPicture`.
+
+See [enum@Gtk.ContentFit] for details.
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a `GtkPicture`
+</parameter_description>
+</parameter>
+</parameters>
+<return> the content fit mode
+
+</return>
+</function>
+
<function name="gtk_picture_get_file">
<description>
Gets the `GFile` currently displayed if @self is displaying a file.
@@ -60030,6 +60175,9 @@ If @self is not displaying a file, for example when
<description>
Returns whether the `GtkPicture` preserves its contents aspect ratio.
+Deprecated: 4.8: Use [method@Gtk.Picture.get_content_fit] instead. This will
+now return `FALSE` only if [property@Gtk.Picture:content-fit] is
+`GTK_CONTENT_FIT_FILL`. Returns `TRUE` otherwise.
</description>
<parameters>
@@ -60039,6 +60187,7 @@ Returns whether the `GtkPicture` preserves its contents aspect ratio.
</parameter>
</parameters>
<return> %TRUE if the self tries to keep the contents' aspect ratio
+
</return>
</function>
@@ -60222,6 +60371,28 @@ because the grow behavior can be controlled via
<return></return>
</function>
+<function name="gtk_picture_set_content_fit">
+<description>
+Sets how the content should be resized to fit the `GtkPicture`.
+
+See [enum@Gtk.ContentFit] for details.
+
+Since: 4.8
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a `GtkPicture`
+</parameter_description>
+</parameter>
+<parameter name="content_fit">
+<parameter_description> the content fit mode
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="gtk_picture_set_file">
<description>
Makes @self load and display @file.
@@ -60273,6 +60444,11 @@ left/right of @self.
If set to %FALSE or if the contents provide no aspect ratio,
the contents will be stretched over the picture's whole area.
+Deprecated: 4.8: Use [method@Gtk.Picture.set_content_fit] instead. If still
+used, this method will always set the [property@Gtk.Picture:content-fit]
+property to `GTK_CONTENT_FIT_CONTAIN` if @keep_aspect_ratio is true,
+otherwise it will set it to `GTK_CONTENT_FIT_FILL`.
+
</description>
<parameters>
<parameter name="self">
@@ -91101,7 +91277,7 @@ 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]
+widget. When returning `TRUE`, widgets normally call [method@Gtk.Widget.grab_focus]
to place the focus accordingly; when returning `FALSE`, they don’t modify
the current focus location.
diff --git a/gtk/src/gtk_enums.defs b/gtk/src/gtk_enums.defs
index ea0ef35e..d094c974 100644
--- a/gtk/src/gtk_enums.defs
+++ b/gtk/src/gtk_enums.defs
@@ -446,6 +446,26 @@
)
)
+;; Original typedef:
+;; typedef enum
+;; {
+;; GTK_CONTENT_FIT_FILL,
+;; GTK_CONTENT_FIT_CONTAIN,
+;; GTK_CONTENT_FIT_COVER,
+;; GTK_CONTENT_FIT_SCALE_DOWN,
+;; } GtkContentFit;
+
+(define-enum-extended ContentFit
+ (in-module "Gtk")
+ (c-name "GtkContentFit")
+ (values
+ '("fill" "GTK_CONTENT_FIT_FILL" "0")
+ '("contain" "GTK_CONTENT_FIT_CONTAIN" "1")
+ '("cover" "GTK_CONTENT_FIT_COVER" "2")
+ '("scale-down" "GTK_CONTENT_FIT_SCALE_DOWN" "3")
+ )
+)
+
;; Original typedef:
;; typedef enum
;; {
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 72636672..877b0f37 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -661,6 +661,18 @@
)
)
+(define-enum ContentFit
+ (in-module "Gtk")
+ (c-name "GtkContentFit")
+ (gtype-id "GTK_TYPE_CONTENT_FIT")
+ (values
+ '("fill" "GTK_CONTENT_FIT_FILL")
+ '("contain" "GTK_CONTENT_FIT_CONTAIN")
+ '("cover" "GTK_CONTENT_FIT_COVER")
+ '("scale-down" "GTK_CONTENT_FIT_SCALE_DOWN")
+ )
+)
+
(define-enum DeleteType
(in-module "Gtk")
(c-name "GtkDeleteType")
@@ -9690,6 +9702,15 @@
)
)
+(define-method set_static_name
+ (of-object "GtkEventController")
+ (c-name "gtk_event_controller_set_static_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
(define-method get_current_event
(of-object "GtkEventController")
(c-name "gtk_event_controller_get_current_event")
@@ -14598,6 +14619,21 @@
(return-type "GMenuModel*")
)
+(define-method set_tabs
+ (of-object "GtkLabel")
+ (c-name "gtk_label_set_tabs")
+ (return-type "none")
+ (parameters
+ '("PangoTabArray*" "tabs")
+ )
+)
+
+(define-method get_tabs
+ (of-object "GtkLabel")
+ (c-name "gtk_label_get_tabs")
+ (return-type "PangoTabArray*")
+)
+
;; From gtklayoutchild.h
@@ -17786,6 +17822,44 @@
)
)
+(define-method to_string
+ (of-object "PangoWrapMode")
+ (c-name "pango_wrap_mode_to_string")
+ (return-type "const-char*")
+)
+
+(define-method to_string
+ (of-object "PangoUnderline")
+ (c-name "pango_underline_to_string")
+ (return-type "const-char*")
+)
+
+(define-method to_string
+ (of-object "PangoStretch")
+ (c-name "pango_stretch_to_string")
+ (return-type "const-char*")
+)
+
+(define-method to_string
+ (of-object "PangoStyle")
+ (c-name "pango_style_to_string")
+ (return-type "const-char*")
+)
+
+(define-method to_string
+ (of-object "PangoVariant")
+ (c-name "pango_variant_to_string")
+ (return-type "const-char*")
+)
+
+(define-function pango_align_to_string
+ (c-name "pango_align_to_string")
+ (return-type "const-char*")
+ (parameters
+ '("PangoAlignment" "align")
+ )
+)
+
;; From gtkpapersize.h
@@ -18201,6 +18275,21 @@
(return-type "gboolean")
)
+(define-method set_content_fit
+ (of-object "GtkPicture")
+ (c-name "gtk_picture_set_content_fit")
+ (return-type "none")
+ (parameters
+ '("GtkContentFit" "content_fit")
+ )
+)
+
+(define-method get_content_fit
+ (of-object "GtkPicture")
+ (c-name "gtk_picture_get_content_fit")
+ (return-type "GtkContentFit")
+)
+
(define-method set_alternative_text
(of-object "GtkPicture")
(c-name "gtk_picture_set_alternative_text")
@@ -32573,6 +32662,11 @@
(return-type "GType")
)
+(define-function gtk_content_fit_get_type
+ (c-name "gtk_content_fit_get_type")
+ (return-type "GType")
+)
+
(define-function gtk_delete_type_get_type
(c-name "gtk_delete_type_get_type")
(return-type "GType")
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index 3ec9d466..a83b9aaf 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -6486,6 +6486,15 @@
(construct-only #f)
)
+(define-property tabs
+ (of-object "GtkLabel")
+ (prop-type "GParamBoxed")
+ (docs "")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From GtkLayoutChild
(define-property layout-manager
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]