quartz: Emulate root window as 1x1 bitmap

We subclass GdkWindowImplQuartz into a new GdkRootWindowImplQuartz,
and override the get_context method in order to do this cleanly.
Also made release_context a virtual method, since the root window has
to release its CGContextRef differently compared to normal windows.
This commit is contained in:
Kristian Rietveld
2010-10-04 11:43:16 +02:00
parent 97bdf55b6d
commit 8970b174dc
4 changed files with 138 additions and 21 deletions

View File

@ -69,6 +69,33 @@ struct _GdkWindowImplQuartzClass
GType _gdk_window_impl_quartz_get_type (void);
/* Root window implementation for Quartz
*/
typedef struct _GdkRootWindowImplQuartz GdkRootWindowImplQuartz;
typedef struct _GdkRootWindowImplQuartzClass GdkRootWindowImplQuartzClass;
#define GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ (_gdk_root_window_impl_quartz_get_type ())
#define GDK_ROOT_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartz))
#define GDK_ROOT_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartzClass))
#define GDK_IS_ROOT_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ))
#define GDK_IS_ROOT_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ))
#define GDK_ROOT_WINDOW_IMPL_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartzClass))
struct _GdkRootWindowImplQuartz
{
GdkWindowImplQuartz parent_instance;
};
struct _GdkRootWindowImplQuartzClass
{
GdkWindowImplQuartzClass parent_class;
};
GType _gdk_root_window_impl_quartz_get_type (void);
G_END_DECLS
#endif /* __GDK_WINDOW_QUARTZ_H__ */