1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
3 * toolbar.h - this file was part of Geany (v1.24.1), a fast and lightweight IDE
5 * Copyright 2009-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
6 * Copyright 2009-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
7 * Copyright 2014 Rob Norris <rw_norris@hotmail.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef VIKING_TOOLBAR_H
25 #define VIKING_TOOLBAR_H 1
31 #define VIK_TOOLBAR_TYPE (vik_toolbar_get_type ())
32 #define VIK_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIK_TOOLBAR_TYPE, VikToolbar))
33 #define VIK_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIK_TOOLBAR_TYPE, VikToolbarClass))
34 #define VIK_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIK_TOOLBAR_TYPE))
35 #define VIK_IS_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIK_TOOLBAR_TYPE))
36 #define VIK_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIK_TOOLBAR_TYPE, VikToolbarClass))
38 typedef struct _VikToolbarClass VikToolbarClass;
39 typedef struct _VikToolbar VikToolbar;
41 GType vik_toolbar_get_type ();
43 VikToolbar *vik_toolbar_new (void);
44 void vik_toolbar_finalize ( VikToolbar *vtb );
46 GtkWidget *toolbar_get_widget_by_name(VikToolbar *vtb, const gchar *name);
47 GtkAction *toolbar_get_action_by_name(VikToolbar *vtb, const gchar *name);
49 void toolbar_action_tool_entry_register(VikToolbar *vtb, GtkRadioActionEntry *action);
50 void toolbar_action_mode_entry_register(VikToolbar *vtb, GtkRadioActionEntry *action);
51 void toolbar_action_toggle_entry_register(VikToolbar *vtb, GtkToggleActionEntry *action, gpointer callback);
52 void toolbar_action_entry_register(VikToolbar *vtb, GtkActionEntry *action);
54 void toolbar_action_set_sensitive (VikToolbar *vtb, const gchar *name, gboolean sensitive);
56 typedef void (ToolCB) (GtkAction *, GtkAction *, gpointer); // gpointer is actually a VikWindow
57 typedef void (ReloadCB) (GtkActionGroup *, gpointer); // gpointer is actually a VikWindow
59 void toolbar_init(VikToolbar *vtb,
67 void toolbar_apply_settings(VikToolbar *vtb,
72 GtkWidget* toolbar_get_widget(VikToolbar *vtb);
74 void a_toolbar_init (void);
76 void a_toolbar_uninit (void);