Debian Codegraph @

gdk/quartz/gdkwindow-quartz.h

raw
1 /* gdkdrawable-quartz.h
2 *
3 * Copyright (C) 2005 Imendio AB
4 *
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.
9 *
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.
14 *
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/>.
17 */
18
19 #ifndef __GDK_WINDOW_QUARTZ_H__
20 #define __GDK_WINDOW_QUARTZ_H__
21
22 #import <gdk/quartz/GdkQuartzView.h>
23 #import <gdk/quartz/GdkQuartzNSWindow.h>
24 #include "gdk/gdkwindowimpl.h"
25
26 G_BEGIN_DECLS
27
28 /* Window implementation for Quartz
29 */
30
31 typedef struct _GdkWindowImplQuartz GdkWindowImplQuartz;
32 typedef struct _GdkWindowImplQuartzClass GdkWindowImplQuartzClass;
33
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))
40
41 struct _GdkWindowImplQuartz
42 {
43 GdkWindowImpl parent_instance;
44
45 GdkWindow *wrapper;
46
47 NSWindow *toplevel;
48 NSTrackingRectTag tracking_rect;
49 GdkQuartzView *view;
50
51 GdkWindowTypeHint type_hint;
52
53 gint in_paint_rect_count;
54
55 GdkWindow *transient_for;
56
57 /* Sorted by z-order */
58 GList *sorted_children;
59
60 cairo_region_t *needs_display_region;
61
62 cairo_surface_t *cairo_surface;
63
64 gint shadow_top;
65
66 gint shadow_max;
67
68 gboolean use_cg_context;
69 GSList frame_link;
70 gint pending_frame_counter;
71 };
72
73 struct _GdkWindowImplQuartzClass
74 {
75 GdkWindowImplClass parent_class;
76
77 CGContextRef (* get_context) (GdkWindowImplQuartz *window,
78 gboolean antialias);
79 void (* release_context) (GdkWindowImplQuartz *window,
80 CGContextRef cg_context);
81 };
82
83 GType _gdk_window_impl_quartz_get_type (void);
84
85 CGContextRef gdk_quartz_window_get_context (GdkWindowImplQuartz *window,
86 gboolean antialias);
87 void gdk_quartz_window_release_context (GdkWindowImplQuartz *window,
88 CGContextRef context);
89
90 /* Root window implementation for Quartz
91 */
92
93 typedef struct _GdkRootWindowImplQuartz GdkRootWindowImplQuartz;
94 typedef struct _GdkRootWindowImplQuartzClass GdkRootWindowImplQuartzClass;
95
96 #define GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ (_gdk_root_window_impl_quartz_get_type ())
97 #define GDK_ROOT_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartz))
98 #define GDK_ROOT_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartzClass))
99 #define GDK_IS_ROOT_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ))
100 #define GDK_IS_ROOT_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ))
101 #define GDK_ROOT_WINDOW_IMPL_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_ROOT_WINDOW_IMPL_QUARTZ, GdkRootWindowImplQuartzClass))
102
103 struct _GdkRootWindowImplQuartz
104 {
105 GdkWindowImplQuartz parent_instance;
106 CGContextRef cg_context;
107 GList* cg_layers;
108 };
109
110 struct _GdkRootWindowImplQuartzClass
111 {
112 GdkWindowImplQuartzClass parent_class;
113 };
114
115 GType _gdk_root_window_impl_quartz_get_type (void);
116
117 G_END_DECLS
118
119 #endif /* __GDK_WINDOW_QUARTZ_H__ */