| 1 |
/* GDK - The GIMP Drawing Kit |
| 2 |
* Copyright (C) 2020 the GTK team |
| 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 |
#ifndef __GDK_DEVICE_WINPOINTER_H__ |
| 19 |
#define __GDK_DEVICE_WINPOINTER_H__ |
| 20 |
|
| 21 |
#include <gdk/gdkdeviceprivate.h> |
| 22 |
|
| 23 |
#include <windows.h> |
| 24 |
|
| 25 |
G_BEGIN_DECLS |
| 26 |
|
| 27 |
#define GDK_TYPE_DEVICE_WINPOINTER (gdk_device_winpointer_get_type ()) |
| 28 |
#define GDK_DEVICE_WINPOINTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_WINPOINTER, GdkDeviceWinpointer)) |
| 29 |
#define GDK_DEVICE_WINPOINTER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_WINPOINTER, GdkDeviceWinpointerClass)) |
| 30 |
#define GDK_IS_DEVICE_WINPOINTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_WINPOINTER)) |
| 31 |
#define GDK_IS_DEVICE_WINPOINTER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_WINPOINTER)) |
| 32 |
#define GDK_DEVICE_WINPOINTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_WINPOINTER, GdkDeviceWinpointerClass)) |
| 33 |
|
| 34 |
typedef struct _GdkDeviceWinpointer GdkDeviceWinpointer; |
| 35 |
typedef struct _GdkDeviceWinpointerClass GdkDeviceWinpointerClass; |
| 36 |
|
| 37 |
struct _GdkDeviceWinpointer |
| 38 |
{ |
| 39 |
GdkDevice parent_instance; |
| 40 |
|
| 41 |
HANDLE device_handle; |
| 42 |
UINT32 start_cursor_id; |
| 43 |
UINT32 end_cursor_id; |
| 44 |
|
| 45 |
int origin_x; |
| 46 |
int origin_y; |
| 47 |
double scale_x; |
| 48 |
double scale_y; |
| 49 |
|
| 50 |
double *last_axis_data; |
| 51 |
unsigned num_axes; |
| 52 |
GdkModifierType last_button_mask; |
| 53 |
}; |
| 54 |
|
| 55 |
struct _GdkDeviceWinpointerClass |
| 56 |
{ |
| 57 |
GdkDeviceClass parent_class; |
| 58 |
}; |
| 59 |
|
| 60 |
GType gdk_device_winpointer_get_type (void) G_GNUC_CONST; |
| 61 |
|
| 62 |
G_END_DECLS |
| 63 |
|
| 64 |
#endif /* __GDK_DEVICE_WINPOINTER_H__ */ |