]> Pileus Git - ~andy/gtk/blob - gdk/gdkinputnone.h
Added notice to look in AUTHORS and ChangeLog files for a list of changes.
[~andy/gtk] / gdk / gdkinputnone.h
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 Library 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  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #ifdef XINPUT_NONE
28
29 static void gdk_input_none_get_pointer (GdkWindow       *window,
30                                         guint32   deviceid,
31                                         gdouble         *x,
32                                         gdouble         *y,
33                                         gdouble         *pressure,
34                                         gdouble         *xtilt,
35                                         gdouble         *ytilt,
36                                         GdkModifierType *mask);
37
38 void
39 gdk_input_init (void)
40 {
41   gdk_input_vtable.set_mode           = NULL;
42   gdk_input_vtable.set_axes           = NULL;
43   gdk_input_vtable.set_key            = NULL;
44   gdk_input_vtable.motion_events      = NULL;
45   gdk_input_vtable.get_pointer        = gdk_input_none_get_pointer;
46   gdk_input_vtable.grab_pointer       = NULL;
47   gdk_input_vtable.ungrab_pointer     = NULL;
48   gdk_input_vtable.configure_event    = NULL;
49   gdk_input_vtable.enter_event        = NULL;
50   gdk_input_vtable.other_event        = NULL;
51   gdk_input_vtable.window_none_event  = NULL;
52   gdk_input_vtable.enable_window      = NULL;
53   gdk_input_vtable.disable_window     = NULL;
54
55   gdk_input_devices = g_list_append (NULL, (GdkDeviceInfo *) &gdk_input_core_info);
56
57   gdk_input_ignore_core = FALSE;
58 }
59
60 static void
61 gdk_input_none_get_pointer (GdkWindow       *window,
62                             guint32          deviceid,
63                             gdouble         *x,
64                             gdouble         *y,
65                             gdouble         *pressure,
66                             gdouble         *xtilt,
67                             gdouble         *ytilt,
68                             GdkModifierType *mask)
69 {
70   gint x_int, y_int;
71
72   gdk_window_get_pointer (window, &x_int, &y_int, mask);
73
74   if (x) *x = x_int;
75   if (y) *y = y_int;
76   if (pressure) *pressure = 0.5;
77   if (xtilt) *xtilt = 0;
78   if (ytilt) *ytilt = 0;
79 }
80
81 #endif /* XINPUT_NONE */