#include "gtkmarshalers.h"
#include "gtktextbufferrichtext.h"
#include "gtkintl.h"
-#include "gtkalias.h"
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"
* if your application called "Foo" has a special-purpose
* clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD".
*
- * Return value: the appropriate clipboard object. If no
+ * Return value: (transfer none): the appropriate clipboard object. If no
* clipboard already exists, a new one will
* be created. Once a clipboard object has
* been created, it is persistent and, since
gtk_clipboard_get_for_display (GdkDisplay *display,
GdkAtom selection)
{
+ g_return_val_if_fail (display != NULL, NULL); /* See bgo#463773; this is needed because Flash Player sucks */
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (!display->closed, NULL);
/**
- * gtk_clipboard_get():
- * @selection: a #GdkAtom which identifies the clipboard
- * to use.
- *
+ * gtk_clipboard_get:
+ * @selection: a #GdkAtom which identifies the clipboard to use
+ *
* Returns the clipboard object for the given selection.
* See gtk_clipboard_get_for_display() for complete details.
- *
- * Return value: the appropriate clipboard object. If no
- * clipboard already exists, a new one will
- * be created. Once a clipboard object has
- * been created, it is persistent and, since
- * it is owned by GTK+, must not be freed or
- * unrefd.
- **/
+ *
+ * Return value: (transfer none): the appropriate clipboard object. If no clipboard
+ * already exists, a new one will be created. Once a clipboard
+ * object has been created, it is persistent and, since it is
+ * owned by GTK+, must not be freed or unreffed.
+ */
GtkClipboard *
gtk_clipboard_get (GdkAtom selection)
{
if (timestamp == GDK_CURRENT_TIME)
{
#ifdef GDK_WINDOWING_X11
- timestamp = gdk_x11_get_server_time (clipboard_widget->window);
+ timestamp = gdk_x11_get_server_time (gtk_widget_get_window (clipboard_widget));
#elif defined GDK_WINDOWING_WIN32
timestamp = GetMessageTime ();
#endif
* Requests the contents of the clipboard as URIs. This function waits
* for the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
- *
- * Return value: a newly-allocated %NULL-terminated array of strings which must
+ *
+ * Return value: (array zero-terminated=1) (element-type utf8) (transfer full): a newly-allocated
+ * %NULL-terminated array of strings which must
* be freed with g_strfreev(), or %NULL if
- * retrieving the selection data failed. (This
- * could happen for various reasons, in particular
- * if the clipboard was empty or if the contents of
+ * retrieving the selection data failed. (This
+ * could happen for various reasons, in particular
+ * if the clipboard was empty or if the contents of
* the clipboard could not be converted into URI form.)
*
* Since: 2.14
/**
* gtk_clipboard_set_can_store:
* @clipboard: a #GtkClipboard
- * @targets: array containing information about which forms should be stored
- * or %NULL to indicate that all forms should be stored.
+ * @targets: (allow-none): array containing information about which forms
+ * should be stored or %NULL to indicate that all forms should
+ * be stored.
* @n_targets: number of elements in @targets
*
* Hints that the clipboard data should be stored somewhere when the
clipboard);
gdk_display_store_clipboard (clipboard->display,
- clipboard_widget->window,
+ gtk_widget_get_window (clipboard_widget),
clipboard_get_timestamp (clipboard),
clipboard->storable_targets,
clipboard->n_storable_targets);
g_slist_free (displays);
}
-
-#define __GTK_CLIPBOARD_C__
-#include "gtkaliasdef.c"