[gtkmm/surface-state-rework: 2/2] Gdk, Gtk: Regenerate docs.xml and .defs files
- From: Andreas Persson <andreasp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/surface-state-rework: 2/2] Gdk, Gtk: Regenerate docs.xml and .defs files
- Date: Sat, 12 Dec 2020 14:25:01 +0000 (UTC)
commit 6e3ffc49471321d9af22095d0d0c7a652ef90147
Author: Andreas Persson <andreasp56 outlook com>
Date: Sat Dec 12 15:20:16 2020 +0100
Gdk, Gtk: Regenerate docs.xml and .defs files
gdk/src/gdk_docs.xml | 189 +++++++++----------------
gdk/src/gdk_enums.defs | 108 +++++++-------
gdk/src/gdk_methods.defs | 49 +++----
gdk/src/gdk_signals.defs | 10 +-
gtk/src/gtk_docs.xml | 361 +++++++++++++++++++++++------------------------
gtk/src/gtk_methods.defs | 74 ++++++----
gtk/src/gtk_signals.defs | 22 ++-
7 files changed, 380 insertions(+), 433 deletions(-)
---
diff --git a/gdk/src/gdk_docs.xml b/gdk/src/gdk_docs.xml
index 0c9bcbb2..f618e517 100644
--- a/gdk/src/gdk_docs.xml
+++ b/gdk/src/gdk_docs.xml
@@ -835,10 +835,6 @@ title bar.
<parameter_description> the keyboard focus has entered or left the surface.
</parameter_description>
</parameter>
-<parameter name="GDK_CONFIGURE">
-<parameter_description> the size of the surface has changed.
-</parameter_description>
-</parameter>
<parameter name="GDK_PROXIMITY_IN">
<parameter_description> an input device has moved into contact with a sensing
surface (e.g. a touchscreen or graphics tablet).
@@ -1068,7 +1064,7 @@ correspond to the signals of #GdkFrameClock.
</parameter_description>
</parameter>
<parameter name="GDK_FRAME_CLOCK_PHASE_LAYOUT">
-<parameter_description> corresponds to GdkFrameClock::layout.
+<parameter_description> corresponds to GdkFrameClock::layout. Should not be handled by applicatiosn.
</parameter_description>
</parameter>
<parameter name="GDK_FRAME_CLOCK_PHASE_PAINT">
@@ -1961,22 +1957,6 @@ which must be repeated.
</parameters>
</enum>
-<signal name="GdkPopup::popup-layout-changed">
-<description>
-Emitted when the layout of a popup surface has changed, e.g. if the popup
-layout was reactive and after the parent moved causing the popover to end
-up partially off-screen.
-
-</description>
-<parameters>
-<parameter name="popup">
-<parameter_description> the #GdkSurface that was laid out
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</signal>
-
<enum name="GdkScrollDirection">
<description>
Specifies the direction for scroll events.
@@ -2207,9 +2187,13 @@ Emitted when GDK receives an input event for @surface.
</return>
</signal>
-<signal name="GdkSurface::leave-monitor">
+<signal name="GdkSurface::layout">
<description>
-Emitted when @surface stops being present on the monitor.
+Emitted when the size of @surface is changed, or when relayout should
+be performed.
+
+Surface size is reported in ”application pixels”, not
+”device pixels” (see gdk_surface_get_scale_factor()).
</description>
<parameters>
@@ -2217,18 +2201,21 @@ Emitted when @surface stops being present on the monitor.
<parameter_description> the #GdkSurface
</parameter_description>
</parameter>
-<parameter name="monitor">
-<parameter_description> the monitor
+<parameter name="width">
+<parameter_description> the current width
+</parameter_description>
+</parameter>
+<parameter name="height">
+<parameter_description> the current height
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>
-<signal name="GdkSurface::render">
+<signal name="GdkSurface::leave-monitor">
<description>
-Emitted when part of the surface needs to be redrawn.
-
+Emitted when @surface stops being present on the monitor.
</description>
<parameters>
@@ -2236,21 +2223,18 @@ Emitted when part of the surface needs to be redrawn.
<parameter_description> the #GdkSurface
</parameter_description>
</parameter>
-<parameter name="region">
-<parameter_description> the region that needs to be redrawn
+<parameter name="monitor">
+<parameter_description> the monitor
</parameter_description>
</parameter>
</parameters>
-<return> %TRUE to indicate that the signal has been handled
-</return>
+<return></return>
</signal>
-<signal name="GdkSurface::size-changed">
+<signal name="GdkSurface::render">
<description>
-Emitted when the size of @surface is changed.
+Emitted when part of the surface needs to be redrawn.
-Surface size is reported in ”application pixels”, not
-”device pixels” (see gdk_surface_get_scale_factor()).
</description>
<parameters>
@@ -2258,16 +2242,13 @@ Surface size is reported in ”application pixels”, not
<parameter_description> the #GdkSurface
</parameter_description>
</parameter>
-<parameter name="width">
-<parameter_description> the new width
-</parameter_description>
-</parameter>
-<parameter name="height">
-<parameter_description> the new height
+<parameter name="region">
+<parameter_description> the region that needs to be redrawn
</parameter_description>
</parameter>
</parameters>
-<return></return>
+<return> %TRUE to indicate that the signal has been handled
+</return>
</signal>
<property name="GdkSurface:cursor">
@@ -2379,10 +2360,6 @@ any of the per-edge states being set.
</description>
<parameters>
-<parameter name="GDK_TOPLEVEL_STATE_WITHDRAWN">
-<parameter_description> the surface is not shown
-</parameter_description>
-</parameter>
<parameter name="GDK_TOPLEVEL_STATE_MINIMIZED">
<parameter_description> the surface is minimized
</parameter_description>
@@ -3361,28 +3338,6 @@ ignore.
</return>
</function>
-<function name="gdk_configure_event_get_size">
-<description>
-Extracts the surface size from a configure event.
-
-</description>
-<parameters>
-<parameter name="event">
-<parameter_description> a configure event
-</parameter_description>
-</parameter>
-<parameter name="width">
-<parameter_description> return location for surface width
-</parameter_description>
-</parameter>
-<parameter name="height">
-<parameter_description> return location for surface height
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gdk_content_deserialize_async">
<description>
Read content from the given input stream and deserialize it, asynchronously.
@@ -13418,7 +13373,7 @@ Obtains the position of the popup relative to its parent.
Gets the current popup rectangle anchor.
The value returned may change after calling gdk_popup_present(),
-or after the "popup-layout-changed" is emitted.
+or after the #GdkSurface::layout signal is emitted.
</description>
@@ -13437,7 +13392,7 @@ or after the "popup-layout-changed" is emitted.
Gets the current popup surface anchor.
The value returned may change after calling gdk_popup_present(),
-or after the "popup-layout-changed" is emitted.
+or after the #GdkSurface::layout signal is emitted.
</description>
@@ -13742,13 +13697,16 @@ Present @popup after having processed the #GdkPopupLayout rules.
If the popup was previously now showing, it will be showed,
otherwise it will change position according to @layout.
-After calling this function, the result of the layout can be queried
-using gdk_popup_get_position_x(), gdk_popup_get_position_y(),
-gdk_surface_get_width(), gdk_surface_get_height(),
-gdk_popup_get_rect_anchor() and gdk_popup_get_surface_anchor().
+After calling this function, the result should be handled in response
+to the #GdkSurface::layout signal being emitted. The resulting popup
+position can be queried using gdk_popup_get_position_x(),
+gdk_popup_get_position_y(), and the resulting size will be sent as
+parameters in the layout signal. Use gdk_popup_get_rect_anchor() and
+gdk_popup_get_surface_anchor() to get the resulting anchors.
-Presenting may have fail, for example if it was immediately
-hidden if the @popup was set to autohide.
+Presenting may fail, for example if the @popup is set to autohide
+and is immediately hidden upon being presented. If presenting failed,
+the #GdkSurface::layout signal will not me emitted.
</description>
@@ -14801,44 +14759,6 @@ property in your #GtkWidgetClass.css_changed() handler.
<return></return>
</function>
-<function name="gdk_surface_set_shadow_width">
-<description>
-Newer GTK windows using client-side decorations use extra geometry
-around their frames for effects like shadows and invisible borders.
-Window managers that want to maximize windows or snap to edges need
-to know where the extents of the actual frame lie, so that users
-don’t feel like windows are snapping against random invisible edges.
-
-Note that this property is automatically updated by GTK, so this
-function should only be used by applications which do not use GTK
-to create toplevel surfaces.
-
-</description>
-<parameters>
-<parameter name="surface">
-<parameter_description> a #GdkSurface
-</parameter_description>
-</parameter>
-<parameter name="left">
-<parameter_description> The left extent
-</parameter_description>
-</parameter>
-<parameter name="right">
-<parameter_description> The right extent
-</parameter_description>
-</parameter>
-<parameter name="top">
-<parameter_description> The top extent
-</parameter_description>
-</parameter>
-<parameter name="bottom">
-<parameter_description> The bottom extent
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gdk_surface_translate_coordinates">
<description>
Translates the given coordinates from being
@@ -15464,8 +15384,8 @@ GDK may emit the 'compute-size' signal to let the user of this toplevel
compute the preferred size of the toplevel surface. See
#GdkToplevel::compute-size for details.
-Presenting may fail.
-
+Presenting is asynchronous and the specified layout parameters are not
+guaranteed to be respected.
</description>
<parameters>
@@ -15478,8 +15398,7 @@ Presenting may fail.
</parameter_description>
</parameter>
</parameters>
-<return> %FALSE if @toplevel failed to be presented, otherwise %TRUE.
-</return>
+<return></return>
</function>
<function name="gdk_toplevel_restore_system_shortcuts">
@@ -15730,6 +15649,38 @@ gdk_toplevel_size_get_bounds()).
<return></return>
</function>
+<function name="gdk_toplevel_size_set_shadow_width">
+<description>
+The shadow width corresponds to the part of the computed surface size
+that would consist of the shadow margin surrounding the window, would
+there be any.
+
+</description>
+<parameters>
+<parameter name="size">
+<parameter_description> a #GdkToplevelSize
+</parameter_description>
+</parameter>
+<parameter name="left">
+<parameter_description> width of the left part of the shadow
+</parameter_description>
+</parameter>
+<parameter name="right">
+<parameter_description> width of the right part of the shadow
+</parameter_description>
+</parameter>
+<parameter name="top">
+<parameter_description> height of the top part of the shadow
+</parameter_description>
+</parameter>
+<parameter name="bottom">
+<parameter_description> height of the bottom part of the shadow
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="gdk_toplevel_size_set_size">
<description>
Sets the size the toplevel prefers to be resized to. The size should be
diff --git a/gdk/src/gdk_enums.defs b/gdk/src/gdk_enums.defs
index d27089a2..085eb35a 100644
--- a/gdk/src/gdk_enums.defs
+++ b/gdk/src/gdk_enums.defs
@@ -163,7 +163,6 @@
;; GDK_ENTER_NOTIFY,
;; GDK_LEAVE_NOTIFY,
;; GDK_FOCUS_CHANGE,
-;; GDK_CONFIGURE,
;; GDK_PROXIMITY_IN,
;; GDK_PROXIMITY_OUT,
;; GDK_DRAG_ENTER,
@@ -199,27 +198,26 @@
'("enter-notify" "GDK_ENTER_NOTIFY" "6")
'("leave-notify" "GDK_LEAVE_NOTIFY" "7")
'("focus-change" "GDK_FOCUS_CHANGE" "8")
- '("configure" "GDK_CONFIGURE" "9")
- '("proximity-in" "GDK_PROXIMITY_IN" "10")
- '("proximity-out" "GDK_PROXIMITY_OUT" "11")
- '("drag-enter" "GDK_DRAG_ENTER" "12")
- '("drag-leave" "GDK_DRAG_LEAVE" "13")
- '("drag-motion" "GDK_DRAG_MOTION" "14")
- '("drop-start" "GDK_DROP_START" "15")
- '("scroll" "GDK_SCROLL" "16")
- '("grab-broken" "GDK_GRAB_BROKEN" "17")
- '("touch-begin" "GDK_TOUCH_BEGIN" "18")
- '("touch-update" "GDK_TOUCH_UPDATE" "19")
- '("touch-end" "GDK_TOUCH_END" "20")
- '("touch-cancel" "GDK_TOUCH_CANCEL" "21")
- '("touchpad-swipe" "GDK_TOUCHPAD_SWIPE" "22")
- '("touchpad-pinch" "GDK_TOUCHPAD_PINCH" "23")
- '("pad-button-press" "GDK_PAD_BUTTON_PRESS" "24")
- '("pad-button-release" "GDK_PAD_BUTTON_RELEASE" "25")
- '("pad-ring" "GDK_PAD_RING" "26")
- '("pad-strip" "GDK_PAD_STRIP" "27")
- '("pad-group-mode" "GDK_PAD_GROUP_MODE" "28")
- '("event-last" "GDK_EVENT_LAST" "29")
+ '("proximity-in" "GDK_PROXIMITY_IN" "9")
+ '("proximity-out" "GDK_PROXIMITY_OUT" "10")
+ '("drag-enter" "GDK_DRAG_ENTER" "11")
+ '("drag-leave" "GDK_DRAG_LEAVE" "12")
+ '("drag-motion" "GDK_DRAG_MOTION" "13")
+ '("drop-start" "GDK_DROP_START" "14")
+ '("scroll" "GDK_SCROLL" "15")
+ '("grab-broken" "GDK_GRAB_BROKEN" "16")
+ '("touch-begin" "GDK_TOUCH_BEGIN" "17")
+ '("touch-update" "GDK_TOUCH_UPDATE" "18")
+ '("touch-end" "GDK_TOUCH_END" "19")
+ '("touch-cancel" "GDK_TOUCH_CANCEL" "20")
+ '("touchpad-swipe" "GDK_TOUCHPAD_SWIPE" "21")
+ '("touchpad-pinch" "GDK_TOUCHPAD_PINCH" "22")
+ '("pad-button-press" "GDK_PAD_BUTTON_PRESS" "23")
+ '("pad-button-release" "GDK_PAD_BUTTON_RELEASE" "24")
+ '("pad-ring" "GDK_PAD_RING" "25")
+ '("pad-strip" "GDK_PAD_STRIP" "26")
+ '("pad-group-mode" "GDK_PAD_GROUP_MODE" "27")
+ '("event-last" "GDK_EVENT_LAST" "28")
)
)
@@ -551,46 +549,44 @@
;; Original typedef:
;; typedef enum
;; {
-;; GDK_TOPLEVEL_STATE_WITHDRAWN = 1 << 0,
-;; GDK_TOPLEVEL_STATE_MINIMIZED = 1 << 1,
-;; GDK_TOPLEVEL_STATE_MAXIMIZED = 1 << 2,
-;; GDK_TOPLEVEL_STATE_STICKY = 1 << 3,
-;; GDK_TOPLEVEL_STATE_FULLSCREEN = 1 << 4,
-;; GDK_TOPLEVEL_STATE_ABOVE = 1 << 5,
-;; GDK_TOPLEVEL_STATE_BELOW = 1 << 6,
-;; GDK_TOPLEVEL_STATE_FOCUSED = 1 << 7,
-;; GDK_TOPLEVEL_STATE_TILED = 1 << 8,
-;; GDK_TOPLEVEL_STATE_TOP_TILED = 1 << 9,
-;; GDK_TOPLEVEL_STATE_TOP_RESIZABLE = 1 << 10,
-;; GDK_TOPLEVEL_STATE_RIGHT_TILED = 1 << 11,
-;; GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE = 1 << 12,
-;; GDK_TOPLEVEL_STATE_BOTTOM_TILED = 1 << 13,
-;; GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE = 1 << 14,
-;; GDK_TOPLEVEL_STATE_LEFT_TILED = 1 << 15,
-;; GDK_TOPLEVEL_STATE_LEFT_RESIZABLE = 1 << 16
+;; GDK_TOPLEVEL_STATE_MINIMIZED = 1 << 0,
+;; GDK_TOPLEVEL_STATE_MAXIMIZED = 1 << 1,
+;; GDK_TOPLEVEL_STATE_STICKY = 1 << 2,
+;; GDK_TOPLEVEL_STATE_FULLSCREEN = 1 << 3,
+;; GDK_TOPLEVEL_STATE_ABOVE = 1 << 4,
+;; GDK_TOPLEVEL_STATE_BELOW = 1 << 5,
+;; GDK_TOPLEVEL_STATE_FOCUSED = 1 << 6,
+;; GDK_TOPLEVEL_STATE_TILED = 1 << 7,
+;; GDK_TOPLEVEL_STATE_TOP_TILED = 1 << 8,
+;; GDK_TOPLEVEL_STATE_TOP_RESIZABLE = 1 << 9,
+;; GDK_TOPLEVEL_STATE_RIGHT_TILED = 1 << 10,
+;; GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE = 1 << 11,
+;; GDK_TOPLEVEL_STATE_BOTTOM_TILED = 1 << 12,
+;; GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE = 1 << 13,
+;; GDK_TOPLEVEL_STATE_LEFT_TILED = 1 << 14,
+;; GDK_TOPLEVEL_STATE_LEFT_RESIZABLE = 1 << 15
;; } GdkToplevelState;
(define-flags-extended ToplevelState
(in-module "Gdk")
(c-name "GdkToplevelState")
(values
- '("withdrawn" "GDK_TOPLEVEL_STATE_WITHDRAWN" "1 << 0")
- '("minimized" "GDK_TOPLEVEL_STATE_MINIMIZED" "1 << 1")
- '("maximized" "GDK_TOPLEVEL_STATE_MAXIMIZED" "1 << 2")
- '("sticky" "GDK_TOPLEVEL_STATE_STICKY" "1 << 3")
- '("fullscreen" "GDK_TOPLEVEL_STATE_FULLSCREEN" "1 << 4")
- '("above" "GDK_TOPLEVEL_STATE_ABOVE" "1 << 5")
- '("below" "GDK_TOPLEVEL_STATE_BELOW" "1 << 6")
- '("focused" "GDK_TOPLEVEL_STATE_FOCUSED" "1 << 7")
- '("tiled" "GDK_TOPLEVEL_STATE_TILED" "1 << 8")
- '("top-tiled" "GDK_TOPLEVEL_STATE_TOP_TILED" "1 << 9")
- '("top-resizable" "GDK_TOPLEVEL_STATE_TOP_RESIZABLE" "1 << 10")
- '("right-tiled" "GDK_TOPLEVEL_STATE_RIGHT_TILED" "1 << 11")
- '("right-resizable" "GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE" "1 << 12")
- '("bottom-tiled" "GDK_TOPLEVEL_STATE_BOTTOM_TILED" "1 << 13")
- '("bottom-resizable" "GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE" "1 << 14")
- '("left-tiled" "GDK_TOPLEVEL_STATE_LEFT_TILED" "1 << 15")
- '("left-resizable" "GDK_TOPLEVEL_STATE_LEFT_RESIZABLE" "1 << 16")
+ '("minimized" "GDK_TOPLEVEL_STATE_MINIMIZED" "1 << 0")
+ '("maximized" "GDK_TOPLEVEL_STATE_MAXIMIZED" "1 << 1")
+ '("sticky" "GDK_TOPLEVEL_STATE_STICKY" "1 << 2")
+ '("fullscreen" "GDK_TOPLEVEL_STATE_FULLSCREEN" "1 << 3")
+ '("above" "GDK_TOPLEVEL_STATE_ABOVE" "1 << 4")
+ '("below" "GDK_TOPLEVEL_STATE_BELOW" "1 << 5")
+ '("focused" "GDK_TOPLEVEL_STATE_FOCUSED" "1 << 6")
+ '("tiled" "GDK_TOPLEVEL_STATE_TILED" "1 << 7")
+ '("top-tiled" "GDK_TOPLEVEL_STATE_TOP_TILED" "1 << 8")
+ '("top-resizable" "GDK_TOPLEVEL_STATE_TOP_RESIZABLE" "1 << 9")
+ '("right-tiled" "GDK_TOPLEVEL_STATE_RIGHT_TILED" "1 << 10")
+ '("right-resizable" "GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE" "1 << 11")
+ '("bottom-tiled" "GDK_TOPLEVEL_STATE_BOTTOM_TILED" "1 << 12")
+ '("bottom-resizable" "GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE" "1 << 13")
+ '("left-tiled" "GDK_TOPLEVEL_STATE_LEFT_TILED" "1 << 14")
+ '("left-resizable" "GDK_TOPLEVEL_STATE_LEFT_RESIZABLE" "1 << 15")
)
)
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 53a4078e..0efb24a6 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -105,7 +105,6 @@
'("enter-notify" "GDK_ENTER_NOTIFY")
'("leave-notify" "GDK_LEAVE_NOTIFY")
'("focus-change" "GDK_FOCUS_CHANGE")
- '("configure" "GDK_CONFIGURE")
'("proximity-in" "GDK_PROXIMITY_IN")
'("proximity-out" "GDK_PROXIMITY_OUT")
'("drag-enter" "GDK_DRAG_ENTER")
@@ -318,7 +317,6 @@
(c-name "GdkToplevelState")
(gtype-id "GDK_TYPE_TOPLEVEL_STATE")
(values
- '("withdrawn" "GDK_TOPLEVEL_STATE_WITHDRAWN")
'("minimized" "GDK_TOPLEVEL_STATE_MINIMIZED")
'("maximized" "GDK_TOPLEVEL_STATE_MAXIMIZED")
'("sticky" "GDK_TOPLEVEL_STATE_STICKY")
@@ -2405,21 +2403,6 @@
)
)
-(define-function gdk_configure_event_get_type
- (c-name "gdk_configure_event_get_type")
- (return-type "GType")
-)
-
-(define-function gdk_configure_event_get_size
- (c-name "gdk_configure_event_get_size")
- (return-type "none")
- (parameters
- '("GdkEvent*" "event")
- '("int*" "width")
- '("int*" "height")
- )
-)
-
(define-function gdk_touchpad_event_get_type
(c-name "gdk_touchpad_event_get_type")
(return-type "GType")
@@ -3728,6 +3711,12 @@
(return-type "none")
)
+(define-method request_layout
+ (of-object "GdkSurface")
+ (c-name "gdk_surface_request_layout")
+ (return-type "none")
+)
+
(define-method get_frame_clock
(of-object "GdkSurface")
(c-name "gdk_surface_get_frame_clock")
@@ -3743,18 +3732,6 @@
)
)
-(define-method set_shadow_width
- (of-object "GdkSurface")
- (c-name "gdk_surface_set_shadow_width")
- (return-type "none")
- (parameters
- '("int" "left")
- '("int" "right")
- '("int" "top")
- '("int" "bottom")
- )
-)
-
(define-method create_cairo_context
(of-object "GdkSurface")
(c-name "gdk_surface_create_cairo_context")
@@ -3846,7 +3823,7 @@
(define-method present
(of-object "GdkToplevel")
(c-name "gdk_toplevel_present")
- (return-type "gboolean")
+ (return-type "none")
(parameters
'("GdkToplevelLayout*" "layout")
)
@@ -4132,6 +4109,18 @@
)
)
+(define-method set_shadow_width
+ (of-object "GdkToplevelSize")
+ (c-name "gdk_toplevel_size_set_shadow_width")
+ (return-type "none")
+ (parameters
+ '("int" "left")
+ '("int" "right")
+ '("int" "top")
+ '("int" "bottom")
+ )
+)
+
;; From gdktypes.h
diff --git a/gdk/src/gdk_signals.defs b/gdk/src/gdk_signals.defs
index 3964ced7..7a5223c4 100644
--- a/gdk/src/gdk_signals.defs
+++ b/gdk/src/gdk_signals.defs
@@ -909,12 +909,6 @@
;; From GdkPopup
-(define-signal popup-layout-changed
- (of-object "GdkPopup")
- (return-type "void")
- (flags "Run First")
-)
-
(define-property autohide
(of-object "GdkPopup")
(prop-type "GParamBoolean")
@@ -983,7 +977,7 @@
;; From GdkSurface
-(define-signal size-changed
+(define-signal layout
(of-object "GdkSurface")
(return-type "void")
(flags "Run First")
@@ -1195,7 +1189,7 @@
(readable #t)
(writable #f)
(construct-only #f)
- (default-value "GDK_TOPLEVEL_STATE_WITHDRAWN")
+ (default-value "0")
)
(define-property title
diff --git a/gtk/src/gtk_docs.xml b/gtk/src/gtk_docs.xml
index 778acb17..e32caac9 100644
--- a/gtk/src/gtk_docs.xml
+++ b/gtk/src/gtk_docs.xml
@@ -16751,6 +16751,18 @@ and should not be set by applications.
</description>
</property>
+<property name="GtkWindow:fullscreened">
+<description>
+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.
+
+</description>
+</property>
+
<property name="GtkWindow:icon-name">
<description>
The :icon-name property specifies the name of the themed icon to
@@ -16759,6 +16771,18 @@ use as the window icon. See #GtkIconTheme for more details.
</description>
</property>
+<property name="GtkWindow:maximized">
+<description>
+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.
+
+</description>
+</property>
+
<property name="GtkWindow:mnemonics-visible">
<description>
Whether mnemonics are currently visible in this window.
@@ -51019,23 +51043,6 @@ See gtk_widget_insert_action_group() for how to add actions to widgets.
</return>
</function>
-<function name="gtk_native_check_resize">
-<description>
-Reposition and resize a #GtkNative.
-
-Widgets need to call this function on their attached
-native widgets when they receive a new size allocation.
-
-</description>
-<parameters>
-<parameter name="self">
-<parameter_description> a #GtkNative
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gtk_native_dialog_destroy">
<description>
Destroys a dialog.
@@ -84436,9 +84443,18 @@ gtk_widget_class_install_action().
<function name="gtk_widget_activate">
<description>
For widgets that can be “activated” (buttons, menu items, etc.)
-this function activates them. Activation is what happens when you
-press Enter on a widget during key navigation. If @widget isn't
-activatable, the function returns %FALSE.
+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.
+
+If you wish to handle the activation keybinding yourself, it is
+recommended to use gtk_widget_class_add_shortcut() with an action
+created with gtk_signal_action_new().
+
+If @widget isn't activatable, the function returns %FALSE.
</description>
@@ -85143,6 +85159,24 @@ See also: gtk_accessible_get_accessible_role()
</return>
</function>
+<function name="gtk_widget_class_get_activate_signal">
+<description>
+Retrieves the signal id for the activation signal set using
+gtk_widget_class_set_activate_signal().
+
+
+</description>
+<parameters>
+<parameter name="widget_class">
+<parameter_description> a #GtkWidgetClass
+</parameter_description>
+</parameter>
+</parameters>
+<return> a signal id, or 0 if the widget class does not
+specify an activation signal
+</return>
+</function>
+
<function name="gtk_widget_class_get_css_name">
<description>
Gets the name used by this class for matching in CSS code. See
@@ -85309,6 +85343,52 @@ differently by assistive technologies.
<return></return>
</function>
+<function name="gtk_widget_class_set_activate_signal">
+<description>
+Sets the #GtkWidgetClass.activate_signal field with the
+given @signal_id; the signal will be emitted when calling
+gtk_widget_activate().
+
+The @signal_id must have been registered with g_signal_new()
+or g_signal_newv() before calling this function.
+
+</description>
+<parameters>
+<parameter name="widget_class">
+<parameter_description> a #GtkWidgetClass
+</parameter_description>
+</parameter>
+<parameter name="signal_id">
+<parameter_description> the id for the activate signal
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gtk_widget_class_set_activate_signal_from_name">
+<description>
+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().
+
+The @signal_name of @widget_type must have been registered with
+g_signal_new() or g_signal_newv() before calling this function.
+
+</description>
+<parameters>
+<parameter name="widget_class">
+<parameter_description> a #GtkWidgetClass
+</parameter_description>
+</parameter>
+<parameter name="signal_name">
+<parameter_description> the name of the activate signal of @widget_type
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="gtk_widget_class_set_css_name">
<description>
Sets the name to be used for CSS matching of widgets.
@@ -89040,15 +89120,15 @@ Drop the internal reference GTK holds on toplevel windows.
<function name="gtk_window_fullscreen">
<description>
-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. But normally the window will end up fullscreen. Just
-don’t write code that crashes if not.
+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.
-You can track iconification via the #GdkToplevel:state property
+You can track the result of this operation via the #GdkToplevel:state property,
+or by listening to notifications of the #GtkWindow:fullscreened property.
</description>
<parameters>
@@ -89062,10 +89142,15 @@ You can track iconification via the #GdkToplevel:state property
<function name="gtk_window_fullscreen_on_monitor">
<description>
-Asks to place @window in the fullscreen state. Note that you shouldn't assume
-the window is definitely full screen afterward.
+Asks to place @window in the fullscreen state on the given @monitor.
+
+Note that you shouldn't assume the window is definitely full screen
+afterward, or that the windowing system allows fullscreen windows on
+any given monitor.
-You can track iconification via the #GdkToplevel:state property
+You can track the result of this operation via the #GdkToplevel:state
+property, or by listening to notifications of the #GtkWindow:fullscreened
+property.
</description>
<parameters>
@@ -89149,12 +89234,11 @@ It is only valid until the next call to gtk_window_set_default_icon_name().
<function name="gtk_window_get_default_size">
<description>
-Gets the default size of the window. A value of -1 for the width or
+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.
-
</description>
<parameters>
<parameter name="window">
@@ -89366,77 +89450,6 @@ Gets the value set by gtk_window_set_resizable().
</return>
</function>
-<function name="gtk_window_get_size">
-<description>
-Obtains the current size of @window.
-
-If @window is not visible on screen, this function return the size GTK
-will suggest to the [window manager][gtk-X11-arch] for the initial window
-size (but this is not reliably the same as the size the window manager
-will actually select). See: gtk_window_set_default_size().
-
-Depending on the windowing system and the window manager constraints,
-the size returned by this function may not match the size set using
-gtk_window_resize(); additionally, since gtk_window_resize() may be
-implemented as an asynchronous operation, GTK cannot guarantee in any
-way that this code:
-
-|[<!-- language="C" -->
-GtkWindow *window = GTK_WINDOW (gtk_window_new ());
-int width = 500;
-int height = 300;
-gtk_window_resize (window, width, height);
-
-int new_width, new_height;
-gtk_window_get_size (window, &new_width, &new_height);
-]|
-
-will result in `new_width` and `new_height` matching `width` and
-`height`, respectively.
-
-This function will return the logical size of the #GtkWindow,
-excluding the widgets used in client side decorations; there is,
-however, no guarantee that the result will be completely accurate
-because client side decoration may include widgets that depend on
-the user preferences and that may not be visible at the time you
-call this function.
-
-The dimensions returned by this function are suitable for being
-stored across sessions; use gtk_window_set_default_size() to
-restore them when before showing the window.
-
-|[<!-- language="C" -->
-static void
-on_size_allocate (GtkWidget *widget,
-const GtkAllocation *allocation,
-int baseline)
-{
-int new_width, new_height;
-
-gtk_window_get_size (GTK_WINDOW (widget), &new_width, &new_height);
-
-// ...
-}
-]|
-
-</description>
-<parameters>
-<parameter name="window">
-<parameter_description> a #GtkWindow
-</parameter_description>
-</parameter>
-<parameter name="width">
-<parameter_description> return location for width, or %NULL
-</parameter_description>
-</parameter>
-<parameter name="height">
-<parameter_description> return location for height, or %NULL
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gtk_window_get_title">
<description>
Retrieves the title of the window. See gtk_window_set_title().
@@ -89657,6 +89670,31 @@ differently in an active window from a widget in an inactive window.
</return>
</function>
+<function name="gtk_window_is_fullscreen">
+<description>
+Retrieves the current fullscreen state of @window.
+
+Note that since fullscreening is ultimately handled by the 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().
+
+If the window isn't yet mapped, the value returned will whether the
+initial requested state is fullscreen.
+
+
+</description>
+<parameters>
+<parameter name="window">
+<parameter_description> a #GtkWindow
+</parameter_description>
+</parameter>
+</parameters>
+<return> whether the window has a fullscreen state.
+</return>
+</function>
+
<function name="gtk_window_is_maximized">
<description>
Retrieves the current maximized state of @window.
@@ -89667,6 +89705,9 @@ 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().
+If the window isn't yet mapped, the value returned will whether the
+initial requested state is maximized.
+
</description>
<parameters>
@@ -89698,20 +89739,17 @@ then unref all the widgets afterwards.
<function name="gtk_window_maximize">
<description>
-Asks to maximize @window, so that it becomes full-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. But
-normally the window will end up maximized. Just don’t write code
-that crashes if not.
+Asks to maximize @window, so that it fills the screen.
-It’s permitted to call this function before showing a window,
-in which case the window will be maximized when it appears onscreen
-initially.
+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.
+
+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:is-maximized
+property, or by listening to notifications on the #GtkWindow:maximized
property.
</description>
@@ -89827,56 +89865,6 @@ button or key press event) which triggered this call
<return></return>
</function>
-<function name="gtk_window_resize">
-<description>
-Resizes the window as if the user had done so, obeying geometry
-constraints. The default geometry constraint is that windows may
-not be smaller than their size request; to override this
-constraint, call gtk_widget_set_size_request() to set the window's
-request to a smaller value.
-
-If gtk_window_resize() is called before showing a window for the
-first time, it overrides any default size set with
-gtk_window_set_default_size().
-
-Windows may not be resized smaller than 1 by 1 pixels.
-
-When using client side decorations, GTK will do its best to adjust
-the given size so that the resulting window size matches the
-requested size without the title bar, borders and shadows added for
-the client side decorations, but there is no guarantee that the
-result will be totally accurate because these widgets added for
-client side decorations depend on the theme and may not be realized
-or visible at the time gtk_window_resize() is issued.
-
-If the GtkWindow has a titlebar widget (see gtk_window_set_titlebar()), then
-typically, gtk_window_resize() will compensate for the height of the titlebar
-widget only if the height is known when the resulting GtkWindow configuration
-is issued.
-For example, if new widgets are added after the GtkWindow configuration
-and cause the titlebar widget to grow in height, this will result in a
-window content smaller that specified by gtk_window_resize() and not
-a larger window.
-
-
-</description>
-<parameters>
-<parameter name="window">
-<parameter_description> a #GtkWindow
-</parameter_description>
-</parameter>
-<parameter name="width">
-<parameter_description> width in pixels to resize the window to
-</parameter_description>
-</parameter>
-<parameter name="height">
-<parameter_description> height in pixels to resize the window to
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gtk_window_set_application">
<description>
Sets or unsets the #GtkApplication associated with the window.
@@ -90004,11 +89992,6 @@ 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).
-For some uses, gtk_window_resize() is a more appropriate function.
-gtk_window_resize() changes the current size of the window, rather
-than the size to be used on initial display. gtk_window_resize() always
-affects the window itself, not the geometry widget.
-
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
it had prior to hiding, rather than using the default size.
@@ -90018,7 +90001,7 @@ passing 0 for @width and @height is OK, resulting in a 1x1 default size.
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_size(). Using the window allocation directly will not
+gtk_window_get_default_size(). Using the window allocation directly will not
work in all circumstances and can lead to growing or shrinking windows.
</description>
@@ -90270,8 +90253,9 @@ will then disallow lowering the dialog below the parent.
<function name="gtk_window_set_resizable">
<description>
-Sets whether the user can resize a window. Windows are user resizable
-by default.
+Sets whether the user can resize a window.
+
+Windows are user resizable by default.
</description>
<parameters>
@@ -90400,15 +90384,17 @@ much as the window manager would have done on X.
<function name="gtk_window_unfullscreen">
<description>
-Asks to toggle off the fullscreen state for @window. 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. But normally the window will end up restored to its normal
-state. Just don’t write code that crashes if not.
+Asks to remove the fullscreen state for @window, and return to its previous
+state.
-You can track iconification via the #GdkToplevel:state property
+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
+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.
</description>
<parameters>
@@ -90422,15 +90408,14 @@ You can track iconification via the #GdkToplevel:state property
<function name="gtk_window_unmaximize">
<description>
-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. But normally the window will
-end up unmaximized. Just don’t write code that crashes if not.
+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.
You can track the result of this operation via the #GdkToplevel:state
-property, or by listening to notifications on the #GtkWindow:is-maximized
+property, or by listening to notifications on the #GtkWindow:maximized
property.
</description>
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index e8a7569b..1af5b7b2 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -16176,6 +16176,18 @@
;; From gtknative.h
+(define-method realize
+ (of-object "GtkNative")
+ (c-name "gtk_native_realize")
+ (return-type "none")
+)
+
+(define-method unrealize
+ (of-object "GtkNative")
+ (c-name "gtk_native_unrealize")
+ (return-type "none")
+)
+
(define-function gtk_native_get_for_surface
(c-name "gtk_native_get_for_surface")
(return-type "GtkNative*")
@@ -16184,12 +16196,6 @@
)
)
-(define-method check_resize
- (of-object "GtkNative")
- (c-name "gtk_native_check_resize")
- (return-type "none")
-)
-
(define-method get_surface
(of-object "GtkNative")
(c-name "gtk_native_get_surface")
@@ -17927,6 +17933,12 @@
)
)
+(define-method present
+ (of-object "GtkPopover")
+ (c-name "gtk_popover_present")
+ (return-type "none")
+)
+
;; From gtkpopovermenubar.h
@@ -30018,6 +30030,30 @@
)
)
+(define-method set_activate_signal
+ (of-object "GtkWidgetClass")
+ (c-name "gtk_widget_class_set_activate_signal")
+ (return-type "none")
+ (parameters
+ '("guint" "signal_id")
+ )
+)
+
+(define-method set_activate_signal_from_name
+ (of-object "GtkWidgetClass")
+ (c-name "gtk_widget_class_set_activate_signal_from_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "signal_name")
+ )
+)
+
+(define-method get_activate_signal
+ (of-object "GtkWidgetClass")
+ (c-name "gtk_widget_class_get_activate_signal")
+ (return-type "guint")
+)
+
(define-method mnemonic_activate
(of-object "GtkWidget")
(c-name "gtk_widget_mnemonic_activate")
@@ -31699,26 +31735,6 @@
)
)
-(define-method resize
- (of-object "GtkWindow")
- (c-name "gtk_window_resize")
- (return-type "none")
- (parameters
- '("int" "width")
- '("int" "height")
- )
-)
-
-(define-method get_size
- (of-object "GtkWindow")
- (c-name "gtk_window_get_size")
- (return-type "none")
- (parameters
- '("int*" "width")
- '("int*" "height")
- )
-)
-
(define-method get_group
(of-object "GtkWindow")
(c-name "gtk_window_get_group")
@@ -31782,6 +31798,12 @@
(return-type "gboolean")
)
+(define-method is_fullscreen
+ (of-object "GtkWindow")
+ (c-name "gtk_window_is_fullscreen")
+ (return-type "gboolean")
+)
+
(define-method destroy
(of-object "GtkWindow")
(c-name "gtk_window_destroy")
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index 9570ac6f..036fdb6a 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -13501,21 +13501,21 @@
(define-property default-width
(of-object "GtkWindow")
(prop-type "GParamInt")
- (docs "The default width of the window, used when initially showing the window")
+ (docs "The default width of the window")
(readable #t)
(writable #t)
(construct-only #f)
- (default-value "-1")
+ (default-value "0")
)
(define-property default-height
(of-object "GtkWindow")
(prop-type "GParamInt")
- (docs "The default height of the window, used when initially showing the window")
+ (docs "The default height of the window")
(readable #t)
(writable #t)
(construct-only #f)
- (default-value "-1")
+ (default-value "0")
)
(define-property destroy-with-parent
@@ -13662,12 +13662,22 @@
(default-value "TRUE")
)
-(define-property is-maximized
+(define-property maximized
(of-object "GtkWindow")
(prop-type "GParamBoolean")
(docs "Whether the window is maximized")
(readable #t)
- (writable #f)
+ (writable #t)
+ (construct-only #f)
+ (default-value "FALSE")
+)
+
+(define-property fullscreened
+ (of-object "GtkWindow")
+ (prop-type "GParamBoolean")
+ (docs "Whether the window is fullscreen")
+ (readable #t)
+ (writable #t)
(construct-only #f)
(default-value "FALSE")
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]