Debian Codegraph @

gdk/quartz/gdkmain-quartz.c

raw
1 /* gdkmain-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 #include <dlfcn.h>
23
24 #include "gdk.h"
25 #include <ApplicationServices/ApplicationServices.h>
26
27 const GOptionEntry _gdk_windowing_args[] = {
28 { NULL }
29 };
30
31 void
32 _gdk_windowing_init (void)
33 {
34 ProcessSerialNumber psn = { 0, kCurrentProcess };
35 void (*_gtk_quartz_framework_init_ptr) (void);
36
37 /* Make the current process a foreground application, i.e. an app
38 * with a user interface, in case we're not running from a .app bundle
39 */
40 TransformProcessType (&psn, kProcessTransformToForegroundApplication);
41
42 /* Initialize GTK+ framework if there is one. */
43 _gtk_quartz_framework_init_ptr = dlsym (RTLD_DEFAULT, "_gtk_quartz_framework_init");
44 if (_gtk_quartz_framework_init_ptr)
45 _gtk_quartz_framework_init_ptr ();
46 }
47
48 void
49 gdk_error_trap_push (void)
50 {
51 }
52
53 gint
54 gdk_error_trap_pop (void)
55 {
56 return 0;
57 }
58
59 gchar *
60 gdk_get_display (void)
61 {
62 return g_strdup (gdk_display_get_name (gdk_display_get_default ()));
63 }
64
65 void
66 gdk_notify_startup_complete (void)
67 {
68 /* FIXME: Implement? */
69 }
70
71 void
72 gdk_notify_startup_complete_with_id (const gchar* startup_id)
73 {
74 /* FIXME: Implement? */
75 }
76
77 void
78 gdk_window_set_startup_id (GdkWindow *window,
79 const gchar *startup_id)
80 {
81 /* FIXME: Implement? */
82 }
83
84 void
85 _gdk_windowing_display_set_sm_client_id (GdkDisplay *display,
86 const gchar *sm_client_id)
87 {
88 }
89
90 void
91 gdk_set_use_xshm (gboolean use_xshm)
92 {
93 /* Always on, since we're always on the local machine */
94 }
95
96 gboolean
97 gdk_get_use_xshm (void)
98 {
99 return TRUE;
100 }
101