]> Pileus Git - ~andy/gtk/blob - gdk/quartz/gdkdisplay-quartz.c
Add stubs for input shape functions.
[~andy/gtk] / gdk / quartz / gdkdisplay-quartz.c
1 /* gdkdisplay-quartz.c
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, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #include <config.h>
22
23 #include "gdk.h"
24 #include "gdkprivate-quartz.h"
25
26 void
27 _gdk_windowing_set_default_display (GdkDisplay *display)
28 {
29   g_assert (_gdk_display == display);
30 }
31
32 GdkDisplay *
33 gdk_display_open (const gchar *display_name)
34 {
35   if (_gdk_display != NULL)
36     return NULL;
37
38   _gdk_display = g_object_new (GDK_TYPE_DISPLAY, NULL);
39   _gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
40
41   /* Initialize application */
42   [NSApplication sharedApplication];
43
44   _gdk_visual_init ();
45   gdk_screen_set_default_colormap (_gdk_screen,
46                                    gdk_screen_get_system_colormap (_gdk_screen));
47   _gdk_windowing_window_init ();
48
49
50   _gdk_events_init ();
51 #if 0
52   /* FIXME: Remove the #if 0 when we have these functions */
53   _gdk_input_init ();
54   _gdk_dnd_init ();
55 #endif
56
57   g_signal_emit_by_name (gdk_display_manager_get (),
58                          "display_opened", _gdk_display);
59
60   return _gdk_display;
61 }
62
63 G_CONST_RETURN gchar *
64 gdk_display_get_name (GdkDisplay *display)
65 {
66   /* FIXME: Implement */
67   return NULL;
68 }
69
70 int
71 gdk_display_get_n_screens (GdkDisplay *display)
72 {
73   g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
74
75   return 1;
76 }
77
78 GdkScreen *
79 gdk_display_get_screen (GdkDisplay *display,
80                         gint        screen_num)
81 {
82   g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
83   g_return_val_if_fail (screen_num == 0, NULL);
84
85   return _gdk_screen;
86 }
87
88 GdkScreen *
89 gdk_display_get_default_screen (GdkDisplay *display)
90 {
91   return _gdk_screen;
92 }
93
94 void
95 gdk_display_beep (GdkDisplay *display)
96 {
97   g_return_if_fail (GDK_IS_DISPLAY (display));
98
99   NSBeep();
100 }
101
102 gboolean 
103 gdk_display_supports_selection_notification (GdkDisplay *display)
104 {
105   g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
106
107   /* FIXME: Implement */
108   return FALSE;
109 }
110
111 gboolean 
112 gdk_display_request_selection_notification (GdkDisplay *display,
113                                             GdkAtom     selection)
114
115 {
116   /* FIXME: Implement */
117   return FALSE;
118 }
119
120 gboolean
121 gdk_display_supports_clipboard_persistence (GdkDisplay *display)
122 {
123   /* FIXME: Implement */
124   return FALSE;
125 }
126
127 gboolean 
128 gdk_display_supports_shapes (GdkDisplay *display)
129 {
130   /* FIXME: Implement */
131   return FALSE;
132 }
133
134 gboolean 
135 gdk_display_supports_input_shapes (GdkDisplay *display)
136 {
137   /* FIXME: Implement */
138   return FALSE;
139 }
140
141 void
142 gdk_display_store_clipboard (GdkDisplay *display,
143                              GdkWindow  *clipboard_window,
144                              guint32     time_,
145                              GdkAtom    *targets,
146                              gint        n_targets)
147 {
148   /* FIXME: Implement */
149 }
150