]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkclipboard.c
Remove deprecated 'shadow' properties in GtkFrame and GtkHandleBox
[~andy/gtk] / gtk / gtkclipboard.c
index 48ee63f537d657e9d93eeaeb6c1cd9b4817e2809..86caed4af16087e0b6343fc877271b17ae66bf51 100644 (file)
@@ -29,7 +29,6 @@
 #include "gtkmarshalers.h"
 #include "gtktextbufferrichtext.h"
 #include "gtkintl.h"
-#include "gtkalias.h"
 
 #ifdef GDK_WINDOWING_X11
 #include "x11/gdkx.h"
@@ -287,7 +286,7 @@ clipboard_display_closed (GdkDisplay   *display,
  * 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
@@ -300,6 +299,7 @@ GtkClipboard *
 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);
 
@@ -308,20 +308,17 @@ gtk_clipboard_get_for_display (GdkDisplay *display,
 
 
 /**
- * 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)
 {
@@ -416,7 +413,7 @@ clipboard_get_timestamp (GtkClipboard *clipboard)
   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
@@ -1528,12 +1525,13 @@ clipboard_uris_received_func (GtkClipboard *clipboard,
  * 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
@@ -1928,8 +1926,9 @@ gtk_clipboard_store_timeout (GtkClipboard *clipboard)
 /**
  * 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
@@ -2026,7 +2025,7 @@ gtk_clipboard_store (GtkClipboard *clipboard)
                                                  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);
@@ -2082,6 +2081,3 @@ _gtk_clipboard_store_all (void)
   g_slist_free (displays);
   
 }
-
-#define __GTK_CLIPBOARD_C__
-#include "gtkaliasdef.c"