]>
Commit | Line | Data |
---|---|---|
59bc9e85 | 1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ |
50b4f4de | 2 | /* |
59bc9e85 | 3 | * toolbar.h - this file was part of Geany (v1.24.1), a fast and lightweight IDE |
50b4f4de RN |
4 | * |
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> | |
59bc9e85 | 7 | * Copyright 2014 Rob Norris <rw_norris@hotmail.com> |
50b4f4de RN |
8 | * |
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. | |
13 | * | |
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. | |
18 | * | |
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. | |
22 | */ | |
23 | ||
59bc9e85 RN |
24 | #ifndef VIKING_TOOLBAR_H |
25 | #define VIKING_TOOLBAR_H 1 | |
50b4f4de | 26 | |
59bc9e85 | 27 | #include <gtk/gtk.h> |
50b4f4de | 28 | |
59bc9e85 | 29 | G_BEGIN_DECLS |
50b4f4de | 30 | |
59bc9e85 RN |
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)) | |
50b4f4de | 37 | |
59bc9e85 RN |
38 | typedef struct _VikToolbarClass VikToolbarClass; |
39 | typedef struct _VikToolbar VikToolbar; | |
50b4f4de | 40 | |
59bc9e85 | 41 | GType vik_toolbar_get_type (); |
50b4f4de | 42 | |
59bc9e85 RN |
43 | VikToolbar *vik_toolbar_new (void); |
44 | void vik_toolbar_finalize ( VikToolbar *vtb ); | |
50b4f4de | 45 | |
59bc9e85 RN |
46 | GtkWidget *toolbar_get_widget_by_name(VikToolbar *vtb, const gchar *name); |
47 | GtkAction *toolbar_get_action_by_name(VikToolbar *vtb, const gchar *name); | |
50b4f4de | 48 | |
59bc9e85 RN |
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); | |
50b4f4de | 53 | |
59bc9e85 | 54 | void toolbar_action_set_sensitive (VikToolbar *vtb, const gchar *name, gboolean sensitive); |
50b4f4de | 55 | |
59bc9e85 RN |
56 | typedef void (ToolCB) (GtkAction *, GtkAction *, gpointer); // gpointer is actually a VikWindow |
57 | typedef void (ReloadCB) (GtkActionGroup *, gpointer); // gpointer is actually a VikWindow | |
50b4f4de | 58 | |
59bc9e85 RN |
59 | void toolbar_init(VikToolbar *vtb, |
60 | GtkWindow *parent, | |
61 | GtkWidget *vbox, | |
62 | GtkWidget *hbox, | |
63 | ToolCB tool_cb, | |
64 | ReloadCB reload_cb, | |
65 | gpointer user_data); | |
50b4f4de | 66 | |
59bc9e85 RN |
67 | void toolbar_apply_settings(VikToolbar *vtb, |
68 | GtkWidget *vbox, | |
69 | GtkWidget *hbox, | |
70 | gboolean reset); | |
50b4f4de | 71 | |
59bc9e85 | 72 | GtkWidget* toolbar_get_widget(VikToolbar *vtb); |
50b4f4de | 73 | |
59bc9e85 | 74 | void a_toolbar_init (void); |
50b4f4de | 75 | |
59bc9e85 | 76 | void a_toolbar_uninit (void); |
50b4f4de RN |
77 | |
78 | G_END_DECLS | |
79 | ||
80 | #endif |