~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to src/dtgtk/button.h

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-04-14 23:42:12 UTC
  • Revision ID: james.westby@ubuntu.com-20110414234212-kuffcz5wiu18v6ra
Tags: upstream-0.8
ImportĀ upstreamĀ versionĀ 0.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    This file is part of darktable,
 
3
    copyright (c) 2010 Henrik Andersson.
 
4
 
 
5
    darktable 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
    darktable 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 darktable.  If not, see <http://www.gnu.org/licenses/>.
 
17
*/
 
18
#ifndef DTGTK_BUTTON_H
 
19
#define DTGTK_BUTTON_H
 
20
 
 
21
#include <gtk/gtk.h>
 
22
#include "paint.h"
 
23
G_BEGIN_DECLS
 
24
#define DTGTK_BUTTON(obj) GTK_CHECK_CAST(obj, dtgtk_button_get_type (), GtkDarktableButton)
 
25
#define DTGTK_BUTTON_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, dtgtk_button_get_type(), GtkDarktableButtonClass)
 
26
#define DTGTK_IS_BUTTON(obj) GTK_CHECK_TYPE(obj, dtgtk_button_get_type())
 
27
#define DTGTK_IS_BUTTON_CLASS(klass) GTK_CHECK_CLASS_TYPE(obj, dtgtk_button_get_type())
 
28
 
 
29
typedef enum _darktable_button_flags
 
30
{
 
31
  DARKTABLE_BUTTON_SHOW_LABEL                           = 1
 
32
}
 
33
_darktable_button_flags_t;
 
34
 
 
35
typedef struct _GtkDarktableButton
 
36
{
 
37
  GtkButton widget;
 
38
  DTGTKCairoPaintIconFunc icon;
 
39
  gint icon_flags;
 
40
} GtkDarktableButton;
 
41
 
 
42
typedef struct _GtkDarktableButtonClass
 
43
{
 
44
  GtkButtonClass parent_class;
 
45
} GtkDarktableButtonClass;
 
46
 
 
47
GType dtgtk_button_get_type (void);
 
48
 
 
49
/** Instansiate a new darktable button control passing paint function as content */
 
50
GtkWidget* dtgtk_button_new(DTGTKCairoPaintIconFunc paint, gint paintflags);
 
51
GtkWidget* dtgtk_button_new_with_label(const gchar *label, DTGTKCairoPaintIconFunc paint, gint paintflags);
 
52
G_END_DECLS
 
53
#endif