1 | /* GTK - The GIMP Toolkit |
2 | * Copyright © 2013 Carlos Garnacho <[email protected]> |
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_POPOVER_H__ |
19 | #define __GTK_POPOVER_H__ |
20 | |
21 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
22 | #error "Only <gtk/gtk.h> can be included directly." |
23 | #endif |
24 | |
25 | #include <gtk/gtkwindow.h> |
26 | |
27 | G_BEGIN_DECLS |
28 | |
29 | #define GTK_TYPE_POPOVER (gtk_popover_get_type ()) |
30 | #define GTK_POPOVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_POPOVER, GtkPopover)) |
31 | #define GTK_POPOVER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GTK_TYPE_POPOVER, GtkPopoverClass)) |
32 | #define GTK_IS_POPOVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_POPOVER)) |
33 | #define GTK_IS_POPOVER_CLASS(o) (G_TYPE_CHECK_CLASS_TYPE ((o), GTK_TYPE_POPOVER)) |
34 | #define GTK_POPOVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_POPOVER, GtkPopoverClass)) |
35 | |
36 | typedef struct _GtkPopover GtkPopover; |
37 | typedef struct _GtkPopoverClass GtkPopoverClass; |
38 | typedef struct _GtkPopoverPrivate GtkPopoverPrivate; |
39 | |
40 | struct _GtkPopover |
41 | { |
42 | GtkBin parent_instance; |
43 | |
44 | /*< private >*/ |
45 | |
46 | GtkPopoverPrivate *priv; |
47 | }; |
48 | |
49 | struct _GtkPopoverClass |
50 | { |
51 | GtkBinClass parent_class; |
52 | |
53 | void (* closed) (GtkPopover *popover); |
54 | |
55 | /*< private >*/ |
56 | |
57 | /* Padding for future expansion */ |
58 | gpointer reserved[10]; |
59 | }; |
60 | |
61 | GDK_AVAILABLE_IN_3_12 |
62 | GType gtk_popover_get_type (void) G_GNUC_CONST; |
63 | |
64 | GDK_AVAILABLE_IN_3_12 |
65 | GtkWidget * gtk_popover_new (GtkWidget *relative_to); |
66 | |
67 | GDK_AVAILABLE_IN_3_12 |
68 | GtkWidget * gtk_popover_new_from_model (GtkWidget *relative_to, |
69 | GMenuModel *model); |
70 | |
71 | GDK_AVAILABLE_IN_3_12 |
72 | void gtk_popover_set_relative_to (GtkPopover *popover, |
73 | GtkWidget *relative_to); |
74 | GDK_AVAILABLE_IN_3_12 |
75 | GtkWidget * gtk_popover_get_relative_to (GtkPopover *popover); |
76 | |
77 | GDK_AVAILABLE_IN_3_12 |
78 | void gtk_popover_set_pointing_to (GtkPopover *popover, |
79 | const GdkRectangle *rect); |
80 | GDK_AVAILABLE_IN_3_12 |
81 | gboolean gtk_popover_get_pointing_to (GtkPopover *popover, |
82 | GdkRectangle *rect); |
83 | GDK_AVAILABLE_IN_3_12 |
84 | void gtk_popover_set_position (GtkPopover *popover, |
85 | GtkPositionType position); |
86 | GDK_AVAILABLE_IN_3_12 |
87 | GtkPositionType gtk_popover_get_position (GtkPopover *popover); |
88 | |
89 | GDK_AVAILABLE_IN_3_12 |
90 | void gtk_popover_set_modal (GtkPopover *popover, |
91 | gboolean modal); |
92 | GDK_AVAILABLE_IN_3_12 |
93 | gboolean gtk_popover_get_modal (GtkPopover *popover); |
94 | |
95 | GDK_AVAILABLE_IN_3_12 |
96 | void gtk_popover_bind_model (GtkPopover *popover, |
97 | GMenuModel *model, |
98 | const gchar *action_namespace); |
99 | |
100 | GDK_DEPRECATED_IN_3_22 |
101 | void gtk_popover_set_transitions_enabled (GtkPopover *popover, |
102 | gboolean transitions_enabled); |
103 | GDK_DEPRECATED_IN_3_22 |
104 | gboolean gtk_popover_get_transitions_enabled (GtkPopover *popover); |
105 | |
106 | GDK_AVAILABLE_IN_3_18 |
107 | void gtk_popover_set_default_widget (GtkPopover *popover, |
108 | GtkWidget *widget); |
109 | GDK_AVAILABLE_IN_3_18 |
110 | GtkWidget * gtk_popover_get_default_widget (GtkPopover *popover); |
111 | |
112 | GDK_AVAILABLE_IN_3_20 |
113 | void gtk_popover_set_constrain_to (GtkPopover *popover, |
114 | GtkPopoverConstraint constraint); |
115 | |
116 | GDK_AVAILABLE_IN_3_20 |
117 | GtkPopoverConstraint gtk_popover_get_constrain_to (GtkPopover *popover); |
118 | |
119 | GDK_AVAILABLE_IN_3_22 |
120 | void (GtkPopover *popover); |
121 | |
122 | GDK_AVAILABLE_IN_3_22 |
123 | void gtk_popover_popdown (GtkPopover *popover); |
124 | |
125 | |
126 | G_END_DECLS |
127 | |
128 | #endif /* __GTK_POPOVER_H__ */ |
129 | |