diff options
-rw-r--r-- | src/ui/frames.c | 28 | ||||
-rw-r--r-- | src/ui/frames.h | 37 |
2 files changed, 25 insertions, 40 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c index ed84e6eb..039b371e 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -98,18 +98,36 @@ static void invalidate_all_caches (MetaFrames *frames); static void invalidate_whole_window (MetaFrames *frames, MetaUIFrame *frame); +struct _MetaFrames +{ + GtkWindow parent; + + GHashTable *text_heights; + + GHashTable *frames; + + guint tooltip_timeout; + MetaUIFrame *last_motion_frame; + + gint expose_delay_count; + + gint invalidate_cache_timeout_id; + GList *invalidate_frames; + GHashTable *cache; +}; + G_DEFINE_TYPE (MetaFrames, meta_frames, GTK_TYPE_WINDOW) static void -meta_frames_class_init (MetaFramesClass *class) +meta_frames_class_init (MetaFramesClass *frames_class) { - GObjectClass *gobject_class; + GObjectClass *object_class; GtkWidgetClass *widget_class; - gobject_class = G_OBJECT_CLASS (class); - widget_class = (GtkWidgetClass*) class; + object_class = G_OBJECT_CLASS (frames_class); + widget_class = GTK_WIDGET_CLASS (frames_class); - gobject_class->finalize = meta_frames_finalize; + object_class->finalize = meta_frames_finalize; widget_class->destroy = meta_frames_destroy; widget_class->style_updated = meta_frames_style_updated; diff --git a/src/ui/frames.h b/src/ui/frames.h index 2396b02b..30cb6237 100644 --- a/src/ui/frames.h +++ b/src/ui/frames.h @@ -58,15 +58,8 @@ typedef enum * as subwindows. */ -#define META_TYPE_FRAMES (meta_frames_get_type ()) -#define META_FRAMES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_FRAMES, MetaFrames)) -#define META_FRAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_FRAMES, MetaFramesClass)) -#define META_IS_FRAMES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_FRAMES)) -#define META_IS_FRAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_FRAMES)) -#define META_FRAMES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_FRAMES, MetaFramesClass)) - -typedef struct _MetaFrames MetaFrames; -typedef struct _MetaFramesClass MetaFramesClass; +#define META_TYPE_FRAMES meta_frames_get_type () +G_DECLARE_FINAL_TYPE (MetaFrames, meta_frames, META, FRAMES, GtkWindow) typedef struct _MetaUIFrame MetaUIFrame; @@ -86,32 +79,6 @@ struct _MetaUIFrame MetaFrameControl prelit_control; }; -struct _MetaFrames -{ - GtkWindow parent_instance; - - GHashTable *text_heights; - - GHashTable *frames; - - guint tooltip_timeout; - MetaUIFrame *last_motion_frame; - - int expose_delay_count; - - int invalidate_cache_timeout_id; - GList *invalidate_frames; - GHashTable *cache; -}; - -struct _MetaFramesClass -{ - GtkWindowClass parent_class; - -}; - -GType meta_frames_get_type (void) G_GNUC_CONST; - MetaFrames *meta_frames_new (int screen_number); void meta_frames_manage_window (MetaFrames *frames, |