diff --git a/libxfce4panel/xfce-panel-plugin.h b/libxfce4panel/xfce-panel-plugin.h
index 86937bf9ec83afe26ac94a2a9221ac1b1d19be7c..ee80da62f42630b2676e70442f660ccc577727b6 100644
--- a/libxfce4panel/xfce-panel-plugin.h
+++ b/libxfce4panel/xfce-panel-plugin.h
@@ -76,6 +76,7 @@ typedef gboolean (*XfcePanelPluginCheck) (GdkScreen *screen);
 #define XFCE_IS_PANEL_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PANEL_PLUGIN))
 #define XFCE_IS_PANEL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_PANEL_PLUGIN))
 #define XFCE_PANEL_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_PANEL_PLUGIN, XfcePanelPluginClass))
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (XfcePanelPlugin, g_object_unref)
 
 /**
  * XfcePanelPluginClass:
diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index 8569c96b3d09027c9f2bf150f949b79e180e8cc6..c2c7f77aceab294be0c3fa602275d92d60237f24 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -22,12 +22,8 @@
 #endif
 
 #include <gtk/gtk.h>
-#include <libxfce4panel/libxfce4panel.h>
-#include <libxfce4util/libxfce4util.h>
 #include <libxfce4ui/libxfce4ui.h>
 
-#include <gio/gio.h>
-
 #include <common/panel-private.h>
 #include <common/panel-xfconf.h>
 #include <common/panel-utils.h>
@@ -38,7 +34,6 @@
 
 
 #define DEFAULT_TITLE    _("Session Menu")
-#define DEFAULT_ICON_SIZE (16)
 #define DEFAULT_TIMEOUT   (30)
 
 
@@ -101,11 +96,6 @@ enum
   COLUMN_TYPE
 };
 
-struct _ActionsPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
 struct _ActionsPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/actions/actions.h b/plugins/actions/actions.h
index f7c8106fdaecfcc244115994269dcf6c3c9fe37e..0bd0d81489cd5fab38ddcab7d5bc15017a858c0c 100644
--- a/plugins/actions/actions.h
+++ b/plugins/actions/actions.h
@@ -19,23 +19,14 @@
 #ifndef __ACTIONS_H__
 #define __ACTIONS_H__
 
-#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _ActionsPluginClass ActionsPluginClass;
-typedef struct _ActionsPlugin      ActionsPlugin;
+#define XFCE_TYPE_ACTIONS_PLUGIN (actions_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (ActionsPlugin, actions_plugin, XFCE, ACTIONS_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_ACTIONS_PLUGIN            (actions_plugin_get_type ())
-#define XFCE_ACTIONS_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_ACTIONS_PLUGIN, ActionsPlugin))
-#define XFCE_ACTIONS_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_ACTIONS_PLUGIN, ActionsPluginClass))
-#define XFCE_IS_ACTIONS_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_ACTIONS_PLUGIN))
-#define XFCE_IS_ACTIONS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_ACTIONS_PLUGIN))
-#define XFCE_ACTIONS_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_ACTIONS_PLUGIN, ActionsPluginClass))
-
-GType actions_plugin_get_type      (void) G_GNUC_CONST;
-
-void  actions_plugin_register_type (XfcePanelTypeModule *type_module);
+void actions_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/applicationsmenu/applicationsmenu.c b/plugins/applicationsmenu/applicationsmenu.c
index a35af222d0eff935a6bb4e7c356909cd9e616ff3..84c2210f8972b701346523593bb3fb80ee39e4b9 100644
--- a/plugins/applicationsmenu/applicationsmenu.c
+++ b/plugins/applicationsmenu/applicationsmenu.c
@@ -24,8 +24,6 @@
 #include <garcon/garcon.h>
 #include <garcon-gtk/garcon-gtk.h>
 #include <libxfce4ui/libxfce4ui.h>
-#include <libxfce4util/libxfce4util.h>
-#include <libxfce4panel/libxfce4panel.h>
 #include <common/panel-xfconf.h>
 #include <common/panel-utils.h>
 #include <common/panel-private.h>
@@ -43,10 +41,6 @@
 #define DEFAULT_EDITOR    "menulibre"
 
 
-struct _ApplicationsMenuPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
 
 struct _ApplicationsMenuPlugin
 {
diff --git a/plugins/applicationsmenu/applicationsmenu.h b/plugins/applicationsmenu/applicationsmenu.h
index 287cfddbb4b382fac23409b1e0f841340a93c969..3c6ada7b8d9fda4d194e35669e83bb61b409df87 100644
--- a/plugins/applicationsmenu/applicationsmenu.h
+++ b/plugins/applicationsmenu/applicationsmenu.h
@@ -19,23 +19,14 @@
 #ifndef __XFCE_APPLICATIONS_MENU_PLUGIN_H__
 #define __XFCE_APPLICATIONS_MENU_PLUGIN_H__
 
-#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _ApplicationsMenuPluginClass ApplicationsMenuPluginClass;
-typedef struct _ApplicationsMenuPlugin      ApplicationsMenuPlugin;
+#define XFCE_TYPE_APPLICATIONS_MENU_PLUGIN (applications_menu_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (ApplicationsMenuPlugin, applications_menu_plugin, XFCE, APPLICATIONS_MENU_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_APPLICATIONS_MENU_PLUGIN            (applications_menu_plugin_get_type ())
-#define XFCE_APPLICATIONS_MENU_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_APPLICATIONS_MENU_PLUGIN, ApplicationsMenuPlugin))
-#define XFCE_APPLICATIONS_MENU_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_APPLICATIONS_MENU_PLUGIN, ApplicationsMenuPluginClass))
-#define XFCE_IS_APPLICATIONS_MENU_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_APPLICATIONS_MENU_PLUGIN))
-#define XFCE_IS_APPLICATIONS_MENU_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_APPLICATIONS_MENU_PLUGIN))
-#define XFCE_APPLICATIONS_MENU_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_APPLICATIONS_MENU_PLUGIN, ApplicationsMenuPluginClass))
-
-GType applications_menu_plugin_get_type      (void) G_GNUC_CONST;
-
-void  applications_menu_plugin_register_type (XfcePanelTypeModule *type_module);
+void applications_menu_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/clock/clock-analog.c b/plugins/clock/clock-analog.c
index 3d8d7b53b22c1e84ab9f16a325e4d3ae3455032d..6318c8edcf2d232ca18df816d3287f0709cce956 100644
--- a/plugins/clock/clock-analog.c
+++ b/plugins/clock/clock-analog.c
@@ -24,7 +24,6 @@
 #include <math.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <cairo/cairo.h>
 #include <common/panel-private.h>
 
@@ -74,11 +73,6 @@ enum
   PROP_ORIENTATION
 };
 
-struct _XfceClockAnalogClass
-{
-  GtkImageClass __parent__;
-};
-
 struct _XfceClockAnalog
 {
   GtkImage __parent__;
diff --git a/plugins/clock/clock-analog.h b/plugins/clock/clock-analog.h
index d8b25f485c0e660e200645bd2ac19f61d19ece7a..654466bf63bc90359ba2ceaa79762f9d58b3154c 100644
--- a/plugins/clock/clock-analog.h
+++ b/plugins/clock/clock-analog.h
@@ -19,19 +19,13 @@
 #ifndef __CLOCK_ANALOG_H__
 #define __CLOCK_ANALOG_H__
 
-G_BEGIN_DECLS
-
-typedef struct _XfceClockAnalogClass XfceClockAnalogClass;
-typedef struct _XfceClockAnalog      XfceClockAnalog;
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
-#define XFCE_CLOCK_TYPE_ANALOG            (xfce_clock_analog_get_type ())
-#define XFCE_CLOCK_ANALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_CLOCK_TYPE_ANALOG, XfceClockAnalog))
-#define XFCE_CLOCK_ANALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_ANALOG, XfceClockAnalogClass))
-#define XFCE_CLOCK_IS_ANALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_CLOCK_TYPE_ANALOG))
-#define XFCE_CLOCK_IS_ANALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_ANALOG))
-#define XFCE_CLOCK_ANALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_ANALOG, XfceClockAnalogClass))
+G_BEGIN_DECLS
 
-GType      xfce_clock_analog_get_type      (void) G_GNUC_CONST;
+#define XFCE_CLOCK_TYPE_ANALOG (xfce_clock_analog_get_type ())
+G_DECLARE_FINAL_TYPE (XfceClockAnalog, xfce_clock_analog, XFCE_CLOCK, ANALOG, GtkImage)
 
 void       xfce_clock_analog_register_type (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/clock/clock-binary.c b/plugins/clock/clock-binary.c
index 04e65503cbb6f1af187e21af670f3600f26ffbdd..5581eaa063b754ae589c8077e38ae6ce56994d76 100644
--- a/plugins/clock/clock-binary.c
+++ b/plugins/clock/clock-binary.c
@@ -24,7 +24,6 @@
 #include <math.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <cairo/cairo.h>
 #include <common/panel-private.h>
 
@@ -69,11 +68,6 @@ enum
   MODE_BINARY_TIME
 };
 
-struct _XfceClockBinaryClass
-{
-  GtkImageClass __parent__;
-};
-
 struct _XfceClockBinary
 {
   GtkImage  __parent__;
diff --git a/plugins/clock/clock-binary.h b/plugins/clock/clock-binary.h
index d6fe813e4d28ec077a0ef036359025f9a18d2a11..55dbef2adca3e529d45a60da7af642dbe63391a1 100644
--- a/plugins/clock/clock-binary.h
+++ b/plugins/clock/clock-binary.h
@@ -19,19 +19,13 @@
 #ifndef __CLOCK_BINARY_H__
 #define __CLOCK_BINARY_H__
 
-G_BEGIN_DECLS
-
-typedef struct _XfceClockBinaryClass XfceClockBinaryClass;
-typedef struct _XfceClockBinary      XfceClockBinary;
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
-#define XFCE_CLOCK_TYPE_BINARY            (xfce_clock_binary_get_type ())
-#define XFCE_CLOCK_BINARY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_CLOCK_TYPE_BINARY, XfceClockBinary))
-#define XFCE_CLOCK_BINARY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_BINARY, XfceClockBinaryClass))
-#define XFCE_CLOCK_IS_BINARY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_CLOCK_TYPE_BINARY))
-#define XFCE_CLOCK_IS_BINARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_BINARY))
-#define XFCE_CLOCK_BINARY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_BINARY, XfceClockBinaryClass))
+G_BEGIN_DECLS
 
-GType      xfce_clock_binary_get_type      (void) G_GNUC_CONST;
+#define XFCE_CLOCK_TYPE_BINARY (xfce_clock_binary_get_type ())
+G_DECLARE_FINAL_TYPE (XfceClockBinary, xfce_clock_binary, XFCE_CLOCK, BINARY, GtkImage)
 
 void       xfce_clock_binary_register_type (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/clock/clock-digital.c b/plugins/clock/clock-digital.c
index c7feb7cd7710f7d7e8c23abba0c5a83b61cd379f..28ab314cb1da234a0397f3b1c6031d1bd7768122 100644
--- a/plugins/clock/clock-digital.c
+++ b/plugins/clock/clock-digital.c
@@ -20,7 +20,6 @@
 #include <config.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <common/panel-private.h>
 #include <common/panel-xfconf.h>
 
@@ -58,11 +57,6 @@ enum
   PROP_ORIENTATION,
 };
 
-struct _XfceClockDigitalClass
-{
-  GtkBoxClass __parent__;
-};
-
 struct _XfceClockDigital
 {
   GtkBox __parent__;
diff --git a/plugins/clock/clock-digital.h b/plugins/clock/clock-digital.h
index c7d21971da1e8c1311ed84872d2fd611af601edd..cbce6aaef68eb195a4235be722a7953247ad6505 100644
--- a/plugins/clock/clock-digital.h
+++ b/plugins/clock/clock-digital.h
@@ -19,22 +19,21 @@
 #ifndef __CLOCK_DIGITAL_H__
 #define __CLOCK_DIGITAL_H__
 
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
+
 G_BEGIN_DECLS
 
-/* TRANSLATORS: adjust this accordingly for your locale format */
 #define DEFAULT_DIGITAL_TIME_FORMAT NC_("Time", "%R")
 #define DEFAULT_DIGITAL_DATE_FORMAT NC_("Date", "%Y-%m-%d")
