Commit fb8817c3 authored by Guido Gunther's avatar Guido Gunther

panel: use G_DECLARE_FINAL_TYPE

instead of open coding it
parent bf454012
......@@ -24,13 +24,18 @@ enum {
};
static guint signals[N_SIGNALS] = { 0 };
struct PhoshPanelPrivate {
typedef struct {
GtkWidget *btn_favorites;
GtkWidget *btn_settings;
gint height;
GnomeWallClock *wall_clock;
};
} PhoshPanelPrivate;
typedef struct _PhoshPanel
{
GtkWindow parent;
} PhoshPanel;
G_DEFINE_TYPE_WITH_PRIVATE (PhoshPanel, phosh_panel, GTK_TYPE_WINDOW)
......
......@@ -10,30 +10,11 @@
#include <gtk/gtk.h>
#define PHOSH_PANEL_TYPE (phosh_panel_get_type ())
#define PHOSH_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOSH_PANEL_TYPE, PhoshPanel))
#define PHOSH_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOSH_PANEL_TYPE, PhoshPanelClass))
#define PHOSH_IS_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOSH_PANEL_TYPE))
#define PHOSH_IS_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOSH_PANEL_TYPE))
#define PHOSH_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOSH_PANEL_TYPE, PhoshPanelClass))
typedef struct PhoshPanel PhoshPanel;
typedef struct PhoshPanelClass PhoshPanelClass;
typedef struct PhoshPanelPrivate PhoshPanelPrivate;
struct PhoshPanel
{
GtkWindow parent;
};
struct PhoshPanelClass
{
GtkWindowClass parent_class;
};
G_DECLARE_FINAL_TYPE (PhoshPanel, phosh_panel, PHOSH, PANEL, GtkWindow)
#define PHOSH_PANEL_HEIGHT 32
GType phosh_panel_get_type (void) G_GNUC_CONST;
GtkWidget * phosh_panel_new (void);
gint phosh_panel_get_height (PhoshPanel *self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment