]> Pileus Git - ~andy/gtk/blob - gtk/gtkbuttonprivate.h
Add new GtkActionable interface
[~andy/gtk] / gtk / gtkbuttonprivate.h
1 /* GTK - The GIMP Toolkit
2  *
3  * Copyright (C) 2010 Javier Jardón
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __GTK_BUTTON_PRIVATE_H__
20 #define __GTK_BUTTON_PRIVATE_H__
21
22 #include "gsimpleactionobserver.h"
23 #include "gtkaction.h"
24
25 G_BEGIN_DECLS
26
27
28 struct _GtkButtonPrivate
29 {
30   GtkAction             *action;
31   GtkWidget             *image;
32
33   gchar                 *action_name;
34   GVariant              *action_target;
35   GSimpleActionObserver *action_observer;
36
37   GdkDevice             *grab_keyboard;
38   GdkWindow             *event_window;
39
40   gchar                 *label_text;
41
42   gfloat                 xalign;
43   gfloat                 yalign;
44
45   guint                  activate_timeout;
46   guint32                grab_time;
47
48   GtkPositionType        image_position;
49
50   guint          align_set             : 1;
51   guint          button_down           : 1;
52   guint          constructed           : 1;
53   guint          depressed             : 1;
54   guint          depress_on_activate   : 1;
55   guint          focus_on_click        : 1;
56   guint          image_is_stock        : 1;
57   guint          in_button             : 1;
58   guint          relief                : 2;
59   guint          use_action_appearance : 1;
60   guint          use_stock             : 1;
61   guint          use_underline         : 1;
62 };
63
64 void _gtk_button_set_depressed             (GtkButton          *button,
65                                             gboolean            depressed);
66 void _gtk_button_paint                     (GtkButton          *button,
67                                             cairo_t            *cr,
68                                             int                 width,
69                                             int                 height,
70                                             GtkStateFlags       state);
71
72
73 G_END_DECLS
74
75 #endif /* __GTK_BUTTON_PRIVATE_H__ */