-#define DEFAULT_DIGITAL_FORMAT NC_("Time", "%a %_d %b, %R")
 
 typedef enum
 {
-
   CLOCK_PLUGIN_DIGITAL_FORMAT_DATE_TIME = 0,
   CLOCK_PLUGIN_DIGITAL_FORMAT_TIME_DATE,
   CLOCK_PLUGIN_DIGITAL_FORMAT_DATE,
   CLOCK_PLUGIN_DIGITAL_FORMAT_TIME,
 
-
   /* defines */
   CLOCK_PLUGIN_DIGITAL_FORMAT_MIN = CLOCK_PLUGIN_DIGITAL_FORMAT_DATE_TIME,
   CLOCK_PLUGIN_DIGITAL_FORMAT_MAX = CLOCK_PLUGIN_DIGITAL_FORMAT_TIME,
@@ -42,17 +41,8 @@ typedef enum
 }
 ClockPluginDigitalFormat;
 
-typedef struct _XfceClockDigitalClass XfceClockDigitalClass;
-typedef struct _XfceClockDigital      XfceClockDigital;
-
-#define XFCE_CLOCK_TYPE_DIGITAL            (xfce_clock_digital_get_type ())
-#define XFCE_CLOCK_DIGITAL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_CLOCK_TYPE_DIGITAL, XfceClockDigital))
-#define XFCE_CLOCK_DIGITAL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_DIGITAL, XfceClockDigitalClass))
-#define XFCE_CLOCK_IS_DIGITAL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_CLOCK_TYPE_DIGITAL))
-#define XFCE_CLOCK_IS_DIGITAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_DIGITAL))
-#define XFCE_CLOCK_DIGITAL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_DIGITAL, XfceClockDigitalClass))
-
-GType      xfce_clock_digital_get_type      (void) G_GNUC_CONST;
+#define XFCE_CLOCK_TYPE_DIGITAL (xfce_clock_digital_get_type ())
+G_DECLARE_FINAL_TYPE (XfceClockDigital, xfce_clock_digital, XFCE_CLOCK, DIGITAL, GtkBox)
 
 void       xfce_clock_digital_register_type (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/clock/clock-fuzzy.c b/plugins/clock/clock-fuzzy.c
index 482b39ab1008a21bd6b518c9ba2a418a525f6448..97679d23f710d9e2e7bcca124569b52261d00fd9 100644
--- a/plugins/clock/clock-fuzzy.c
+++ b/plugins/clock/clock-fuzzy.c
@@ -24,7 +24,6 @@
 #include <string.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <common/panel-private.h>
 
 #include "clock.h"
@@ -67,11 +66,6 @@ enum
   PROP_ORIENTATION
 };
 
