1 | /* GTK - The GIMP Toolkit |
2 | * Copyright (C) 2017 - Red Hat Inc. |
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 _GTK_POINTER_FOCUS_PRIVATE_H_ |
19 | #define _GTK_POINTER_FOCUS_PRIVATE_H_ |
20 | |
21 | #include <gtk/gtktypes.h> |
22 | |
23 | typedef struct _GtkPointerFocus GtkPointerFocus; |
24 | |
25 | struct _GtkPointerFocus |
26 | { |
27 | int ref_count; |
28 | GdkDevice *device; |
29 | GdkEventSequence *sequence; |
30 | GtkWindow *toplevel; |
31 | GtkWidget *target; /* Unaffected by the implicit grab */ |
32 | GtkWidget *grab_widget; |
33 | double x, y; /* In toplevel coordinates */ |
34 | }; |
35 | |
36 | GtkPointerFocus * gtk_pointer_focus_new (GtkWindow *toplevel, |
37 | GtkWidget *widget, |
38 | GdkDevice *device, |
39 | GdkEventSequence *sequence, |
40 | double x, |
41 | double y); |
42 | GtkPointerFocus * gtk_pointer_focus_ref (GtkPointerFocus *focus); |
43 | void gtk_pointer_focus_unref (GtkPointerFocus *focus); |
44 | |
45 | void gtk_pointer_focus_set_coordinates (GtkPointerFocus *focus, |
46 | double x, |
47 | double y); |
48 | void gtk_pointer_focus_set_target (GtkPointerFocus *focus, |
49 | GtkWidget *target); |
50 | GtkWidget * gtk_pointer_focus_get_target (GtkPointerFocus *focus); |
51 | |
52 | void gtk_pointer_focus_set_implicit_grab (GtkPointerFocus *focus, |
53 | GtkWidget *grab_widget); |
54 | GtkWidget * gtk_pointer_focus_get_implicit_grab (GtkPointerFocus *focus); |
55 | |
56 | GtkWidget * gtk_pointer_focus_get_effective_target (GtkPointerFocus *focus); |
57 | |
58 | void gtk_pointer_focus_repick_target (GtkPointerFocus *focus); |
59 | |
60 | #endif /* _GTK_POINTER_FOCUS_PRIVATE_H_ */ |
61 | |