[gtkmm] Gdk, Gtk: Regenerate docs.xml and .defs files



commit 4328027fcef80c0d07d6b8a5a39712d3f22a9197
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sun May 27 15:40:06 2018 +0200

    Gdk, Gtk: Regenerate docs.xml and .defs files
    
    and update gtk/src/gtk_signals.defs.patch.
    
    * gtk/src/gtk_docs_override.xml:
    Add a substitute_enumerator_name element.
    * tools/extra_defs_gen/generate_defs_gtk.cc:
    Add GTK_TYPE_EVENT_CONTROLLER_[KEY|MOTION|SCROLL].

 gdk/src/gdk_docs.xml                      |  81 ++----
 gdk/src/gdk_methods.defs                  |  18 --
 gdk/src/gdk_signals.defs                  |   4 +-
 gtk/src/gtk_docs.xml                      | 419 +++++++++++++++++++++---------
 gtk/src/gtk_docs_override.xml             |   1 +
 gtk/src/gtk_methods.defs                  |  59 ++---
 gtk/src/gtk_signals.defs                  | 147 +++++++++--
 gtk/src/gtk_signals.defs.patch            |  45 +---
 tools/extra_defs_gen/generate_defs_gtk.cc |   3 +
 9 files changed, 482 insertions(+), 295 deletions(-)
---
diff --git a/gdk/src/gdk_docs.xml b/gdk/src/gdk_docs.xml
index 0e0fd08e..70941fa5 100644
--- a/gdk/src/gdk_docs.xml
+++ b/gdk/src/gdk_docs.xml
@@ -833,6 +833,13 @@ context.
 </description>
 </property>
 
+<property name="GdkDragContext:device">
+<description>
+The #GdkDevice that is performing the drag.
+
+</description>
+</property>
+
 <property name="GdkDragContext:display">
 <description>
 The #GdkDisplay that the drag context belongs to.
@@ -1996,8 +2003,6 @@ Emitted when the contents of the @paintable change.
 Examples for such an event would be videos changing to the next frame or
 the icon theme for an icon changing.
 
-Since: 4.0
-
 </description>
 <parameters>
 <parameter name="paintable">
@@ -2018,8 +2023,6 @@ has changed.
 Examples for such an event would be a paintable displaying the contents of a toplevel
 surface being resized.
 
-Since: 4.0
-
 </description>
 <parameters>
 <parameter name="paintable">
@@ -3229,7 +3232,7 @@ gdk_draw_context_end_frame() is called.
 
 </description>
 <parameters>
-<parameter name="context">
+<parameter name="self">
 <parameter_description> a #GdkCairoContext that is currently drawing
 </parameter_description>
 </parameter>
@@ -7326,25 +7329,6 @@ all subsequent calls will be ignored.
 <return></return>
 </function>
 
-<function name="gdk_drag_drop_succeeded">
-<description>
-Returns whether the dropped data has been successfully
-transferred. This function is intended to be used while
-handling a %GDK_DROP_FINISHED event, its return value is
-meaningless at other times.
-
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
-</parameter_description>
-</parameter>
-</parameters>
-<return> %TRUE if the drop was successful.
-</return>
-</function>
-
 <function name="gdk_drag_status">
 <description>
 Selects one of the actions offered by the drag source.
@@ -7533,6 +7517,8 @@ This function is called by the drag destination.
 
 <function name="gdk_drop_read_async">
 <description>
+Asynchronously read the dropped data from a DND context
+in a format that complies with one of the mime types.
 
 </description>
 <parameters>
@@ -7541,23 +7527,23 @@ This function is called by the drag destination.
 </parameter_description>
 </parameter>
 <parameter name="mime_types">
-<parameter_description>
+<parameter_description> pointer to an array of mime types
 </parameter_description>
 </parameter>
 <parameter name="io_priority">
-<parameter_description>
+<parameter_description> the io priority for the read operation
 </parameter_description>
 </parameter>
 <parameter name="cancellable">
-<parameter_description>
+<parameter_description> optional #GCancellable object, %NULL to ignore
 </parameter_description>
 </parameter>
 <parameter name="callback">
-<parameter_description>
+<parameter_description> a #GAsyncReadyCallback to call when the request is satisfied
 </parameter_description>
 </parameter>
 <parameter name="user_data">
-<parameter_description>
+<parameter_description> the data to pass to @callback
 </parameter_description>
 </parameter>
 </parameters>
@@ -7566,6 +7552,8 @@ This function is called by the drag destination.
 
 <function name="gdk_drop_read_finish">
 <description>
+Finishes an async drop read operation, see gdk_drop_read_async().
+
 
 </description>
 <parameters>