-struct _XfceClockFuzzyClass
-{
- GtkLabelClass __parent__;
-};
-
 struct _XfceClockFuzzy
 {
   GtkLabel __parent__;
diff --git a/plugins/clock/clock-fuzzy.h b/plugins/clock/clock-fuzzy.h
index 278c1404f58ede55d4763674bed54bda5d128e75..fcfdd1fa9f63ee7073ec5c257eac8ce6c35d2ecf 100644
--- a/plugins/clock/clock-fuzzy.h
+++ b/plugins/clock/clock-fuzzy.h
@@ -19,19 +19,13 @@
 #ifndef __CLOCK_FUZZY_H__
 #define __CLOCK_FUZZY_H__
 
-G_BEGIN_DECLS
-
-typedef struct _XfceClockFuzzyClass XfceClockFuzzyClass;
-typedef struct _XfceClockFuzzy      XfceClockFuzzy;
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
-#define XFCE_CLOCK_TYPE_FUZZY            (xfce_clock_fuzzy_get_type ())
-#define XFCE_CLOCK_FUZZY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_CLOCK_TYPE_FUZZY, XfceClockFuzzy))
-#define XFCE_CLOCK_FUZZY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_FUZZY, XfceClockFuzzyClass))
-#define XFCE_CLOCK_IS_FUZZY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_CLOCK_TYPE_FUZZY))
-#define XFCE_CLOCK_IS_FUZZY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_FUZZY))
-#define XFCE_CLOCK_FUZZY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_FUZZY, XfceClockFuzzyClass))
+G_BEGIN_DECLS
 
-GType      xfce_clock_fuzzy_get_type      (void) G_GNUC_CONST;
+#define XFCE_CLOCK_TYPE_FUZZY (xfce_clock_fuzzy_get_type ())
+G_DECLARE_FINAL_TYPE (XfceClockFuzzy, xfce_clock_fuzzy, XFCE_CLOCK, FUZZY, GtkLabel)
 
 void       xfce_clock_fuzzy_register_type (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/clock/clock-lcd.c b/plugins/clock/clock-lcd.c
index 24f2296f13a575a7603fef012824e073754adcd4..892ca0cb8e7653157bcce9ca915553678b42c066 100644
--- a/plugins/clock/clock-lcd.c
+++ b/plugins/clock/clock-lcd.c
@@ -24,7 +24,6 @@
 #include <math.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <cairo/cairo.h>
 #include <common/panel-private.h>
 
@@ -76,11 +75,6 @@ enum
   PROP_ORIENTATION
 };
 
-struct _XfceClockLcdClass
-{
-  GtkImageClass __parent__;
-};
-
 struct _XfceClockLcd
 {
   GtkImage __parent__;
diff --git a/plugins/clock/clock-lcd.h b/plugins/clock/clock-lcd.h
index 9cd15a1673458181d5f7d8f504206e7c3e9056cb..d6362d57898c25d400db357269e8530f45056fae 100644
--- a/plugins/clock/clock-lcd.h
+++ b/plugins/clock/clock-lcd.h
@@ -19,19 +19,13 @@
 #ifndef __CLOCK_LCD_H__
 #define __CLOCK_LCD_H__
 
-G_BEGIN_DECLS
-
-typedef struct _XfceClockLcdClass XfceClockLcdClass;
-typedef struct _XfceClockLcd      XfceClockLcd;
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
-#define XFCE_CLOCK_TYPE_LCD            (xfce_clock_lcd_get_type ())
-#define XFCE_CLOCK_LCD(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_CLOCK_TYPE_LCD, XfceClockLcd))
-#define XFCE_CLOCK_LCD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_LCD, XfceClockLcdClass))
-#define XFCE_CLOCK_IS_LCD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_CLOCK_TYPE_LCD))
-#define XFCE_CLOCK_IS_LCD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_LCD))
-#define XFCE_CLOCK_LCD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_LCD, XfceClockLcdClass))
+G_BEGIN_DECLS
 
-GType      xfce_clock_lcd_get_type      (void) G_GNUC_CONST;
+#define XFCE_CLOCK_TYPE_LCD (xfce_clock_lcd_get_type ())
+G_DECLARE_FINAL_TYPE (XfceClockLcd, xfce_clock_lcd, XFCE_CLOCK, LCD, GtkImage)
 
 void       xfce_clock_lcd_register_type (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/clock/clock-sleep-monitor.c b/plugins/clock/clock-sleep-monitor.c
index b83e8ebd38ba1ce3c7623a379117f29218712daa..c318d351b3311c0ac247c24ff1a6335ea2744e2f 100644
--- a/plugins/clock/clock-sleep-monitor.c
+++ b/plugins/clock/clock-sleep-monitor.c
@@ -57,13 +57,6 @@ struct _ClockSleepMonitor
   GObject parent_instance;
 };
 
-struct _ClockSleepMonitorClass
-{
-  GObjectClass parent_class;
-};
-
-typedef struct _ClockSleepMonitorClass ClockSleepMonitorClass;
-
 G_DEFINE_TYPE (ClockSleepMonitor, clock_sleep_monitor, G_TYPE_OBJECT)
 
 static void clock_sleep_monitor_finalize (GObject *object);
@@ -106,19 +99,8 @@ struct _ClockSleepMonitorLogind
   GDBusProxy *logind_proxy;
 };
 
-struct _ClockSleepMonitorLogindClass
-{
-  ClockSleepMonitorClass parent_class;
-};
-
-typedef struct _ClockSleepMonitorLogind ClockSleepMonitorLogind;
-typedef struct _ClockSleepMonitorLogindClass ClockSleepMonitorLogindClass;
-
-GType clock_sleep_monitor_logind_get_type (void) G_GNUC_CONST;
-
 #define XFCE_TYPE_CLOCK_SLEEP_MONITOR_LOGIND (clock_sleep_monitor_logind_get_type ())
-#define XFCE_CLOCK_SLEEP_MONITOR_LOGIND(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), XFCE_TYPE_CLOCK_SLEEP_MONITOR_LOGIND, ClockSleepMonitorLogind))
-#define XFCE_IS_CLOCK_SLEEP_MONITOR_LOGIND(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), XFCE_TYPE_CLOCK_SLEEP_MONITOR_LOGIND))
+G_DECLARE_FINAL_TYPE (ClockSleepMonitorLogind, clock_sleep_monitor_logind, XFCE, CLOCK_SLEEP_MONITOR_LOGIND, ClockSleepMonitor)
 
 G_DEFINE_TYPE (ClockSleepMonitorLogind, clock_sleep_monitor_logind, XFCE_TYPE_CLOCK_SLEEP_MONITOR)
 
diff --git a/plugins/clock/clock-sleep-monitor.h b/plugins/clock/clock-sleep-monitor.h
index 4369be7c57a26ce09aa3aba683cf27f4e7b4f6dd..e2ce2ece0d3c68172425c0b2d8c46ae6ac828181 100644
--- a/plugins/clock/clock-sleep-monitor.h
+++ b/plugins/clock/clock-sleep-monitor.h
@@ -18,18 +18,12 @@
 
 #pragma once
 
-#include <glib.h>
 #include <glib-object.h>
 
 G_BEGIN_DECLS
 
-typedef struct _ClockSleepMonitor ClockSleepMonitor;
-
-GType clock_sleep_monitor_get_type (void) G_GNUC_CONST;
-
 #define XFCE_TYPE_CLOCK_SLEEP_MONITOR (clock_sleep_monitor_get_type ())
-#define XFCE_CLOCK_SLEEP_MONITOR(object) (G_TYPE_CHECK_INSTANCE_CAST((object), XFCE_TYPE_CLOCK_SLEEP_MONITOR, ClockSleepMonitor))
-#define XFCE_IS_CLOCK_SLEEP_MONITOR(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), XFCE_TYPE_CLOCK_SLEEP_MONITOR))
+G_DECLARE_FINAL_TYPE (ClockSleepMonitor, clock_sleep_monitor, XFCE, CLOCK_SLEEP_MONITOR, GObject)
 
 /* Factory function that tries to instantiate a sleep monitor. Returns
  * NULL if no implementation could be found or instantiated.
diff --git a/plugins/clock/clock-time.c b/plugins/clock/clock-time.c
index 5786426b157c8bcf35ecbda7b599d7223348c143..d2b5b4b1f8fd17ada96859a202eade4a1ba601ad 100644
--- a/plugins/clock/clock-time.c
+++ b/plugins/clock/clock-time.c
@@ -21,7 +21,6 @@
 #include <config.h>
 #endif
 
-#include <glib.h>
 #include <common/panel-private.h>
 
 #include "clock-time.h"
@@ -47,11 +46,6 @@ enum
   PROP_TIMEZONE
 };
 
-struct _ClockTimeClass
-{
-  GObjectClass        __parent__;
-};
-
 struct _ClockTime
 {
   GObject             __parent__;
diff --git a/plugins/clock/clock-time.h b/plugins/clock/clock-time.h
index d71037bb95827655b1f51c95733ce866995a7079..35dc4b40f2dc5c0afeb67334558f88ca4f61e28f 100644
--- a/plugins/clock/clock-time.h
+++ b/plugins/clock/clock-time.h
@@ -19,7 +19,7 @@
 #ifndef __CLOCK_TIME_H__
 #define __CLOCK_TIME_H__
 
-#include <glib.h>
+#include <glib-object.h>
 #include <libxfce4util/libxfce4util.h>
 #include <libxfce4panel/libxfce4panel.h>
 
@@ -30,20 +30,10 @@ G_BEGIN_DECLS
 #define CLOCK_INTERVAL_SECOND (1)
 #define CLOCK_INTERVAL_MINUTE (60)
 
-typedef struct _ClockTime          ClockTime;
-typedef struct _ClockTimeClass     ClockTimeClass;
 typedef struct _ClockTimeTimeout   ClockTimeTimeout;
 
-#define XFCE_TYPE_CLOCK_TIME              (clock_time_get_type ())
-#define XFCE_CLOCK_TIME(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_CLOCK_TIME, ClockTime))
-#define XFCE_CLOCK_TIME_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_CLOCK_TIME, ClockTimeClass))
-#define XFCE_IS_CLOCK_TIME(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_CLOCK_TIME))
-#define XFCE_IS_CLOCK_TIME_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_CLOCK_TIME))
-#define XFCE_CLOCK_TIME_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_CLOCK_TIME, ClockTimeClass))
-
-
-
-GType               clock_time_get_type               (void) G_GNUC_CONST;
+#define XFCE_TYPE_CLOCK_TIME (clock_time_get_type ())
+G_DECLARE_FINAL_TYPE (ClockTime, clock_time, XFCE, CLOCK_TIME, GObject)
 
 void                clock_time_register_type          (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
index 6c1d8e39748d6060bf0c5e8f6d1c0d016d8389e2..9ff7d02b5168b6027714a52c47129eb528d3c38d 100644
--- a/plugins/clock/clock.c
+++ b/plugins/clock/clock.c
@@ -111,11 +111,6 @@ typedef enum
 }
 ClockPluginMode;
 
-struct _ClockPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
 struct _ClockPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/clock/clock.h b/plugins/clock/clock.h
index 277310d603b1ae62484703b6afc2a40c8fe388a8..e4cce8ddd8422806709dd32a9fce1097a069687b 100644
--- a/plugins/clock/clock.h
+++ b/plugins/clock/clock.h
@@ -19,31 +19,14 @@
 #ifndef __CLOCK_H__
 #define __CLOCK_H__
 
-#include <gtk/gtk.h>
-#include <libxfce4util/libxfce4util.h>
 #include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-#define CLOCK_INTERVAL_SECOND (1)
-#define CLOCK_INTERVAL_MINUTE (60)
+#define XFCE_TYPE_CLOCK_PLUGIN (clock_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (ClockPlugin, clock_plugin, XFCE, CLOCK_PLUGIN, XfcePanelPlugin)
 
-typedef struct _ClockPlugin        ClockPlugin;
-typedef struct _ClockPluginClass   ClockPluginClass;
-typedef struct _ClockPluginTimeout ClockPluginTimeout;
-
-#define XFCE_TYPE_CLOCK_PLUGIN            (clock_plugin_get_type ())
-#define XFCE_CLOCK_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_CLOCK_PLUGIN, ClockPlugin))
-#define XFCE_CLOCK_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_CLOCK_PLUGIN, ClockPluginClass))
-#define XFCE_IS_CLOCK_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_CLOCK_PLUGIN))
-#define XFCE_IS_CLOCK_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_CLOCK_PLUGIN))
-#define XFCE_CLOCK_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_CLOCK_PLUGIN, ClockPluginClass))
-
-
-
-GType               clock_plugin_get_type             (void) G_GNUC_CONST;
-
-void                clock_plugin_register_type        (XfcePanelTypeModule *type_module);
+void clock_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/directorymenu/directorymenu.c b/plugins/directorymenu/directorymenu.c
index e058ed1b314bd7450dc41679c52ddcbdf6f9caab..5d065ac987d72ed362192e81eb663c639528eb30 100644
--- a/plugins/directorymenu/directorymenu.c
+++ b/plugins/directorymenu/directorymenu.c
@@ -24,8 +24,6 @@
 #include <gio/gio.h>
 #include <gio/gdesktopappinfo.h>
 #include <libxfce4ui/libxfce4ui.h>
-#include <libxfce4util/libxfce4util.h>
-#include <libxfce4panel/libxfce4panel.h>
 #include <common/panel-xfconf.h>
 #include <common/panel-utils.h>
 #include <common/panel-private.h>
@@ -39,11 +37,6 @@
 #define DIALOG_RESPONSE_CREATE 0
 #define DIALOG_RESPONSE_OPEN 1
 
-struct _DirectoryMenuPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
 struct _DirectoryMenuPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/directorymenu/directorymenu.h b/plugins/directorymenu/directorymenu.h
index 1e214346590316b723dda7818277d9503d36bca4..8640ceaebcda2935afa2c687236304e5a4e5202d 100644
--- a/plugins/directorymenu/directorymenu.h
+++ b/plugins/directorymenu/directorymenu.h
@@ -19,23 +19,14 @@
 #ifndef __XFCE_DIRECTORY_MENU_PLUGIN_H__
 #define __XFCE_DIRECTORY_MENU_PLUGIN_H__
 
-#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _DirectoryMenuPluginClass DirectoryMenuPluginClass;
-typedef struct _DirectoryMenuPlugin      DirectoryMenuPlugin;
+#define XFCE_TYPE_DIRECTORY_MENU_PLUGIN (directory_menu_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (DirectoryMenuPlugin, directory_menu_plugin, XFCE, DIRECTORY_MENU_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_DIRECTORY_MENU_PLUGIN            (directory_menu_plugin_get_type ())
-#define XFCE_DIRECTORY_MENU_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_DIRECTORY_MENU_PLUGIN, DirectoryMenuPlugin))
-#define XFCE_DIRECTORY_MENU_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_DIRECTORY_MENU_PLUGIN, DirectoryMenuPluginClass))
-#define XFCE_IS_DIRECTORY_MENU_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_DIRECTORY_MENU_PLUGIN))
-#define XFCE_IS_DIRECTORY_MENU_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_DIRECTORY_MENU_PLUGIN))
-#define XFCE_DIRECTORY_MENU_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_DIRECTORY_MENU_PLUGIN, DirectoryMenuPluginClass))
-
-GType directory_menu_plugin_get_type      (void) G_GNUC_CONST;
-
-void  directory_menu_plugin_register_type (XfcePanelTypeModule *type_module);
+void directory_menu_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 08a9acf727e84bd6fa97779e4c05475f215bcf34..a9c08c30ff20a7482e07efac1860f48d04f2e894 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -24,14 +24,11 @@
 #include <string.h>
 #endif
 
-#include <gio/gio.h>
-#include <libxfce4util/libxfce4util.h>
+#include <gtk/gtk.h>
 #include <libxfce4ui/libxfce4ui.h>
-#include <garcon/garcon.h>
 #include <garcon-gtk/garcon-gtk.h>
 #include <xfconf/xfconf.h>
 
-#include <libxfce4panel/libxfce4panel.h>
 #include <common/panel-private.h>
 #include <common/panel-xfconf.h>
 #include <common/panel-utils.h>
@@ -171,11 +168,6 @@ static void               launcher_plugin_uri_list_free                 (GSList
 
 
 
-struct _LauncherPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
 struct _LauncherPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/launcher/launcher.h b/plugins/launcher/launcher.h
index e2980fbe582f7bc3ed04c97bc0a425fa578e964c..fa2bcc12fdcd40ee9cae11a9f5c5918877d61a69 100644
--- a/plugins/launcher/launcher.h
+++ b/plugins/launcher/launcher.h
@@ -19,23 +19,15 @@
 #ifndef __LAUNCHER_H__
 #define __LAUNCHER_H__
 
-#include <gtk/gtk.h>
+#include <garcon/garcon.h>
 #include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _LauncherPluginClass LauncherPluginClass;
-typedef struct _LauncherPlugin      LauncherPlugin;
-typedef enum   _LauncherArrowType   LauncherArrowType;
+#define XFCE_TYPE_LAUNCHER_PLUGIN (launcher_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (LauncherPlugin, launcher_plugin, XFCE, LAUNCHER_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_LAUNCHER_PLUGIN            (launcher_plugin_get_type ())
-#define XFCE_LAUNCHER_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_LAUNCHER_PLUGIN, LauncherPlugin))
-#define XFCE_LAUNCHER_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_LAUNCHER_PLUGIN, LauncherPluginClass))
-#define XFCE_IS_LAUNCHER_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_LAUNCHER_PLUGIN))
-#define XFCE_IS_LAUNCHER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_LAUNCHER_PLUGIN))
-#define XFCE_LAUNCHER_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_LAUNCHER_PLUGIN, LauncherPluginClass))
-
-enum _LauncherArrowType
+typedef enum _LauncherArrowType
 {
   LAUNCHER_ARROW_DEFAULT = 0,
   LAUNCHER_ARROW_NORTH,
@@ -43,9 +35,7 @@ enum _LauncherArrowType
   LAUNCHER_ARROW_EAST,
   LAUNCHER_ARROW_SOUTH,
   LAUNCHER_ARROW_INTERNAL
-};
-
-GType       launcher_plugin_get_type         (void) G_GNUC_CONST;
+} LauncherArrowType;
 
 void        launcher_plugin_register_type    (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/pager/pager-buttons.c b/plugins/pager/pager-buttons.c
index 294787c3c056c0071af16e4c77bfadd32bc55f86..4657a74795a5cf794c51e9ffe841fd26ec13f681 100644
--- a/plugins/pager/pager-buttons.c
+++ b/plugins/pager/pager-buttons.c
@@ -20,9 +20,7 @@
 #include <config.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <libxfce4ui/libxfce4ui.h>
-#include <libxfce4panel/libxfce4panel.h>
 #include <common/panel-private.h>
 
 #include "pager-buttons.h"
@@ -59,11 +57,6 @@ static void pager_buttons_viewport_button_toggled    (GtkWidget     *button,
 
 
 
-struct _PagerButtonsClass
-{
-  GtkGridClass    __parent__;
-};
-
 struct _PagerButtons
 {
   GtkGrid         __parent__;
diff --git a/plugins/pager/pager-buttons.h b/plugins/pager/pager-buttons.h
index de53bae67c6f7f06ad5a2058d12fef66e69d24e5..dece77f6ffeaa3e48e70fff95b78ba5d0314eccc 100644
--- a/plugins/pager/pager-buttons.h
+++ b/plugins/pager/pager-buttons.h
@@ -21,20 +21,12 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4windowing/libxfce4windowing.h>
+#include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _PagerButtonsClass PagerButtonsClass;
-typedef struct _PagerButtons      PagerButtons;
-
-#define XFCE_TYPE_PAGER_BUTTONS            (pager_buttons_get_type ())
-#define XFCE_PAGER_BUTTONS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_PAGER_BUTTONS, PagerButtons))
-#define XFCE_PAGER_BUTTONS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_PAGER_BUTTONS, PagerButtonsClass))
-#define XFCE_IS_PAGER_BUTTONS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PAGER_BUTTONS))
-#define XFCE_IS_PAGER_BUTTONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_PAGER_BUTTONS))
-#define XFCE_PAGER_BUTTONS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_PAGER_BUTTONS, PagerButtonsClass))
-
-GType      pager_buttons_get_type        (void) G_GNUC_CONST;
+#define XFCE_TYPE_PAGER_BUTTONS (pager_buttons_get_type ())
+G_DECLARE_FINAL_TYPE (PagerButtons, pager_buttons, XFCE, PAGER_BUTTONS, XfcePanelPlugin)
 
 void       pager_buttons_register_type   (XfcePanelTypeModule *type_module);
 
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index 661dd962a976686f625ed1ae80df8c38fdc4b6f2..2fadd6a966b168bc8295d4fdfbddb6c0fe70f24a 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -34,8 +34,6 @@
 #define pager_plugin_miniature_view_is_supported() FALSE
 #endif
 
-#include <libxfce4panel/libxfce4panel.h>
-#include <libxfce4util/libxfce4util.h>
 #include <libxfce4ui/libxfce4ui.h>
 #include <common/panel-xfconf.h>
 #include <common/panel-utils.h>
@@ -101,11 +99,6 @@ static void     pager_plugin_get_preferred_height_for_width (GtkWidget
 
 
 
-struct _PagerPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
 struct _PagerPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/pager/pager.h b/plugins/pager/pager.h
index 1d65f59ee58ff55b3108f957eca7b728aaee2d8c..1b330932976841dbe6712677ed9e9c3695b8ffc1 100644
--- a/plugins/pager/pager.h
+++ b/plugins/pager/pager.h
@@ -19,23 +19,14 @@
 #ifndef __PAGER_H__
 #define __PAGER_H__
 
-#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _PagerPluginClass PagerPluginClass;
-typedef struct _PagerPlugin      PagerPlugin;
+#define XFCE_TYPE_PAGER_PLUGIN (pager_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (PagerPlugin, pager_plugin, XFCE, PAGER_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_PAGER_PLUGIN            (pager_plugin_get_type ())
-#define XFCE_PAGER_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_PAGER_PLUGIN, PagerPlugin))
-#define XFCE_PAGER_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_PAGER_PLUGIN, PagerPluginClass))
-#define XFCE_IS_PAGER_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PAGER_PLUGIN))
-#define XFCE_IS_PAGER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_PAGER_PLUGIN))
-#define XFCE_PAGER_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_PAGER_PLUGIN, PagerPluginClass))
-
-GType pager_plugin_get_type      (void) G_GNUC_CONST;
-
-void  pager_plugin_register_type (XfcePanelTypeModule *type_module);
+void pager_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/separator/separator.c b/plugins/separator/separator.c
index 77793a3fb3025d56c61aff6d1e91fd5e4b779a0f..ce8babfaac8491b61f50b3300fae296641521dc0 100644
--- a/plugins/separator/separator.c
+++ b/plugins/separator/separator.c
@@ -22,9 +22,7 @@
 #endif
 
 #include <gtk/gtk.h>
-#include <libxfce4panel/libxfce4panel.h>
 #include <libxfce4panel/xfce-panel-plugin-provider.h>
-#include <libxfce4util/libxfce4util.h>
 #include <libxfce4ui/libxfce4ui.h>
 #include <common/panel-private.h>
 #include <common/panel-xfconf.h>
@@ -61,7 +59,7 @@ static void     separator_plugin_orientation_changed       (XfcePanelPlugin
 
 
 
-enum _SeparatorPluginStyle
+typedef enum _SeparatorPluginStyle
 {
   SEPARATOR_PLUGIN_STYLE_TRANSPARENT = 0,
   SEPARATOR_PLUGIN_STYLE_SEPARATOR,
@@ -73,13 +71,7 @@ enum _SeparatorPluginStyle
   SEPARATOR_PLUGIN_STYLE_MIN = SEPARATOR_PLUGIN_STYLE_TRANSPARENT,
   SEPARATOR_PLUGIN_STYLE_MAX = SEPARATOR_PLUGIN_STYLE_WRAP,
   SEPARATOR_PLUGIN_STYLE_DEFAULT = SEPARATOR_PLUGIN_STYLE_SEPARATOR
-};
-
-struct _SeparatorPluginClass
-{
-  /* parent class */
-  XfcePanelPluginClass __parent__;
-};
+} SeparatorPluginStyle;
 
 struct _SeparatorPlugin
 {
diff --git a/plugins/separator/separator.h b/plugins/separator/separator.h
index 0b70b4e27aefb511e0344570f8bdd9c8790dba64..fb0fea10acf761e1e4154636d12b9e6fd71756a7 100644
--- a/plugins/separator/separator.h
+++ b/plugins/separator/separator.h
@@ -20,24 +20,14 @@
 #ifndef __SEPARATOR_H__
 #define __SEPARATOR_H__
 
-#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _SeparatorPluginClass SeparatorPluginClass;
-typedef struct _SeparatorPlugin      SeparatorPlugin;
-typedef enum   _SeparatorPluginStyle  SeparatorPluginStyle;
+#define XFCE_TYPE_SEPARATOR_PLUGIN (separator_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (SeparatorPlugin, separator_plugin, XFCE, SEPARATOR_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_SEPARATOR_PLUGIN            (separator_plugin_get_type ())
-#define XFCE_SEPARATOR_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SEPARATOR_PLUGIN, SeparatorPlugin))
-#define XFCE_SEPARATOR_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SEPARATOR_PLUGIN, SeparatorPluginClass))
-#define XFCE_IS_SEPARATOR_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SEPARATOR_PLUGIN))
-#define XFCE_IS_SEPARATOR_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SEPARATOR_PLUGIN))
-#define XFCE_SEPARATOR_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SEPARATOR_PLUGIN, SeparatorPluginClass))
-
-GType separator_plugin_get_type      (void) G_GNUC_CONST;
-
-void  separator_plugin_register_type (XfcePanelTypeModule *type_module);
+void separator_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/showdesktop/showdesktop.c b/plugins/showdesktop/showdesktop.c
index 199a27b1830760d20835fb35621a16b68549d576..5351913ab419745ba5d4804183ee7383b30b7abc 100644
--- a/plugins/showdesktop/showdesktop.c
+++ b/plugins/showdesktop/showdesktop.c
@@ -21,6 +21,7 @@
 #include <config.h>
 #endif
 
+#include <gtk/gtk.h>
 #include <libxfce4windowing/libxfce4windowing.h>
 #include <libxfce4util/libxfce4util.h>
 #include <common/panel-private.h>
@@ -61,11 +62,6 @@ static gboolean show_desktop_plugin_drag_motion             (GtkWidget
 
 
 
-struct _ShowDesktopPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
 struct _ShowDesktopPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/showdesktop/showdesktop.h b/plugins/showdesktop/showdesktop.h
index 9814923a6c4994618facb8f0b4e358ea22f3f402..a60f293b04188df0405f8176b5e8195910b60965 100644
--- a/plugins/showdesktop/showdesktop.h
+++ b/plugins/showdesktop/showdesktop.h
@@ -19,24 +19,14 @@
 #ifndef __XFCE_SHOW_DESKTOP_PLUGIN_H__
 #define __XFCE_SHOW_DESKTOP_PLUGIN_H__
 
-#include <gtk/gtk.h>
 #include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _ShowDesktopPluginClass ShowDesktopPluginClass;
-typedef struct _ShowDesktopPlugin      ShowDesktopPlugin;
+#define XFCE_TYPE_SHOW_DESKTOP_PLUGIN (show_desktop_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (ShowDesktopPlugin, show_desktop_plugin, XFCE, SHOW_DESKTOP_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_SHOW_DESKTOP_PLUGIN            (show_desktop_plugin_get_type ())
-#define XFCE_SHOW_DESKTOP_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHOW_DESKTOP_PLUGIN, ShowDesktopPlugin))
-#define XFCE_SHOW_DESKTOP_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHOW_DESKTOP_PLUGIN, ShowDesktopPluginClass))
-#define XFCE_IS_SHOW_DESKTOP_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHOW_DESKTOP_PLUGIN))
-#define XFCE_IS_SHOW_DESKTOP_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHOW_DESKTOP_PLUGIN))
-#define XFCE_SHOW_DESKTOP_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHOW_DESKTOP_PLUGIN, ShowDesktopPluginClass))
-
-GType show_desktop_plugin_get_type      (void) G_GNUC_CONST;
-
-void  show_desktop_plugin_register_type (XfcePanelTypeModule *type_module);
+void show_desktop_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/systray/sn-backend.c b/plugins/systray/sn-backend.c
index a51cb1952839b8420a18eff1b7f8258bcf33fd96..5b19d49062730bb0eb6c82222c16ab57b2bbb197 100644
--- a/plugins/systray/sn-backend.c
+++ b/plugins/systray/sn-backend.c
@@ -91,11 +91,6 @@ static void                  sn_backend_host_clear_items             (SnBackend
 
 
 
-struct _SnBackendClass
-{
-  GObjectClass         __parent__;
-};
-
 struct _SnBackend
 {
   GObject              __parent__;
diff --git a/plugins/systray/sn-backend.h b/plugins/systray/sn-backend.h
index 9e98cc3c5266b2b9835cd83af398f914ce8dfbbc..de7f9b79d02dd87801d9a59f5496d9ef726910e5 100644
--- a/plugins/systray/sn-backend.h
+++ b/plugins/systray/sn-backend.h
@@ -23,17 +23,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnBackendClass SnBackendClass;
-typedef struct _SnBackend      SnBackend;
-
-#define XFCE_TYPE_SN_BACKEND            (sn_backend_get_type ())
-#define XFCE_SN_BACKEND(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_BACKEND, SnBackend))
-#define XFCE_SN_BACKEND_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_BACKEND, SnBackendClass))
-#define XFCE_IS_SN_BACKEND(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_BACKEND))
-#define XFCE_IS_SN_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_BACKEND))
-#define XFCE_SN_BACKEND_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_BACKEND, SnBackendClass))
-
-GType                  sn_backend_get_type                     (void) G_GNUC_CONST;
+#define XFCE_TYPE_SN_BACKEND (sn_backend_get_type ())
+G_DECLARE_FINAL_TYPE (SnBackend, sn_backend, XFCE, SN_BACKEND, GObject)
 
 SnBackend             *sn_backend_new                          (void);
 
diff --git a/plugins/systray/sn-box.c b/plugins/systray/sn-box.c
index 69d76c0809f3d66a7128fa6f25700af80e95d45f..c9d011bb50f5ddbf7915baf95a02a9d5d647fd1b 100644
--- a/plugins/systray/sn-box.c
+++ b/plugins/systray/sn-box.c
@@ -78,11 +78,6 @@ enum
   PROP_HAS_HIDDEN
 };
 
-struct _SnBoxClass
-{
-  GtkContainerClass    __parent__;
-};
-
 struct _SnBox
 {
   GtkContainer         __parent__;
diff --git a/plugins/systray/sn-box.h b/plugins/systray/sn-box.h
index bf1cf748b70cf4a9ed91c8fbdb3a8f0cf4bf5269..59f8595aca6547e8b9f022596b54a8ce00fd30fe 100644
--- a/plugins/systray/sn-box.h
+++ b/plugins/systray/sn-box.h
@@ -27,17 +27,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnBoxClass SnBoxClass;
-typedef struct _SnBox      SnBox;
-
-#define XFCE_TYPE_SN_BOX            (sn_box_get_type ())
-#define XFCE_SN_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_BOX, SnBox))
-#define XFCE_SN_BOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_BOX, SnBoxClass))
-#define XFCE_IS_SN_BOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_BOX))
-#define XFCE_IS_SN_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_BOX))
-#define XFCE_SN_BOX_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_BOX, SnBoxClass))
-
-GType                  sn_box_get_type                         (void) G_GNUC_CONST;
+#define XFCE_TYPE_SN_BOX (sn_box_get_type ())
+G_DECLARE_FINAL_TYPE (SnBox, sn_box, XFCE, SN_BOX, GtkContainer)
 
 void                   sn_box_remove_item                      (SnBox                   *box,
                                                                 SnItem                  *item);
diff --git a/plugins/systray/sn-button.c b/plugins/systray/sn-button.c
index 9f6804d83a11c63c7254d9f446358d434183f13c..913e25c3e0b7aeb7608c84d28e46643b562f364a 100644
--- a/plugins/systray/sn-button.c
+++ b/plugins/systray/sn-button.c
@@ -60,11 +60,6 @@ static gboolean              sn_button_query_tooltip                 (GtkWidget
 
 
 
-struct _SnButtonClass
-{
-  GtkButtonClass       __parent__;
-};
-
 struct _SnButton
 {
   GtkButton            __parent__;
diff --git a/plugins/systray/sn-button.h b/plugins/systray/sn-button.h
index 7eb87acdb429ac49999405b395d86ba31fa018e7..cccf0deba580bd8c414e220a175d0d1b12290009 100644
--- a/plugins/systray/sn-button.h
+++ b/plugins/systray/sn-button.h
@@ -28,17 +28,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnButtonClass SnButtonClass;
-typedef struct _SnButton      SnButton;
-
-#define XFCE_TYPE_SN_BUTTON            (sn_button_get_type ())
-#define XFCE_SN_BUTTON(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_BUTTON, SnButton))
-#define XFCE_SN_BUTTON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_BUTTON, SnButtonClass))
-#define XFCE_IS_SN_BUTTON(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_BUTTON))
-#define XFCE_IS_SN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_BUTTON))
-#define XFCE_SN_BUTTON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_BUTTON, SnButtonClass))
-
-GType                  sn_button_get_type                      (void) G_GNUC_CONST;
+#define XFCE_TYPE_SN_BUTTON (sn_button_get_type ())
+G_DECLARE_FINAL_TYPE (SnButton, sn_button, XFCE, SN_BUTTON, GtkButton)
 
 SnItem                *sn_button_get_item                      (SnButton                *button);
 
diff --git a/plugins/systray/sn-config.c b/plugins/systray/sn-config.c
index 35a757cca49bdecd9f83a7f260ea93ba891308cb..b6767ada000272135d46500c00150b006900e50b 100644
--- a/plugins/systray/sn-config.c
+++ b/plugins/systray/sn-config.c
@@ -40,18 +40,6 @@
 
 
 
-#define DEFAULT_ICON_SIZE          22
-#define DEFAULT_SINGLE_ROW         FALSE
-#define DEFAULT_SQUARE_ICONS       FALSE
-#define DEFAULT_SYMBOLIC_ICONS     FALSE
-#define DEFAULT_MENU_IS_PRIMARY    FALSE
-#define DEFAULT_ORIENTATION        GTK_ORIENTATION_HORIZONTAL
-#define DEFAULT_PANEL_ORIENTATION  GTK_ORIENTATION_HORIZONTAL
-#define DEFAULT_PANEL_SIZE         28
-#define DEFAULT_HIDE_NEW_ITEMS     FALSE
-
-
-
 static void                  sn_config_finalize                      (GObject                 *object);
 
 static void                  sn_config_get_property                  (GObject                 *object,
@@ -66,11 +54,6 @@ static void                  sn_config_set_property                  (GObject
 
 
 
-struct _SnConfigClass
-{
-  GObjectClass         __parent__;
-};
-
 struct _SnConfig
 {
   GObject             __parent__;
diff --git a/plugins/systray/sn-config.h b/plugins/systray/sn-config.h
index 7a1b605210dc505c5e4eeec163e2051a2e878ec5..d3306bf0642fd25f94a2a7698e29ed38c44341a0 100644
--- a/plugins/systray/sn-config.h
+++ b/plugins/systray/sn-config.h
@@ -24,17 +24,18 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnConfigClass SnConfigClass;
-typedef struct _SnConfig      SnConfig;
+#define XFCE_TYPE_SN_CONFIG (sn_config_get_type ())
+G_DECLARE_FINAL_TYPE (SnConfig, sn_config, XFCE, SN_CONFIG, GObject)
 
-#define XFCE_TYPE_SN_CONFIG            (sn_config_get_type ())
-#define XFCE_SN_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_CONFIG, SnConfig))
-#define XFCE_SN_CONFIG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_CONFIG, SnConfigClass))
-#define XFCE_IS_SN_CONFIG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_CONFIG))
-#define XFCE_IS_SN_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_CONFIG))
-#define XFCE_SN_CONFIG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_CONFIG, SnConfigClass))
-
-GType                  sn_config_get_type                      (void) G_GNUC_CONST;
+#define DEFAULT_ICON_SIZE          22
+#define DEFAULT_SINGLE_ROW         FALSE
+#define DEFAULT_SQUARE_ICONS       FALSE
+#define DEFAULT_SYMBOLIC_ICONS     FALSE
+#define DEFAULT_MENU_IS_PRIMARY    FALSE
+#define DEFAULT_ORIENTATION        GTK_ORIENTATION_HORIZONTAL
+#define DEFAULT_PANEL_ORIENTATION  GTK_ORIENTATION_HORIZONTAL
+#define DEFAULT_PANEL_SIZE         28
+#define DEFAULT_HIDE_NEW_ITEMS     FALSE
 
 SnConfig              *sn_config_new                           (const gchar             *property_base);
 
@@ -108,20 +109,6 @@ void                   sn_config_swap_known_legacy_items       (SnConfig
 gboolean               sn_config_items_clear                   (SnConfig                *config);
 gboolean               sn_config_legacy_items_clear            (SnConfig                *config);
 
-
-
-#define DEFAULT_ICON_SIZE          22
-#define DEFAULT_SINGLE_ROW         FALSE
-#define DEFAULT_SQUARE_ICONS       FALSE
-#define DEFAULT_SYMBOLIC_ICONS     FALSE
-#define DEFAULT_MENU_IS_PRIMARY    FALSE
-#define DEFAULT_ORIENTATION        GTK_ORIENTATION_HORIZONTAL
-#define DEFAULT_PANEL_ORIENTATION  GTK_ORIENTATION_HORIZONTAL
-#define DEFAULT_PANEL_SIZE         28
-#define DEFAULT_HIDE_NEW_ITEMS     FALSE
-
-
-
 G_END_DECLS
 
 #endif /* !__SN_CONFIG_H__ */
diff --git a/plugins/systray/sn-dialog.c b/plugins/systray/sn-dialog.c
index af9fc99069362ba1320082081fe23d1755a8c230..1341b5ba1de3b483fa2bdaea33e4d5d5d9a5828d 100644
--- a/plugins/systray/sn-dialog.c
+++ b/plugins/systray/sn-dialog.c
@@ -36,21 +36,12 @@
 
 
 
-#define DEFAULT_ICON_SIZE          22
-
-
-
 static gboolean              sn_dialog_build                         (SnDialog                *dialog);
 
 static void                  sn_dialog_finalize                      (GObject                 *object);
 
 
 
-struct _SnDialogClass
-{
-  GObjectClass         __parent__;
-};
-
 struct _SnDialog
 {
   GObject              __parent__;
diff --git a/plugins/systray/sn-dialog.h b/plugins/systray/sn-dialog.h
index 9416a35e2d87b6b34e1c729db90bf3fdb41ed3dd..1e9903bbdc320e6d319e029d8f199002204070f4 100644
--- a/plugins/systray/sn-dialog.h
+++ b/plugins/systray/sn-dialog.h
@@ -26,17 +26,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnDialogClass SnDialogClass;
-typedef struct _SnDialog      SnDialog;
-
-#define XFCE_TYPE_SN_DIALOG            (sn_dialog_get_type ())
-#define XFCE_SN_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_DIALOG, SnDialog))
-#define XFCE_SN_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_DIALOG, SnDialogClass))
-#define XFCE_IS_SN_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_DIALOG))
-#define XFCE_IS_SN_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_DIALOG))
-#define XFCE_SN_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_DIALOG, SnDialogClass))
-
-GType                  sn_dialog_get_type                      (void) G_GNUC_CONST;
+#define XFCE_TYPE_SN_DIALOG (sn_dialog_get_type ())
+G_DECLARE_FINAL_TYPE (SnDialog, sn_dialog, XFCE, SN_DIALOG, GObject)
 
 SnDialog              *sn_dialog_new                           (SnConfig                *config,
                                                                 GdkScreen               *screen);
diff --git a/plugins/systray/sn-icon-box.c b/plugins/systray/sn-icon-box.c
index 7fe3b770fa5a6c5436439dedfabae3631343ca08..93bf158eb443942c5b4553ec0530c066c57e3a8f 100644
--- a/plugins/systray/sn-icon-box.c
+++ b/plugins/systray/sn-icon-box.c
@@ -56,11 +56,6 @@ static void                  sn_icon_box_forall                      (GtkContain
                                                                       gpointer                 callback_data);
 
 
-struct _SnIconBoxClass
-{
-  GtkContainerClass    __parent__;
-};
-
 struct _SnIconBox
 {
   GtkContainer         __parent__;
diff --git a/plugins/systray/sn-icon-box.h b/plugins/systray/sn-icon-box.h
index cb42a05d7cbc0b8c96e1aae2190bdc4311a6216f..ffc2b253fc3683d59ab194b1a30bb9b1c33d152e 100644
--- a/plugins/systray/sn-icon-box.h
+++ b/plugins/systray/sn-icon-box.h
@@ -26,17 +26,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnIconBoxClass SnIconBoxClass;
-typedef struct _SnIconBox      SnIconBox;
-
-#define XFCE_TYPE_SN_ICON_BOX            (sn_icon_box_get_type ())
-#define XFCE_SN_ICON_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_ICON_BOX, SnIconBox))
-#define XFCE_SN_ICON_BOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_ICON_BOX, SnIconBoxClass))
-#define XFCE_IS_SN_ICON_BOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_ICON_BOX))
-#define XFCE_IS_SN_ICON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_ICON_BOX))
-#define XFCE_SN_ICON_BOX_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_ICON_BOX, SnIconBoxClass))
-
-GType                  sn_icon_box_get_type                    (void) G_GNUC_CONST;
+#define XFCE_TYPE_SN_ICON_BOX (sn_icon_box_get_type ())
+G_DECLARE_FINAL_TYPE (SnIconBox, sn_icon_box, XFCE, SN_ICON_BOX, GtkContainer)
 
 GtkWidget             *sn_icon_box_new                         (SnItem                  *item,
                                                                 SnConfig                *config);
diff --git a/plugins/systray/sn-item.c b/plugins/systray/sn-item.c
index fd0d94218c4aab023da217f01ac3954cbed9223b..5f1211b639ab53c8707d935858fdd92183175506 100644
--- a/plugins/systray/sn-item.c
+++ b/plugins/systray/sn-item.c
@@ -59,11 +59,6 @@ static void                  sn_item_get_all_properties_result       (GObject
 
 
 
-struct _SnItemClass
-{
-  GObjectClass         __parent__;
-};
-
 struct _SnItem
 {
   GObject              __parent__;
diff --git a/plugins/systray/sn-item.h b/plugins/systray/sn-item.h
index ba9e55c6d2729571949dc68df86d17507710521f..37a9576b1105ef28768da415c2f9c2e2a7445cf3 100644
--- a/plugins/systray/sn-item.h
+++ b/plugins/systray/sn-item.h
@@ -23,17 +23,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnItemClass SnItemClass;
-typedef struct _SnItem      SnItem;
-
-#define XFCE_TYPE_SN_ITEM            (sn_item_get_type ())
-#define XFCE_SN_ITEM(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_ITEM, SnItem))
-#define XFCE_SN_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_ITEM, SnItemClass))
-#define XFCE_IS_SN_ITEM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_ITEM))
-#define XFCE_IS_SN_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_ITEM))
-#define XFCE_SN_ITEM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_ITEM, SnItemClass))
-
-GType                  sn_item_get_type                        (void) G_GNUC_CONST;
+#define XFCE_TYPE_SN_ITEM (sn_item_get_type ())
+G_DECLARE_FINAL_TYPE (SnItem, sn_item, XFCE, SN_ITEM, GObject)
 
 void                   sn_item_start                           (SnItem                  *item);
 
@@ -50,8 +41,8 @@ void                   sn_item_get_icon                        (SnItem
                                                                 GdkPixbuf              **overlay_icon_pixbuf);
 
 void                   sn_item_get_tooltip                     (SnItem                  *item,
-	                                                           const gchar            **title,
-	                                                           const gchar            **subtitle);
+                                                                const gchar            **title,
+                                                                const gchar            **subtitle);
 
 gboolean               sn_item_is_menu_only                    (SnItem                  *item);
 
diff --git a/plugins/systray/sn-plugin.c b/plugins/systray/sn-plugin.c
index 65e0e540f7034531361e46fa8ab8711fe2faa343..bd221bd3d270f4a7cbdc2e6c3377bab2f64b5c64 100644
--- a/plugins/systray/sn-plugin.c
+++ b/plugins/systray/sn-plugin.c
@@ -49,7 +49,6 @@
 #include "sn-item.h"
 #include "sn-plugin.h"
 
-#define BUTTON_SIZE   (16)
 
 
 static void                  sn_plugin_construct                     (XfcePanelPlugin         *panel_plugin);
diff --git a/plugins/systray/sn-plugin.h b/plugins/systray/sn-plugin.h
index f65d2c10c3c7acc59c56c94a558e66e684cbe456..5e4f74d85fcc4de6e1509819a7c0cdaa47543ea1 100644
--- a/plugins/systray/sn-plugin.h
+++ b/plugins/systray/sn-plugin.h
@@ -31,20 +31,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnPluginClass SnPluginClass;
-typedef struct _SnPlugin      SnPlugin;
-
-#define XFCE_TYPE_SN_PLUGIN            (sn_plugin_get_type ())
-#define XFCE_SN_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_PLUGIN, SnPlugin))
-#define XFCE_SN_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_PLUGIN, SnPluginClass))
-#define XFCE_IS_SN_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_PLUGIN))
-#define XFCE_IS_SN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_PLUGIN))
-#define XFCE_SN_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_PLUGIN, SnPluginClass))
-
-struct _SnPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
+#define XFCE_TYPE_SN_PLUGIN (sn_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (SnPlugin, sn_plugin, XFCE, SN_PLUGIN, XfcePanelPlugin)
 
 struct _SnPlugin
 {
@@ -79,8 +67,6 @@ struct _SnPlugin
   SnConfig            *config;
 };
 
-GType                  sn_plugin_get_type                      (void) G_GNUC_CONST;
-
 void                   sn_plugin_register_type                 (XfcePanelTypeModule     *panel_type_module);
 
 gboolean               sn_plugin_legacy_item_added             (SnPlugin                *plugin,
diff --git a/plugins/systray/systray-box.c b/plugins/systray/systray-box.c
index 214d48b31a0bd399c91e15cb465f7f9dad176688..76f310a90476d0b0abd33547e0e1c882821d2748 100644
--- a/plugins/systray/systray-box.c
+++ b/plugins/systray/systray-box.c
@@ -27,7 +27,6 @@
 #include <math.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <libxfce4panel/libxfce4panel.h>
 #include <common/panel-private.h>
 #include <common/panel-debug.h>
@@ -81,11 +80,6 @@ enum
   PROP_HAS_HIDDEN
 };
 
-struct _SystrayBoxClass
-{
-  GtkContainerClass __parent__;
-};
-
 struct _SystrayBox
 {
   GtkContainer  __parent__;
@@ -715,13 +709,13 @@ systray_box_compare_function (gconstpointer a,
   gpointer     value;
 
   /* sort hidden icons before visible ones */
-  hidden_a = systray_socket_get_hidden (XFCE_SYSTRAY_SOCKET (a));
-  hidden_b = systray_socket_get_hidden (XFCE_SYSTRAY_SOCKET (b));
+  hidden_a = systray_socket_get_hidden ((SystraySocket *) (a));
+  hidden_b = systray_socket_get_hidden ((SystraySocket *) (b));
   if (hidden_a != hidden_b)
     return hidden_a ? 1 : -1;
 
-  name_a = systray_socket_get_name (XFCE_SYSTRAY_SOCKET (a));
-  name_b = systray_socket_get_name (XFCE_SYSTRAY_SOCKET (b));
+  name_a = systray_socket_get_name ((SystraySocket *) (a));
+  name_b = systray_socket_get_name ((SystraySocket *) (b));
 
   if (name_a != NULL && g_hash_table_lookup_extended (box->names_ordered, name_a, NULL, &value))
     index_a = GPOINTER_TO_INT (value);
diff --git a/plugins/systray/systray-box.h b/plugins/systray/systray-box.h
index 302a6ef8e0b0276ec149da2bf77b4c322b518706..96edad570334e8f7c8c4e5e89f2e724a9aa0f887 100644
--- a/plugins/systray/systray-box.h
+++ b/plugins/systray/systray-box.h
@@ -19,22 +19,12 @@
 #ifndef __SYSTRAY_BOX_H__
 #define __SYSTRAY_BOX_H__
 
-typedef struct _SystrayBoxClass SystrayBoxClass;
-typedef struct _SystrayBox      SystrayBox;
+#include <gtk/gtk.h>
 
-/* keep those in sync with the glade file too! */
-#define SIZE_MAX_MIN     (12)
-#define SIZE_MAX_MAX     (64)
-#define SIZE_MAX_DEFAULT (22)
+G_BEGIN_DECLS
 
-#define XFCE_TYPE_SYSTRAY_BOX            (systray_box_get_type ())
-#define XFCE_SYSTRAY_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SYSTRAY_BOX, SystrayBox))
-#define XFCE_SYSTRAY_BOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SYSTRAY_BOX, SystrayBoxClass))
-#define XFCE_IS_SYSTRAY_BOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SYSTRAY_BOX))
-#define XFCE_IS_SYSTRAY_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SYSTRAY_BOX))
-#define XFCE_SYSTRAY_BOX_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SYSTRAY_BOX, SystrayBoxClass))
-
-GType      systray_box_get_type        (void) G_GNUC_CONST;
+#define XFCE_TYPE_SYSTRAY_BOX (systray_box_get_type ())
+G_DECLARE_FINAL_TYPE (SystrayBox, systray_box, XFCE, SYSTRAY_BOX, GtkContainer)
 
 void       systray_box_register_type   (XfcePanelTypeModule *module);
 
@@ -70,4 +60,6 @@ gboolean   systray_box_has_hidden_items (SystrayBox         *box);
 void       systray_box_set_single_row  (SystrayBox          *box,
                                         gboolean             single_row);
 
+G_END_DECLS
+
 #endif /* !__SYSTRAY_BOX_H__ */
diff --git a/plugins/systray/systray-manager.c b/plugins/systray/systray-manager.c
index 066a10aaa4b7c49d31a7ae6efe9b1658a6228014..55c7a1b0d503d99aea5c8bc5e50629a4afbbd352 100644
--- a/plugins/systray/systray-manager.c
+++ b/plugins/systray/systray-manager.c
@@ -53,6 +53,9 @@
 #define XFCE_SYSTRAY_MANAGER_ORIENTATION_HORIZONTAL 0
 #define XFCE_SYSTRAY_MANAGER_ORIENTATION_VERTICAL   1
 
+#define XFCE_SYSTRAY_MANAGER_ERROR (systray_manager_error_quark())
+
+typedef struct _SystrayMessage SystrayMessage;
 
 
 static void            systray_manager_finalize                           (GObject             *object);
@@ -84,6 +87,11 @@ static void            systray_manager_message_remove_from_list           (Systr
 
 
 
+enum
+{
+  XFCE_SYSTRAY_MANAGER_ERROR_SELECTION_FAILED
+};
+
 enum
 {
   ICON_ADDED,
@@ -94,11 +102,6 @@ enum
   LAST_SIGNAL
 };
 
-struct _SystrayManagerClass
-{
-  GObjectClass __parent__;
-};
-
 struct _SystrayManager
 {
   GObject __parent__;
diff --git a/plugins/systray/systray-manager.h b/plugins/systray/systray-manager.h
index 62006973f187b8c7135e4067fe22866e4e942c08..a84963457803bf6a328744a879b905085137899f 100644
--- a/plugins/systray/systray-manager.h
+++ b/plugins/systray/systray-manager.h
@@ -25,28 +25,10 @@
 
 #include <gtk/gtk.h>
 
-typedef struct _SystrayManagerClass SystrayManagerClass;
-typedef struct _SystrayManager      SystrayManager;
-typedef struct _SystrayMessage      SystrayMessage;
+G_BEGIN_DECLS
 
-#define XFCE_TYPE_SYSTRAY_MANAGER            (systray_manager_get_type ())
-#define XFCE_SYSTRAY_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SYSTRAY_MANAGER, SystrayManager))
-#define XFCE_SYSTRAY_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SYSTRAY_MANAGER, SystrayManagerClass))
-#define XFCE_IS_SYSTRAY_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SYSTRAY_MANAGER))
-#define XFCE_IS_SYSTRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SYSTRAY_MANAGER))
-#define XFCE_SYSTRAY_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SYSTRAY_MANAGER, SystrayManagerClass))
-#define XFCE_SYSTRAY_MANAGER_ERROR           (systray_manager_error_quark())
-
-
-
-enum
-{
-    XFCE_SYSTRAY_MANAGER_ERROR_SELECTION_FAILED
-};
-
-
-
-GType           systray_manager_get_type             (void) G_GNUC_CONST;
+#define XFCE_TYPE_SYSTRAY_MANAGER  (systray_manager_get_type ())
+G_DECLARE_FINAL_TYPE (SystrayManager, systray_manager, XFCE, SYSTRAY_MANAGER, GObject)
 
 void            systray_manager_register_type        (XfcePanelTypeModule *type_module);
 
@@ -69,5 +51,6 @@ void            systray_manager_set_colors           (SystrayManager *manager,
 void            systray_manager_set_orientation      (SystrayManager      *manager,
                                                       GtkOrientation       orientation);
 
+G_END_DECLS
 
 #endif /* !__SYSTRAY_MANAGER_H__ */
diff --git a/plugins/systray/systray-socket.c b/plugins/systray/systray-socket.c
index 1a5e7bde8e6f2623aff16f30a51b7c83e99491c6..98c7b9ed9d59da251d4ad21c7bc4aee1bf5ee462 100644
--- a/plugins/systray/systray-socket.c
+++ b/plugins/systray/systray-socket.c
@@ -39,11 +39,6 @@
 
 
 
-struct _SystraySocketClass
-{
-  GtkSocketClass __parent__;
-};
-
 struct _SystraySocket
 {
   GtkSocket __parent__;
diff --git a/plugins/systray/systray-socket.h b/plugins/systray/systray-socket.h
index 8d9ccbdcadb6fee02d2c9442a9d233dbc1558397..48cda9232fe829ffafab64d4115277312b7c4bc9 100644
--- a/plugins/systray/systray-socket.h
+++ b/plugins/systray/systray-socket.h
@@ -25,17 +25,10 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkx.h>
 
-typedef struct _SystraySocketClass SystraySocketClass;
-typedef struct _SystraySocket      SystraySocket;
+G_BEGIN_DECLS
 
-#define XFCE_TYPE_SYSTRAY_SOCKET            (systray_socket_get_type ())
-#define XFCE_SYSTRAY_SOCKET(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SYSTRAY_SOCKET, SystraySocket))
-#define XFCE_SYSTRAY_SOCKET_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SYSTRAY_SOCKET, SystraySocketClass))
-#define XFCE_IS_SYSTRAY_SOCKET(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SYSTRAY_SOCKET))
-#define XFCE_IS_SYSTRAY_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SYSTRAY_SOCKET))
-#define XFCE_SYSTRAY_SOCKET_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SYSTRAY_SOCKET, SystraySocketClass))
-
-GType            systray_socket_get_type      (void) G_GNUC_CONST;
+#define XFCE_TYPE_SYSTRAY_SOCKET (systray_socket_get_type ())
+G_DECLARE_FINAL_TYPE (SystraySocket, systray_socket, XFCE, SYSTRAY_SOCKET, GtkSocket)
 
 void             systray_socket_register_type (GTypeModule     *type_module);
 
@@ -55,4 +48,6 @@ gboolean         systray_socket_get_hidden    (SystraySocket   *socket);
 void             systray_socket_set_hidden    (SystraySocket   *socket,
                                                gboolean         hidden);
 
+G_END_DECLS
+
 #endif /* !__SYSTRAY_SOCKET_H__ */
diff --git a/plugins/systray/systray.h b/plugins/systray/systray.h
index c589c3fbf2a77d5ea4397782e79aca10e3f3862a..3c75273a5d21b71428dfdf3d11fd7915af6be8f0 100644
--- a/plugins/systray/systray.h
+++ b/plugins/systray/systray.h
@@ -26,13 +26,6 @@
 
 G_BEGIN_DECLS
 
-typedef struct _SnPluginClass SnPluginClass;
-typedef struct _SnPlugin      SnPlugin;
-typedef struct _SystrayChild       SystrayChild;
-typedef enum   _SystrayChildState  SystrayChildState;
-
-GType systray_plugin_get_type      (void) G_GNUC_CONST;
-
 void  systray_plugin_box_draw            (GtkWidget             *box,
                                           cairo_t               *cr,
                                           gpointer               user_data);
diff --git a/plugins/tasklist/Makefile.am b/plugins/tasklist/Makefile.am
index 1d9647039ed3ff9f6b041bc18da1c2e98805977a..b0838d40eec20595b875700ddf0b0b38818b6868 100644
--- a/plugins/tasklist/Makefile.am
+++ b/plugins/tasklist/Makefile.am
@@ -16,6 +16,7 @@ libtasklist_built_sources = \
 libtasklist_la_SOURCES = \
 	$(libtasklist_built_sources) \
 	tasklist.c \
+	tasklist.h \
 	tasklist-widget.c \
 	tasklist-widget.h
 
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 7268b9b814cff7cd092db0b5c6eb0c6b8bdf072d..2176852ec1d80c43f90766b078877a355e927793 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -27,7 +27,6 @@
 #include <math.h>
 #endif
 
-#include <gtk/gtk.h>
 #include <libxfce4ui/libxfce4ui.h>
 #include <libxfce4windowing/libxfce4windowing.h>
 #include <libxfce4windowingui/libxfce4windowingui.h>
@@ -76,6 +75,31 @@
 
 
 
+typedef enum _XfceTasklistSortOrder
+{
+  XFCE_TASKLIST_SORT_ORDER_TIMESTAMP, /* sort by unique_id */
+  XFCE_TASKLIST_SORT_ORDER_GROUP_TIMESTAMP, /* sort by group and then by timestamp */
+  XFCE_TASKLIST_SORT_ORDER_TITLE, /* sort by window title */
+  XFCE_TASKLIST_SORT_ORDER_GROUP_TITLE, /* sort by group and then by title */
+  XFCE_TASKLIST_SORT_ORDER_DND, /* append and support dnd */
+
+  XFCE_TASKLIST_SORT_ORDER_MIN = XFCE_TASKLIST_SORT_ORDER_TIMESTAMP,
+  XFCE_TASKLIST_SORT_ORDER_MAX = XFCE_TASKLIST_SORT_ORDER_DND,
+  XFCE_TASKLIST_SORT_ORDER_DEFAULT = XFCE_TASKLIST_SORT_ORDER_GROUP_TIMESTAMP
+} XfceTasklistSortOrder;
+
+typedef enum _XfceTasklistMClick
+{
+  XFCE_TASKLIST_MIDDLE_CLICK_NOTHING, /* do nothing */
+  XFCE_TASKLIST_MIDDLE_CLICK_CLOSE_WINDOW, /* close the window */
+  XFCE_TASKLIST_MIDDLE_CLICK_MINIMIZE_WINDOW, /* minimize, never minimize with button 1 */
+  XFCE_TASKLIST_MIDDLE_CLICK_NEW_INSTANCE, /* launches a new instance of the window */
+
+  XFCE_TASKLIST_MIDDLE_CLICK_MIN = XFCE_TASKLIST_MIDDLE_CLICK_NOTHING,
+  XFCE_TASKLIST_MIDDLE_CLICK_MAX = XFCE_TASKLIST_MIDDLE_CLICK_NEW_INSTANCE,
+  XFCE_TASKLIST_MIDDLE_CLICK_DEFAULT = XFCE_TASKLIST_MIDDLE_CLICK_NOTHING
+} XfceTasklistMClick;
+
 enum
 {
   PROP_0,
@@ -97,11 +121,6 @@ enum
   PROP_LABEL_DECORATIONS
 };
 
-struct _XfceTasklistClass
-{
-  GtkContainerClass __parent__;
-};
-
 struct _XfceTasklist
 {
   GtkContainer __parent__;
@@ -218,8 +237,7 @@ typedef enum
 }
 XfceTasklistChildType;
 
-typedef struct _XfceTasklistChild XfceTasklistChild;
-struct _XfceTasklistChild
+typedef struct _XfceTasklistChild
 {
   /* type of this button */
   XfceTasklistChildType  type;
@@ -254,7 +272,7 @@ struct _XfceTasklistChild
   /* xfw information */
   XfwWindow              *window;
   XfwApplication         *app;
-};
+} XfceTasklistChild;
 
 static const GtkTargetEntry source_targets[] =
 {
diff --git a/plugins/tasklist/tasklist-widget.h b/plugins/tasklist/tasklist-widget.h
index 3b9f96ff58ff675a324acb8c53a97bebda55caf4..f6e0f195fceabec33541a280eeff5c69beb59be7 100644
--- a/plugins/tasklist/tasklist-widget.h
+++ b/plugins/tasklist/tasklist-widget.h
@@ -23,48 +23,8 @@
 
 G_BEGIN_DECLS
 
-typedef struct _XfceTasklistClass     XfceTasklistClass;
-typedef struct _XfceTasklist          XfceTasklist;
-typedef enum   _XfceTasklistSortOrder XfceTasklistSortOrder;
-typedef enum   _XfceTasklistMClick    XfceTasklistMClick;
-
-#define XFCE_TYPE_TASKLIST            (xfce_tasklist_get_type ())
-#define XFCE_TASKLIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_TASKLIST, XfceTasklist))
-#define XFCE_TASKLIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_TASKLIST, XfceTasklistClass))
-#define XFCE_IS_TASKLIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_TASKLIST))
-#define XFCE_IS_TASKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_TASKLIST))
-#define XFCE_TASKLIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_TASKLIST, XfceTasklistClass))
-
-
-
-enum _XfceTasklistSortOrder
-{
-  XFCE_TASKLIST_SORT_ORDER_TIMESTAMP, /* sort by unique_id */
-  XFCE_TASKLIST_SORT_ORDER_GROUP_TIMESTAMP, /* sort by group and then by timestamp */
-  XFCE_TASKLIST_SORT_ORDER_TITLE, /* sort by window title */
-  XFCE_TASKLIST_SORT_ORDER_GROUP_TITLE, /* sort by group and then by title */
-  XFCE_TASKLIST_SORT_ORDER_DND, /* append and support dnd */
-
-  XFCE_TASKLIST_SORT_ORDER_MIN = XFCE_TASKLIST_SORT_ORDER_TIMESTAMP,
-  XFCE_TASKLIST_SORT_ORDER_MAX = XFCE_TASKLIST_SORT_ORDER_DND,
-  XFCE_TASKLIST_SORT_ORDER_DEFAULT = XFCE_TASKLIST_SORT_ORDER_GROUP_TIMESTAMP
-};
-
-enum _XfceTasklistMClick
-{
-  XFCE_TASKLIST_MIDDLE_CLICK_NOTHING, /* do nothing */
-  XFCE_TASKLIST_MIDDLE_CLICK_CLOSE_WINDOW, /* close the window */
-  XFCE_TASKLIST_MIDDLE_CLICK_MINIMIZE_WINDOW, /* minimize, never minimize with button 1 */
-  XFCE_TASKLIST_MIDDLE_CLICK_NEW_INSTANCE, /* launches a new instance of the window */
-
-  XFCE_TASKLIST_MIDDLE_CLICK_MIN = XFCE_TASKLIST_MIDDLE_CLICK_NOTHING,
-  XFCE_TASKLIST_MIDDLE_CLICK_MAX = XFCE_TASKLIST_MIDDLE_CLICK_NEW_INSTANCE,
-  XFCE_TASKLIST_MIDDLE_CLICK_DEFAULT = XFCE_TASKLIST_MIDDLE_CLICK_NOTHING
-};
-
-
-
-GType xfce_tasklist_get_type                (void) G_GNUC_CONST;
+#define XFCE_TYPE_TASKLIST (xfce_tasklist_get_type ())
+G_DECLARE_FINAL_TYPE (XfceTasklist, xfce_tasklist, XFCE, TASKLIST, GtkContainer)
 
 void  xfce_tasklist_set_mode                (XfceTasklist        *tasklist,
                                              XfcePanelPluginMode  mode);
diff --git a/plugins/tasklist/tasklist.c b/plugins/tasklist/tasklist.c
index da60d732c1db40ee32b3e9889736e79b00f7cc5f..92e486633de6b8848e64dffe99e8f6595c788875 100644
--- a/plugins/tasklist/tasklist.c
+++ b/plugins/tasklist/tasklist.c
@@ -24,34 +24,15 @@
 #include <common/panel-xfconf.h>
 #include <common/panel-utils.h>
 #include <common/panel-private.h>
-#include <libxfce4panel/libxfce4panel.h>
 
+#include "tasklist.h"
 #include "tasklist-widget.h"
 #include "tasklist-dialog_ui.h"
 
 
-#define HANDLE_OFFSET (0.15)
-#define HANDLE_SIZE      (4)
+#define HANDLE_SIZE (4)
 
 
-/* TODO move to header */
-GType tasklist_plugin_get_type (void) G_GNUC_CONST;
-void tasklist_plugin_register_type (XfcePanelTypeModule *type_module);
-#define XFCE_TYPE_TASKLIST_PLUGIN            (tasklist_plugin_get_type ())
-#define XFCE_TASKLIST_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_TASKLIST_PLUGIN, TasklistPlugin))
-#define XFCE_TASKLIST_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_TASKLIST_PLUGIN, TasklistPluginClass))
-#define XFCE_IS_TASKLIST_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_TASKLIST_PLUGIN))
-#define XFCE_IS_TASKLIST_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_TASKLIST_PLUGIN))
-#define XFCE_TASKLIST_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_TASKLIST_PLUGIN, TasklistPluginClass))
-
-
-typedef struct _TasklistPluginClass TasklistPluginClass;
-struct _TasklistPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
-typedef struct _TasklistPlugin TasklistPlugin;
 struct _TasklistPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/tasklist/tasklist.h b/plugins/tasklist/tasklist.h
new file mode 100644
index 0000000000000000000000000000000000000000..60c2059ccfa8cd7d9433bec9dcbdd8b93193c007
--- /dev/null
+++ b/plugins/tasklist/tasklist.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2023 Gaël Bonithon <gael@xfce.org>
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __XFCE_TASKLIST_PLUGIN_H__
+#define __XFCE_TASKLIST_PLUGIN_H__
+
+#include <libxfce4panel/libxfce4panel.h>
+
+G_BEGIN_DECLS
+
+#define XFCE_TYPE_TASKLIST_PLUGIN (tasklist_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (TasklistPlugin, tasklist_plugin, XFCE, TASKLIST_PLUGIN, XfcePanelPlugin)
+
+void tasklist_plugin_register_type (XfcePanelTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* !__XFCE_TASKLIST_PLUGIN_H__ */
diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
index 9913ba9af7bd67140d8fca285a0c0c80b90009ba..cc76a2cc9b4fcc8f42ad2960850d61f0aa27a6c2 100644
--- a/plugins/windowmenu/windowmenu.c
+++ b/plugins/windowmenu/windowmenu.c
@@ -20,9 +20,9 @@
 #include <config.h>
 #endif
 
+#include <gtk/gtk.h>
 #include <exo/exo.h>
 #include <libxfce4ui/libxfce4ui.h>
-#include <libxfce4panel/libxfce4panel.h>
 #include <libxfce4windowing/libxfce4windowing.h>
 #include <libxfce4windowingui/libxfce4windowingui.h>
 #include <common/panel-xfconf.h>
@@ -33,16 +33,10 @@
 #include "windowmenu.h"
 #include "windowmenu-dialog_ui.h"
 
-#define ARROW_BUTTON_SIZE       (12)
 #define DEFAULT_ICON_LUCENCY    (50)
 #define DEFAULT_MAX_WIDTH_CHARS (24)
 #define DEFAULT_ELLIPSIZE_MODE  (PANGO_ELLIPSIZE_MIDDLE)
 
-struct _WindowMenuPluginClass
-{
-  XfcePanelPluginClass __parent__;
-};
-
 struct _WindowMenuPlugin
 {
   XfcePanelPlugin __parent__;
diff --git a/plugins/windowmenu/windowmenu.h b/plugins/windowmenu/windowmenu.h
index 316f250cf74730eab8f9e0c3820e37a8cd7032dd..c0183a353b9e26e7c09ebb836c5557e77774d4af 100644
--- a/plugins/windowmenu/windowmenu.h
+++ b/plugins/windowmenu/windowmenu.h
@@ -19,23 +19,14 @@
 #ifndef __XFCE_WINDOW_MENU_PLUGIN_H__
 #define __XFCE_WINDOW_MENU_PLUGIN_H__
 
-#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
 
 G_BEGIN_DECLS
 
-typedef struct _WindowMenuPluginClass WindowMenuPluginClass;
-typedef struct _WindowMenuPlugin      WindowMenuPlugin;
+#define XFCE_TYPE_WINDOW_MENU_PLUGIN (window_menu_plugin_get_type ())
+G_DECLARE_FINAL_TYPE (WindowMenuPlugin, window_menu_plugin, XFCE, WINDOW_MENU_PLUGIN, XfcePanelPlugin)
 
-#define XFCE_TYPE_WINDOW_MENU_PLUGIN            (window_menu_plugin_get_type ())
-#define XFCE_WINDOW_MENU_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_WINDOW_MENU_PLUGIN, WindowMenuPlugin))
-#define XFCE_WINDOW_MENU_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_WINDOW_MENU_PLUGIN, WindowMenuPluginClass))
-#define XFCE_IS_WINDOW_MENU_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_WINDOW_MENU_PLUGIN))
-#define XFCE_IS_WINDOW_MENU_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_WINDOW_MENU_PLUGIN))
-#define XFCE_WINDOW_MENU_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_WINDOW_MENU_PLUGIN, WindowMenuPluginClass))
-
-GType window_menu_plugin_get_type      (void) G_GNUC_CONST;
-
-void  window_menu_plugin_register_type (XfcePanelTypeModule *type_module);
+void window_menu_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS