Debian Codegraph @

gdk/quartz/gdkquartz.h

raw
1 /* gdkquartz.h
2 *
3 * Copyright (C) 2005-2007 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, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21 #ifndef __GDK_QUARTZ_H__
22 #define __GDK_QUARTZ_H__
23
24 #include <AppKit/AppKit.h>
25 #include <gdk/gdkprivate.h>
26
27 G_BEGIN_DECLS
28
29 /* NSInteger only exists in Leopard and newer. This check has to be
30 * done after inclusion of the system headers. If NSInteger has not
31 * been defined, we know for sure that we are on 32-bit.
32 */
33 #ifndef NSINTEGER_DEFINED
34 typedef int NSInteger;
35 typedef unsigned int NSUInteger;
36 #endif
37
38 #ifndef CGFLOAT_DEFINED
39 typedef float CGFloat;
40 #endif
41
42 typedef enum
43 {
44 GDK_OSX_UNSUPPORTED = 0,
45 GDK_OSX_MIN = 4,
46 GDK_OSX_TIGER = 4,
47 GDK_OSX_LEOPARD = 5,
48 GDK_OSX_SNOW_LEOPARD = 6,
49 GDK_OSX_LION = 7,
50 GDK_OSX_MOUNTAIN_LION = 8,
51 GDK_OSX_MAVERICKS = 9,
52 GDK_OSX_YOSEMITE = 10,
53 GDK_OSX_EL_CAPITAN = 11,
54 GDK_OSX_SIERRA = 12,
55 GDK_OSX_HIGH_SIERRA = 13,
56 GDK_OSX_MOJAVE = 14,
57 GDK_OSX_CURRENT = 14,
58 GDK_OSX_NEW = 99
59 } GdkOSXVersion;
60
61 gboolean gdk_quartz_window_is_quartz (GdkWindow *window);
62 NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
63 NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
64 NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
65 id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context);
66 NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
67 GdkOSXVersion gdk_quartz_osx_version (void);
68
69 GdkAtom gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type);
70 NSString *gdk_quartz_target_to_pasteboard_type_libgtk_only (const gchar *target);
71 NSString *gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom);
72
73 G_END_DECLS
74
75 #endif /* __GDK_QUARTZ_H__ */