3 * Copyright (C) 2005-2006 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, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __GDK_PRIVATE_QUARTZ_H__
22 #define __GDK_PRIVATE_QUARTZ_H__
24 #define GDK_QUARTZ_ALLOC_POOL NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]
25 #define GDK_QUARTZ_RELEASE_POOL [pool release]
27 #include <gdk/gdkprivate.h>
28 #include <gdk/quartz/gdkpixmap-quartz.h>
29 #include <gdk/quartz/gdkwindow-quartz.h>
33 #include "gdkinternals.h"
37 #define GDK_TYPE_GC_QUARTZ (_gdk_gc_quartz_get_type ())
38 #define GDK_GC_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_QUARTZ, GdkGCQuartz))
39 #define GDK_GC_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GC_QUARTZ, GdkGCQuartzClass))
40 #define GDK_IS_GC_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC_QUARTZ))
41 #define GDK_IS_GC_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GC_QUARTZ))
42 #define GDK_GC_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GC_QUARTZ, GdkGCQuartzClass))
44 #define GDK_DRAG_CONTEXT_PRIVATE(context) ((GdkDragContextPrivate *) GDK_DRAG_CONTEXT (context)->windowing_data)
46 typedef struct _GdkCursorPrivate GdkCursorPrivate;
47 typedef struct _GdkGCQuartz GdkGCQuartz;
48 typedef struct _GdkGCQuartzClass GdkGCQuartzClass;
49 typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
53 GdkGC parent_instance;
55 GdkGCValuesMask values_mask;
57 gboolean have_clip_region;
58 gboolean have_clip_mask;
62 struct _GdkGCQuartzClass
64 GdkGCClass parent_class;
67 struct _GdkVisualClass
69 GObjectClass parent_class;
72 struct _GdkCursorPrivate
78 struct _GdkDragContextPrivate
80 id <NSDraggingInfo> dragging_info;
83 extern GdkDisplay *_gdk_display;
84 extern GdkScreen *_gdk_screen;
85 extern GdkWindow *_gdk_root;
87 extern GdkDragContext *_gdk_quartz_drag_source_context;
89 GType _gdk_gc_quartz_get_type (void);
91 GdkGC *_gdk_quartz_gc_new (GdkDrawable *drawable,
93 GdkGCValuesMask values_mask);
96 void _gdk_windowing_window_init (void);
97 void _gdk_events_init (void);
98 void _gdk_visual_init (void);
99 void _gdk_input_init (void);
101 void _gdk_quartz_set_context_fill_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel);
102 void _gdk_quartz_set_context_stroke_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel);
104 void _gdk_quartz_update_context_from_gc (CGContextRef context, GdkGC *gc);
106 gint _gdk_quartz_get_inverted_screen_y (gint y);
108 GdkWindow * _gdk_quartz_find_child_window_by_point (GdkWindow *toplevel,
114 void _gdk_quartz_update_focus_window (GdkWindow *new_window,
116 GdkWindow *_gdk_quartz_get_mouse_window (void);
117 void _gdk_quartz_update_mouse_window (GdkWindow *window);
118 void _gdk_quartz_update_cursor (GdkWindow *window);
120 GdkImage *_gdk_quartz_copy_to_image (GdkDrawable *drawable,
129 void _gdk_quartz_send_map_events (GdkWindow *window);
131 GdkEventType _gdk_quartz_key_event_type (NSEvent *event);
132 gboolean _gdk_quartz_key_is_modifier (guint keycode);
134 extern GdkWindow *_gdk_quartz_keyboard_grab_window;
135 extern GdkWindow *_gdk_quartz_pointer_grab_window;
137 #endif /* __GDK_PRIVATE_QUARTZ_H__ */