]> Pileus Git - ~andy/gtk/blob - gtk/gtkmenutoolbutton.h
Replace non-deprecated API using old tooltips API, deprecate old tooltips
[~andy/gtk] / gtk / gtkmenutoolbutton.h
1 /* GTK - The GIMP Toolkit
2  *
3  * Copyright (C) 2003 Ricardo Fernandez Pascual
4  * Copyright (C) 2004 Paolo Borelli
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GTK_MENU_TOOL_BUTTON_H__
23 #define __GTK_MENU_TOOL_BUTTON_H__
24
25 #include "gtkmenu.h"
26 #include "gtk/gtktoolbutton.h"
27
28 G_BEGIN_DECLS
29
30 #define GTK_TYPE_MENU_TOOL_BUTTON         (gtk_menu_tool_button_get_type ())
31 #define GTK_MENU_TOOL_BUTTON(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButton))
32 #define GTK_MENU_TOOL_BUTTON_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButtonClass))
33 #define GTK_IS_MENU_TOOL_BUTTON(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_MENU_TOOL_BUTTON))
34 #define GTK_IS_MENU_TOOL_BUTTON_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_MENU_TOOL_BUTTON))
35 #define GTK_MENU_TOOL_BUTTON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButtonClass))
36
37 typedef struct _GtkMenuToolButtonClass   GtkMenuToolButtonClass;
38 typedef struct _GtkMenuToolButton        GtkMenuToolButton;
39 typedef struct _GtkMenuToolButtonPrivate GtkMenuToolButtonPrivate;
40
41 struct _GtkMenuToolButton
42 {
43   GtkToolButton parent;
44
45   /*< private >*/
46   GtkMenuToolButtonPrivate *priv;
47 };
48
49 struct _GtkMenuToolButtonClass
50 {
51   GtkToolButtonClass parent_class;
52
53   void (*show_menu) (GtkMenuToolButton *button);
54
55   /* Padding for future expansion */
56   void (*_gtk_reserved1) (void);
57   void (*_gtk_reserved2) (void);
58   void (*_gtk_reserved3) (void);
59   void (*_gtk_reserved4) (void);
60 };
61
62 GType         gtk_menu_tool_button_get_type       (void) G_GNUC_CONST;
63 GtkToolItem  *gtk_menu_tool_button_new            (GtkWidget   *icon_widget,
64                                                    const gchar *label);
65 GtkToolItem  *gtk_menu_tool_button_new_from_stock (const gchar *stock_id);
66
67 void          gtk_menu_tool_button_set_menu       (GtkMenuToolButton *button,
68                                                    GtkWidget         *menu);
69 GtkWidget    *gtk_menu_tool_button_get_menu       (GtkMenuToolButton *button);
70
71 #ifndef GTK_DISABLE_DEPRECATED
72 void          gtk_menu_tool_button_set_arrow_tooltip (GtkMenuToolButton *button,
73                                                       GtkTooltips       *tooltips,
74                                                       const gchar       *tip_text,
75                                                       const gchar       *tip_private);
76 #endif /* GTK_DISABLE_DEPRECATED */
77
78 void          gtk_menu_tool_button_set_arrow_tooltip_text   (GtkMenuToolButton *button,
79                                                              const gchar       *text);
80 void          gtk_menu_tool_button_set_arrow_tooltip_markup (GtkMenuToolButton *button,
81                                                              const gchar       *markup);
82
83 G_END_DECLS
84
85 #endif /* __GTK_MENU_TOOL_BUTTON_H__ */