@@ -7574,15 +7562,15 @@ This function is called by the drag destination.
 </parameter_description>
 </parameter>
 <parameter name="out_mime_type">
-<parameter_description>
+<parameter_description> return location for the used mime type
 </parameter_description>
 </parameter>
 <parameter name="result">
-<parameter_description>
+<parameter_description> a #GAsyncResult
 </parameter_description>
 </parameter>
 <parameter name="error">
-<parameter_description>
+<parameter_description> location to store error information on failure, or %NULL
 </parameter_description>
 </parameter>
 </parameters>
@@ -7590,31 +7578,6 @@ This function is called by the drag destination.
 </return>
 </function>
 
-<function name="gdk_drop_reply">
-<description>
-Accepts or rejects a drop.
-
-This function is called by the drag destination in response
-to a drop initiated by the drag source.
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
-</parameter_description>
-</parameter>
-<parameter name="accepted">
-<parameter_description> %TRUE if the drop is accepted
-</parameter_description>
-</parameter>
-<parameter name="time_">
-<parameter_description> the timestamp for this operation
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
 <function name="gdk_event_copy">
 <description>
 Copies a #GdkEvent, copying or incrementing the reference count of the
@@ -10570,8 +10533,6 @@ Snapshots the given paintable with the given @width and @height at the
 current (0,0) offset of the @snapshot. If @width and @height are not larger
 than zero, this function will do nothing.
 
-Since: 4.0
-
 </description>
 <parameters>
 <parameter name="paintable">
@@ -12809,7 +12770,7 @@ you will have to fill it completely yourself.
 </parameter_description>
 </parameter>
 </parameters>
-<return> A newly-created #GdkPixbuf with a reference count of 1, or 
+<return> A newly-created #GdkPixbuf with a reference count of 1, or
 %NULL if not enough memory could be allocated for the image buffer.
 </return>
 </function>
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index bad35450..0f88bc4d 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -2264,16 +2264,6 @@
   )
 )
 
-(define-function gdk_drop_reply
-  (c-name "gdk_drop_reply")
-  (return-type "none")
-  (parameters
-    '("GdkDragContext*" "context")
-    '("gboolean" "accepted")
-    '("guint32" "time_")
-  )
-)
-
 (define-function gdk_drop_finish
   (c-name "gdk_drop_finish")
   (return-type "none")
@@ -2321,14 +2311,6 @@
   )
 )
 
