gimpspinscale.h revision 20e25114cc4b04c88faf68f0f3e19dc13833474a
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith/* GIMP - The GNU Image Manipulation Program
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * Copyright (C) 1995 Spencer Kimball and Peter Mattis
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith *
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * gimpspinscale.h
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * Copyright (C) 2010 Michael Natterer <mitch@gimp.org>
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith *
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * This program is free software: you can redistribute it and/or modify
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * it under the terms of the GNU General Public License as published by
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * the Free Software Foundation; either version 3 of the License, or
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * (at your option) any later version.
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith *
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * This program is distributed in the hope that it will be useful,
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * but WITHOUT ANY WARRANTY; without even the implied warranty of
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * GNU General Public License for more details.
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith *
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * You should have received a copy of the GNU General Public License
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith * along with this program. If not, see <http://www.gnu.org/licenses/>.
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith */
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#ifndef __GIMP_SPIN_SCALE_H__
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#define __GIMP_SPIN_SCALE_H__
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#ifndef WITH_GIMP
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#include <gtk/gtk.h>
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#endif
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John SmithG_BEGIN_DECLS
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#define GIMP_TYPE_SPIN_SCALE (gimp_spin_scale_get_type ())
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#define GIMP_SPIN_SCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_SPIN_SCALE, GimpSpinScale))
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#define GIMP_SPIN_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SPIN_SCALE, GimpSpinScaleClass))
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#define GIMP_IS_SPIN_SCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_SPIN_SCALE))
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#define GIMP_IS_SPIN_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SPIN_SCALE))
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#define GIMP_SPIN_SCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SPIN_SCALE, GimpSpinScaleClass))
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smithtypedef struct _GimpSpinScale GimpSpinScale;
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smithtypedef struct _GimpSpinScaleClass GimpSpinScaleClass;
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smithstruct _GimpSpinScale
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith{
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith GtkSpinButton parent_instance;
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith};
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smithstruct _GimpSpinScaleClass
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith{
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith GtkSpinButtonClass parent_class;
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith};
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex ValavanisGType gimp_spin_scale_get_type (void) G_GNUC_CONST;
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex ValavanisGtkWidget * gimp_spin_scale_new (GtkAdjustment *adjustment,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis const gchar *label,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis gint digits);
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisvoid gimp_spin_scale_set_label (GimpSpinScale *scale,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis const gchar *label);
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisconst gchar * gimp_spin_scale_get_label (GimpSpinScale *scale);
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisvoid gimp_spin_scale_set_scale_limits (GimpSpinScale *scale,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis gdouble lower,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis gdouble upper);
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisvoid gimp_spin_scale_unset_scale_limits (GimpSpinScale *scale);
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisgboolean gimp_spin_scale_get_scale_limits (GimpSpinScale *scale,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis gdouble *lower,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis gdouble *upper);
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisvoid gimp_spin_scale_set_gamma (GimpSpinScale *scale,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis gdouble gamma);
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisgdouble gimp_spin_scale_get_gamma (GimpSpinScale *scale);
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisvoid gimp_spin_scale_set_focuswidget (GtkWidget *scale,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis GtkWidget *widget);
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanisvoid gimp_spin_scale_set_appearance (GtkWidget *scale,
20e25114cc4b04c88faf68f0f3e19dc13833474aAlex Valavanis const gchar *appearance);
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John SmithG_END_DECLS
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith
6bd7ac3b4704cf1cba90dd21a73bfedd6d640a16John Smith#endif /* __GIMP_SPIN_SCALE_H__ */