Unverified Commit 77f0cd78 authored by Mike Wey's avatar Mike Wey Committed by GitHub
Browse files

Merge pull request #340 from KonstantIMP/patch-2

Fix ApiLookup errors
parents abcd2093 08786825
......@@ -27,6 +27,7 @@ module atk.Version;
private import atk.c.functions;
public import atk.c.types;
private import glib.Str;
private import glib.c.functions;
/** */
......
......@@ -34,14 +34,15 @@ private import gobject.ObjectG;
/**
* GdkAppLaunchContext is an implementation of #GAppLaunchContext that
* handles launching an application in a graphical context. It provides
* startup notification and allows to launch applications on a specific
* screen or workspace.
* `GdkAppLaunchContext` handles launching an application in a graphical context.
*
* It is an implementation of `GAppLaunchContext` that provides startup
* notification and allows to launch applications on a specific screen
* or workspace.
*
* ## Launching an application
*
* |[<!-- language="C" -->
* ```c
* GdkAppLaunchContext *context;
*
* context = gdk_display_get_app_launch_context (display);
......@@ -53,7 +54,7 @@ private import gobject.ObjectG;
* g_warning ("Launching failed: %s\n", error->message);
*
* g_object_unref (context);
* ]|
* ```
*/
public class AppLaunchContext : DGioAppLaunchContext
{
......@@ -91,7 +92,7 @@ public class AppLaunchContext : DGioAppLaunchContext
}
/**
* Gets the #GdkDisplay that @context is for.
* Gets the `GdkDisplay` that @context is for.
*
* Returns: the display of @context
*/
......@@ -108,8 +109,9 @@ public class AppLaunchContext : DGioAppLaunchContext
}
/**
* Sets the workspace on which applications will be launched when
* using this context when running under a window manager that
* Sets the workspace on which applications will be launched.
*
* This only works when running under a window manager that
* supports multiple workspaces, as described in the
* [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
*
......@@ -132,7 +134,7 @@ public class AppLaunchContext : DGioAppLaunchContext
* Window Managers can use this information when displaying startup
* notification.
*
* See also gdk_app_launch_context_set_icon_name().
* See also [method@Gdk.AppLaunchContext.set_icon_name].
*
* Params:
* icon = a #GIcon, or %NULL
......@@ -144,12 +146,13 @@ public class AppLaunchContext : DGioAppLaunchContext
/**
* Sets the icon for applications that are launched with this context.
*
* The @icon_name will be interpreted in the same way as the Icon field
* in desktop files. See also gdk_app_launch_context_set_icon().
* in desktop files. See also [method@Gdk.AppLaunchContext.set_icon()].
*
* If both @icon and @icon_name are set, the @icon_name takes priority.
* If neither @icon or @icon_name is set, the icon is taken from either
* the file that is passed to launched application or from the #GAppInfo
* the file that is passed to launched application or from the `GAppInfo`
* for the launched application itself.
*
* Params:
......@@ -161,8 +164,10 @@ public class AppLaunchContext : DGioAppLaunchContext
}
/**
* Sets the timestamp of @context. The timestamp should ideally
* be taken from the event that triggered the launch.
* Sets the timestamp of @context.
*
* The timestamp should ideally be taken from the event that
* triggered the launch.
*
* Window managers can use this information to avoid moving the
* focus to the newly launched application when the user is busy
......
......@@ -30,7 +30,7 @@ public import gdk.c.types;
/**
* An event related to a button on a pointer device/
* An event related to a button on a pointer device.
*/
public class ButtonEvent : Event
{
......
......@@ -31,12 +31,12 @@ public import gdk.c.types;
/**
* #GdkCairoContext is an object representing the platform-specific
* `GdkCairoContext` is an object representing the platform-specific
* draw context.
*
* #GdkCairoContexts are created for a #GdkDisplay using
* gdk_surface_create_cairo_context(), and the context can then be used
* to draw on that #GdkSurface.
* `GdkCairoContext`s are created for a surface using
* [method@Gdk.Surface.create_cairo_context], and the context can then be used
* to draw on that surface.
*/
public class CairoContext : DrawContext
{
......@@ -74,15 +74,17 @@ public class CairoContext : DrawContext
}
/**
* Retrieves a Cairo context to be used to draw on the #GdkSurface
* of @context. A call to gdk_draw_context_begin_frame() with this
* Retrieves a Cairo context to be used to draw on the `GdkSurface`
* of @context.
*
* A call to [method@Gdk.DrawContext.begin_frame] with this
* @context must have been done or this function will return %NULL.
*
* The returned context is guaranteed to be valid until
* gdk_draw_context_end_frame() is called.
* [method@Gdk.DrawContext.end_frame] is called.
*
* Returns: a Cairo context to be used
* to draw the contents of the #GdkSurface. %NULL is returned
* to draw the contents of the `GdkSurface`. %NULL is returned
* when @context is not drawing.
*/
public Context cairoCreate()
......
......@@ -36,6 +36,7 @@ private import gio.InputStream;
private import glib.ErrorG;
private import glib.GException;
private import glib.Str;
private import glib.c.functions;
private import gobject.ObjectG;
private import gobject.Signals;
private import gobject.Value;
......@@ -43,21 +44,23 @@ private import std.algorithm;
/**
* The #GdkClipboard object represents a clipboard of data shared
* between different applications or between different parts of
* the same application.
* The `GdkClipboard` object represents data shared between applications or
* inside an application.
*
* To get a GdkClipboard object, use gdk_display_get_clipboard() or
* gdk_display_get_primary_clipboard(). You can find out about the data that
* is currently available in a clipboard using gdk_clipboard_get_formats().
* To get a `GdkClipboard` object, use [method@Gdk.Display.get_clipboard] or
* [method@Gdk.Display.get_primary_clipboard]. You can find out about the data
* that is currently available in a clipboard using
* [method@Gdk.Clipboard.get_formats].
*
* To make text or image data available in a clipboard, use gdk_clipboard_set_text() or
* gdk_clipboard_set_texture(). For other data, you can use gdk_clipboard_set_content(),
* which takes a #GdkContentProvider object.
* To make text or image data available in a clipboard, use
* [method@Gdk.Clipboard.set_text] or [method@Gdk.Clipboard.set_texture].
* For other data, you can use [method@Gdk.Clipboard.set_content], which
* takes a [class@Gdk.ContentProvider] object.
*
* To read textual or image data from a clipboard, use gdk_clipboard_read_text_async() or
* gdk_clipboard_read_texture_async(). For other data, use gdk_clipboard_read_async(),
* which provides a #GInputStream object.
* To read textual or image data from a clipboard, use
* [method@Gdk.Clipboard.read_text_async] or
* [method@Gdk.Clipboard.read_texture_async]. For other data, use
* [method@Gdk.Clipboard.read_async], which provides a `GInputStream` object.
*/
public class Clipboard : ObjectG
{
......@@ -95,9 +98,10 @@ public class Clipboard : ObjectG
}
/**
* Returns the #GdkContentProvider currently set on @clipboard. If the
* @clipboard is empty or its contents are not owned by the current process,
* %NULL will be returned.
* Returns the `GdkContentProvider` currently set on @clipboard.
*
* If the @clipboard is empty or its contents are not owned by the
* current process, %NULL will be returned.
*
* Returns: The content of a clipboard or %NULL
* if the clipboard does not maintain any content.
......@@ -115,9 +119,9 @@ public class Clipboard : ObjectG
}
/**
* Gets the #GdkDisplay that the clipboard was created for.
* Gets the `GdkDisplay` that the clipboard was created for.
*
* Returns: a #GdkDisplay
* Returns: a `GdkDisplay`
*/
public Display getDisplay()
{
......@@ -149,11 +153,13 @@ public class Clipboard : ObjectG
}
/**
* Returns if the clipboard is local. A clipboard is considered local if it was
* last claimed by the running application.
* Returns if the clipboard is local.
*
* A clipboard is considered local if it was last claimed
* by the running application.
*
* Note that gdk_clipboard_get_content() may return %NULL even on a local
* clipboard. In this case the clipboard is empty.
* Note that [method@Gdk.Clipboard.get_content] may return %NULL
* even on a local clipboard. In this case the clipboard is empty.
*
* Returns: %TRUE if the clipboard is local
*/
......@@ -164,18 +170,18 @@ public class Clipboard : ObjectG
/**
* Asynchronously requests an input stream to read the @clipboard's
* contents from. When the operation is finished @callback will be called.
* You can then call gdk_clipboard_read_finish() to get the result of the
* operation.
* contents from.
*
* When the operation is finished @callback will be called. You must then
* call [method@Gdk.Clipboard.read_finish] to get the result of the operation.
*
* The clipboard will choose the most suitable mime type from the given list
* to fulfill the request, preferring the ones listed first.
*
* Params:
* mimeTypes = a %NULL-terminated array of mime types to choose from
* ioPriority = the [I/O priority][io-priority]
* of the request.
* cancellable = optional #GCancellable object, %NULL to ignore.
* ioPriority = the I/O priority of the request
* cancellable = optional `GCancellable` object, %NULL to ignore.
* callback = callback to call when the request is satisfied
* userData = the data to pass to callback function
*/
......@@ -185,14 +191,16 @@ public class Clipboard : ObjectG
}
/**
* Finishes an asynchronous clipboard read started with gdk_clipboard_read_async().
* Finishes an asynchronous clipboard read.
*
* See [method@Gdk.Clipboard.read_async].
*
* Params:
* result = a #GAsyncResult
* result = a `GAsyncResult`
* outMimeType = pointer to store
* the chosen mime type in or %NULL
*
* Returns: a #GInputStream or %NULL on error.
* Returns: a `GInputStream` or %NULL on error.
*
* Throws: GException on failure.
*/
......@@ -220,15 +228,16 @@ public class Clipboard : ObjectG
/**
* Asynchronously request the @clipboard contents converted to a string.
* When the operation is finished @callback will be called. You can then
* call gdk_clipboard_read_text_finish() to get the result.
*
* This is a simple wrapper around gdk_clipboard_read_value_async(). Use
* that function or gdk_clipboard_read_async() directly if you need more
* control over the operation.
* When the operation is finished @callback will be called. You must then
* call [method@Gdk.Clipboard.read_text_finish] to get the result.
*
* This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
* Use that function or [method@Gdk.Clipboard.read_async] directly if you
* need more control over the operation.
*
* Params:
* cancellable = optional #GCancellable object, %NULL to ignore.
* cancellable = optional `GCancellable` object, %NULL to ignore
* callback = callback to call when the request is satisfied
* userData = the data to pass to callback function
*/
......@@ -238,13 +247,14 @@ public class Clipboard : ObjectG
}
/**
* Finishes an asynchronous clipboard read started with
* gdk_clipboard_read_text_async().
* Finishes an asynchronous clipboard read.
*
* See [method@Gdk.Clipboard.read_text_async].
*
* Params:
* result = a #GAsyncResult
* result = a `GAsyncResult`
*
* Returns: a new string or %NULL on error.
* Returns: a new string or %NULL on error
*
* Throws: GException on failure.
*/
......@@ -264,16 +274,17 @@ public class Clipboard : ObjectG
}
/**
* Asynchronously request the @clipboard contents converted to a #GdkPixbuf.
* When the operation is finished @callback will be called. You can then
* call gdk_clipboard_read_texture_finish() to get the result.
* Asynchronously request the @clipboard contents converted to a `GdkPixbuf`.
*
* This is a simple wrapper around gdk_clipboard_read_value_async(). Use
* that function or gdk_clipboard_read_async() directly if you need more
* control over the operation.
* When the operation is finished @callback will be called. You must then
* call [method@Gdk.Clipboard.read_texture_finish] to get the result.
*
* This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
* Use that function or [methos@Gdk.Clipboard.read_async] directly if you
* need more control over the operation.
*
* Params:
* cancellable = optional #GCancellable object, %NULL to ignore.
* cancellable = optional `GCancellable` object, %NULL to ignore.
* callback = callback to call when the request is satisfied
* userData = the data to pass to callback function
*/
......@@ -283,13 +294,14 @@ public class Clipboard : ObjectG
}
/**
* Finishes an asynchronous clipboard read started with
* gdk_clipboard_read_texture_async().
* Finishes an asynchronous clipboard read.
*
* See [method@Gdk.Clipboard.read_texture_async].
*
* Params:
* result = a #GAsyncResult
* result = a `GAsyncResult`
*
* Returns: a new #GdkTexture or %NULL on error.
* Returns: a new `GdkTexture` or %NULL on error
*
* Throws: GException on failure.
*/
......@@ -314,18 +326,18 @@ public class Clipboard : ObjectG
/**
* Asynchronously request the @clipboard contents converted to the given
* @type. When the operation is finished @callback will be called.
* You can then call gdk_clipboard_read_value_finish() to get the resulting
* #GValue.
* @type.
*
* When the operation is finished @callback will be called. You must then call
* [method@Gdk.Clipboard.read_value_finish] to get the resulting `GValue`.
*
* For local clipboard contents 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 clipboard's data.
* For local clipboard contents that are available in the given `GType`,
* the value will be copied directly. Otherwise, GDK will try to use
* [func@content_deserialize_async] to convert the clipboard's data.
*
* Params:
* type = a #GType to read
* ioPriority = the [I/O priority][io-priority]
* of the request.
* type = a `GType` to read
* ioPriority = the I/O priority of the request
* cancellable = optional #GCancellable object, %NULL to ignore.
* callback = callback to call when the request is satisfied
* userData = the data to pass to callback function
......@@ -336,13 +348,14 @@ public class Clipboard : ObjectG
}
/**
* Finishes an asynchronous clipboard read started with
* gdk_clipboard_read_value_async().
* Finishes an asynchronous clipboard read.
*
* See [method@Gdk.Clipboard.read_value_async].
*
* Params:
* result = a #GAsyncResult
* result = a `GAsyncResult`
*
* Returns: a #GValue containing the result.
* Returns: a `GValue` containing the result.
*
* Throws: GException on failure.
*/
......@@ -366,9 +379,10 @@ public class Clipboard : ObjectG
}
/**
* Sets a new content provider on @clipboard. The clipboard will claim the
* #GdkDisplay's resources and advertise these new contents to other
* applications.
* Sets a new content provider on @clipboard.
*
* The clipboard will claim the `GdkDisplay`'s resources and advertise
* these new contents to other applications.
*
* In the rare case of a failure, this function will return %FALSE. The
* clipboard will then continue reporting its old contents and ignore
......@@ -404,7 +418,7 @@ public class Clipboard : ObjectG
* Puts the given @texture into the clipboard.
*
* Params:
* texture = a #GdkTexture to put into the clipboard
* texture = a `GdkTexture` to put into the clipboard
*/
public void setTexture(Texture texture)
{
......@@ -412,8 +426,7 @@ public class Clipboard : ObjectG
}
/**
* Sets the clipboard to contain the value collected from the given
* @args.
* Sets the clipboard to contain the value collected from the given @args.
*
* Params:
* type = type of value to set
......@@ -428,7 +441,7 @@ public class Clipboard : ObjectG
* Sets the @clipboard to contain the given @value.
*
* Params:
* value = a #GValue to set
* value = a `GValue` to set
*/
public void setValue(Value value)
{
......@@ -436,17 +449,23 @@ public class Clipboard : ObjectG
}
/**
* Asynchronously instructs the @clipboard to store its contents remotely to
* preserve them for later usage. If the clipboard is not local, this function
* does nothing but report success.
* Asynchronously instructs the @clipboard to store its contents remotely.
*
* If the clipboard is not local, this function does nothing but report success.
*
* This function is called automatically when gtk_main() or #GtkApplication
* exit, so you likely don't need to call it.
* The @callback must call [method@Gdk.Clipboard.store_finish].
*
* The purpose of this call is to preserve clipboard contents beyond the
* lifetime of an application, so this function is typically called on
* exit. Depending on the platform, the functionality may not be available
* unless a "clipboard manager" is running.
*
* This function is called automatically when a [class@Gtk.Application] is
* shut down, so you likely don't need to call it.
*
* Params:
* ioPriority = the [I/O priority][io-priority]
* of the request.
* cancellable = optional #GCancellable object, %NULL to ignore.
* ioPriority = the I/O priority of the request.
* cancellable = optional `GCancellable` object, %NULL to ignore.
* callback = callback to call when the request is satisfied
* userData = the data to pass to callback function
*/
......@@ -456,10 +475,12 @@ public class Clipboard : ObjectG
}
/**
* Finishes an asynchronous clipboard store started with gdk_clipboard_store_async().
* Finishes an asynchronous clipboard store.
*
* See [method@Gdk.Clipboard.store_async].
*
* Params:
* result = a #GAsyncResult
* result = a `GAsyncResult`
*
* Returns: %TRUE if storing was successful.
*
......@@ -480,7 +501,7 @@ public class Clipboard : ObjectG
}
/**
* The ::changed signal is emitted when the clipboard changes ownership.
* Emitted when the clipboard changes ownership.
*/
gulong addOnChanged(void delegate(Clipboard) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
......
......@@ -32,13 +32,23 @@ private import gio.Cancellable;
private import gio.InputStream;
private import glib.ErrorG;
private import glib.Str;
private import glib.c.functions;
private import gobject.ObjectG;
private import gobject.Value;
/**
* A GdkContentDeserializer is used to deserialize content received via
* A `GdkContentDeserializer` is used to deserialize content received via
* inter-application data transfers.
*
* The `GdkContentDeserializer` transforms serialized content that is
* identified by a mime type into an object identified by a GType.
*
* GTK provides serializers and deserializers for common data types
* such as text, colors, images or file lists. To register your own
* deserialization functions, use [func@content_register_deserializer].
*
* Also see [class@Gdk.ContentSerializer].
*/
public class ContentDeserializer : ObjectG, AsyncResultIF
{
......@@ -79,7 +89,9 @@ public class ContentDeserializer : ObjectG, AsyncResultIF
}
/**
* Gets the cancellable that was passed to gdk_content_deserialize_async().
* Gets the cancellable for the current operation.
*
* This is the `GCancellable` that was passed to [func@content_deserialize_async].
*
* Returns: the cancellable for the current operation
*/
......@@ -106,7 +118,9 @@ public class ContentDeserializer : ObjectG, AsyncResultIF
}
/**
* Gets the input stream that was passed to gdk_content_deserialize_async().
* Gets the input stream for the current operation.
*
* This is the stream that was passed to [func@content_deserialize_async].
*
* Returns: the input stream for the current operation
*/
......@@ -133,9 +147,11 @@ public class ContentDeserializer : ObjectG, AsyncResultIF
}
/**
* Gets the io priority that was passed to gdk_content_deserialize_async().
* Gets the I/O priority for the current operation.
*
* This is the priority that was passed to [funccontent_deserialize_async].
*
* Returns: the io priority for the current operation
* Returns: the I/O priority for the current operation
*/
public int getPriority()
{
......@@ -143,7 +159,9 @@ public class ContentDeserializer : ObjectG, AsyncResultIF
}
/**
* Gets the data that was associated with @deserializer via gdk_content_deserializer_set_task_data().
* Gets the data that was associated with the current operation.
*
* See [method@Gdk.ContentDeserializer.set_task_data].
*
* Returns: the task data for @deserializer
*/
......@@ -163,9 +181,9 @@ public class ContentDeserializer : ObjectG, AsyncResultIF
}
/**
* Gets the #GValue to store the deserialized object in.
* Gets the `GValue` to store the deserialized object in.
*
* Returns: the #GValue for the current operation
* Returns: the `GValue` for the current operation
*/
public Value getValue()
{
......@@ -181,10 +199,11 @@ public class ContentDeserializer : ObjectG, AsyncResultIF
/**
* Indicate that the deserialization has ended with an error.
*
* This function consumes @error.
*
* Params:
* error = a #GError
* error = a `GError`
*/
public void returnError(ErrorG error)
{
......
......@@ -29,38 +29,44 @@ public import gdk.c.types;
private import glib.ConstructionException;
private import glib.Str;
private import glib.StringG;
private import glib.c.functions;
private import gobject.ObjectG;
private import gtkd.Loader;
/**
* This section describes the #GdkContentFormats structure that is used to
* advertise and negotiate the format of content passed between different
* widgets, windows or applications using for example the clipboard or
* drag'n'drop.
* The `GdkContentFormats` structure is used to advertise and negotiate the
* format of content.
*
* GDK supports content in 2 forms: #GType and mime type.
* Using #GTypes is meant only for in-process content transfers. Mime types
* You will encounter `GdkContentFormats` when interacting with objects
* controlling operations that pass data between different widgets, window
* or application, like [class@Gdk.Drag], [class@Gdk.Drop],
* [class@Gdk.Clipboard] or [class@Gdk.ContentProvider].
*
* GDK supports content in 2 forms: `GType` and mime type.
* Using `GTypes` is meant only for in-process content transfers. Mime types
* are meant to be used for data passing both in-process and out-of-process.
* The details of how data is passed is described in the documentation of
* the actual implementations.
* the actual implementations. To transform between the two forms,
* [class@Gdk.ContentSerializer] and [class@Gdk.ContentDeserializer] are used.
*
* A #GdkContentFormats describes a set of possible formats content can be
* exchanged in. It is assumed that this set is ordered. #GTypes are more
* important than mime types. Order between different #GTypes or mime types
* A `GdkContentFormats` describes a set of possible formats content can be
* exchanged in. It is assumed that this set is ordered. `GTypes` are more
* important than mime types. Order between different `GTypes` or mime types
* is the order they were added in, most important first. Functions that
* care about order, such as gdk_content_formats_union() will describe in
* their documentation how they interpret that order, though in general the
* care about order, such as [method@Gdk.ContentFormats.union], will describe
* in their documentation how they interpret that order, though in general the
* order of the first argument is considered the primary order of the result,
* followed by the order of further arguments.
*