-(define-function gdk_drag_drop_succeeded
-  (c-name "gdk_drag_drop_succeeded")
-  (return-type "gboolean")
-  (parameters
-    '("GdkDragContext*" "context")
-  )
-)
-
 (define-function gdk_drag_drop_done
   (c-name "gdk_drag_drop_done")
   (return-type "none")
diff --git a/gdk/src/gdk_signals.defs b/gdk/src/gdk_signals.defs
index ad73d855..29572c2b 100644
--- a/gdk/src/gdk_signals.defs
+++ b/gdk/src/gdk_signals.defs
@@ -147,8 +147,8 @@
   (prop-type "GParamBoxed")
   (docs "The possible formats for data")
   (readable #t)
-  (writable #f)
-  (construct-only #f)
+  (writable #t)
+  (construct-only #t)
 )
 
 ;; From GdkCursor
diff --git a/gtk/src/gtk_docs.xml b/gtk/src/gtk_docs.xml
index 95b82b31..7c9ffbd9 100644
--- a/gtk/src/gtk_docs.xml
+++ b/gtk/src/gtk_docs.xml
@@ -11980,6 +11980,10 @@ New values may be added to this enumeration.
 
 </description>
 <parameters>
+<parameter name="GTK_STYLE_CONTEXT_PRINT_NONE">
+<parameter_description> Default value.
+</parameter_description>
+</parameter>
 <parameter name="GTK_STYLE_CONTEXT_PRINT_RECURSE">
 <parameter_description> Print the entire tree of
 CSS nodes starting at the style context's node
@@ -14654,11 +14658,8 @@ else
 
 <signal name="GtkWidget::event">
 <description>
-The GTK+ main loop will emit three signals for each GDK event delivered
-to a widget: one generic ::event signal, another, more specific,
-signal that matches the type of event delivered (e.g.
-#GtkWidget::key-press-event) and finally a generic
-#GtkWidget::event-after signal.
+The GTK+ main loop will emit this signal for each GDK event delivered
+to a widget.
 
 
 </description>
@@ -14674,9 +14675,7 @@ signal that matches the type of event delivered (e.g.
 </parameters>
 <return> %TRUE to stop other handlers from being invoked for the event
 and to cancel the emission of the second specific ::event signal.
-%FALSE to propagate the event further and to allow the emission of
-the second signal. The ::event-after signal is emitted regardless of
-the return value.
+%FALSE to propagate the event further.
 </return>
 </signal>
 
@@ -14775,59 +14774,6 @@ if the widget was previously unanchored
 <return></return>
 </signal>
 
-<signal name="GtkWidget::key-press-event">
-<description>
-The ::key-press-event signal is emitted when a key is pressed. The signal
-emission will reoccur at the key-repeat rate when the key is kept pressed.
-
-To receive this signal, the #GdkSurface associated to the widget needs
-to enable the #GDK_KEY_PRESS_MASK mask.
-
-This signal will be sent to the grab widget if there is one.
-
-
-</description>
-<parameters>
-<parameter name="widget">
-<parameter_description> the object which received the signal
-</parameter_description>
-</parameter>
-<parameter name="event">
-<parameter_description> the #GdkEventKey which triggered this signal.
-</parameter_description>
-</parameter>
-</parameters>
-<return> %TRUE to stop other handlers from being invoked for the event.
-%FALSE to propagate the event further.
-</return>
-</signal>
-
-<signal name="GtkWidget::key-release-event">
-<description>
-The ::key-release-event signal is emitted when a key is released.
-
-To receive this signal, the #GdkSurface associated to the widget needs
-to enable the #GDK_KEY_RELEASE_MASK mask.
-
-This signal will be sent to the grab widget if there is one.
-
-
-</description>
-<parameters>
-<parameter name="widget">
-<parameter_description> the object which received the signal
-</parameter_description>
-</parameter>
-<parameter name="event">
-<parameter_description> the #GdkEventKey which triggered this signal.
-</parameter_description>
-</parameter>
-</parameters>
-<return> %TRUE to stop other handlers from being invoked for the event.
-%FALSE to propagate the event further.
-</return>
-</signal>
-
 <signal name="GtkWidget::keynav-failed">
 <description>
 Gets emitted if keyboard navigation fails.
@@ -32119,16 +32065,11 @@ Since: 3.94
 
 <function name="gtk_event_controller_motion_new">
 <description>
-Creates a new event controller that will handle motion events
-for the given @widget.
+Creates a new event controller that will handle motion events.
 
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a new #GtkEventControllerMotion
 </return>
@@ -32168,16 +32109,11 @@ Gets the flags conditioning the scroll controller behavior.
 
 <function name="gtk_event_controller_scroll_new">
 <description>
-Creates a new event controller that will handle scroll events
-for the given @widget.
+Creates a new event controller that will handle scroll events.
 
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 <parameter name="flags">
 <parameter_description> behavior flags
 </parameter_description>
@@ -36089,10 +36025,6 @@ Returns a newly created #GtkGesture that recognizes drags.
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a newly created #GtkGestureDrag
 </return>
@@ -36304,6 +36236,9 @@ through g_list_free()
 Adds @gesture to the same group than @group_gesture. Gestures
 are by default isolated in their own groups.
 
+Both gestures must have been added to the same widget before they
+can be grouped. 
+
 When gestures are grouped, the state of #GdkEventSequences
 is kept in sync for all of those, so calling gtk_gesture_set_sequence_state(),
 on one will transfer the same value to the others.
@@ -36412,10 +36347,6 @@ Returns a newly created #GtkGesture that recognizes long presses.
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a newly created #GtkGestureLongPress
 </return>
@@ -36452,10 +36383,6 @@ presses.
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a newly created #GtkGestureMultiPress
 </return>
@@ -36510,10 +36437,6 @@ Returns a newly created #GtkGesture that recognizes pan gestures.
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 <parameter name="orientation">
 <parameter_description> expected orientation
 </parameter_description>
@@ -36567,10 +36490,6 @@ rotation gestures.
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a newly created #GtkGestureRotate
 </return>
@@ -36927,10 +36846,6 @@ Since: 3.94
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a newly created stylus gesture
 
@@ -36970,10 +36885,6 @@ Returns a newly created #GtkGesture that recognizes swipes.
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a newly created #GtkGestureSwipe
 </return>
@@ -37019,10 +36930,6 @@ in/out gestures (usually known as pinch/zoom).
 
 </description>
 <parameters>
-<parameter name="widget">
-<parameter_description> a #GtkWidget
-</parameter_description>
-</parameter>
 </parameters>
 <return> a newly created #GtkGestureZoom
 </return>
@@ -45409,6 +45316,22 @@ when it regains control.
 <return></return>
 </function>
 
+<function name="gtk_medai_stream_get_ended">
+<description>
+Returns whether the streams playback is finished.
+
+Return: %TRUE if playback is finished
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_media_controls_get_media_stream">
 <description>
 Gets the media stream managed by @controls or %NULL if none.
@@ -45442,6 +45365,24 @@ manage or %NULL for none.
 </return>
 </function>
 
+<function name="gtk_media_controls_set_media_stream">
+<description>
+Sets the stream that is controlled by @controls.
+
+</description>
+<parameters>
+<parameter name="controls">
+<parameter_description> a #GtkMediaControls widget
+</parameter_description>
+</parameter>
+<parameter name="stream">
+<parameter_description>  a #GtkMediaStream, or %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_media_file_clear">
 <description>
 Resets the media file to be empty. 
@@ -45838,6 +45779,38 @@ See gtk_media_stream_set_muted() for details.
 </return>
 </function>
 
+<function name="gtk_media_stream_get_playing">
+<description>
+Return whether the stream is currently playing.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the stream is playing
+</return>
+</function>
+
+<function name="gtk_media_stream_get_timestamp">
+<description>
+Returns the current presentation timestamp in microseconds.
+
+Return: the timestamp in microseconds
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_media_stream_get_volume">
 <description>
 Returns the volume of the audio for the stream.
@@ -45855,6 +45828,55 @@ See gtk_media_stream_set_volume() for details.
 </return>
 </function>
 
+<function name="gtk_media_stream_has_audio">
+<description>
+Returns whether the stream has audio.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the stream has audio
+</return>
+</function>
+
+<function name="gtk_media_stream_has_video">
+<description>
+Returns whether the stream has video.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the stream has video
+</return>
+</function>
+
+<function name="gtk_media_stream_is_prepared">
+<description>
+Returns whether the stream has finished initializing and existence of
+audio and video is known.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the stream is prepared
+</return>
+</function>
+
 <function name="gtk_media_stream_is_seekable">
 <description>
 Checks if a stream may be seekable.
@@ -45895,6 +45917,36 @@ Checks if there is currently a seek operation going on.
 </return>
 </function>
 
+<function name="gtk_media_stream_pause">
+<description>
+Pauses playback of the stream. If the stream
+is not playing, do nothing.
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gtk_media_stream_play">
+<description>
+Starts playing the stream. If the stream
+is in error or already playing, do nothing.
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_media_stream_prepared">
 <description>
 Called by #GtkMediaStream implementations to advertise the stream
@@ -46074,6 +46126,24 @@ but it will not have an audible effect.
 <return></return>
 </function>
 
+<function name="gtk_media_stream_set_playing">
+<description>
+Starts or pauses playback of the stream.
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GtkMediaStream
+</parameter_description>
+</parameter>
+<parameter name="playing">
+<parameter_description> whether to start or pause playback
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_media_stream_set_volume">
 <description>
 Sets the volume of the audio stream. This function call will work even if
@@ -49787,20 +49857,19 @@ child property for @widget.
 Creates a new #GtkPadController that will associate events from @pad to
 actions. A %NULL pad may be provided so the controller manages all pad devices
 generically, it is discouraged to mix #GtkPadController objects with %NULL
-and non-%NULL @pad argument on the same @window, as execution order is not
-guaranteed.
+and non-%NULL @pad argument on the same toplevel window, as execution order
+is not guaranteed.
 
 The #GtkPadController is created with no mapped actions. In order to map pad
 events to actions, use gtk_pad_controller_set_action_entries() or
 gtk_pad_controller_set_action().
 
+Be aware that pad events will only be delivered to #GtkWindows, so adding a pad
+controller to any other type of widget will not have an effect.
+
 
 </description>
 <parameters>
-<parameter name="window">
-<parameter_description> a #GtkWindow
-</parameter_description>
-</parameter>
 <parameter name="group">
 <parameter_description> #GActionGroup to trigger actions from
 </parameter_description>
@@ -61250,6 +61319,40 @@ current node.
 <return></return>
 </function>
 
+<function name="gtk_snapshot_append_linear_gradient">
+<description>
+Appends a linear gradient node with the given stops to @snapshot.
+
+</description>
+<parameters>
+<parameter name="snapshot">
+<parameter_description> a #GtkSnapshot
+</parameter_description>
+</parameter>
+<parameter name="bounds">
+<parameter_description> the rectangle to render the linear gradient into
+</parameter_description>
+</parameter>
+<parameter name="start_point">
+<parameter_description> the point at which the linear gradient will begin
+</parameter_description>
+</parameter>
+<parameter name="end_point">
+<parameter_description> the point at which the linear gradient will finish
+</parameter_description>
+</parameter>
+<parameter name="stops">
+<parameter_description> a pointer to an array of #GskColorStop defining the gradient
+</parameter_description>
+</parameter>
+<parameter name="n_stops">
+<parameter_description> the number of elements in @stops
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_snapshot_append_node">
 <description>
 Appends @node to the current render node of @snapshot,
@@ -61271,6 +61374,40 @@ initial node.
 <return></return>
 </function>
 
+<function name="gtk_snapshot_append_repeating_linear_gradient">
+<description>
+Appends a repeating linear gradient node with the given stops to @snapshot.
+
+</description>
+<parameters>
+<parameter name="snapshot">
+<parameter_description> a #GtkSnapshot
+</parameter_description>
+</parameter>
+<parameter name="bounds">
+<parameter_description> the rectangle to render the linear gradient into
+</parameter_description>
+</parameter>
+<parameter name="start_point">
+<parameter_description> the point at which the linear gradient will begin
+</parameter_description>
+</parameter>
+<parameter name="end_point">
+<parameter_description> the point at which the linear gradient will finish
+</parameter_description>
+</parameter>
+<parameter name="stops">
+<parameter_description> a pointer to an array of #GskColorStop defining the gradient
+</parameter_description>
+</parameter>
+<parameter name="n_stops">
+<parameter_description> the number of elements in @stops
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_snapshot_append_texture">
 <description>
 Creates a new render node drawing the @texture into the given @bounds and appends it
@@ -61383,7 +61520,7 @@ Appends a translation by (@x, @y) to the current transformation.
 </description>
 <parameters>
 <parameter name="snapshot">
-<parameter_description> a $GtkSnapshot
+<parameter_description> a #GtkSnapshot
 </parameter_description>
 </parameter>
 <parameter name="x">
@@ -61957,8 +62094,8 @@ button should use, or %NULL
 </parameter_description>
 </parameter>
 <parameter name="climb_rate">
-<parameter_description> specifies how much the spin button changes when an arrow
-is clicked on
+<parameter_description> specifies by how much the rate of change in the value will
+accelerate if you continue to hold down an up/down button or arrow key
 </parameter_description>
 </parameter>
 <parameter name="digits">
@@ -69659,7 +69796,7 @@ visible, in case blinking is disabled).
 
 This function should be called in response to user input
 (e.g. from derived classes that override the textview's
-#GtkWidget::key-press-event handler).
+event handlers).
 
 </description>
 <parameters>
@@ -78607,6 +78744,27 @@ gtk_menu_item_set_accel_path() instead.
 <return></return>
 </function>
 
+<function name="gtk_widget_add_controller">
+<description>
+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.
+
+</description>
+<parameters>
+<parameter name="widget">
+<parameter_description> a #GtkWidget
+</parameter_description>
+</parameter>
+<parameter name="controller">
+<parameter_description> a #GtkEventController that hasn't been
+added to a widget yet
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_widget_add_mnemonic_label">
 <description>
 Adds a widget to the list of mnemonic labels for
@@ -78674,7 +78832,8 @@ have to worry about when a #GdkFrameClock is assigned to a widget.
 </parameter>
 </parameters>
 <return> an id for the connection of this callback. Remove the callback
-by passing it to gtk_widget_remove_tick_callback()
+by passing the id returned from this function to
+gtk_widget_remove_tick_callback()
 </return>
 </function>
 
@@ -82406,6 +82565,28 @@ gtk_widget_add_accelerator().
 </return>
 </function>
 
+<function name="gtk_widget_remove_controller">
+<description>
+Removes @controller from @widget, so that it doesn't process
+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.
+
+</description>
+<parameters>
+<parameter name="widget">
+<parameter_description> a #GtkWidget
+</parameter_description>
+</parameter>
+<parameter name="controller">
+<parameter_description> a #GtkEventController
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_widget_remove_mnemonic_label">
 <description>
 Removes a widget from the list of mnemonic labels for
@@ -82613,7 +82794,7 @@ never should be called by an application.
 <parameter_description> a #GtkWidget
 </parameter_description>
 </parameter>
-<parameter name="is_visible">
+<parameter name="child_visible">
 <parameter_description> if %TRUE, @widget should be mapped along with its parent.
 </parameter_description>
 </parameter>
@@ -83485,9 +83666,7 @@ 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. It is a
-convenient and optimized way of getting the same effect as calling
-gtk_widget_snapshot() on the child directly.
+@snapshot, and deciding whether the child needs to be snapshot.
 
 </description>
 <parameters>
diff --git a/gtk/src/gtk_docs_override.xml b/gtk/src/gtk_docs_override.xml
index 61246284..06c01670 100644
--- a/gtk/src/gtk_docs_override.xml
+++ b/gtk/src/gtk_docs_override.xml
@@ -122,6 +122,7 @@
 <substitute_enumerator_name from_prefix="GTK_TREE_VIEW_GRID_LINES_" to_prefix="Gtk::TreeView::GridLines::" />
 <substitute_enumerator_name from_prefix="GTK_SORT_" to_prefix="Gtk::SortType::" />
 <substitute_enumerator_name from_prefix="GTK_FONT_CHOOSER_LEVEL_" to_prefix="Gtk::FontChooser::Level::" />
+<substitute_enumerator_name from_prefix="GTK_EVENT_CONTROLLER_SCROLL_" 
to_prefix="Gtk::EventControllerScroll::Flags::" />
 <!-- GdkWindowWindowClass is not wrapped in gtkmm. Don't substitute its enumerator names. -->
 <substitute_enumerator_name from="GDK_INPUT_ONLY" to="GDK_INPUT_ONLY" />
 <substitute_enumerator_name from="GDK_INPUT_OUTPUT" to="GDK_INPUT_OUTPUT" />
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 434f8803..851c6f62 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -9495,9 +9495,6 @@
   (c-name "gtk_event_controller_key_new")
   (is-constructor-of "GtkEventControllerKey")
   (return-type "GtkEventController*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 (define-method set_im_context
@@ -9543,9 +9540,6 @@
   (c-name "gtk_event_controller_motion_new")
   (is-constructor-of "GtkEventControllerMotion")
   (return-type "GtkEventController*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 
@@ -9562,7 +9556,6 @@
   (is-constructor-of "GtkEventControllerScroll")
   (return-type "GtkEventController*")
   (parameters
-    '("GtkWidget*" "widget")
     '("GtkEventControllerScrollFlags" "flags")
   )
 )
@@ -11133,9 +11126,6 @@
   (c-name "gtk_gesture_drag_new")
   (is-constructor-of "GtkGestureDrag")
   (return-type "GtkGesture*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 (define-method get_start_point
@@ -11316,9 +11306,6 @@
   (c-name "gtk_gesture_long_press_new")
   (is-constructor-of "GtkGestureLongPress")
   (return-type "GtkGesture*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 
@@ -11334,9 +11321,6 @@
   (c-name "gtk_gesture_multi_press_new")
   (is-constructor-of "GtkGestureMultiPress")
   (return-type "GtkGesture*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 (define-method set_area
@@ -11371,7 +11355,6 @@
   (is-constructor-of "GtkGesturePan")
   (return-type "GtkGesture*")
   (parameters
-    '("GtkWidget*" "widget")
     '("GtkOrientation" "orientation")
   )
 )
@@ -11404,9 +11387,6 @@
   (c-name "gtk_gesture_rotate_new")
   (is-constructor-of "GtkGestureRotate")
   (return-type "GtkGesture*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 (define-method get_angle_delta
@@ -11494,9 +11474,6 @@
   (c-name "gtk_gesture_stylus_new")
   (is-constructor-of "GtkGestureStylus")
   (return-type "GtkGesture*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 (define-method get_axis
@@ -11548,9 +11525,6 @@
   (c-name "gtk_gesture_swipe_new")
   (is-constructor-of "GtkGestureSwipe")
   (return-type "GtkGesture*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 (define-method get_velocity
@@ -11576,9 +11550,6 @@
   (c-name "gtk_gesture_zoom_new")
   (is-constructor-of "GtkGestureZoom")
   (return-type "GtkGesture*")
-  (parameters
-    '("GtkWidget*" "widget")
-  )
 )
 
 (define-method get_scale_delta
@@ -16990,7 +16961,6 @@
   (is-constructor-of "GtkPadController")
   (return-type "GtkPadController*")
   (parameters
-    '("GtkWindow*" "window")
     '("GActionGroup*" "group")
     '("GdkDevice*" "pad")
   )
@@ -21372,15 +21342,6 @@
   (return-type "GtkAdjustment*")
 )
 
-(define-method get_wheel_delta
-  (of-object "GtkScrollbar")
-  (c-name "gtk_scrollbar_get_wheel_delta")
-  (return-type "double")
-  (parameters
-    '("const-GdkEventScroll*" "event")
-  )
-)
-
 
 
 ;; From gtkscrolledwindow.h
@@ -29610,7 +29571,7 @@
   (c-name "gtk_widget_set_child_visible")
   (return-type "none")
   (parameters
-    '("gboolean" "is_visible")
+    '("gboolean" "child_visible")
   )
 )
 
@@ -30062,6 +30023,24 @@
   )
 )
 
+(define-method add_controller
+  (of-object "GtkWidget")
+  (c-name "gtk_widget_add_controller")
+  (return-type "none")
+  (parameters
+    '("GtkEventController*" "controller")
+  )
+)
+
+(define-method remove_controller
+  (of-object "GtkWidget")
+  (c-name "gtk_widget_remove_controller")
+  (return-type "none")
+  (parameters
+    '("GtkEventController*" "controller")
+  )
+)
+
 (define-method reset_style
   (of-object "GtkWidget")
   (c-name "gtk_widget_reset_style")
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index c48f909b..3638fbb7 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -3413,8 +3413,8 @@
   (prop-type "GParamObject")
   (docs "Widget the gesture relates to")
   (readable #t)
-  (writable #t)
-  (construct-only #t)
+  (writable #f)
+  (construct-only #f)
 )
 
 (define-property propagation-phase
@@ -3427,6 +3427,129 @@
   (default-value "GTK_PHASE_BUBBLE")
 )
 
+;; From GtkEventControllerKey
+
+(define-signal key-pressed
+  (of-object "GtkEventControllerKey")
+  (return-type "gboolean")
+  (flags "Run Last")
+  (parameters
+    '("guint" "p0")
+    '("guint" "p1")
+    '("GdkModifierType" "p2")
+  )
+)
+
+(define-signal key-released
+  (of-object "GtkEventControllerKey")
+  (return-type "void")
+  (flags "Run Last")
+  (parameters
+    '("guint" "p0")
+    '("guint" "p1")
+    '("GdkModifierType" "p2")
+  )
+)
+
+(define-signal modifiers
+  (of-object "GtkEventControllerKey")
+  (return-type "gboolean")
+  (flags "Run Last")
+  (parameters
+    '("GdkModifierType" "p0")
+  )
+)
+
+(define-signal im-update
+  (of-object "GtkEventControllerKey")
+  (return-type "void")
+  (flags "Run Last")
+)
+
+(define-signal focus-in
+  (of-object "GtkEventControllerKey")
+  (return-type "void")
+  (flags "Run Last")
+)
+
+(define-signal focus-out
+  (of-object "GtkEventControllerKey")
+  (return-type "void")
+  (flags "Run Last")
+)
+
+;; From GtkEventControllerMotion
+
+(define-signal enter
+  (of-object "GtkEventControllerMotion")
+  (return-type "void")
+  (flags "Run First")
+  (parameters
+    '("gdouble" "p0")
+    '("gdouble" "p1")
+  )
+)
+
+(define-signal leave
+  (of-object "GtkEventControllerMotion")
+  (return-type "void")
+  (flags "Run First")
+)
+
+(define-signal motion
+  (of-object "GtkEventControllerMotion")
+  (return-type "void")
+  (flags "Run First")
+  (parameters
+    '("gdouble" "p0")
+    '("gdouble" "p1")
+  )
+)
+
+;; From GtkEventControllerScroll
+
+(define-signal scroll-begin
+  (of-object "GtkEventControllerScroll")
+  (return-type "void")
+  (flags "Run First")
+)
+
+(define-signal scroll
+  (of-object "GtkEventControllerScroll")
+  (return-type "void")
+  (flags "Run First")
+  (parameters
+    '("gdouble" "p0")
+    '("gdouble" "p1")
+  )
+)
+
+(define-signal scroll-end
+  (of-object "GtkEventControllerScroll")
+  (return-type "void")
+  (flags "Run First")
+)
+
+(define-signal decelerate
+  (of-object "GtkEventControllerScroll")
+  (return-type "void")
+  (flags "Run First")
+  (parameters
+    '("gdouble" "p0")
+    '("gdouble" "p1")
+  )
+)
+
+(define-property flags
+  (of-object "GtkEventControllerScroll")
+  (prop-type "GParamFlags")
+  (docs "Flags")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+  (default-value "GTK_EVENT_CONTROLLER_SCROLL_NONE")
+)
+
 ;; From GtkExpander
 
 (define-signal activate
@@ -8513,7 +8636,7 @@
 (define-property climb-rate
   (of-object "GtkSpinButton")
   (prop-type "GParamDouble")
-  (docs "The acceleration rate when you hold down a button")
+  (docs "The acceleration rate when you hold down a button or key")
   (readable #t)
   (writable #t)
   (construct-only #f)
@@ -11100,24 +11223,6 @@
   )
 )
 
-(define-signal key-press-event
-  (of-object "GtkWidget")
-  (return-type "gboolean")
-  (flags "Run Last")
-  (parameters
-    '("GdkEventKey*" "p0")
-  )
-)
-
-(define-signal key-release-event
-  (of-object "GtkWidget")
-  (return-type "gboolean")
-  (flags "Run Last")
-  (parameters
-    '("GdkEventKey*" "p0")
-  )
-)
-
 (define-signal drag-leave
   (of-object "GtkWidget")
   (return-type "void")
diff --git a/gtk/src/gtk_signals.defs.patch b/gtk/src/gtk_signals.defs.patch
index 776dc70b..990ec4dc 100644
--- a/gtk/src/gtk_signals.defs.patch
+++ b/gtk/src/gtk_signals.defs.patch
@@ -1,5 +1,5 @@
---- ./../../gtk/src/gtk_signals.defs.orig      2018-04-11 18:14:10.215329071 +0200
-+++ ./../../gtk/src/gtk_signals.defs   2018-04-11 18:27:32.206901498 +0200
+--- ./../../gtk/src/gtk_signals.defs.orig      2018-05-25 16:10:10.692348483 +0200
++++ ./../../gtk/src/gtk_signals.defs   2018-05-25 16:10:10.748353999 +0200
 @@ -2267,11 +2267,11 @@
  (define-signal color-activated
    (of-object "GtkColorChooser")
@@ -63,7 +63,7 @@
  
  (define-signal preedit-changed
    (of-object "GtkEntry")
-@@ -5718,11 +5718,11 @@
+@@ -5851,11 +5851,11 @@
  (define-signal toggle-size-request
    (of-object "GtkMenuItem")
    (return-type "void")
@@ -76,7 +76,7 @@
  
  (define-signal toggle-size-allocate
    (of-object "GtkMenuItem")
-@@ -6677,11 +6677,11 @@
+@@ -6810,11 +6810,11 @@
    )
  )
  
@@ -89,7 +89,7 @@
  
  (define-signal update-custom-widget
    (of-object "GtkPrintOperation")
-@@ -7291,11 +7291,11 @@
+@@ -7424,11 +7424,11 @@
  
  ;; From GtkScale
  
@@ -102,7 +102,7 @@
      '("gdouble" "p0")
    )
  )
-@@ -8473,11 +8473,11 @@
+@@ -8606,11 +8606,11 @@
  (define-signal input
    (of-object "GtkSpinButton")
    (return-type "gint")
@@ -115,7 +115,7 @@
  
  (define-signal output
    (of-object "GtkSpinButton")
-@@ -9061,11 +9061,11 @@
+@@ -9194,11 +9194,11 @@
  (define-signal mark-set
    (of-object "GtkTextBuffer")
    (return-type "void")
@@ -128,7 +128,7 @@
  )
  
  (define-signal mark-deleted
-@@ -9081,23 +9081,23 @@
+@@ -9214,23 +9214,23 @@
    (of-object "GtkTextBuffer")
    (return-type "void")
    (flags "Run Last")
@@ -156,7 +156,7 @@
  
  (define-signal begin-user-action
    (of-object "GtkTextBuffer")
-@@ -10355,11 +10355,11 @@
+@@ -10488,11 +10488,11 @@
    (return-type "void")
    (flags "Run First")
    (parameters
@@ -169,7 +169,7 @@
  
  ;; From GtkTreeSelection
  
-@@ -10979,11 +10979,11 @@
+@@ -11112,11 +11112,11 @@
  (define-signal size-allocate
    (of-object "GtkWidget")
    (return-type "void")
@@ -182,7 +182,7 @@
  )
  
  (define-signal state-flags-changed
-@@ -11032,11 +11032,11 @@
+@@ -11165,11 +11165,11 @@
    (of-object "GtkWidget")
    (return-type "void")
    (flags "Run First, No Recurse, No Hooks")
@@ -195,26 +195,3 @@
  
  (define-signal mnemonic-activate
    (of-object "GtkWidget")
-@@ -11093,20 +11093,20 @@
- (define-signal key-press-event
-   (of-object "GtkWidget")
-   (return-type "gboolean")
-   (flags "Run Last")
-   (parameters
--    '("GdkEvent*" "p0")
-+    '("GdkEventKey*" "p0")
-   )
- )
- 
- (define-signal key-release-event
-   (of-object "GtkWidget")
-   (return-type "gboolean")
-   (flags "Run Last")
-   (parameters
--    '("GdkEvent*" "p0")
-+    '("GdkEventKey*" "p0")
-   )
- )
- 
- (define-signal drag-leave
-   (of-object "GtkWidget")
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 94120321..ad9cc380 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -95,6 +95,9 @@ int main(int /* argc */, char** /* argv */)
             << get_defs( GTK_TYPE_ENTRY_COMPLETION )
             << get_defs( GTK_TYPE_ENTRY_BUFFER )
             << get_defs( GTK_TYPE_EVENT_CONTROLLER )
+            << get_defs( GTK_TYPE_EVENT_CONTROLLER_KEY )
+            << get_defs( GTK_TYPE_EVENT_CONTROLLER_MOTION )
+            << get_defs( GTK_TYPE_EVENT_CONTROLLER_SCROLL )
             << get_defs( GTK_TYPE_EXPANDER )
             << get_defs( GTK_TYPE_FILE_FILTER )
             << get_defs( GTK_TYPE_FILE_CHOOSER )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]