shell: Use generic marshaller
https://bugzilla.gnome.org/show_bug.cgi?id=662152
This commit is contained in:
parent
46505a8314
commit
b40b19997a
@ -89,13 +89,10 @@ privlibdir = $(pkglibdir)
|
||||
privlib_LTLIBRARIES = libgnome-shell.la
|
||||
|
||||
shell_built_sources = \
|
||||
shell-marshal.h \
|
||||
shell-marshal.c \
|
||||
shell-enum-types.h \
|
||||
shell-enum-types.c
|
||||
|
||||
BUILT_SOURCES += $(shell_built_sources)
|
||||
EXTRA_DIST += shell-marshal.list
|
||||
|
||||
shell_public_headers_h = \
|
||||
shell-app.h \
|
||||
@ -230,28 +227,6 @@ run_js_test_SOURCES = \
|
||||
|
||||
########################################
|
||||
|
||||
shell-marshal.h: stamp-shell-marshal.h
|
||||
@true
|
||||
stamp-shell-marshal.h: Makefile shell-marshal.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_shell_marshal \
|
||||
--header \
|
||||
$(srcdir)/shell-marshal.list > xgen-smh && \
|
||||
(cmp -s xgen-smh shell-marshal.h || cp -f xgen-smh shell-marshal.h) && \
|
||||
rm -f xgen-smh && \
|
||||
echo timestamp > $(@F)
|
||||
CLEANFILES += stamp-shell-marshal.h
|
||||
|
||||
shell-marshal.c: Makefile shell-marshal.list
|
||||
$(AM_V_GEN) (echo "#include \"shell-marshal.h\"" ; \
|
||||
$(GLIB_GENMARSHAL) \
|
||||
--prefix=_shell_marshal \
|
||||
--body \
|
||||
$(srcdir)/shell-marshal.list ) > xgen-smc && \
|
||||
cp -f xgen-smc shell-marshal.c && \
|
||||
rm -f xgen-smc
|
||||
|
||||
|
||||
shell-enum-types.h: stamp-shell-enum-types.h Makefile
|
||||
@true
|
||||
stamp-shell-enum-types.h: $(srcdir)/shell-enum-types.h.in $(shell_public_headers_h)
|
||||
|
@ -70,8 +70,7 @@ static void shell_app_system_class_init(ShellAppSystemClass *klass)
|
||||
SHELL_TYPE_APP_SYSTEM,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
SHELL_TYPE_APP);
|
||||
signals[INSTALLED_CHANGED] =
|
||||
@ -79,8 +78,7 @@ static void shell_app_system_class_init(ShellAppSystemClass *klass)
|
||||
SHELL_TYPE_APP_SYSTEM,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ShellAppSystemClass, installed_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (ShellAppSystemPrivate));
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "shell-app-usage.h"
|
||||
#include "shell-window-tracker.h"
|
||||
#include "shell-global.h"
|
||||
#include "shell-marshal.h"
|
||||
|
||||
/* This file includes modified code from
|
||||
* desktop-data-engine/engine-dbus/hippo-application-monitor.c
|
||||
|
@ -1520,8 +1520,7 @@ shell_app_class_init(ShellAppClass *klass)
|
||||
SHELL_TYPE_APP,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
|
@ -320,8 +320,7 @@ shell_doc_system_class_init(ShellDocSystemClass *klass)
|
||||
SHELL_TYPE_DOC_SYSTEM,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
signals[DELETED] =
|
||||
@ -329,8 +328,7 @@ shell_doc_system_class_init(ShellDocSystemClass *klass)
|
||||
SHELL_TYPE_DOC_SYSTEM,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__BOXED,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, GTK_TYPE_RECENT_INFO);
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (ShellDocSystemPrivate));
|
||||
|
@ -285,8 +285,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
gi_cclosure_marshal_generic,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
|
||||
|
||||
/**
|
||||
@ -310,8 +309,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
gi_cclosure_marshal_generic,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
|
||||
|
||||
/**
|
||||
@ -331,8 +329,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
gi_cclosure_marshal_generic,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2, CLUTTER_TYPE_ACTOR_BOX, CLUTTER_TYPE_ALLOCATION_FLAGS);
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (ShellGenericContainerPrivate));
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "shell-enum-types.h"
|
||||
#include "shell-global-private.h"
|
||||
#include "shell-jsapi-compat-private.h"
|
||||
#include "shell-marshal.h"
|
||||
#include "shell-perf-log.h"
|
||||
#include "shell-window-tracker.h"
|
||||
#include "shell-wm.h"
|
||||
@ -311,8 +310,7 @@ shell_global_class_init (ShellGlobalClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_shell_marshal_VOID__INT_INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
||||
|
||||
/* Emitted from gnome-shell-plugin.c during event handling */
|
||||
@ -321,8 +319,7 @@ shell_global_class_init (ShellGlobalClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/* Emitted from gnome-shell-plugin.c during event handling */
|
||||
@ -331,8 +328,7 @@ shell_global_class_init (ShellGlobalClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
shell_global_signals[NOTIFY_ERROR] =
|
||||
@ -340,8 +336,7 @@ shell_global_class_init (ShellGlobalClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
gi_cclosure_marshal_generic,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING);
|
||||
|
@ -1,9 +0,0 @@
|
||||
VOID:INT,INT,INT
|
||||
VOID:OBJECT,INT,INT,INT,INT
|
||||
VOID:BOXED
|
||||
VOID:BOXED,OBJECT
|
||||
VOID:OBJECT,OBJECT
|
||||
VOID:STRING,UINT,OBJECT,BOOLEAN
|
||||
VOID:INT,INT
|
||||
VOID:STRING,STRING,STRING,STRING,BOXED
|
||||
VOID:STRING,OBJECT,STRING,BOXED
|
@ -135,8 +135,7 @@ shell_mount_operation_class_init (ShellMountOperationClass *klass)
|
||||
g_signal_new ("show-processes-2",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (ShellMountOperationPrivate));
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <gnome-keyring.h>
|
||||
|
||||
#include "shell-network-agent.h"
|
||||
#include "shell-marshal.h"
|
||||
|
||||
enum {
|
||||
SIGNAL_NEW_REQUEST,
|
||||
@ -775,7 +774,7 @@ shell_network_agent_class_init (ShellNetworkAgentClass *klass)
|
||||
0, /* class offset */
|
||||
NULL, /* accumulator */
|
||||
NULL, /* accu_data */
|
||||
_shell_marshal_VOID__STRING_OBJECT_STRING_BOXED,
|
||||
NULL, /* marshaller */
|
||||
G_TYPE_NONE, /* return */
|
||||
3, /* n_params */
|
||||
G_TYPE_STRING,
|
||||
@ -789,7 +788,7 @@ shell_network_agent_class_init (ShellNetworkAgentClass *klass)
|
||||
0, /* class offset */
|
||||
NULL, /* accumulator */
|
||||
NULL, /* accu_data */
|
||||
g_cclosure_marshal_VOID__STRING,
|
||||
NULL, /* marshaller */
|
||||
G_TYPE_NONE,
|
||||
1, /* n_params */
|
||||
G_TYPE_STRING);
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
#include <pwd.h>
|
||||
|
||||
#include "shell-marshal.h"
|
||||
|
||||
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
|
||||
#include <polkitagent/polkitagent.h>
|
||||
#include "shell-polkit-authentication-agent.h"
|
||||
@ -173,7 +171,7 @@ shell_polkit_authentication_agent_class_init (ShellPolkitAuthenticationAgentClas
|
||||
0, /* class_offset */
|
||||
NULL, /* accumulator */
|
||||
NULL, /* accumulator data */
|
||||
_shell_marshal_VOID__STRING_STRING_STRING_STRING_BOXED,
|
||||
NULL, /* marshaller */
|
||||
G_TYPE_NONE,
|
||||
5,
|
||||
G_TYPE_STRING,
|
||||
@ -189,7 +187,7 @@ shell_polkit_authentication_agent_class_init (ShellPolkitAuthenticationAgentClas
|
||||
0, /* class_offset */
|
||||
NULL, /* accumulator */
|
||||
NULL, /* accumulator data */
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, /* marshaller */
|
||||
G_TYPE_NONE,
|
||||
0);
|
||||
}
|
||||
|
@ -157,8 +157,7 @@ shell_tray_manager_class_init (ShellTrayManagerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ShellTrayManagerClass, tray_icon_added),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
shell_tray_manager_signals[TRAY_ICON_REMOVED] =
|
||||
@ -166,8 +165,7 @@ shell_tray_manager_class_init (ShellTrayManagerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ShellTrayManagerClass, tray_icon_removed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "shell-window-tracker-private.h"
|
||||
#include "shell-app-private.h"
|
||||
#include "shell-global.h"
|
||||
#include "shell-marshal.h"
|
||||
#include "st.h"
|
||||
|
||||
/* This file includes modified code from
|
||||
@ -117,15 +116,13 @@ shell_window_tracker_class_init (ShellWindowTrackerClass *klass)
|
||||
SHELL_TYPE_WINDOW_TRACKER,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__BOXED,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, SHELL_TYPE_STARTUP_SEQUENCE);
|
||||
signals[TRACKED_WINDOWS_CHANGED] = g_signal_new ("tracked-windows-changed",
|
||||
SHELL_TYPE_WINDOW_TRACKER,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include "shell-wm-private.h"
|
||||
#include "shell-global.h"
|
||||
#include "shell-marshal.h"
|
||||
|
||||
struct _ShellWM {
|
||||
GObject parent;
|
||||
@ -58,8 +57,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[MAXIMIZE] =
|
||||
@ -67,8 +65,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_shell_marshal_VOID__OBJECT_INT_INT_INT_INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 5,
|
||||
META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
shell_wm_signals[UNMAXIMIZE] =
|
||||
@ -76,8 +73,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_shell_marshal_VOID__OBJECT_INT_INT_INT_INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
shell_wm_signals[MAP] =
|
||||
@ -85,8 +81,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[DESTROY] =
|
||||
@ -94,8 +89,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[SWITCH_WORKSPACE] =
|
||||
@ -103,8 +97,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_shell_marshal_VOID__INT_INT_INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
shell_wm_signals[KILL_SWITCH_WORKSPACE] =
|
||||
@ -112,16 +105,14 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
shell_wm_signals[KILL_WINDOW_EFFECTS] =
|
||||
g_signal_new ("kill-window-effects",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
}
|
||||
|
@ -304,8 +304,7 @@ shell_xfixes_cursor_class_init (ShellXFixesCursorClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
gobject_class->get_property = shell_xfixes_cursor_get_property;
|
||||
|
Loading…
Reference in New Issue
Block a user