[gtk+] quartz: Copy annotations
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] quartz: Copy annotations
- Date: Sun, 30 Nov 2014 22:20:55 +0000 (UTC)
commit bbb3f6a2db9633a16f1b7ed996d2dff2c549cbbb
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Nov 30 16:57:22 2014 -0500
quartz: Copy annotations
Better than juggling introspection sources in the Makefile.
gtk/Makefile.am | 35 ++++--------
gtk/gtkclipboard-quartz.c | 132 +++++++++++++++++++++++++++++++++++++++++++++
gtk/gtkdnd-quartz.c | 30 +++++++++--
3 files changed, 168 insertions(+), 29 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 4c9e9b6..dc54085 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -576,7 +576,6 @@ gtk_base_c_sources = \
$(a11y_c_sources) \
$(deprecated_c_sources) \
$(inspector_c_sources) \
- $(clipboard_dnd_c_sources) \
gtkactionmuxer.c \
gtkactionobserver.c \
gtkactionobservable.c \
@@ -894,6 +893,16 @@ gtk_base_c_sources = \
gtkwindowgroup.c \
gtkwin32theme.c
+if USE_QUARTZ
+gtk_base_c_sources += \
+ gtkclipboard-quartz.c \
+ gtkdnd-quartz.c
+else
+gtk_base_c_sources += \
+ gtkclipboard.c \
+ gtkdnd.c
+endif
+
nodist_gtk_c_sources =
gtk_c_sources = $(gtk_base_c_sources)
@@ -1023,17 +1032,6 @@ endif
endif
endif
-if USE_QUARTZ
-clipboard_dnd_c_sources = \
- gtkclipboard-quartz.c \
- gtkdnd-quartz.c
-else
-# No wayland gtkdnd-wayland.c yet
-clipboard_dnd_c_sources = \
- gtkclipboard.c \
- gtkdnd.c
-endif
-
# we use our own built_sources variable rules to avoid automake's
# BUILT_SOURCES oddities
# we generate frequently rebuild files piggyback on a stamp file, so sources
@@ -1398,24 +1396,13 @@ LDADDS = \
$(GTK_DEP_LIBS)
if HAVE_INTROSPECTION
-# The Quartz clipboard and dnd files aren't annotated for
-# introspection. Rather than copy the annotations over from the
-# regular files, exclude the quartz ones:
introspection_files = \
$(filter-out %private.h gtktextdisplay.h gtktextlayout.h gtkx.h, $(gtkinclude_HEADERS)
$(a11yinclude_HEADERS) $(deprecatedinclude_HEADERS)) \
- $(filter-out gtkclipboard-quartz.c gtkdnd-quartz.c, \
- $(gtk_base_c_sources)) \
+ $(gtk_base_c_sources) \
gtkprintoperation-unix.c \
gtktypebuiltins.h \
gtktypebuiltins.c
-# And include the regular ones:
-if USE_QUARTZ
-introspection_files += \
- gtkclipboard.c \
- gtkdnd.c
-endif
-
if USE_X11
introspection_files += \
gtksocket.c \
diff --git a/gtk/gtkclipboard-quartz.c b/gtk/gtkclipboard-quartz.c
index 88c39f2..b0625f1 100644
--- a/gtk/gtkclipboard-quartz.c
+++ b/gtk/gtkclipboard-quartz.c
@@ -198,6 +198,11 @@ gtk_clipboard_class_init (GtkClipboardClass *class)
class->owner_change = gtk_clipboard_owner_change;
+ /**
+ * GtkClipboard::owner-change:
+ * @clipboard:
+ * @event: (type GdkEventOwnerChange):
+ */
clipboard_signals[OWNER_CHANGE] =
g_signal_new (I_("owner-change"),
G_TYPE_FROM_CLASS (gobject_class),
@@ -252,6 +257,13 @@ clipboard_display_closed (GdkDisplay *display,
g_object_unref (clipboard);
}
+/**
+ * gtk_clipboard_get_for_display:
+ * @display:
+ * @selection:
+ *
+ * Returns: (transfer none):
+ */
GtkClipboard *
gtk_clipboard_get_for_display (GdkDisplay *display,
GdkAtom selection)
@@ -262,6 +274,12 @@ gtk_clipboard_get_for_display (GdkDisplay *display,
return clipboard_peek (display, selection, FALSE);
}
+/**
+ * gtk_clipboard_get:
+ * @selection:
+ *
+ * Returns: (transfer none):
+ */
GtkClipboard *
gtk_clipboard_get (GdkAtom selection)
{
@@ -402,6 +420,15 @@ gtk_clipboard_set_contents (GtkClipboard *clipboard,
return TRUE;
}
+/**
+ * gtk_clipboard_set_with_data: (skip)
+ * @clipboard:
+ * @targets: (array length=n_targets):
+ * @n_targets:
+ * @get_func: (scope async):
+ * @clear_func: (scope async):
+ * @user_data:
+ */
gboolean
gtk_clipboard_set_with_data (GtkClipboard *clipboard,
const GtkTargetEntry *targets,
@@ -419,6 +446,14 @@ gtk_clipboard_set_with_data (GtkClipboard *clipboard,
FALSE);
}
+/**
+ * gtk_clipboard_set_with_owner: (skip)
+ * @clipboard:
+ * @targets: (array length=n_targets):
+ * @get_func: (scope async):
+ * @clear_func: (scope async):
+ * @owner:
+ */
gboolean
gtk_clipboard_set_with_owner (GtkClipboard *clipboard,
const GtkTargetEntry *targets,
@@ -437,6 +472,12 @@ gtk_clipboard_set_with_owner (GtkClipboard *clipboard,
TRUE);
}
+/**
+ * gtk_clipboard_get_owner:
+ * @clipboard:
+ *
+ * Returns: (transfer none):
+ */
GObject *
gtk_clipboard_get_owner (GtkClipboard *clipboard)
{
@@ -595,6 +636,13 @@ gtk_clipboard_set_image (GtkClipboard *clipboard,
gtk_target_list_unref (list);
}
+/**
+ * gtk_clipboard_request_contents:
+ * @clipboard:
+ * @target:
+ * @callback: (scope async):
+ * @user_data:
+ */
void
gtk_clipboard_request_contents (GtkClipboard *clipboard,
GdkAtom target,
@@ -610,6 +658,12 @@ gtk_clipboard_request_contents (GtkClipboard *clipboard,
gtk_selection_data_free (data);
}
+/**
+ * gtk_clipboard_request_text:
+ * @clipboard:
+ * @callback: (scope async):
+ * @user_data:
+ */
void
gtk_clipboard_request_text (GtkClipboard *clipboard,
GtkClipboardTextReceivedFunc callback,
@@ -622,6 +676,13 @@ gtk_clipboard_request_text (GtkClipboard *clipboard,
g_free (data);
}
+/**
+ * gtk_clipboard_request_rich_text:
+ * @clipboard:
+ * @buffer:
+ * @callback: (scope async):
+ * @user_data:
+ */
void
gtk_clipboard_request_rich_text (GtkClipboard *clipboard,
GtkTextBuffer *buffer,
@@ -632,6 +693,15 @@ gtk_clipboard_request_rich_text (GtkClipboard *clipboard,
}
+/**
+ * gtk_clipboard_wait_for_rich_text:
+ * @clipboard:
+ * @buffer:
+ * @format: (out):
+ * @length: (out):
+ *
+ * Returns: (nullable):
+ */
guint8 *
gtk_clipboard_wait_for_rich_text (GtkClipboard *clipboard,
GtkTextBuffer *buffer,
@@ -642,6 +712,12 @@ gtk_clipboard_wait_for_rich_text (GtkClipboard *clipboard,
return NULL;
}
+/**
+ * gtk_clipboard_request_image:
+ * @clipboard:
+ * @callback: (scope async):
+ * @user_data:
+ */
void
gtk_clipboard_request_image (GtkClipboard *clipboard,
GtkClipboardImageReceivedFunc callback,
@@ -655,6 +731,12 @@ gtk_clipboard_request_image (GtkClipboard *clipboard,
g_object_unref (pixbuf);
}
+/**
+ * gtk_clipboard_request_uris:
+ * @clipboard:
+ * @callback: (scope async):
+ * @user_data:
+ */
void
gtk_clipboard_request_uris (GtkClipboard *clipboard,
GtkClipboardURIReceivedFunc callback,
@@ -667,6 +749,12 @@ gtk_clipboard_request_uris (GtkClipboard *clipboard,
g_strfreev (uris);
}
+/**
+ * gtk_clipboard_request_targets:
+ * @clipboard:
+ * @callback: (scope async):
+ * @user_data:
+ */
void
gtk_clipboard_request_targets (GtkClipboard *clipboard,
GtkClipboardTargetsReceivedFunc callback,
@@ -680,6 +768,13 @@ gtk_clipboard_request_targets (GtkClipboard *clipboard,
callback (clipboard, targets, n_targets, user_data);
}
+/**
+ * gtk_clipboard_wait_for_contents:
+ * @clipboard:
+ * @target:
+ *
+ * Returns: (nullable):
+ */
GtkSelectionData *
gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
GdkAtom target)
@@ -733,6 +828,13 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
return selection_data;
}
+/**
+ * gtk_clipboard_wait_for_text:
+ * @clipboard:
+ * @target:
+ *
+ * Returns: (nullable):
+ */
gchar *
gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
{
@@ -749,6 +851,12 @@ gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
return result;
}
+/**
+ * gtk_clipboard_wait_for_image:
+ * @clipboard:
+ *
+ * Returns: (nullable) (transfer full):
+ */
GdkPixbuf *
gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
{
@@ -773,6 +881,12 @@ gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
return NULL;
}
+/**
+ * gtk_clipboard_wait_for_uris:
+ * @clipboard:
+ *
+ * Returns: (nullable) (array zero-terminated=1):
+ */
gchar **
gtk_clipboard_wait_for_uris (GtkClipboard *clipboard)
{
@@ -792,6 +906,12 @@ gtk_clipboard_wait_for_uris (GtkClipboard *clipboard)
return NULL;
}
+/**
+ * gtk_clipboard_get_display:
+ * @clipboard:
+ *
+ * Returns: (transfer none):
+ */
GdkDisplay *
gtk_clipboard_get_display (GtkClipboard *clipboard)
{
@@ -870,6 +990,12 @@ gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard)
return result;
}
+/**
+ * gtk_clipboard_wait_for_targets:
+ * @clipboard:
+ * @targets: (out) (array length=n_targets):
+ * @n_targets: (out):
+ */
gboolean
gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
GdkAtom **targets,
@@ -1030,6 +1156,12 @@ _gtk_clipboard_handle_event (GdkEventOwnerChange *event)
{
}
+/**
+ * gtk_clipboard_set_can_store:
+ * @clipboard:
+ * @targets: (allow-none) (array length=n_targets):
+ * @n_targets:
+ */
void
gtk_clipboard_set_can_store (GtkClipboard *clipboard,
const GtkTargetEntry *targets,
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index 9967ef7..a927298 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -334,6 +334,8 @@ gtk_drag_clear_source_info (GdkDragContext *context)
/**
* gtk_drag_get_source_widget: (method)
* @context: a (destination side) drag context
+ *
+ * Returns: (transfer none):
*/
GtkWidget *
gtk_drag_get_source_widget (GdkDragContext *context)
@@ -1066,6 +1068,8 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
* @context: drag context
* @target_list: (allow-none): list of droppable targets, or %NULL to use
* gtk_drag_dest_get_target_list (@widget).
+ *
+ * Returns: (transfer none):
*/
GdkAtom
gtk_drag_dest_find_target (GtkWidget *widget,
@@ -1324,6 +1328,18 @@ gtk_drag_begin_internal (GtkWidget *widget,
return context;
}
+/**
+ * gtk_drag_begin_with_coordinates: (method)
+ * @widget:
+ * @targets:
+ * @actions:
+ * @button:
+ * @event:
+ * @x:
+ * @y:
+ *
+ * Returns: (transfer none):
+ */
GdkDragContext *
gtk_drag_begin_with_coordinates (GtkWidget *widget,
GtkTargetList *targets,
@@ -1348,6 +1364,8 @@ gtk_drag_begin_with_coordinates (GtkWidget *widget,
* @actions: A bitmask of the allowed drag actions for this drag.
* @button: The button the user clicked to start the drag.
* @event: The event that triggered the start of the drag.
+ *
+ * Returns: (transfer none):
*/
GdkDragContext *
gtk_drag_begin (GtkWidget *widget,
@@ -1508,6 +1526,8 @@ gtk_drag_source_unset (GtkWidget *widget)
/**
* gtk_drag_source_get_target_list: (method)
* @widget: a #GtkWidget
+ *
+ * Returns: (transfer none):
*/
GtkTargetList *
gtk_drag_source_get_target_list (GtkWidget *widget)
@@ -1553,7 +1573,7 @@ gtk_drag_source_set_target_list (GtkWidget *widget,
}
/**
- * gtk_drag_source_add_text_targets:
+ * gtk_drag_source_add_text_targets: (method)
* @widget: a #GtkWidget that’s is a drag source
*
* Add the text targets supported by #GtkSelection to
@@ -1677,7 +1697,7 @@ gtk_drag_source_set_icon_pixbuf (GtkWidget *widget,
}
/**
- * gtk_drag_source_set_icon_stock:
+ * gtk_drag_source_set_icon_stock: (method)
* @widget: a #GtkWidget
* @stock_id: the ID of the stock icon to use
*
@@ -1703,7 +1723,7 @@ gtk_drag_source_set_icon_stock (GtkWidget *widget,
}
/**
- * gtk_drag_source_set_icon_name:
+ * gtk_drag_source_set_icon_name: (method)
* @widget: a #GtkWidget
* @icon_name: name of icon to use
*
@@ -1732,7 +1752,7 @@ gtk_drag_source_set_icon_name (GtkWidget *widget,
/**
- * gtk_drag_set_icon_widget:
+ * gtk_drag_set_icon_widget: (method)
* @context: the context for a drag. (This must be called
with a context for the source side of a drag)
* @widget: a toplevel window to use as an icon.
@@ -1960,7 +1980,7 @@ gtk_drag_set_icon_name (GdkDragContext *context,
}
/**
- * gtk_drag_set_icon_default:
+ * gtk_drag_set_icon_default: (method)
* @context: the context for a drag. (This must be called
with a context for the source side of a drag)
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]