~ubuntu-branches/debian/stretch/gnome-builder/stretch

« back to all changes in this revision

Viewing changes to src/util/gb-widget.h

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2015-10-11 12:38:45 UTC
  • Revision ID: package-import@ubuntu.com-20151011123845-a0hvkz01se0p1p5a
Tags: upstream-3.16.3
ImportĀ upstreamĀ versionĀ 3.16.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* gb-widget.h
 
2
 *
 
3
 * Copyright (C) 2014 Christian Hergert <christian.hergert@mongodb.com>
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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/>.
 
17
 */
 
18
 
 
19
#ifndef GB_WIDGET_H
 
20
#define GB_WIDGET_H
 
21
 
 
22
#include <gtk/gtk.h>
 
23
#include <ide.h>
 
24
 
 
25
#include "gb-workbench-types.h"
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
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)
 
36
 
 
37
typedef void (*GbWidgetContextHandler) (GtkWidget  *widget,
 
38
                                        IdeContext *context);
 
39
 
 
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,
 
44
                                                gint          width,
 
45
                                                gint          height,
 
46
                                                gdouble       alpha,
 
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,
 
52
                                                const gchar  *prefix,
 
53
                                                const gchar  *action_name,
 
54
                                                GVariant     *parameter);
 
55
void             gb_widget_set_context_handler (gpointer      widget,
 
56
                                                GbWidgetContextHandler handler);
 
57
 
 
58
G_END_DECLS
 
59
 
 
60
#endif /* GB_WIDGET_H */