[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: Thu, 28 Jun 2018 10:45:46 +0000 (UTC)
commit 87a2b8dcaa882ecd208d5976ae091292aa7c6a75
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Thu Jun 28 12:39:34 2018 +0200
Gdk, Gtk: Regenerate docs.xml and .defs files
and make manual modifications:
* gdk/src/gdk_docs_override.xml: Add and remove some
substitute_enumerator_name elements.
* gdk/src/gdk_extra_objects.defs: Add GdkDrop.
* gdk/src/gdk_methods.defs.patch: New file
* gtk/src/gtk_docs_override.xml: Update entries for some drag-and-drop signals.
* gtk/src/gtk_signals.defs.patch: Updated.
* tools/extra_defs_gen/generate_defs_gdk.cc: Add get_defs(GDK_TYPE_DROP).
* tools/gen_scripts/gdk_generate_methods.sh: Patch gtk_methods.defs.
gdk/src/gdk_docs.xml | 653 ++++++++++++++++++------------
gdk/src/gdk_docs_override.xml | 6 +-
gdk/src/gdk_enums.defs | 48 +--
gdk/src/gdk_extra_objects.defs | 6 +
gdk/src/gdk_methods.defs | 287 +++++++------
gdk/src/gdk_methods.defs.patch | 22 +
gdk/src/gdk_signals.defs | 60 ++-
gtk/src/gtk_docs.xml | 300 ++++----------
gtk/src/gtk_docs_override.xml | 24 +-
gtk/src/gtk_methods.defs | 44 +-
gtk/src/gtk_signals.defs | 34 +-
gtk/src/gtk_signals.defs.patch | 46 +--
tools/extra_defs_gen/generate_defs_gdk.cc | 1 +
tools/gen_scripts/gdk_generate_methods.sh | 41 +-
14 files changed, 823 insertions(+), 749 deletions(-)
---
diff --git a/gdk/src/gdk_docs.xml b/gdk/src/gdk_docs.xml
index 70941fa5..9d576c14 100644
--- a/gdk/src/gdk_docs.xml
+++ b/gdk/src/gdk_docs.xml
@@ -17,9 +17,6 @@ horizontally to fit.
In general, when multiple flags are set, flipping should take precedence over
sliding, which should take precedence over resizing.
-Since: 3.22
-Stability: Unstable
-
</description>
<parameters>
<parameter name="GDK_ANCHOR_FLIP_X">
@@ -65,8 +62,6 @@ Stability: Unstable
<description>
Flags describing the current capabilities of a device/tool.
-Since: 3.22
-
</description>
<parameters>
<parameter name="GDK_AXIS_FLAG_X">
@@ -149,15 +144,15 @@ X and Y are present as axes depends on the GDK backend.
</parameter_description>
</parameter>
<parameter name="GDK_AXIS_DISTANCE">
-<parameter_description> the axis is used for pen/tablet distance information. (Since: 3.22)
+<parameter_description> the axis is used for pen/tablet distance information
</parameter_description>
</parameter>
<parameter name="GDK_AXIS_ROTATION">
-<parameter_description> the axis is used for pen rotation information. (Since: 3.22)
+<parameter_description> the axis is used for pen rotation information
</parameter_description>
</parameter>
<parameter name="GDK_AXIS_SLIDER">
-<parameter_description> the axis is used for pen slider information. (Since: 3.22)
+<parameter_description> the axis is used for pen slider information
</parameter_description>
</parameter>
<parameter name="GDK_AXIS_LAST">
@@ -470,8 +465,6 @@ A pad feature.
Indicates the specific type of tool being used being a tablet. Such as an
airbrush, pencil, etc.
-Since: 3.22
-
</description>
<parameters>
<parameter name="GDK_DEVICE_TOOL_TYPE_UNKNOWN">
@@ -702,10 +695,6 @@ should do with the dropped data.
</description>
<parameters>
-<parameter name="GDK_ACTION_DEFAULT">
-<parameter_description> Means nothing, and should not be used.
-</parameter_description>
-</parameter>
<parameter name="GDK_ACTION_COPY">
<parameter_description> Copy the data.
</parameter_description>
@@ -720,11 +709,6 @@ it from the source using the DELETE target of the X selection protocol.
useful if source and destination agree on what it means.
</parameter_description>
</parameter>
-<parameter name="GDK_ACTION_PRIVATE">
-<parameter_description> Special action which tells the source that the
-destination will do something that the source doesn’t understand.
-</parameter_description>
-</parameter>
<parameter name="GDK_ACTION_ASK">
<parameter_description> Ask the user what to do with the data.
</parameter_description>
@@ -736,8 +720,6 @@ destination will do something that the source doesn’t understand.
<description>
Used in #GdkDragContext to the reason of a cancelled DND operation.
-Since: 3.20
-
</description>
<parameters>
<parameter name="GDK_DRAG_CANCEL_NO_TARGET">
@@ -817,10 +799,6 @@ The drag and drop operation was performed on an accepting client.
<parameter_description> The object on which the signal is emitted
</parameter_description>
</parameter>
-<parameter name="time">
-<parameter_description> the time at which the drop happened.
-</parameter_description>
-</parameter>
</parameters>
<return></return>
</signal>
@@ -868,6 +846,48 @@ The #GdkSurface the gl context is bound to.
</description>
</property>
+<property name="GdkDrop:actions">
+<description>
+The possible actions for this drop
+
+</description>
+</property>
+
+<property name="GdkDrop:device">
+<description>
+The #GdkDevice performing the drop
+
+</description>
+</property>
+
+<property name="GdkDrop:display">
+<description>
+The #GdkDisplay that the drop belongs to.
+
+</description>
+</property>
+
+<property name="GdkDrop:drag">
+<description>
+The #GdkDrag that initiated this drop
+
+</description>
+</property>
+
+<property name="GdkDrop:formats">
+<description>
+The possible formats that the drop can provide its data in.
+
+</description>
+</property>
+
+<property name="GdkDrop:surface">
+<description>
+The #GdkSurface the drop happens on
+
+</description>
+</property>
+
<enum name="GdkEventMask">
<description>
A set of bit-flags to indicate which events a surface is to receive.
@@ -877,11 +897,6 @@ above.
See the [input handling overview][chap-input-handling] for details of
[event masks][event-masks] and [event propagation][event-propagation].
-Since GTK 3.8, motion events are already compressed by default, independent
-of this mechanism. This compression can be disabled with
-gdk_surface_set_event_compression(). See the documentation of that function
-for details.
-
If %GDK_TOUCH_MASK is enabled, the surface will receive touch events
from touch-enabled devices. Those will come as sequences of #GdkEventTouch
with type %GDK_TOUCH_UPDATE, enclosed by two events with
@@ -960,8 +975,7 @@ events, so different sequences may be distinguished.
</parameter_description>
</parameter>
<parameter name="GDK_SUBSTRUCTURE_MASK">
-<parameter_description> receive events about surface configuration changes of
-child surfaces
+<parameter_description> receive events about surface configuration changes of child surfaces
</parameter_description>
</parameter>
<parameter name="GDK_SCROLL_MASK">
@@ -969,16 +983,16 @@ child surfaces
</parameter_description>
</parameter>
<parameter name="GDK_TOUCH_MASK">
-<parameter_description> receive touch events. Since 3.4
+<parameter_description> receive touch events
</parameter_description>
</parameter>
<parameter name="GDK_SMOOTH_SCROLL_MASK">
-<parameter_description> receive smooth scrolling events. Since 3.4
- @GDK_TOUCHPAD_GESTURE_MASK: receive touchpad gesture events. Since 3.18
+<parameter_description> receive smooth scrolling events
+ @GDK_TOUCHPAD_GESTURE_MASK: receive touchpad gesture events
</parameter_description>
</parameter>
<parameter name="GDK_TABLET_PAD_MASK">
-<parameter_description> receive tablet pad events. Since 3.22
+<parameter_description> receive tablet pad events
</parameter_description>
</parameter>
<parameter name="GDK_ALL_EVENTS_MASK">
@@ -1282,8 +1296,6 @@ interface.
phases that can be requested. The elements of the enumeration
correspond to the signals of #GdkFrameClock.
-Since: 3.8
-
</description>
<parameters>
<parameter name="GDK_FRAME_CLOCK_PHASE_NONE">
@@ -1326,8 +1338,6 @@ Since: 3.8
Indicates which monitor (in a multi-head setup) a surface should span over
when in fullscreen mode.
-Since: 3.8
-
</description>
<parameters>
<parameter name="GDK_FULLSCREEN_ON_CURRENT_MONITOR">
@@ -1352,8 +1362,6 @@ The #GdkGLContext that this context is sharing data with, or %NULL
<description>
Error enumeration for #GdkGLContext.
-Since: 3.16
-
</description>
<parameters>
<parameter name="GDK_GL_ERROR_NOT_AVAILABLE">
@@ -1369,11 +1377,11 @@ Since: 3.16
</parameter_description>
</parameter>
<parameter name="GDK_GL_ERROR_COMPILATION_FAILED">
-<parameter_description> The shader compilation failed (available since 3.22)
+<parameter_description> The shader compilation failed
</parameter_description>
</parameter>
<parameter name="GDK_GL_ERROR_LINK_FAILED">
-<parameter_description> The shader linking failed (available since 3.22)
+<parameter_description> The shader linking failed
</parameter_description>
</parameter>
</parameters>
@@ -1430,7 +1438,7 @@ viewable.
</parameter_description>
</parameter>
<parameter name="GDK_GRAB_FAILED">
-<parameter_description> the grab failed for some other reason. Since 3.16
+<parameter_description> the grab failed for some other reason
</parameter_description>
</parameter>
</parameters>
@@ -1570,15 +1578,13 @@ added in 3.22.
<enum name="GdkInterpType">
<description>
This enumeration describes the different interpolation modes that
-can be used with the scaling functions. @GDK_INTERP_NEAREST is
-the fastest scaling method, but has horrible quality when
-scaling down. @GDK_INTERP_BILINEAR is the best choice if you
+can be used with the scaling functions. @GDK_INTERP_NEAREST is
+the fastest scaling method, but has horrible quality when
+scaling down. @GDK_INTERP_BILINEAR is the best choice if you
aren't sure what to choose, it has a good speed/quality balance.
-<note>
-Cubic filtering is missing from the list; hyperbolic
+**Note**: Cubic filtering is missing from the list; hyperbolic
interpolation is just as fast and results in higher quality.
-</note>
</description>
<parameters>
@@ -1610,6 +1616,9 @@ reconstruction function. It is derived from the hyperbolic filters in
Wolberg's "Digital Image Warping", and is formally defined as the
hyperbolic-filter sampling the ideal hyperbolic-filter interpolated
image (the filter is designed to be idempotent for 1:1 pixel mapping).
+**Deprecated**: this interpolation filter is deprecated, as in reality
+it has a lower quality than the @GDK_INTERP_BILINEAR filter
+(Since: 2.38)
</parameter_description>
</parameter>
</parameters>
@@ -1729,8 +1738,6 @@ invoking menu shortcuts (accelerators), whereas on Apple computers
it’s the Command key (which correspond to %GDK_CONTROL_MASK and
%GDK_MOD2_MASK, respectively).
-Since: 3.4
-
</description>
<parameters>
<parameter name="GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR">
@@ -1784,7 +1791,7 @@ Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
-Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped
+GDK recognizes which of the Meta, Super or Hyper keys are mapped
to Mod2 - Mod5, and indicates this by setting %GDK_SUPER_MASK,
%GDK_HYPER_MASK or %GDK_META_MASK in the state field of key events.
@@ -1911,15 +1918,15 @@ mapping of the X server which key is interpreted as this modifier).
</parameter_description>
</parameter>
<parameter name="GDK_SUPER_MASK">
-<parameter_description> the Super modifier. Since 2.10
+<parameter_description> the Super modifier
</parameter_description>
</parameter>
<parameter name="GDK_HYPER_MASK">
-<parameter_description> the Hyper modifier. Since 2.10
+<parameter_description> the Hyper modifier
</parameter_description>
</parameter>
<parameter name="GDK_META_MASK">
-<parameter_description> the Meta modifier. Since 2.10
+<parameter_description> the Meta modifier
</parameter_description>
</parameter>
<parameter name="GDK_MODIFIER_RESERVED_29_MASK">
@@ -2443,7 +2450,7 @@ Specifies the direction for scroll events.
</parameter>
<parameter name="GDK_SCROLL_SMOOTH">
<parameter_description> the scrolling is determined by the delta values
-in scroll events. See gdk_event_get_scroll_deltas(). Since: 3.4
+in scroll events. See gdk_event_get_scroll_deltas()
</parameter_description>
</parameter>
</parameters>
@@ -2540,8 +2547,6 @@ to this @seat.
<description>
Flags describing the seat capabilities.
-Since: 3.20
-
</description>
<parameters>
<parameter name="GDK_SEAT_CAPABILITY_NONE">
@@ -2584,8 +2589,6 @@ Since: 3.20
This enumeration describes how the red, green and blue components
of physical pixels on an output device are laid out.
-Since: 3.22
-
</description>
<parameters>
<parameter name="GDK_SUBPIXEL_LAYOUT_UNKNOWN">
@@ -2809,40 +2812,39 @@ decorations.
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_TILED">
-<parameter_description> the surface is in a tiled state, Since 3.10. Since 3.91.2, this
-is deprecated in favor of per-edge information.
+<parameter_description> the surface is in a tiled state. Deprecated
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_TOP_TILED">
-<parameter_description> whether the top edge is tiled, Since 3.91.2
+<parameter_description> whether the top edge is tiled
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_TOP_RESIZABLE">
-<parameter_description> whether the top edge is resizable, Since 3.91.2
+<parameter_description> whether the top edge is resizable
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_RIGHT_TILED">
-<parameter_description> whether the right edge is tiled, Since 3.91.2
+<parameter_description> whether the right edge is tiled
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_RIGHT_RESIZABLE">
-<parameter_description> whether the right edge is resizable, Since 3.91.2
+<parameter_description> whether the right edge is resizable
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_BOTTOM_TILED">
-<parameter_description> whether the bottom edge is tiled, Since 3.91.2
+<parameter_description> whether the bottom edge is tiled
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_BOTTOM_RESIZABLE">
-<parameter_description> whether the bottom edge is resizable, Since 3.91.2
+<parameter_description> whether the bottom edge is resizable
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_LEFT_TILED">
-<parameter_description> whether the left edge is tiled, Since 3.91.2
+<parameter_description> whether the left edge is tiled
</parameter_description>
</parameter>
<parameter name="GDK_SURFACE_STATE_LEFT_RESIZABLE">
-<parameter_description> whether the left edge is resizable, Since 3.91.2
+<parameter_description> whether the left edge is resizable
</parameter_description>
</parameter>
</parameters>
@@ -2867,14 +2869,10 @@ Describes the kind of surface.
#GtkMenu)
</parameter_description>
</parameter>
-<parameter name="GDK_SURFACE_FOREIGN">
-<parameter_description> foreign surface (see gdk_surface_foreign_new())
-</parameter_description>
-</parameter>
<parameter name="GDK_SURFACE_SUBSURFACE">
<parameter_description> subsurface; This surface is visually
tied to a toplevel, and is moved/stacked with it. Currently this window
-type is only implemented in Wayland. Since 3.14
+type is only implemented in Wayland
</parameter_description>
</parameter>
</parameters>
@@ -3032,8 +3030,6 @@ for example in response to a change of the surface size.
<description>
Error enumeration for #GdkVulkanContext.
-Since: 3.90
-
</description>
<parameters>
<parameter name="GDK_VULKAN_ERROR_UNSUPPORTED">
@@ -6753,6 +6749,23 @@ in @value, %FALSE otherwise
</return>
</function>
+<function name="gdk_display_get_startup_notification_id">
+<description>
+Gets the startup notification ID for a Wayland display, or %NULL
+if no ID has been defined.
+
+
+</description>
+<parameters>
+<parameter name="display">
+<parameter_description> a #GdkDisplay
+</parameter_description>
+</parameter>
+</parameters>
+<return> the startup notification ID for @display, or %NULL
+</return>
+</function>
+
<function name="gdk_display_has_pending">
<description>
Returns whether the display has events that are waiting
@@ -7089,6 +7102,26 @@ handled synchronously, this function will do nothing.
<return></return>
</function>
+<function name="gdk_drag_action_is_unique">
+<description>
+Checks if @action represents a single action or if it
+includes multiple flags that can be selected from.
+
+When @action is 0 - ie no action was given, %TRUE
+is returned.
+
+
+</description>
+<parameters>
+<parameter name="action">
+<parameter_description> a #GdkDragAction
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if exactly one action was given
+</return>
+</function>
+
<function name="gdk_drag_begin">
<description>
Starts a drag and creates a new drag context for it.
@@ -7145,22 +7178,6 @@ gdk_drag_context_get_suggested_action() returns %GDK_ACTION_ASK.
</return>
</function>
-<function name="gdk_drag_context_get_dest_surface">
-<description>
-Returns the destination surface for the DND operation.
-
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
-</parameter_description>
-</parameter>
-</parameters>
-<return> a #GdkSurface
-</return>
-</function>
-
<function name="gdk_drag_context_get_device">
<description>
Returns the #GdkDevice associated to the drag context.
@@ -7246,22 +7263,6 @@ Determines the action chosen by the drag destination.
</return>
</function>
-<function name="gdk_drag_context_get_source_surface">
-<description>
-Returns the #GdkSurface where the DND operation started.
-
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
-</parameter_description>
-</parameter>
-</parameters>
-<return> a #GdkSurface
-</return>
-</function>
-
<function name="gdk_drag_context_get_suggested_action">
<description>
Determines the suggested drag action of the context.
@@ -7329,32 +7330,6 @@ all subsequent calls will be ignored.
<return></return>
</function>
-<function name="gdk_drag_status">
-<description>
-Selects one of the actions offered by the drag source.
-
-This function is called by the drag destination in response to
-gdk_drag_motion() called by the drag source.
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
-</parameter_description>
-</parameter>
-<parameter name="action">
-<parameter_description> the selected action which will be taken when a drop happens,
-or 0 to indicate that a drop will not be accepted
-</parameter_description>
-</parameter>
-<parameter name="time_">
-<parameter_description> the timestamp for this operation
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gdk_draw_context_begin_frame">
<description>
Indicates that you are beginning the process of redrawing @region
@@ -7495,39 +7470,146 @@ In this situation, drawing commands may be effecting the contents of a
<description>
Ends the drag operation after a drop.
-This function is called by the drag destination.
+The @action must be a single action selected from the actions
+available via gdk_drop_get_actions().
</description>
<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
+<parameter name="self">
+<parameter_description> a #GdkDrop
</parameter_description>
</parameter>
-<parameter name="success">
-<parameter_description> %TRUE if the data was successfully received
+<parameter name="action">
+<parameter_description> the action performed by the destination or 0 if the drop
+failed
</parameter_description>
</parameter>
-<parameter name="time_">
-<parameter_description> the timestamp for this operation
+</parameters>
+<return></return>
+</function>
+
+<function name="gdk_drop_get_actions">
+<description>
+Returns the possible actions for this #GdkDrop. If this value
+contains multiple actions - ie gdk_drag_action_is_unique()
+returns %FALSE for the result - gdk_drag_finish() must choose
+the action to use when accepting the drop.
+
+This value may change over the lifetime of the #GdkDrop both
+as a response to source side actions as well as to calls to
+gdk_drop_status() or gdk_drag_finish(). The source side will
+not change this value anymore once a drop has started.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
</parameter_description>
</parameter>
</parameters>
-<return></return>
+<return> The possible #GdkDragActions
+</return>
+</function>
+
+<function name="gdk_drop_get_device">
+<description>
+Returns the #GdkDevice performing the drop.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+</parameters>
+<return> The #GdkDevice performing the drop.
+</return>
+</function>
+
+<function name="gdk_drop_get_display">
+<description>
+Gets the #GdkDisplay that @self was created for.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+</parameters>
+<return> a #GdkDisplay
+</return>
+</function>
+
+<function name="gdk_drop_get_drag">
+<description>
+If this is an in-app drag-and-drop operation, returns the #GdkDrag
+that corresponds to this drop.
+
+If it is not, %NULL is returned.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+</parameters>
+<return> the corresponding #GdkDrag
+</return>
+</function>
+
+<function name="gdk_drop_get_formats">
+<description>
+Returns the #GdkContentFormats that the drop offers the data
+to be read in.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+</parameters>
+<return> The possible #GdkContentFormats
+</return>
+</function>
+
+<function name="gdk_drop_get_surface">
+<description>
+Returns the #GdkSurface performing the drop.
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+</parameters>
+<return> The #GdkSurface performing the drop.
+</return>
</function>
<function name="gdk_drop_read_async">
<description>
-Asynchronously read the dropped data from a DND context
+Asynchronously read the dropped data from a #GdkDrop
in a format that complies with one of the mime types.
</description>
<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
+<parameter name="self">
+<parameter_description> a #GdkDrop
</parameter_description>
</parameter>
<parameter name="mime_types">
-<parameter_description> pointer to an array of mime types
+<parameter_description>
+pointer to an array of mime types
</parameter_description>
</parameter>
<parameter name="io_priority">
@@ -7535,11 +7617,13 @@ in a format that complies with one of the mime types.
</parameter_description>
</parameter>
<parameter name="cancellable">
-<parameter_description> optional #GCancellable object, %NULL to ignore
+<parameter_description> optional #GCancellable object,
+%NULL to ignore
</parameter_description>
</parameter>
<parameter name="callback">
-<parameter_description> a #GAsyncReadyCallback to call when the request is satisfied
+<parameter_description> a #GAsyncReadyCallback to call when
+the request is satisfied
</parameter_description>
</parameter>
<parameter name="user_data">
@@ -7557,8 +7641,8 @@ Finishes an async drop read operation, see gdk_drop_read_async().
</description>
<parameters>
-<parameter name="context">
-<parameter_description> a #GdkDragContext
+<parameter name="self">
+<parameter_description> a #GdkDrop
</parameter_description>
</parameter>
<parameter name="out_mime_type">
@@ -7578,39 +7662,177 @@ Finishes an async drop read operation, see gdk_drop_read_async().
</return>
</function>
-<function name="gdk_event_copy">
+<function name="gdk_drop_read_text_async">
<description>
-Copies a #GdkEvent, copying or incrementing the reference count of the
-resources associated with it (e.g. #GdkSurface’s and strings).
+Asynchronously request the drag operation's contents converted to a string.
+When the operation is finished @callback will be called. You can then
+call gdk_drop_read_text_finish() to get the result.
+This is a simple wrapper around gdk_drop_read_value_async(). Use
+that function or gdk_drop_read_async() directly if you need more
+control over the operation.
</description>
<parameters>
-<parameter name="event">
-<parameter_description> a #GdkEvent
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> optional #GCancellable object, %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> callback to call when the request is satisfied
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> the data to pass to callback function
</parameter_description>
</parameter>
</parameters>
-<return> a copy of @event. Free with g_object_unref()
+<return></return>
+</function>
+
+<function name="gdk_drop_read_text_finish">
+<description>
+Finishes an asynchronous read started with
+gdk_drop_read_text_async().
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+<parameter name="result">
+<parameter_description> a #GAsyncResult
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> a #GError location to store the error occurring, or %NULL to
+ignore.
+</parameter_description>
+</parameter>
+</parameters>
+<return> a new string or %NULL on error.
</return>
</function>
-<function name="gdk_event_free">
+<function name="gdk_drop_read_value_async">
<description>
-Frees a #GdkEvent, freeing or decrementing any resources associated with it.
+Asynchronously request the drag operation's contents converted to the given
+@type. When the operation is finished @callback will be called.
+You can then call gdk_drop_read_value_finish() to get the resulting
+#GValue.
-This is equivalent to g_object_unref().
+For local drag'n'drop operations that are available in the given #GType, the
+value will be copied directly. Otherwise, GDK will try to use
+gdk_content_deserialize_async() to convert the data.
</description>
<parameters>
-<parameter name="event">
-<parameter_description> a #GdkEvent.
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+<parameter name="type">
+<parameter_description> a #GType to read
+</parameter_description>
+</parameter>
+<parameter name="io_priority">
+<parameter_description> the [I/O priority][io-priority]
+of the request.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> optional #GCancellable object, %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> callback to call when the request is satisfied
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> the data to pass to callback function
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gdk_drop_read_value_finish">
+<description>
+Finishes an async drop read started with
+gdk_drop_read_value_async().
+
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+<parameter name="result">
+<parameter_description> a #GAsyncResult
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> a #GError location to store the error occurring, or %NULL to
+ignore.
+</parameter_description>
+</parameter>
+</parameters>
+<return> a #GValue containing the result.
+</return>
+</function>
+
+<function name="gdk_drop_status">
+<description>
+Selects all actions that are potentially supported by the destination.
+
+When calling this function, do not restrict the passed in actions to
+the ones provided by gdk_drop_get_actions(). Those actions may
+change in the future, even depending on the actions you provide here.
+
+This function should be called by drag destinations in response to
+%GDK_DRAG_ENTER or %GDK_DRAG_MOTION events. If the destination does
+not yet know the exact actions it supports, it should set any possible
+actions first and then later call this function again.
+
+</description>
+<parameters>
+<parameter name="self">
+<parameter_description> a #GdkDrop
+</parameter_description>
+</parameter>
+<parameter name="actions">
+<parameter_description> Supported actions of the destination, or 0 to indicate
+that a drop will not be accepted
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>
+<function name="gdk_event_copy">
+<description>
+Copies a #GdkEvent, copying or incrementing the reference count of the
+resources associated with it (e.g. #GdkSurface’s and strings).
+
+
+</description>
+<parameters>
+<parameter name="event">
+<parameter_description> a #GdkEvent
+</parameter_description>
+</parameter>
+</parameters>
+<return> a copy of @event. Free with g_object_unref()
+</return>
+</function>
+
<function name="gdk_event_get_axes">
<description>
Extracts all axis values from an event.
@@ -7820,9 +8042,9 @@ Retrieves the #GdkDisplay associated to the @event.
</return>
</function>
-<function name="gdk_event_get_drag_context">
+<function name="gdk_event_get_drop">
<description>
-Gets the drag context from a DND event.
+Gets the #GdkDrop from a DND event.
</description>
@@ -7831,12 +8053,8 @@ Gets the drag context from a DND event.
<parameter_description> a #GdkEvent
</parameter_description>
</parameter>
-<parameter name="context">
-<parameter_description> return location for the drag context
-</parameter_description>
-</parameter>
</parameters>
-<return> %TRUE on success, otherwise %FALSE
+<return> the drop
</return>
</function>
@@ -8002,7 +8220,6 @@ Extracts the keyval from an event.
Retrieves the history of the @event motion, as a list of time and
coordinates.
-Since: 3.94
</description>
<parameters>
@@ -8013,7 +8230,6 @@ Since: 3.94
</parameters>
<return> a list
of time and coordinates
-
</return>
</function>
@@ -15746,26 +15962,6 @@ cursor of the surface
</return>
</function>
-<function name="gdk_surface_get_device_events">
-<description>
-Returns the event mask for @surface corresponding to an specific device.
-
-
-</description>
-<parameters>
-<parameter name="surface">
-<parameter_description> a #GdkSurface.
-</parameter_description>
-</parameter>
-<parameter name="device">
-<parameter_description> a #GdkDevice.
-</parameter_description>
-</parameter>
-</parameters>
-<return> device event mask for @surface
-</return>
-</function>
-
<function name="gdk_surface_get_device_position">
<description>
Obtains the current device position and modifier state.
@@ -15856,23 +16052,6 @@ Gets the #GdkDisplay associated with a #GdkSurface.
</return>
</function>
-<function name="gdk_surface_get_events">
-<description>
-Gets the event mask for @surface for all master input devices. See
-gdk_surface_set_events().
-
-
-</description>
-<parameters>
-<parameter name="surface">
-<parameter_description> a #GdkSurface
-</parameter_description>
-</parameter>
-</parameters>
-<return> event mask for @surface
-</return>
-</function>
-
<function name="gdk_surface_get_focus_on_map">
<description>
Determines whether or not the desktop environment should be hinted that the
@@ -16712,8 +16891,6 @@ it to move off-screen. For example, %GDK_ANCHOR_FLIP_X will replace
Connect to the #GdkSurface::moved-to-rect signal to find out how it was
actually positioned.
-Stability: Private
-
</description>
<parameters>
<parameter name="surface">
@@ -17090,58 +17267,6 @@ use this default.
<return></return>
</function>
-<function name="gdk_surface_set_device_events">
-<description>
-Sets the event mask for a given device (Normally a floating device, not
-attached to any visible pointer) to @surface. For example, an event mask
-including #GDK_BUTTON_PRESS_MASK means the surface should report button
-press events. The event mask is the bitwise OR of values from the
-#GdkEventMask enumeration.
-
-See the [input handling overview][event-masks] for details.
-
-</description>
-<parameters>
-<parameter name="surface">
-<parameter_description> a #GdkSurface
-</parameter_description>
-</parameter>
-<parameter name="device">
-<parameter_description> #GdkDevice to enable events for.
-</parameter_description>
-</parameter>
-<parameter name="event_mask">
-<parameter_description> event mask for @surface
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
-<function name="gdk_surface_set_events">
-<description>
-The event mask for a surface determines which events will be reported
-for that surface from all master input devices. For example, an event mask
-including #GDK_BUTTON_PRESS_MASK means the surface should report button
-press events. The event mask is the bitwise OR of values from the
-#GdkEventMask enumeration.
-
-See the [input handling overview][event-masks] for details.
-
-</description>
-<parameters>
-<parameter name="surface">
-<parameter_description> a #GdkSurface
-</parameter_description>
-</parameter>
-<parameter name="event_mask">
-<parameter_description> event mask for @surface
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gdk_surface_set_focus_on_map">
<description>
Setting @focus_on_map to %FALSE hints the desktop environment that the
diff --git a/gdk/src/gdk_docs_override.xml b/gdk/src/gdk_docs_override.xml
index 82d4b31a..1dd7779c 100644
--- a/gdk/src/gdk_docs_override.xml
+++ b/gdk/src/gdk_docs_override.xml
@@ -52,12 +52,10 @@
<substitute_enumerator_name from="GDK_MOTION_NOTIFY" to="Gdk::Event::Type::MOTION_NOTIFY" />
<substitute_enumerator_name from="GDK_POINTER_MOTION_HINT_MASK"
to="Gdk::EventMask::POINTER_MOTION_HINT_MASK" />
<substitute_enumerator_name from="GDK_TOUCH_MASK" to="Gdk::EventMask::TOUCH_MASK" />
-<substitute_enumerator_name from="GDK_2BUTTON_PRESS" to="Gdk::Event::Type::2BUTTON_PRESS" />
-<substitute_enumerator_name from="GDK_3BUTTON_PRESS" to="Gdk::Event::Type::3BUTTON_PRESS" />
-<substitute_enumerator_name from="GDK_DOUBLE_BUTTON_PRESS" to="Gdk::Event::Type::DOUBLE_BUTTON_PRESS" />
-<substitute_enumerator_name from="GDK_TRIPLE_BUTTON_PRESS" to="Gdk::Event::Type::TRIPLE_BUTTON_PRESS" />
<substitute_enumerator_name from="GDK_BUTTON_PRESS" to="Gdk::Event::Type::BUTTON_PRESS" />
<substitute_enumerator_name from="GDK_SURFACE_STATE" to="Gdk::Event::Type::SURFACE_STATE" />
+<substitute_enumerator_name from="GDK_DRAG_ENTER" to="Gdk::Event::Type::DRAG_ENTER" />
+<substitute_enumerator_name from="GDK_DRAG_MOTION" to="Gdk::Event::Type::DRAG_MOTION" />
<substitute_enumerator_name from="GDK_BUTTON_PRESS_MASK" to="Gdk::EventMask::BUTTON_PRESS_MASK" />
<substitute_enumerator_name from="GDK_SUPER_MASK" to="Gdk::ModifierType::SUPER_MASK" />
<substitute_enumerator_name from="GDK_HYPER_MASK" to="Gdk::ModifierType::HYPER_MASK" />
diff --git a/gdk/src/gdk_enums.defs b/gdk/src/gdk_enums.defs
index 56ea7b80..3cefd194 100644
--- a/gdk/src/gdk_enums.defs
+++ b/gdk/src/gdk_enums.defs
@@ -115,30 +115,6 @@
;; From gdkdnd.h
-;; Original typedef:
-;; typedef enum
-;; {
-;; GDK_ACTION_DEFAULT = 1 << 0,
-;; GDK_ACTION_COPY = 1 << 1,
-;; GDK_ACTION_MOVE = 1 << 2,
-;; GDK_ACTION_LINK = 1 << 3,
-;; GDK_ACTION_PRIVATE = 1 << 4,
-;; GDK_ACTION_ASK = 1 << 5
-;; } GdkDragAction;
-
-(define-flags-extended DragAction
- (in-module "Gdk")
- (c-name "GdkDragAction")
- (values
- '("default" "GDK_ACTION_DEFAULT" "1 << 0")
- '("copy" "GDK_ACTION_COPY" "1 << 1")
- '("move" "GDK_ACTION_MOVE" "1 << 2")
- '("link" "GDK_ACTION_LINK" "1 << 3")
- '("private" "GDK_ACTION_PRIVATE" "1 << 4")
- '("ask" "GDK_ACTION_ASK" "1 << 5")
- )
-)
-
;; Original typedef:
;; typedef enum {
;; GDK_DRAG_CANCEL_NO_TARGET,
@@ -476,7 +452,6 @@
;; GDK_SURFACE_TOPLEVEL,
;; GDK_SURFACE_CHILD,
;; GDK_SURFACE_TEMP,
-;; GDK_SURFACE_FOREIGN,
;; GDK_SURFACE_SUBSURFACE
;; } GdkSurfaceType;
@@ -487,8 +462,7 @@
'("toplevel" "GDK_SURFACE_TOPLEVEL" "0")
'("child" "GDK_SURFACE_CHILD" "1")
'("temp" "GDK_SURFACE_TEMP" "2")
- '("foreign" "GDK_SURFACE_FOREIGN" "3")
- '("subsurface" "GDK_SURFACE_SUBSURFACE" "4")
+ '("subsurface" "GDK_SURFACE_SUBSURFACE" "3")
)
)
@@ -1097,3 +1071,23 @@
)
)
+;; Original typedef:
+;; typedef enum
+;; {
+;; GDK_ACTION_COPY = 1 << 0,
+;; GDK_ACTION_MOVE = 1 << 1,
+;; GDK_ACTION_LINK = 1 << 2,
+;; GDK_ACTION_ASK = 1 << 3
+;; } GdkDragAction;
+
+(define-flags-extended DragAction
+ (in-module "Gdk")
+ (c-name "GdkDragAction")
+ (values
+ '("copy" "GDK_ACTION_COPY" "1 << 0")
+ '("move" "GDK_ACTION_MOVE" "1 << 1")
+ '("link" "GDK_ACTION_LINK" "1 << 2")
+ '("ask" "GDK_ACTION_ASK" "1 << 3")
+ )
+)
+
diff --git a/gdk/src/gdk_extra_objects.defs b/gdk/src/gdk_extra_objects.defs
index f0c32c60..04bc9f7e 100644
--- a/gdk/src/gdk_extra_objects.defs
+++ b/gdk/src/gdk_extra_objects.defs
@@ -79,6 +79,12 @@
(gtype-id "GDK_TYPE_DRAWING_CONTEXT")
)
+(define-object Drop
+ (in-module "Gdk")
+ (c-name "GdkDrop")
+ (gtype-id "GDK_TYPE_DROP")
+)
+
(define-object Event
(in-module "Gdk")
(c-name "GdkEvent")
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 0f88bc4d..6384069d 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -82,20 +82,6 @@
)
)
-(define-flags DragAction
- (in-module "Gdk")
- (c-name "GdkDragAction")
- (gtype-id "GDK_TYPE_DRAG_ACTION")
- (values
- '("default" "GDK_ACTION_DEFAULT")
- '("copy" "GDK_ACTION_COPY")
- '("move" "GDK_ACTION_MOVE")
- '("link" "GDK_ACTION_LINK")
- '("private" "GDK_ACTION_PRIVATE")
- '("ask" "GDK_ACTION_ASK")
- )
-)
-
(define-enum DragCancelReason
(in-module "Gdk")
(c-name "GdkDragCancelReason")
@@ -287,7 +273,6 @@
'("toplevel" "GDK_SURFACE_TOPLEVEL")
'("child" "GDK_SURFACE_CHILD")
'("temp" "GDK_SURFACE_TEMP")
- '("foreign" "GDK_SURFACE_FOREIGN")
'("subsurface" "GDK_SURFACE_SUBSURFACE")
)
)
@@ -627,6 +612,18 @@
)
)
+(define-flags DragAction
+ (in-module "Gdk")
+ (c-name "GdkDragAction")
+ (gtype-id "GDK_TYPE_DRAG_ACTION")
+ (values
+ '("copy" "GDK_ACTION_COPY")
+ '("move" "GDK_ACTION_MOVE")
+ '("link" "GDK_ACTION_LINK")
+ '("ask" "GDK_ACTION_ASK")
+ )
+)
+
;; From gdkapplaunchcontext.h
@@ -2071,6 +2068,12 @@
)
)
+(define-method get_startup_notification_id
+ (of-object "GdkDisplay")
+ (c-name "gdk_display_get_startup_notification_id")
+ (return-type "const-gchar*")
+)
+
(define-method get_app_launch_context
(of-object "GdkDisplay")
(c-name "gdk_display_get_app_launch_context")
@@ -2242,59 +2245,12 @@
(return-type "GdkDragAction")
)
-(define-method get_source_surface
- (of-object "GdkDragContext")
- (c-name "gdk_drag_context_get_source_surface")
- (return-type "GdkSurface*")
-)
-
-(define-method get_dest_surface
- (of-object "GdkDragContext")
- (c-name "gdk_drag_context_get_dest_surface")
- (return-type "GdkSurface*")
-)
-
-(define-function gdk_drag_status
- (c-name "gdk_drag_status")
- (return-type "none")
+; h2def.py thinks that this is a method and that GdkDragAction is an object.
+(define-function gdk_drag_action_is_unique
+ (c-name "gdk_drag_action_is_unique")
+ (return-type "gboolean")
(parameters
- '("GdkDragContext*" "context")
'("GdkDragAction" "action")
- '("guint32" "time_")
- )
-)
-
-(define-function gdk_drop_finish
- (c-name "gdk_drop_finish")
- (return-type "none")
- (parameters
- '("GdkDragContext*" "context")
- '("gboolean" "success")
- '("guint32" "time_")
- )
-)
-
-(define-function gdk_drop_read_async
- (c-name "gdk_drop_read_async")
- (return-type "none")
- (parameters
- '("GdkDragContext*" "context")
- '("const-char**" "mime_types")
- '("int" "io_priority")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-function gdk_drop_read_finish
- (c-name "gdk_drop_read_finish")
- (return-type "GInputStream*")
- (parameters
- '("GdkDragContext*" "context")
- '("const-char**" "out_mime_type")
- '("GAsyncResult*" "result")
- '("GError**" "error")
)
)
@@ -2386,6 +2342,132 @@
+;; From gdkdrop.h
+
+(define-method get_display
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_get_display")
+ (return-type "GdkDisplay*")
+)
+
+(define-method get_device
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_get_device")
+ (return-type "GdkDevice*")
+)
+
+(define-method get_surface
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_get_surface")
+ (return-type "GdkSurface*")
+)
+
+(define-method get_formats
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_get_formats")
+ (return-type "GdkContentFormats*")
+)
+
+(define-method get_actions
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_get_actions")
+ (return-type "GdkDragAction")
+)
+
+(define-method get_drag
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_get_drag")
+ (return-type "GdkDragContext*")
+)
+
+(define-method status
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_status")
+ (return-type "none")
+ (parameters
+ '("GdkDragAction" "actions")
+ )
+)
+
+(define-method finish
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_finish")
+ (return-type "none")
+ (parameters
+ '("GdkDragAction" "action")
+ )
+)
+
+(define-method read_async
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_read_async")
+ (return-type "none")
+ (parameters
+ '("const-char**" "mime_types")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_finish
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_read_finish")
+ (return-type "GInputStream*")
+ (parameters
+ '("const-char**" "out_mime_type")
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method read_value_async
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_read_value_async")
+ (return-type "none")
+ (parameters
+ '("GType" "type")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_value_finish
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_read_value_finish")
+ (return-type "const-GValue*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method read_text_async
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_read_text_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_text_finish
+ (of-object "GdkDrop")
+ (c-name "gdk_drop_read_text_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
;; From gdkevents.h
(define-function gdk_event_get_type
@@ -2413,12 +2495,6 @@
(return-type "GdkEvent*")
)
-(define-method free
- (of-object "GdkEvent")
- (c-name "gdk_event_free")
- (return-type "none")
-)
-
(define-method get_surface
(of-object "GdkEvent")
(c-name "gdk_event_get_surface")
@@ -2742,13 +2818,10 @@
(return-type "gboolean")
)
-(define-method get_drag_context
+(define-method get_drop
(of-object "GdkEvent")
- (c-name "gdk_event_get_drag_context")
- (return-type "gboolean")
- (parameters
- '("GdkDragContext**" "context")
- )
+ (c-name "gdk_event_get_drop")
+ (return-type "GdkDrop*")
)
(define-method get_crossing_mode
@@ -3958,6 +4031,20 @@
)
)
+(define-method move_to_rect
+ (of-object "GdkSurface")
+ (c-name "gdk_surface_move_to_rect")
+ (return-type "none")
+ (parameters
+ '("const-GdkRectangle*" "rect")
+ '("GdkGravity" "rect_anchor")
+ '("GdkGravity" "surface_anchor")
+ '("GdkAnchorHints" "anchor_hints")
+ '("gint" "rect_anchor_dx")
+ '("gint" "rect_anchor_dy")
+ )
+)
+
(define-method raise
(of-object "GdkSurface")
(c-name "gdk_surface_raise")
@@ -4404,40 +4491,6 @@
)
)
-(define-method get_events
- (of-object "GdkSurface")
- (c-name "gdk_surface_get_events")
- (return-type "GdkEventMask")
-)
-
-(define-method set_events
- (of-object "GdkSurface")
- (c-name "gdk_surface_set_events")
- (return-type "none")
- (parameters
- '("GdkEventMask" "event_mask")
- )
-)
-
-(define-method set_device_events
- (of-object "GdkSurface")
- (c-name "gdk_surface_set_device_events")
- (return-type "none")
- (parameters
- '("GdkDevice*" "device")
- '("GdkEventMask" "event_mask")
- )
-)
-
-(define-method get_device_events
- (of-object "GdkSurface")
- (c-name "gdk_surface_get_device_events")
- (return-type "GdkEventMask")
- (parameters
- '("GdkDevice*" "device")
- )
-)
-
(define-method set_icon_list
(of-object "GdkSurface")
(c-name "gdk_surface_set_icon_list")
@@ -4991,11 +5044,6 @@
(return-type "GType")
)
-(define-function gdk_drag_action_get_type
- (c-name "gdk_drag_action_get_type")
- (return-type "GType")
-)
-
(define-function gdk_drag_cancel_reason_get_type
(c-name "gdk_drag_cancel_reason_get_type")
(return-type "GType")
@@ -5151,6 +5199,11 @@
(return-type "GType")
)
+(define-function gdk_drag_action_get_type
+ (c-name "gdk_drag_action_get_type")
+ (return-type "GType")
+)
+
;; From gdkmarshalers.h
diff --git a/gdk/src/gdk_methods.defs.patch b/gdk/src/gdk_methods.defs.patch
new file mode 100644
index 00000000..23bbdf9d
--- /dev/null
+++ b/gdk/src/gdk_methods.defs.patch
@@ -0,0 +1,22 @@
+--- ./../../gdk/src/gdk_methods.defs.orig 2018-06-26 17:10:39.139231000 +0200
++++ ./../../gdk/src/gdk_methods.defs 2018-06-26 17:17:17.130209478 +0200
+@@ -2243,14 +2243,17 @@
+ (of-object "GdkDragContext")
+ (c-name "gdk_drag_context_get_selected_action")
+ (return-type "GdkDragAction")
+ )
+
+-(define-method is_unique
+- (of-object "GdkDragAction")
++; h2def.py thinks that this is a method and that GdkDragAction is an object.
++(define-function gdk_drag_action_is_unique
+ (c-name "gdk_drag_action_is_unique")
+ (return-type "gboolean")
++ (parameters
++ '("GdkDragAction" "action")
++ )
+ )
+
+ (define-function gdk_drag_begin
+ (c-name "gdk_drag_begin")
+ (return-type "GdkDragContext*")
diff --git a/gdk/src/gdk_signals.defs b/gdk/src/gdk_signals.defs
index 29572c2b..44cd6465 100644
--- a/gdk/src/gdk_signals.defs
+++ b/gdk/src/gdk_signals.defs
@@ -95,9 +95,6 @@
(of-object "GdkDragContext")
(return-type "void")
(flags "Run Last")
- (parameters
- '("gint" "p0")
- )
)
(define-signal dnd-finished
@@ -518,6 +515,63 @@
(construct-only #t)
)
+;; From GdkDrop
+
+(define-property actions
+ (of-object "GdkDrop")
+ (prop-type "GParamFlags")
+ (docs "The possible actions for this drop")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+ (default-value "GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK")
+)
+
+(define-property device
+ (of-object "GdkDrop")
+ (prop-type "GParamObject")
+ (docs "The device performing the drop")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property display
+ (of-object "GdkDrop")
+ (prop-type "GParamObject")
+ (docs "Display this drag belongs to")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property drag
+ (of-object "GdkDrop")
+ (prop-type "GParamObject")
+ (docs "The drag that initiated this drop")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property formats
+ (of-object "GdkDrop")
+ (prop-type "GParamBoxed")
+ (docs "The possible formats for data")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property surface
+ (of-object "GdkDrop")
+ (prop-type "GParamObject")
+ (docs "The surface the drop is happening on")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
;; From GdkEvent
(define-property event-type
diff --git a/gtk/src/gtk_docs.xml b/gtk/src/gtk_docs.xml
index 03f800d6..f0d05df2 100644
--- a/gtk/src/gtk_docs.xml
+++ b/gtk/src/gtk_docs.xml
@@ -408,7 +408,7 @@ allocation
</parameter_description>
</parameter>
<parameter name="GTK_ALIGN_BASELINE">
-<parameter_description> align the widget according to the baseline. Since 3.10.
+<parameter_description> align the widget according to the baseline
</parameter_description>
</parameter>
</parameters>
@@ -740,7 +740,7 @@ Used to indicate the direction in which an arrow should point.
</parameter_description>
</parameter>
<parameter name="GTK_ARROW_NONE">
-<parameter_description> No arrow. Since 2.10.
+<parameter_description> No arrow.
</parameter_description>
</parameter>
</parameters>
@@ -1123,14 +1123,14 @@ contains.
</parameter_description>
</parameter>
<parameter name="GTK_BUTTONBOX_CENTER">
-<parameter_description> Buttons are centered in the box. Since 2.12.
+<parameter_description> Buttons are centered in the box
</parameter_description>
</parameter>
<parameter name="GTK_BUTTONBOX_EXPAND">
<parameter_description> Buttons expand to fill the box. This entails giving
buttons a "linked" appearance, making button sizes homogeneous, and
setting spacing to 0 (same as calling gtk_box_set_homogeneous() and
-gtk_box_set_spacing() manually). Since 3.12.
+gtk_box_set_spacing() manually)
</parameter_description>
</parameter>
</parameters>
@@ -2097,11 +2097,11 @@ probably has a selection colored background to render to.
</parameter_description>
</parameter>
<parameter name="GTK_CELL_RENDERER_EXPANDABLE">
-<parameter_description> The cell is in a row that can be expanded. Since 3.4
+<parameter_description> The cell is in a row that can be expanded
</parameter_description>
</parameter>
<parameter name="GTK_CELL_RENDERER_EXPANDED">
-<parameter_description> The cell is in a row that is expanded. Since 3.4
+<parameter_description> The cell is in a row that is expanded
</parameter_description>
</parameter>
</parameters>
@@ -2186,8 +2186,6 @@ have received their natural width.
The text that will be displayed in the #GtkCellRenderer if
#GtkCellRendererText:editable is %TRUE and the cell is empty.
-Since 3.6
-
</description>
</property>
@@ -2812,7 +2810,7 @@ a CSS variable.
</parameter>
<parameter name="GTK_CSS_SECTION_KEYFRAMES">
<parameter_description> The section defines keyframes. See [CSS
-Animations](http://dev.w3.org/csswg/css3-animations/#keyframes) for details. Since 3.6
+Animations](http://dev.w3.org/csswg/css3-animations/#keyframes) for details
</parameter_description>
</parameter>
</parameters>
@@ -2890,9 +2888,9 @@ and action are acceptable.
<parameter_description> If set for a widget, when a drop occurs, GTK+ will
will check if the drag matches this widget’s list of possible formats and
actions. If so, GTK+ will call gtk_drag_get_data() on behalf of the widget.
-Whether or not the drop is successful, GTK+ will call gtk_drag_finish(). If
+Whether or not the drop is successful, GTK+ will call gdk_drag_finish(). If
the action was a move, then if the drag was successful, then %TRUE will be
-passed for the @delete parameter to gtk_drag_finish().
+passed for the @delete parameter to gdk_drag_finish().
</parameter_description>
</parameter>
<parameter name="GTK_DEST_DEFAULT_ALL">
@@ -2968,7 +2966,7 @@ parent is destroyed, see gtk_window_set_destroy_with_parent()
</parameter>
<parameter name="GTK_DIALOG_USE_HEADER_BAR">
<parameter_description> Create dialog with actions in header
-bar instead of action area. Since 3.12.
+bar instead of action area
</parameter_description>
</parameter>
</parameters>
@@ -3266,10 +3264,6 @@ is clicked.
<parameter_description> The position of the clicked icon
</parameter_description>
</parameter>
-<parameter name="event">
-<parameter_description> the button press event
-</parameter_description>
-</parameter>
</parameters>
<return></return>
</signal>
@@ -3289,10 +3283,6 @@ mouse click over an activatable icon.
<parameter_description> The position of the clicked icon
</parameter_description>
</parameter>
-<parameter name="event">
-<parameter_description> the button release event
-</parameter_description>
-</parameter>
</parameters>
<return></return>
</signal>
@@ -6046,32 +6036,32 @@ is %NULL and you need to call gtk_icon_info_get_builtin_pixbuf().
<parameter_description> Try to shorten icon name at '-'
characters before looking at inherited themes. This flag is only
supported in functions that take a single icon name. For more general
-fallback, see gtk_icon_theme_choose_icon(). Since 2.12.
+fallback, see gtk_icon_theme_choose_icon()
</parameter_description>
</parameter>
<parameter name="GTK_ICON_LOOKUP_FORCE_SIZE">
<parameter_description> Always get the icon scaled to the
-requested size. Since 2.14.
+requested size
</parameter_description>
</parameter>
<parameter name="GTK_ICON_LOOKUP_FORCE_REGULAR">
<parameter_description> Try to always load regular icons, even
-when symbolic icon names are given. Since 3.14.
+when symbolic icon names are given
</parameter_description>
</parameter>
<parameter name="GTK_ICON_LOOKUP_FORCE_SYMBOLIC">
<parameter_description> Try to always load symbolic icons, even
-when regular icon names are given. Since 3.14.
+when regular icon names are given
</parameter_description>
</parameter>
<parameter name="GTK_ICON_LOOKUP_DIR_LTR">
<parameter_description> Try to load a variant of the icon for left-to-right
-text direction. Since 3.14.
+text direction
</parameter_description>
</parameter>
<parameter name="GTK_ICON_LOOKUP_DIR_RTL">
<parameter_description> Try to load a variant of the icon for right-to-left
-text direction. Since 3.14.
+text direction
</parameter_description>
</parameter>
</parameters>
@@ -6668,15 +6658,15 @@ first word of each sentence
</parameter_description>
</parameter>
<parameter name="GTK_INPUT_HINT_VERTICAL_WRITING">
-<parameter_description> The text is vertical. Since 3.18
+<parameter_description> The text is vertical
</parameter_description>
</parameter>
<parameter name="GTK_INPUT_HINT_EMOJI">
-<parameter_description> Suggest offering Emoji support. Since 3.22.20
+<parameter_description> Suggest offering Emoji support
</parameter_description>
</parameter>
<parameter name="GTK_INPUT_HINT_NO_EMOJI">
-<parameter_description> Suggest not offering Emoji support. Since 3.22.20
+<parameter_description> Suggest not offering Emoji support
</parameter_description>
</parameter>
</parameters>
@@ -8974,12 +8964,12 @@ the printer in Postscript format
</parameter>
<parameter name="GTK_PRINT_CAPABILITY_NUMBER_UP">
<parameter_description> Print dialog will offer printing multiple
-pages per sheet. Since 2.12
+pages per sheet
</parameter_description>
</parameter>
<parameter name="GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT">
<parameter_description> Print dialog will allow to rearrange
-pages when printing multiple pages per sheet. Since 2.14
+pages when printing multiple pages per sheet
</parameter_description>
</parameter>
</parameters>
@@ -11743,14 +11733,6 @@ current one.
</description>
</property>
-<property name="GtkStackSwitcher:icon-size">
-<description>
-Use the "icon-size" property to change the size of the image displayed
-when a #GtkStackSwitcher is displaying icons.
-
-</description>
-</property>
-
<enum name="GtkStackTransitionType">
<description>
These enumeration values describe the possible transitions
@@ -14347,10 +14329,6 @@ gtk_selection_data_set_text().
#GtkTargetList
</parameter_description>
</parameter>
-<parameter name="time">
-<parameter_description> the timestamp at which the data was requested
-</parameter_description>
-</parameter>
</parameters>
<return></return>
</signal>
@@ -14364,25 +14342,21 @@ to call gdk_drag_status() and not finish the drag.
If the data was received in response to a #GtkWidget::drag-drop signal
(and this is the last target to be received), the handler for this
signal is expected to process the received data and then call
-gtk_drag_finish(), setting the @success parameter depending on
+gdk_drag_finish(), setting the @success parameter depending on
whether the data was processed successfully.
Applications must create some means to determine why the signal was emitted
-and therefore whether to call gdk_drag_status() or gtk_drag_finish().
+and therefore whether to call gdk_drag_status() or gdk_drag_finish().
The handler may inspect the selected action with
gdk_drag_context_get_selected_action() before calling
-gtk_drag_finish(), e.g. to implement %GDK_ACTION_ASK as
+gdk_drag_finish(), e.g. to implement %GDK_ACTION_ASK as
shown in the following example:
|[<!-- language="C" -->
void
drag_data_received (GtkWidget *widget,
-GdkDragContext *context,
-gint x,
-gint y,
-GtkSelectionData *data,
-guint info,
-guint time)
+GdkDrop *drop,
+GtkSelectionData *data)
{
if ((data->length >= 0) && (data->format == 8))
{
@@ -14390,8 +14364,8 @@ GdkDragAction action;
// handle data here
-action = gdk_drag_context_get_selected_action (context);
-if (action == GDK_ACTION_ASK)
+action = gdk_drop_get_actions (drop);
+if (!gdk_drag_action_is_unique (action))
{
GtkWidget *dialog;
gint response;
@@ -14411,10 +14385,10 @@ else
action = GDK_ACTION_COPY;
}
-gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
+gdk_drop_finish (context, action);
}
else
-gtk_drag_finish (context, FALSE, FALSE, time);
+gdk_drop_finish (context, 0);
}
]|
@@ -14424,8 +14398,8 @@ gtk_drag_finish (context, FALSE, FALSE, time);
<parameter_description> the object which received the signal
</parameter_description>
</parameter>
-<parameter name="context">
-<parameter_description> the drag context
+<parameter name="drop">
+<parameter_description> the #GdkDrop
</parameter_description>
</parameter>
<parameter name="x">
@@ -14440,10 +14414,6 @@ gtk_drag_finish (context, FALSE, FALSE, time);
<parameter_description> the received data
</parameter_description>
</parameter>
-<parameter name="time">
-<parameter_description> the timestamp at which the data was received
-</parameter_description>
-</parameter>
</parameters>
<return></return>
</signal>
@@ -14455,8 +14425,8 @@ the data onto the widget. The signal handler must determine whether
the cursor position is in a drop zone or not. If it is not in a drop
zone, it returns %FALSE and no further processing is necessary.
Otherwise, the handler returns %TRUE. In this case, the handler must
-ensure that gtk_drag_finish() is called to let the source know that
-the drop is done. The call to gtk_drag_finish() can be done either
+ensure that gdk_drag_finish() is called to let the source know that
+the drop is done. The call to gdk_drag_finish() can be done either
directly or in a #GtkWidget::drag-data-received handler which gets
triggered by calling gtk_drag_get_data() to receive the data for one
or more of the supported targets.
@@ -14468,8 +14438,8 @@ or more of the supported targets.
<parameter_description> the object which received the signal
</parameter_description>
</parameter>
-<parameter name="context">
-<parameter_description> the drag context
+<parameter name="drop">
+<parameter_description> the #GdkDrop
</parameter_description>
</parameter>
<parameter name="x">
@@ -14480,10 +14450,6 @@ or more of the supported targets.
<parameter_description> the y coordinate of the current cursor position
</parameter_description>
</parameter>
-<parameter name="time">
-<parameter_description> the timestamp of the motion event
-</parameter_description>
-</parameter>
</parameters>
<return> whether the cursor position is in a drop zone
</return>
@@ -14592,11 +14558,10 @@ an "enter" signal. Upon an "enter", the handler will typical
the drop site with gtk_drag_highlight().
|[<!-- language="C" -->
static void
-drag_motion (GtkWidget *widget,
-GdkDragContext *context,
-gint x,
-gint y,
-guint time)
+drag_motion (GtkWidget *widget,
+GdkDrop *drop,
+gint x,
+gint y,
{
GdkAtom target;
@@ -14608,14 +14573,14 @@ private_data->drag_highlight = 1;
gtk_drag_highlight (widget);
}
-target = gtk_drag_dest_find_target (widget, context, NULL);
+target = gtk_drag_dest_find_target (widget, drop, NULL);
if (target == NULL)
-gdk_drag_status (context, 0, time);
+gdk_drop_status (drop, 0);
else
{
private_data->pending_status
-= gdk_drag_context_get_suggested_action (context);
-gtk_drag_get_data (widget, context, target, time);
+= gdk_drop_get_actions (drop);
+gtk_drag_get_data (widget, drop, target);
}
return TRUE;
@@ -14623,12 +14588,8 @@ return TRUE;
static void
drag_data_received (GtkWidget *widget,
-GdkDragContext *context,
-gint x,
-gint y,
-GtkSelectionData *selection_data,
-guint info,
-guint time)
+GdkDrop *drop,
+GtkSelectionData *selection_data)
{
PrivateData *private_data = GET_PRIVATE_DATA (widget);
@@ -14643,11 +14604,9 @@ private_data->suggested_action = 0;
str = gtk_selection_data_get_text (selection_data);
if (!data_is_acceptable (str))
-gdk_drag_status (context, 0, time);
+gdk_drop_status (drop, 0);
else
-gdk_drag_status (context,
-private_data->suggested_action,
-time);
+gdk_drag_status (drop, GDK_ACTION_ALL);
}
else
{
@@ -14663,8 +14622,8 @@ else
<parameter_description> the object which received the signal
</parameter_description>
</parameter>
-<parameter name="context">
-<parameter_description> the drag context
+<parameter name="drop">
+<parameter_description> the #GdkDrop
</parameter_description>
</parameter>
<parameter name="x">
@@ -14675,10 +14634,6 @@ else
<parameter_description> the y coordinate of the current cursor position
</parameter_description>
</parameter>
-<parameter name="time">
-<parameter_description> the timestamp of the motion event
-</parameter_description>
-</parameter>
</parameters>
<return> whether the cursor position is in a drop zone
</return>
@@ -16368,8 +16323,6 @@ first with g_intern_static_string().
Removes an accelerator previously installed through
gtk_accel_group_connect().
-Since 2.20 @closure can be %NULL.
-
</description>
<parameters>
@@ -20889,7 +20842,7 @@ thing to do when an error is detected is to call g_error().
</parameter_description>
</parameter>
</parameters>
-<return> A positive value on success, 0 if an error occurred
+<return> %TRUE on success, %FALSE if an error occurred
</return>
</function>
@@ -20924,7 +20877,7 @@ to call g_error().
</parameter_description>
</parameter>
</parameters>
-<return> A positive value on success, 0 if an error occurred
+<return> %TRUE on success, %FALSE if an error occurred
</return>
</function>
@@ -20963,7 +20916,7 @@ to call g_error().
</parameter_description>
</parameter>
</parameters>
-<return> A positive value on success, 0 if an error occurred
+<return> %TRUE on success, %FALSE if an error occurred
</return>
</function>
@@ -21001,7 +20954,7 @@ its child (for instance a #GtkTreeView that depends on its
</parameter_description>
</parameter>
</parameters>
-<return> A positive value on success, 0 if an error occurred
+<return> %TRUE on success, %FALSE if an error occurred
</return>
</function>
@@ -21039,7 +20992,7 @@ its child (for instance a #GtkTreeView that depends on its
</parameter_description>
</parameter>
</parameters>
-<return> A positive value on success, 0 if an error occurred
+<return> %TRUE on success, %FALSE if an error occurred
</return>
</function>
@@ -21080,7 +21033,7 @@ its child (for instance a #GtkTreeView that depends on its
</parameter_description>
</parameter>
</parameters>
-<return> A positive value on success, 0 if an error occurred
+<return> %TRUE on success, %FALSE if an error occurred
</return>
</function>
@@ -21287,8 +21240,9 @@ Gets the translation domain of @builder.
</parameter_description>
</parameter>
</parameters>
-<return> the translation domain. This string is owned
-by the builder object and must not be modified or freed.
+<return> the translation domain or %NULL
+in case it was never set or explicitly unset via gtk_builder_set_translation_domain().
+This string is owned by the builder object and must not be modified or freed.
</return>
</function>
@@ -21855,9 +21809,9 @@ mnemonic character
<function name="gtk_button_set_icon_name">
<description>
-Adds a #GtkImage with the given icon name as a child. The icon will be
-of size %GTK_ICON_SIZE_BUTTON. If @button already contains a child widget,
-that child widget will be removed and replaced with the image.
+Adds a #GtkImage with the given icon name as a child. If @button already
+contains a child widget, that child widget will be removed and replaced
+with the image.
</description>
<parameters>
@@ -22838,8 +22792,6 @@ and vertical orientations producing a homogeneous effect of the
rows. This is generally the case for #GtkTreeView when
#GtkTreeView:fixed-height-mode is enabled.
-Since 3.0
-
</description>
<parameters>
<parameter name="context">
@@ -23112,8 +23064,6 @@ in the allocated width necessitates a recalculation
of all the displayed row heights using
gtk_cell_area_get_preferred_height_for_width().
-Since 3.0
-
</description>
<parameters>
<parameter name="context">
@@ -28710,7 +28660,7 @@ gtk_drag_dest_set_target_list().
<function name="gtk_drag_dest_find_target">
<description>
-Looks for a match between the supported targets of @context and the
+Looks for a match between the supported targets of @drop and the
@dest_target_list, returning the first matching target, otherwise
returning %NULL. @dest_target_list should usually be the return
value from gtk_drag_dest_get_target_list(), but some widgets may
@@ -28725,8 +28675,8 @@ passes the correct target list to this function.
<parameter_description> drag destination widget
</parameter_description>
</parameter>
-<parameter name="context">
-<parameter_description> drag context
+<parameter name="drop">
+<parameter_description> #GdkDrop
</parameter_description>
</parameter>
<parameter name="target_list">
@@ -28791,7 +28741,7 @@ as described in the documentation for #GtkWidget::drag-motion. The default
behaviors described by @flags make some assumptions, that can conflict
with your own signal handlers. For instance #GTK_DEST_DEFAULT_DROP causes
invokations of gdk_drag_status() in the context of #GtkWidget::drag-motion,
-and invokations of gtk_drag_finish() in #GtkWidget::drag-data-received.
+and invokations of gdk_drag_finish() in #GtkWidget::drag-data-received.
Especially the later is dramatic, when your own #GtkWidget::drag-motion
handler calls gtk_drag_get_data() to inspect the dragged data.
@@ -28900,29 +28850,6 @@ notification of drags.
<return></return>
</function>
-<function name="gtk_drag_finish">
-<description>
-Informs the drag source that the drop is finished, and
-that the data of the drag will no longer be required.
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> the drag context
-</parameter_description>
-</parameter>
-<parameter name="success">
-<parameter_description> a flag indicating whether the drop was successful
-</parameter_description>
-</parameter>
-<parameter name="time_">
-<parameter_description> the timestamp from the #GtkWidget::drag-drop signal
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gtk_drag_get_data">
<description>
Gets the data associated with a drag. When the data
@@ -28941,20 +28868,14 @@ drops.
#GtkWidget::drag-data-received signal
</parameter_description>
</parameter>
-<parameter name="context">
-<parameter_description> the drag context
+<parameter name="drop">
+<parameter_description> the #GdkDrop
</parameter_description>
</parameter>
<parameter name="target">
<parameter_description> the target (form of the data) to retrieve
</parameter_description>
</parameter>
-<parameter name="time_">
-<parameter_description> a timestamp for retrieving the data. This will
-generally be the time received in a #GtkWidget::drag-motion
-or #GtkWidget::drag-drop signal
-</parameter_description>
-</parameter>
</parameters>
<return></return>
</function>
@@ -29071,11 +28992,11 @@ with a context for the source side of a drag)
<function name="gtk_drag_set_icon_paintable">
<description>
-Sets @texture as the icon for a given drag. GTK+ retains
+Sets @paintable as the icon for a given drag. GTK+ retains
references for the arguments, and will release them when
they are no longer needed.
-To position the texture relative to the mouse, its top
+To position the @paintable relative to the mouse, its top
left will be positioned @hot_x, @hot_y pixels from the
mouse cursor.
@@ -29442,7 +29363,7 @@ You should restrict yourself exclusively to drawing your contents in the draw
function.
If what you are drawing does change, call gtk_widget_queue_draw() on the
-drawing area. This will call a redraw and will call @draw_func again.
+drawing area. This will cause a redraw and will call @draw_func again.
</description>
<parameters>
@@ -32077,7 +31998,6 @@ controller action
<description>
Gets the IM context of a key controller.
-Since: 3.94
</description>
<parameters>
@@ -32087,7 +32007,6 @@ Since: 3.94
</parameter>
</parameters>
<return> the IM context
-
</return>
</function>
@@ -36791,7 +36710,6 @@ must be called from either the #GtkGestureStylus:down,
#GtkGestureStylus:motion, #GtkGestureStylus:up or #GtkGestureStylus:proximity
signals.
-Since: 3.94
</description>
<parameters>
@@ -36809,7 +36727,6 @@ Since: 3.94
</parameter>
</parameters>
<return> #TRUE if there is a current value for the axis
-
</return>
</function>
@@ -36870,13 +36787,11 @@ signals.
<description>
Creates a new #GtkGestureStylus.
-Since: 3.94
</description>
<parameters>
</parameters>
<return> a newly created stylus gesture
-
</return>
</function>
@@ -42120,7 +42035,7 @@ initialize the windowing system for some reason. If you want
your program to fall back to a textual interface you want to
call gtk_init_check() instead.
-Since 2.18, GTK+ calls `signal (SIGPIPE, SIG_IGN)`
+GTK+ calls `signal (SIGPIPE, SIG_IGN)`
during initialization, to ignore SIGPIPE signals, since these are
almost never wanted in graphical applications. If you do need to
handle SIGPIPE for some reason, reset the handler after gtk_init(),
@@ -51372,7 +51287,7 @@ Gets the value set via gtk_picture_set_can_shrink().
</parameter_description>
</parameter>
</parameters>
-<return> %TRUE if the self can be made smaller than its contents
+<return> %TRUE if the picture can be made smaller than its contents
</return>
</function>
@@ -51435,7 +51350,7 @@ Creates a new empty #GtkPicture widget.
</description>
<parameters>
</parameters>
-<return> a newly created #GtkPicture widget.
+<return> a newly created #GtkPicture widget.
</return>
</function>
@@ -51462,7 +51377,7 @@ the #GtkPicture from the texture.
<function name="gtk_picture_new_for_filename">
<description>
-Creates a new #GtkPicture displaying the file @filename.
+Creates a new #GtkPicture displaying the file @filename.
This is a utility function that calls gtk_picture_new_for_file().
See that function for details.
@@ -51521,9 +51436,9 @@ The pixbuf must not be modified after passing it to this function.
<function name="gtk_picture_new_for_resource">
<description>
-Creates a new #GtkPicture displaying the file @filename.
+Creates a new #GtkPicture displaying the file @filename.
-This is a utility function that calls gtk_picture_new_for_file(),
+This is a utility function that calls gtk_picture_new_for_file().
See that function for details.
@@ -51611,7 +51526,7 @@ See gtk_picture_new_for_file() for details.
<description>
Makes @self load and display the given @filename.
-This is a utility function that calls gtk_picture_set_file(),
+This is a utility function that calls gtk_picture_set_file().
</description>
<parameters>
@@ -60511,7 +60426,6 @@ search bar (as in our main example).
<description>
Gets the widget that @bar is capturing key events from.
-Since: 3.94
</description>
<parameters>
@@ -60521,7 +60435,6 @@ Since: 3.94
</parameter>
</parameters>
<return> The key capture widget.
-
</return>
</function>
@@ -60637,8 +60550,6 @@ Sets @widget as the widget that @bar will capture key events from.
If key events are handled by the search bar, the bar will
be shown, and the entry populated with the entered text.
-Since: 3.94
-
</description>
<parameters>
<parameter name="bar">
@@ -60696,7 +60607,6 @@ toggle button.
<description>
Gets the widget that @entry is capturing key events from.
-Since: 3.94
</description>
<parameters>
@@ -60706,7 +60616,6 @@ Since: 3.94
</parameter>
</parameters>
<return> The key capture widget.
-
</return>
</function>
@@ -60766,8 +60675,6 @@ If the entry is part of a #GtkSearchBar, it is preferable
to call gtk_search_bar_set_key_capture_widget() instead, which
will reveal the entry in addition to triggering the search entry.
-Since: 3.94
-
</description>
<parameters>
<parameter name="entry">
@@ -63109,7 +63016,7 @@ is homogeneous, the #GtkStack will request the same
size for all its children. If it isn't, the stack
may change size when a different child becomes visible.
-Since 3.16, homogeneity can be controlled separately
+Homogeneity can be controlled separately
for horizontal and vertical size, with the
#GtkStack:hhomogeneous and #GtkStack:vhomogeneous.
@@ -63794,23 +63701,6 @@ Returns the #GdkDisplay to which @context is attached.
</return>
</function>
-<function name="gtk_style_context_get_frame_clock">
-<description>
-Returns the #GdkFrameClock to which @context is attached.
-
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> a #GtkStyleContext
-</parameter_description>
-</parameter>
-</parameters>
-<return> a #GdkFrameClock, or %NULL
-if @context does not have an attached frame clock.
-</return>
-</function>
-
<function name="gtk_style_context_get_margin">
<description>
Gets the margin for a given state as a #GtkBorder.
@@ -64229,30 +64119,6 @@ call this yourself.
<return></return>
</function>
-<function name="gtk_style_context_set_frame_clock">
-<description>
-Attaches @context to the given frame clock.
-
-The frame clock is used for the timing of animations.
-
-If you are using a #GtkStyleContext returned from
-gtk_widget_get_style_context(), you do not need to
-call this yourself.
-
-</description>
-<parameters>
-<parameter name="context">
-<parameter_description> a #GdkFrameClock
-</parameter_description>
-</parameter>
-<parameter name="frame_clock">
-<parameter_description> a #GdkFrameClock
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gtk_style_context_set_parent">
<description>
Sets the parent style context for @context. The parent style
@@ -65304,9 +65170,7 @@ Obtains an iterator pointing to @byte_index within the given line.
@byte_index must be the start of a UTF-8 character. Note bytes, not
characters; UTF-8 may encode one character as multiple bytes.
-Before the 3.20 version, it was not allowed to pass an invalid location.
-
-Since the 3.20 version, if @line_number is greater than the number of lines
+If @line_number is greater than the number of lines
in the @buffer, the end iterator is returned. And if @byte_index is off the
end of the line, the iterator at the end of the line is returned.
@@ -65339,7 +65203,7 @@ characters, not bytes; UTF-8 may encode one character as multiple bytes.
Before the 3.20 version, it was not allowed to pass an invalid location.
-Since the 3.20 version, if @line_number is greater than the number of lines
+If @line_number is greater than the number of lines
in the @buffer, the end iterator is returned. And if @char_offset is off the
end of the line, the iterator at the end of the line is returned.
@@ -85347,7 +85211,6 @@ Removes a window from a #GtkWindowGroup.
<description>
Returns whether @window has an explicit window group.
-Since 2.22
</description>
<parameters>
@@ -85357,7 +85220,6 @@ Since 2.22
</parameter>
</parameters>
<return> %TRUE if @window has an explicit window group.
-
</return>
</function>
diff --git a/gtk/src/gtk_docs_override.xml b/gtk/src/gtk_docs_override.xml
index 06c01670..7a289eff 100644
--- a/gtk/src/gtk_docs_override.xml
+++ b/gtk/src/gtk_docs_override.xml
@@ -1737,10 +1737,6 @@ See gtk_selection_data_set() and gtk_selection_data_set_text().
<parameter_description> the #GtkSelectionData to be filled with the dragged data
</parameter_description>
</parameter>
-<parameter name="time">
-<parameter_description> the timestamp at which the data was requested
-</parameter_description>
-</parameter>
</parameters>
<return></return>
</signal>
@@ -1753,16 +1749,28 @@ See gtk_selection_data_set() and gtk_selection_data_set_text().
<parameter_description> the object which received the signal
</parameter_description>
</parameter>
-<parameter name="context">
-<parameter_description> the drag context
+<parameter name="drop">
+<parameter_description> the #GdkDrop
</parameter_description>
</parameter>
<parameter name="data">
<parameter_description> the received data
</parameter_description>
</parameter>
-<parameter name="time">
-<parameter_description> the timestamp at which the data was received
+</parameters>
+<return></return>
+</signal>
+
+<!-- TODO: Remove this signal description when gtk+'s description contains -->
+<!-- the correct number of parameters (no @time) and @drop instead of @context. -->
+<signal name="GtkWidget::drag-leave">
+<parameters>
+<parameter name="widget">
+<parameter_description> the object which received the signal.
+</parameter_description>
+</parameter>
+<parameter name="drop">
+<parameter_description> the #GdkDrop
</parameter_description>
</parameter>
</parameters>
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 7ae0e1b1..d5f41d6c 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -4941,7 +4941,7 @@
(define-method add_from_file
(of-object "GtkBuilder")
(c-name "gtk_builder_add_from_file")
- (return-type "guint")
+ (return-type "gboolean")
(parameters
'("const-gchar*" "filename")
'("GError**" "error")
@@ -4951,7 +4951,7 @@
(define-method add_from_resource
(of-object "GtkBuilder")
(c-name "gtk_builder_add_from_resource")
- (return-type "guint")
+ (return-type "gboolean")
(parameters
'("const-gchar*" "resource_path")
'("GError**" "error")
@@ -4961,7 +4961,7 @@
(define-method add_from_string
(of-object "GtkBuilder")
(c-name "gtk_builder_add_from_string")
- (return-type "guint")
+ (return-type "gboolean")
(parameters
'("const-gchar*" "buffer")
'("gsize" "length")
@@ -4972,7 +4972,7 @@
(define-method add_objects_from_file
(of-object "GtkBuilder")
(c-name "gtk_builder_add_objects_from_file")
- (return-type "guint")
+ (return-type "gboolean")
(parameters
'("const-gchar*" "filename")
'("gchar**" "object_ids")
@@ -4983,7 +4983,7 @@
(define-method add_objects_from_resource
(of-object "GtkBuilder")
(c-name "gtk_builder_add_objects_from_resource")
- (return-type "guint")
+ (return-type "gboolean")
(parameters
'("const-gchar*" "resource_path")
'("gchar**" "object_ids")
@@ -4994,7 +4994,7 @@
(define-method add_objects_from_string
(of-object "GtkBuilder")
(c-name "gtk_builder_add_objects_from_string")
- (return-type "guint")
+ (return-type "gboolean")
(parameters
'("const-gchar*" "buffer")
'("gsize" "length")
@@ -5168,7 +5168,7 @@
(define-method extend_with_template
(of-object "GtkBuilder")
(c-name "gtk_builder_extend_with_template")
- (return-type "guint")
+ (return-type "gboolean")
(parameters
'("GtkWidget*" "widget")
'("GType" "template_type")
@@ -8043,19 +8043,8 @@
(return-type "none")
(parameters
'("GtkWidget*" "widget")
- '("GdkDragContext*" "context")
+ '("GdkDrop*" "drop")
'("GdkAtom" "target")
- '("guint32" "time_")
- )
-)
-
-(define-function gtk_drag_finish
- (c-name "gtk_drag_finish")
- (return-type "none")
- (parameters
- '("GdkDragContext*" "context")
- '("gboolean" "success")
- '("guint32" "time_")
)
)
@@ -8196,7 +8185,7 @@
(return-type "const-char*")
(parameters
'("GtkWidget*" "widget")
- '("GdkDragContext*" "context")
+ '("GdkDrop*" "drop")
'("GdkContentFormats*" "target_list")
)
)
@@ -23528,21 +23517,6 @@
(return-type "GdkDisplay*")
)
-(define-method set_frame_clock
- (of-object "GtkStyleContext")
- (c-name "gtk_style_context_set_frame_clock")
- (return-type "none")
- (parameters
- '("GdkFrameClock*" "frame_clock")
- )
-)
-
-(define-method get_frame_clock
- (of-object "GtkStyleContext")
- (c-name "gtk_style_context_get_frame_clock")
- (return-type "GdkFrameClock*")
-)
-
(define-method lookup_color
(of-object "GtkStyleContext")
(c-name "gtk_style_context_lookup_color")
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index b52d7e08..e2df0aa3 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -2728,7 +2728,6 @@
(flags "Run Last")
(parameters
'("GtkEntryIconPosition" "p0")
- '("const-GdkEventButton*" "p1")
)
)
@@ -2738,7 +2737,6 @@
(flags "Run Last")
(parameters
'("GtkEntryIconPosition" "p0")
- '("const-GdkEventButton*" "p1")
)
)
@@ -8867,16 +8865,6 @@
;; From GtkStackSwitcher
-(define-property icon-size
- (of-object "GtkStackSwitcher")
- (prop-type "GParamEnum")
- (docs "Symbolic size to use for named icon")
- (readable #t)
- (writable #t)
- (construct-only #f)
- (default-value "GTK_ICON_SIZE_INHERIT")
-)
-
(define-property stack
(of-object "GtkStackSwitcher")
(prop-type "GParamObject")
@@ -8925,15 +8913,6 @@
(construct-only #f)
)
-(define-property paint-clock
- (of-object "GtkStyleContext")
- (prop-type "GParamObject")
- (docs "The associated GdkFrameClock")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
(define-property parent
(of-object "GtkStyleContext")
(prop-type "GParamObject")
@@ -11258,8 +11237,7 @@
(return-type "void")
(flags "Run Last")
(parameters
- '("GdkDragContext*" "p0")
- '("guint" "p1")
+ '("GdkDrop*" "p0")
)
)
@@ -11305,10 +11283,9 @@
(return-type "gboolean")
(flags "Run Last")
(parameters
- '("GdkDragContext*" "p0")
+ '("GdkDrop*" "p0")
'("gint" "p1")
'("gint" "p2")
- '("guint" "p3")
)
)
@@ -11317,10 +11294,9 @@
(return-type "gboolean")
(flags "Run Last")
(parameters
- '("GdkDragContext*" "p0")
+ '("GdkDrop*" "p0")
'("gint" "p1")
'("gint" "p2")
- '("guint" "p3")
)
)
@@ -11331,7 +11307,6 @@
(parameters
'("GdkDragContext*" "p0")
'("GtkSelectionData*" "p1")
- '("guint" "p2")
)
)
@@ -11340,9 +11315,8 @@
(return-type "void")
(flags "Run Last")
(parameters
- '("GdkDragContext*" "p0")
+ '("GdkDrop*" "p0")
'("GtkSelectionData*" "p1")
- '("guint" "p2")
)
)
diff --git a/gtk/src/gtk_signals.defs.patch b/gtk/src/gtk_signals.defs.patch
index 990ec4dc..2020b197 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-05-25 16:10:10.692348483 +0200
-+++ ./../../gtk/src/gtk_signals.defs 2018-05-25 16:10:10.748353999 +0200
+--- ./../../gtk/src/gtk_signals.defs.orig 2018-06-26 18:54:40.175307206 +0200
++++ ./../../gtk/src/gtk_signals.defs 2018-06-26 18:54:40.227309695 +0200
@@ -2267,11 +2267,11 @@
(define-signal color-activated
(of-object "GtkColorChooser")
@@ -39,31 +39,7 @@
;; From GtkDialog
-@@ -2726,21 +2726,21 @@
- (of-object "GtkEntry")
- (return-type "void")
- (flags "Run Last")
- (parameters
- '("GtkEntryIconPosition" "p0")
-- '("GdkEvent*" "p1")
-+ '("const-GdkEventButton*" "p1")
- )
- )
-
- (define-signal icon-release
- (of-object "GtkEntry")
- (return-type "void")
- (flags "Run Last")
- (parameters
- '("GtkEntryIconPosition" "p0")
-- '("GdkEvent*" "p1")
-+ '("const-GdkEventButton*" "p1")
- )
- )
-
- (define-signal preedit-changed
- (of-object "GtkEntry")
-@@ -5851,11 +5851,11 @@
+@@ -5829,11 +5829,11 @@
(define-signal toggle-size-request
(of-object "GtkMenuItem")
(return-type "void")
@@ -76,7 +52,7 @@
(define-signal toggle-size-allocate
(of-object "GtkMenuItem")
-@@ -6810,11 +6810,11 @@
+@@ -6838,11 +6838,11 @@
)
)
@@ -89,7 +65,7 @@
(define-signal update-custom-widget
(of-object "GtkPrintOperation")
-@@ -7424,11 +7424,11 @@
+@@ -7452,11 +7452,11 @@
;; From GtkScale
@@ -102,7 +78,7 @@
'("gdouble" "p0")
)
)
-@@ -8606,11 +8606,11 @@
+@@ -8634,11 +8634,11 @@
(define-signal input
(of-object "GtkSpinButton")
(return-type "gint")
@@ -115,7 +91,7 @@
(define-signal output
(of-object "GtkSpinButton")
-@@ -9194,11 +9194,11 @@
+@@ -9203,11 +9203,11 @@
(define-signal mark-set
(of-object "GtkTextBuffer")
(return-type "void")
@@ -128,7 +104,7 @@
)
(define-signal mark-deleted
-@@ -9214,23 +9214,23 @@
+@@ -9223,23 +9223,23 @@
(of-object "GtkTextBuffer")
(return-type "void")
(flags "Run Last")
@@ -156,7 +132,7 @@
(define-signal begin-user-action
(of-object "GtkTextBuffer")
-@@ -10488,11 +10488,11 @@
+@@ -10497,11 +10497,11 @@
(return-type "void")
(flags "Run First")
(parameters
@@ -169,7 +145,7 @@
;; From GtkTreeSelection
-@@ -11112,11 +11112,11 @@
+@@ -11121,11 +11121,11 @@
(define-signal size-allocate
(of-object "GtkWidget")
(return-type "void")
@@ -182,7 +158,7 @@
)
(define-signal state-flags-changed
-@@ -11165,11 +11165,11 @@
+@@ -11174,11 +11174,11 @@
(of-object "GtkWidget")
(return-type "void")
(flags "Run First, No Recurse, No Hooks")
diff --git a/tools/extra_defs_gen/generate_defs_gdk.cc b/tools/extra_defs_gen/generate_defs_gdk.cc
index 4b030faa..c512204e 100644
--- a/tools/extra_defs_gen/generate_defs_gdk.cc
+++ b/tools/extra_defs_gen/generate_defs_gdk.cc
@@ -47,6 +47,7 @@ int main(int /* argc */, char** /* argv */)
<< get_defs( GDK_TYPE_DISPLAY_MANAGER )
#endif /* G_OS_WIN32 */
<< get_defs( GDK_TYPE_DRAW_CONTEXT )
+ << get_defs( GDK_TYPE_DROP )
<< get_defs( GDK_TYPE_EVENT )
<< get_defs( GDK_TYPE_FRAME_CLOCK )
<< get_defs( GDK_TYPE_MONITOR )
diff --git a/tools/gen_scripts/gdk_generate_methods.sh b/tools/gen_scripts/gdk_generate_methods.sh
index 2c1ec01b..fceb2ced 100755
--- a/tools/gen_scripts/gdk_generate_methods.sh
+++ b/tools/gen_scripts/gdk_generate_methods.sh
@@ -4,6 +4,19 @@
# of the jhbuild sources. The script assumes that it resides in the
# tools/gen_scripts/ directory and the defs file will be placed in gdk/src.
+# To update the gdk_methods.defs file:
+# 1. ./gdk_generate_methods.sh
+# Generates gdk_methods.defs.orig and gdk_methods.defs.
+# If any hunks from the patch file fail to apply, apply them manually to the
+# gdk_methods.defs file, if required.
+# 2. Optional: Remove gdk_methods.defs.orig.
+
+# To update the gdk_methods.defs file and the patch file:
+# 1. Like step 1 when updating only the gdk_methods.defs file.
+# 2. Apply new patches manually to the gdk_methods.defs file.
+# 3. ./gdk_generate_methods.sh --make-patch
+# 4. Like step 2 when updating only the gdk_methods.defs files.
+
if [ -z "$JHBUILD_SOURCES" ]; then
echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
exit 1;
@@ -15,10 +28,24 @@ OUT_DIR="$ROOT_DIR/gdk/src"
shopt -s extglob # Enable extended pattern matching
shopt -s nullglob # Skip a filename pattern that matches no file
-H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
-# Process files whose names end with .h, but not with private.h.
-# Exclude gtk+/gdk/gdkinternals.h.
-$H2DEF_PY "$PREFIX"/gtk+/gdk/!(*private|gdkinternals).h "$PREFIX"/gtk+/gdk/deprecated/!(*private).h \
- "$PREFIX"/gtk+/build/gdk/*.h > "$OUT_DIR"/gdk_methods.defs
-$H2DEF_PY "$PREFIX"/gdk-pixbuf/gdk-pixbuf/gdk!(*private).h \
- "$PREFIX"/gdk-pixbuf/build/gdk-pixbuf/*.h > "$OUT_DIR"/gdk_pixbuf_methods.defs
+if [ $# -eq 0 ]
+then
+ H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
+ # Process files whose names end with .h, but not with private.h.
+ # Exclude gtk+/gdk/gdkinternals.h.
+ $H2DEF_PY "$PREFIX"/gtk+/gdk/!(*private|gdkinternals).h "$PREFIX"/gtk+/gdk/deprecated/!(*private).h \
+ "$PREFIX"/gtk+/build/gdk/*.h > "$OUT_DIR"/gdk_methods.defs
+ $H2DEF_PY "$PREFIX"/gdk-pixbuf/gdk-pixbuf/gdk!(*private).h \
+ "$PREFIX"/gdk-pixbuf/build/gdk-pixbuf/*.h > "$OUT_DIR"/gdk_pixbuf_methods.defs
+ # patch version 2.7.5 does not like directory names.
+ cd "$OUT_DIR"
+ PATCH_OPTIONS="--backup --version-control=simple --suffix=.orig"
+ patch $PATCH_OPTIONS gdk_methods.defs gdk_methods.defs.patch
+elif [ "$1" = "--make-patch" ]
+then
+ OUT_DIR_FILE="$OUT_DIR"/gdk_methods.defs
+ diff --unified=5 "$OUT_DIR_FILE".orig "$OUT_DIR_FILE" > "$OUT_DIR_FILE".patch
+else
+ echo "Usage: $0 [--make-patch]"
+ exit 1
+fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]