]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkdeviceprivate.h
gdk_frame_clock_get_frame_time(): use gint64 for time
[~andy/gtk] / gdk / gdkdeviceprivate.h
index f7318620d8371b4da3e8a5ac05e62bf78a013504..f30dbdb2a0b4dbe501d9b31cf1e019cbd62db15e 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef __GDK_DEVICE_PRIVATE_H__
 #define __GDK_DEVICE_PRIVATE_H__
 
-#include <gdk/gdkdevice.h>
-#include <gdk/gdkevents.h>
+#include "gdkdevice.h"
+#include "gdkdevicemanager.h"
+#include "gdkevents.h"
 
 G_BEGIN_DECLS
 
@@ -30,22 +29,50 @@ G_BEGIN_DECLS
 #define GDK_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE, GdkDeviceClass))
 
 typedef struct _GdkDeviceClass GdkDeviceClass;
+typedef struct _GdkDeviceKey GdkDeviceKey;
+
+struct _GdkDeviceKey
+{
+  guint keyval;
+  GdkModifierType modifiers;
+};
+
+struct _GdkDevice
+{
+  GObject parent_instance;
+
+  gchar *name;
+  GdkInputSource source;
+  GdkInputMode mode;
+  gboolean has_cursor;
+  gint num_keys;
+  GdkDeviceKey *keys;
+  GdkDeviceManager *manager;
+  GdkDisplay *display;
+  /* Paired master for master,
+   * associated master for slaves
+   */
+  GdkDevice *associated;
+  GList *slaves;
+  GdkDeviceType type;
+  GArray *axes;
+};
 
 struct _GdkDeviceClass
 {
   GObjectClass parent_class;
 
-  gboolean (* get_history) (GdkDevice      *device,
-                            GdkWindow      *window,
-                            guint32         start,
-                            guint32         stop,
-                            GdkTimeCoord ***events,
-                            gint           *n_events);
+  gboolean (* get_history)   (GdkDevice      *device,
+                              GdkWindow      *window,
+                              guint32         start,
+                              guint32         stop,
+                              GdkTimeCoord ***events,
+                              gint           *n_events);
 
-  void (* get_state) (GdkDevice       *device,
-                      GdkWindow       *window,
-                      gdouble         *axes,
-                      GdkModifierType *mask);
+  void (* get_state)         (GdkDevice       *device,
+                              GdkWindow       *window,
+                              gdouble         *axes,
+                              GdkModifierType *mask);
 
   void (* set_window_cursor) (GdkDevice *device,
                               GdkWindow *window,
@@ -55,10 +82,10 @@ struct _GdkDeviceClass
                               GdkScreen  *screen,
                               gint        x,
                               gint        y);
-  gboolean (* query_state)   (GdkDevice        *device,
-                              GdkWindow        *window,
-                              GdkWindow       **root_window,
-                              GdkWindow       **child_window,
+  void (* query_state)       (GdkDevice       *device,
+                              GdkWindow       *window,
+                              GdkWindow      **root_window,
+                              GdkWindow      **child_window,
                               gint             *root_x,
                               gint             *root_y,
                               gint             *win_x,
@@ -94,13 +121,17 @@ guint _gdk_device_add_axis   (GdkDevice   *device,
                               gdouble      min_value,
                               gdouble      max_value,
                               gdouble      resolution);
+void _gdk_device_get_axis_info (GdkDevice  *device,
+                               guint       index,
+                               GdkAtom    *label_atom,
+                               GdkAxisUse *use,
+                               gdouble    *min_value,
+                               gdouble    *max_value,
+                               gdouble    *resolution);
 
 void _gdk_device_set_keys    (GdkDevice   *device,
                               guint        num_keys);
 
-GdkAxisUse _gdk_device_get_axis_use (GdkDevice *device,
-                                     guint      index);
-
 gboolean   _gdk_device_translate_window_coord (GdkDevice *device,
                                                GdkWindow *window,
                                                guint      index,
@@ -123,12 +154,24 @@ gboolean   _gdk_device_translate_axis         (GdkDevice *device,
 GdkTimeCoord ** _gdk_device_allocate_history  (GdkDevice *device,
                                                gint       n_events);
 
-void _gdk_input_check_extension_events (GdkDevice *device);
-
 void _gdk_device_add_slave (GdkDevice *device,
                             GdkDevice *slave);
 void _gdk_device_remove_slave (GdkDevice *device,
                                GdkDevice *slave);
+void _gdk_device_query_state                  (GdkDevice        *device,
+                                               GdkWindow        *window,
+                                               GdkWindow       **root_window,
+                                               GdkWindow       **child_window,
+                                               gint             *root_x,
+                                               gint             *root_y,
+                                               gint             *win_x,
+                                               gint             *win_y,
+                                               GdkModifierType  *mask);
+GdkWindow * _gdk_device_window_at_position    (GdkDevice        *device,
+                                               gint             *win_x,
+                                               gint             *win_y,
+                                               GdkModifierType  *mask,
+                                               gboolean          get_toplevel);
 
 G_END_DECLS