]> Pileus Git - ~andy/gtk/blob - gdk/quartz/gdkglobals-quartz.c
Change FSF Address
[~andy/gtk] / gdk / quartz / gdkglobals-quartz.c
1 /* gdkglobals-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, see <http://www.gnu.org/licenses/>.
17  */
18
19 #include "config.h"
20 #include "gdktypes.h"
21 #include "gdkprivate.h"
22 #include "gdkquartz.h"
23
24 GdkDisplay *_gdk_display = NULL;
25 GdkScreen *_gdk_screen = NULL;
26 GdkWindow *_gdk_root = NULL;
27
28 GdkOSXVersion
29 gdk_quartz_osx_version (void)
30 {
31   gint minor;
32   OSErr err = Gestalt (gestaltSystemVersionMinor, &minor);
33   g_return_val_if_fail (err == noErr, GDK_OSX_UNSUPPORTED);
34
35   if (minor < GDK_OSX_MIN)
36     return GDK_OSX_UNSUPPORTED;
37   else if (minor > GDK_OSX_CURRENT)
38     return GDK_OSX_NEW;
39   else
40     return minor;
41 }