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

« back to all changes in this revision

Viewing changes to src/dtgtk/tristatebutton.h

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-07-12 09:36:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110712093646-yp9dbxan44dmw15h
Tags: 0.9-1
* New upstream release.
* Remove all patches now upstream; only patch for
  -Wno-error=unused-but-set-variable remains.
* Bump Standards-Version to 3.9.2 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    This file is part of darktable,
 
3
    copyright (c) 2011 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_TRISTATEBUTTON_H
 
19
#define DTGTK_TRISTATEBUTTON_H
 
20
 
 
21
#include <gtk/gtk.h>
 
22
#include "paint.h"
 
23
G_BEGIN_DECLS
 
24
#define DTGTK_TRISTATEBUTTON(obj) GTK_CHECK_CAST(obj, dtgtk_tristatebutton_get_type (), GtkDarktableTriStateButton)
 
25
#define DTGTK_TRISTATEBUTTON_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, dtgtk_tristatebutton_get_type(), GtkDarktableTriStateButtonClass)
 
26
#define DTGTK_IS_TRISTATEBUTTON(obj) GTK_CHECK_TYPE(obj, dtgtk_tristatebutton_get_type())
 
27
#define DTGTK_IS_TRISTATEBUTTON_CLASS(klass) GTK_CHECK_CLASS_TYPE(obj, dtgtk_tristatebutton_get_type())
 
28
 
 
29
enum
 
30
{
 
31
  STATE_CHANGED,
 
32
  LAST_SIGNAL
 
33
};
 
34
 
 
35
 
 
36
typedef struct _GtkDarktableTriStateButton
 
37
{
 
38
  GtkButton widget;
 
39
  DTGTKCairoPaintIconFunc icon;
 
40
  gint icon_flags;
 
41
  gint state;
 
42
} GtkDarktableTriStateButton;
 
43
 
 
44
typedef struct _GtkDarktableTriStateButtonClass
 
45
{
 
46
  GtkButtonClass parent_class;
 
47
  void  (* state_changed)  (GtkDarktableTriStateButton *ts,int state);
 
48
} GtkDarktableTriStateButtonClass;
 
49
 
 
50
GType dtgtk_tristatebutton_get_type (void);
 
51
 
 
52
/** Instansiate a new darktable slider control passing adjustment as range */
 
53
GtkWidget* dtgtk_tristatebutton_new (DTGTKCairoPaintIconFunc paint, gint paintflag);
 
54
GtkWidget* dtgtk_tristatebutton_new_with_label (const gchar *label,DTGTKCairoPaintIconFunc paint, gint paintflag);
 
55
/** get the current state of the tristate button */
 
56
gint dtgtk_tristatebutton_get_state(const GtkDarktableTriStateButton * );
 
57
/** set the current state of the tristate button */
 
58
void dtgtk_tristatebutton_set_state(GtkDarktableTriStateButton *,gint state);
 
59
 
 
60
G_END_DECLS
 
61
#endif