]> Pileus Git - ~andy/gtk/blob - gdk/win32/gdkinput.c
x11: Use boolean instead of enum for errors in xsettings code
[~andy/gtk] / gdk / win32 / gdkinput.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 /*
19  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
20  * file for a list of people on the GTK+ Team.  See the ChangeLog
21  * files for a list of changes.  These files are distributed with
22  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
23  */
24
25 /* This file should really be one level up, in the backend-independent
26  * GDK, and the x11/gdkinput.c could also be removed.
27  * 
28  * That stuff in x11/gdkinput.c which really *is* X11-dependent should
29  * be in x11/gdkinput-x11.c.
30  */
31
32 #include "config.h"
33
34 #include "gdkdisplay.h"
35 #include "gdkdevice.h"
36 #include "gdkdisplayprivate.h"
37
38 #include "gdkprivate-win32.h"
39 #include "gdkdevicemanager-win32.h"
40
41 gint              _gdk_input_ignore_core;
42
43 GList            *_gdk_input_devices;
44 GList            *_gdk_input_windows;
45
46 GList *
47 gdk_devices_list (void)
48 {
49   return _gdk_win32_display_list_devices (_gdk_display);
50 }
51
52 GList *
53 _gdk_win32_display_list_devices (GdkDisplay *dpy)
54 {
55   g_return_val_if_fail (dpy == _gdk_display, NULL);
56
57   return _gdk_input_devices;
58 }
59
60 void
61 _gdk_input_init (GdkDisplay *display)
62 {
63   GdkDeviceManagerWin32 *device_manager;
64
65   _gdk_input_ignore_core = FALSE;
66
67   device_manager = g_object_new (GDK_TYPE_DEVICE_MANAGER_WIN32,
68                                  "display", display,
69                                  NULL);
70   display->device_manager = GDK_DEVICE_MANAGER (device_manager);
71
72   display->core_pointer = device_manager->core_pointer;
73
74   _gdk_input_devices = g_list_append (NULL, display->core_pointer);
75   _gdk_input_devices = g_list_concat (_gdk_input_devices,
76                                       g_list_copy (device_manager->wintab_devices));
77
78   _gdk_input_wintab_init_check (GDK_DEVICE_MANAGER (device_manager));
79
80 }