1 /* gdkdrawable-quartz.h
3 * Copyright (C) 2005 Imendio AB
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef __GDK_WINDOW_QUARTZ_H__
20 #define __GDK_WINDOW_QUARTZ_H__
22 #import <gdk/quartz/GdkQuartzView.h>
23 #import <gdk/quartz/GdkQuartzNSWindow.h>
24 #include "gdk/gdkwindowimpl.h"
28 /* Window implementation for Quartz
31 typedef struct _GdkWindowImplQuartz GdkWindowImplQuartz;
32 typedef struct _GdkWindowImplQuartzClass GdkWindowImplQuartzClass;
34 #define GDK_TYPE_WINDOW_IMPL_QUARTZ (_gdk_window_impl_quartz_get_type ())
35 #define GDK_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_QUARTZ, GdkWindowImplQuartz))
36 #define GDK_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL_QUARTZ, GdkWindowImplQuartzClass))
37 #define GDK_IS_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_QUARTZ))
38 #define GDK_IS_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL_QUARTZ))
39 #define GDK_WINDOW_IMPL_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL_QUARTZ, GdkWindowImplQuartzClass))
41 struct _GdkWindowImplQuartz
43 GdkWindowImpl parent_instance;
48 NSTrackingRectTag tracking_rect;
51 GdkWindowTypeHint type_hint;
53 cairo_region_t *paint_clip_region;
54 gint begin_paint_count;
55 gint in_paint_rect_count;
57 GdkWindow *transient_for;
59 /* Sorted by z-order */
60 GList *sorted_children;
62 cairo_region_t *needs_display_region;
64 cairo_surface_t *cairo_surface;
67 struct _GdkWindowImplQuartzClass
69 GdkWindowImplClass parent_class;
71 CGContextRef (* get_context) (GdkWindowImplQuartz *window,
73 void (* release_context) (GdkWindowImplQuartz *window,
74 CGContextRef cg_context);
77 GType _gdk_window_impl_quartz_get_type (void);
79 CGContextRef gdk_quartz_window_get_context (GdkWindowImplQuartz *window,
81 void gdk_quartz_window_release_context (GdkWindowImplQuartz *window,
82 CGContextRef context);
84 /* Root window implementation for Quartz
87 typedef struct _GdkRootWindowImplQuartz GdkRootWindowImplQuartz;
88 typedef struct _GdkRootWindowImplQuartzClass GdkRootWindowImplQuartzClass;
90 #define GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ (_gdk_root_window_impl_quartz_get_type ())
91 #define GDK_ROOT_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartz))
92 #define GDK_ROOT_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartzClass))
93 #define GDK_IS_ROOT_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ))
94 #define GDK_IS_ROOT_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ))
95 #define GDK_ROOT_WINDOW_IMPL_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartzClass))
97 struct _GdkRootWindowImplQuartz
99 GdkWindowImplQuartz parent_instance;
102 struct _GdkRootWindowImplQuartzClass
104 GdkWindowImplQuartzClass parent_class;
107 GType _gdk_root_window_impl_quartz_get_type (void);
112 #endif /* __GDK_WINDOW_QUARTZ_H__ */