mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
Drop duplication between marshallers
gtk and gdk have their own marshallers, for historic reasons. But there's no reason to duplicate the same code here. Eventually, we should just move all marshallers to the same place.
This commit is contained in:
parent
2cd5b4df1b
commit
0b9e5e6db4
@ -25,6 +25,7 @@
|
||||
#include "config.h"
|
||||
#include "gtkdrawingarea.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtksnapshot.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
@ -320,11 +321,11 @@ gtk_drawing_area_class_init (GtkDrawingAreaClass *class)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkDrawingAreaClass, resize),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__INT_INT,
|
||||
_gdk_marshal_VOID__INT_INT,
|
||||
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
||||
g_signal_set_va_marshaller (signals[RESIZE],
|
||||
G_TYPE_FROM_CLASS (class),
|
||||
_gtk_marshal_VOID__INT_INTv);
|
||||
_gdk_marshal_VOID__INT_INTv);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gtkdropprivate.h"
|
||||
#include "gtkeventcontrollerprivate.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include "gtknative.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
@ -754,12 +755,12 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkDropTargetClass, accept),
|
||||
g_signal_accumulator_first_wins, NULL,
|
||||
_gtk_marshal_BOOLEAN__OBJECT,
|
||||
_gdk_marshal_BOOLEAN__OBJECT,
|
||||
G_TYPE_BOOLEAN, 1,
|
||||
GDK_TYPE_DROP);
|
||||
g_signal_set_va_marshaller (signals[ACCEPT],
|
||||
GTK_TYPE_DROP_TARGET,
|
||||
_gtk_marshal_BOOLEAN__OBJECTv);
|
||||
_gdk_marshal_BOOLEAN__OBJECTv);
|
||||
|
||||
/**
|
||||
* GtkDropTarget::enter:
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gtkdropprivate.h"
|
||||
#include "gtkeventcontrollerprivate.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include "gtknative.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkprivate.h"
|
||||
@ -430,12 +431,12 @@ gtk_drop_target_async_class_init (GtkDropTargetAsyncClass *class)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkDropTargetAsyncClass, accept),
|
||||
g_signal_accumulator_first_wins, NULL,
|
||||
_gtk_marshal_BOOLEAN__OBJECT,
|
||||
_gdk_marshal_BOOLEAN__OBJECT,
|
||||
G_TYPE_BOOLEAN, 1,
|
||||
GDK_TYPE_DROP);
|
||||
g_signal_set_va_marshaller (signals[ACCEPT],
|
||||
GTK_TYPE_DROP_TARGET_ASYNC,
|
||||
_gtk_marshal_BOOLEAN__OBJECTv);
|
||||
_gdk_marshal_BOOLEAN__OBJECTv);
|
||||
|
||||
/**
|
||||
* GtkDropTargetAsync::drag-enter:
|
||||
|
@ -161,6 +161,7 @@
|
||||
#include "gtkeditable.h"
|
||||
#include "gtkentrybuffer.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
G_DEFINE_INTERFACE (GtkEditable, gtk_editable, GTK_TYPE_WIDGET)
|
||||
@ -342,13 +343,13 @@ gtk_editable_default_init (GtkEditableInterface *iface)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkEditableInterface, delete_text),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__INT_INT,
|
||||
_gdk_marshal_VOID__INT_INT,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
G_TYPE_INT);
|
||||
g_signal_set_va_marshaller (signals[DELETE_TEXT],
|
||||
G_TYPE_FROM_INTERFACE (iface),
|
||||
_gtk_marshal_VOID__INT_INTv);
|
||||
_gdk_marshal_VOID__INT_INTv);
|
||||
|
||||
/**
|
||||
* GtkEditable::changed:
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "gtkeventcontrollerlegacy.h"
|
||||
#include "gtkeventcontrollerprivate.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
struct _GtkEventControllerLegacy
|
||||
@ -89,12 +90,12 @@ gtk_event_controller_legacy_class_init (GtkEventControllerLegacyClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, _gtk_boolean_handled_accumulator, NULL,
|
||||
_gtk_marshal_BOOLEAN__POINTER,
|
||||
_gdk_marshal_BOOLEAN__POINTER,
|
||||
G_TYPE_BOOLEAN, 1,
|
||||
GDK_TYPE_EVENT);
|
||||
|
||||
g_signal_set_va_marshaller (signals[EVENT], G_TYPE_FROM_CLASS (klass),
|
||||
_gtk_marshal_BOOLEAN__POINTERv);
|
||||
_gdk_marshal_BOOLEAN__POINTERv);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "gtkglarea.h"
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtksnapshot.h"
|
||||
#include "gtknative.h"
|
||||
@ -964,12 +964,12 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkGLAreaClass, render),
|
||||
_gtk_boolean_handled_accumulator, NULL,
|
||||
_gtk_marshal_BOOLEAN__OBJECT,
|
||||
_gdk_marshal_BOOLEAN__OBJECT,
|
||||
G_TYPE_BOOLEAN, 1,
|
||||
GDK_TYPE_GL_CONTEXT);
|
||||
g_signal_set_va_marshaller (area_signals[RENDER],
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
_gtk_marshal_BOOLEAN__OBJECTv);
|
||||
_gdk_marshal_BOOLEAN__OBJECTv);
|
||||
|
||||
/**
|
||||
* GtkGLArea::resize:
|
||||
@ -995,11 +995,11 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkGLAreaClass, resize),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__INT_INT,
|
||||
_gdk_marshal_VOID__INT_INT,
|
||||
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
||||
g_signal_set_va_marshaller (area_signals[RESIZE],
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
_gtk_marshal_VOID__INT_INTv);
|
||||
_gdk_marshal_VOID__INT_INTv);
|
||||
|
||||
/**
|
||||
* GtkGLArea::create-context:
|
||||
|
@ -35,12 +35,10 @@ BOOLEAN:FLAGS
|
||||
BOOLEAN:INT
|
||||
BOOLEAN:INT,INT
|
||||
BOOLEAN:INT,INT,BOOLEAN,OBJECT
|
||||
BOOLEAN:OBJECT
|
||||
BOOLEAN:OBJECT,BOXED
|
||||
BOOLEAN:OBJECT,DOUBLE,DOUBLE
|
||||
BOOLEAN:OBJECT,ENUM
|
||||
BOOLEAN:OBJECT,OBJECT,OBJECT
|
||||
BOOLEAN:POINTER
|
||||
BOOLEAN:STRING
|
||||
BOOLEAN:UINT,UINT,FLAGS
|
||||
BOOLEAN:VOID
|
||||
@ -66,7 +64,6 @@ VOID:ENUM,INT
|
||||
VOID:ENUM,INT,BOOLEAN
|
||||
VOID:ENUM,INT,BOOLEAN,BOOLEAN
|
||||
VOID:INT,DOUBLE,DOUBLE
|
||||
VOID:INT,INT
|
||||
VOID:INT,INT,INT
|
||||
VOID:OBJECT,BOOLEAN
|
||||
VOID:OBJECT,BOXED,BOOLEAN,BOOLEAN
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "gtkprintoperation-private.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include "gtkprivate.h"
|
||||
#include "deprecated/gtkmessagedialog.h"
|
||||
@ -821,13 +822,15 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
|
||||
*/
|
||||
signals[PAGINATE] =
|
||||
g_signal_new (I_("paginate"),
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkPrintOperationClass, paginate),
|
||||
paginate_accumulator, NULL,
|
||||
_gtk_marshal_BOOLEAN__OBJECT,
|
||||
G_TYPE_BOOLEAN, 1, GTK_TYPE_PRINT_CONTEXT);
|
||||
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkPrintOperationClass, paginate),
|
||||
paginate_accumulator, NULL,
|
||||
_gdk_marshal_BOOLEAN__OBJECT,
|
||||
G_TYPE_BOOLEAN, 1, GTK_TYPE_PRINT_CONTEXT);
|
||||
g_signal_set_va_marshaller (signals[PAGINATE],
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
_gdk_marshal_BOOLEAN__OBJECTv);
|
||||
|
||||
/**
|
||||
* GtkPrintOperation::request-page-setup:
|
||||
@ -844,15 +847,15 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
|
||||
*/
|
||||
signals[REQUEST_PAGE_SETUP] =
|
||||
g_signal_new (I_("request-page-setup"),
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkPrintOperationClass, request_page_setup),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__OBJECT_INT_OBJECT,
|
||||
G_TYPE_NONE, 3,
|
||||
GTK_TYPE_PRINT_CONTEXT,
|
||||
G_TYPE_INT,
|
||||
GTK_TYPE_PAGE_SETUP);
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkPrintOperationClass, request_page_setup),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__OBJECT_INT_OBJECT,
|
||||
G_TYPE_NONE, 3,
|
||||
GTK_TYPE_PRINT_CONTEXT,
|
||||
G_TYPE_INT,
|
||||
GTK_TYPE_PAGE_SETUP);
|
||||
g_signal_set_va_marshaller (signals[REQUEST_PAGE_SETUP],
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
_gtk_marshal_VOID__OBJECT_INT_OBJECTv);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "gtkgesturedrag.h"
|
||||
#include "gtkgizmoprivate.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gdk/gdkmarshalers.h"
|
||||
#include "gtknativeprivate.h"
|
||||
#include "gtkprivatetypebuiltins.h"
|
||||
#include "gtkrendericonprivate.h"
|
||||
@ -365,12 +366,12 @@ gtk_text_handle_class_init (GtkTextHandleClass *klass)
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
G_SIGNAL_RUN_LAST, 0,
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__INT_INT,
|
||||
_gdk_marshal_VOID__INT_INT,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT, G_TYPE_INT);
|
||||
g_signal_set_va_marshaller (signals[HANDLE_DRAGGED],
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
_gtk_marshal_VOID__INT_INTv);
|
||||
_gdk_marshal_VOID__INT_INTv);
|
||||
|
||||
signals[DRAG_STARTED] =
|
||||
g_signal_new (I_("drag-started"),
|
||||
|
Loading…
Reference in New Issue
Block a user