3
* Copyright (C) 2014 Christian Hergert <christian.hergert@mongodb.com>
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
10
* This program 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
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
#include "gb-workbench-types.h"
29
#define GB_WIDGET_CLASS_TEMPLATE(klass, name) \
30
gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS (klass), \
31
"/org/gnome/builder/ui/"name)
32
#define GB_WIDGET_CLASS_BIND(klass, TN, field) \
33
gtk_widget_class_bind_template_child(GTK_WIDGET_CLASS (klass), TN, field)
34
#define GB_WIDGET_CLASS_BIND_PRIVATE(klass, TN, field) \
35
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), TN, field)
37
typedef void (*GbWidgetContextHandler) (GtkWidget *widget,
40
IdeContext *gb_widget_get_context (GtkWidget *widget);
41
void gb_widget_add_style_class (gpointer widget,
42
const gchar *class_name);
43
cairo_surface_t *gb_widget_snapshot (GtkWidget *widget,
47
gboolean draw_border);
48
GbWorkbench *gb_widget_get_workbench (GtkWidget *widget);
49
void gb_widget_fade_hide (GtkWidget *widget);
50
void gb_widget_fade_show (GtkWidget *widget);
51
void gb_widget_activate_action (GtkWidget *widget,
53
const gchar *action_name,
55
void gb_widget_set_context_handler (gpointer widget,
56
GbWidgetContextHandler handler);
60
#endif /* GB_WIDGET_H */