Blame examples/gtkdial/gtkdial.h

Packit 98cdb6
/* GTK - The GIMP Toolkit
Packit 98cdb6
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
Packit 98cdb6
 *
Packit 98cdb6
 * This library is free software; you can redistribute it and/or
Packit 98cdb6
 * modify it under the terms of the GNU Library General Public
Packit 98cdb6
 * License as published by the Free Software Foundation; either
Packit 98cdb6
 * version 2 of the License, or (at your option) any later version.
Packit 98cdb6
 *
Packit 98cdb6
 * This library is distributed in the hope that it will be useful,
Packit 98cdb6
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 98cdb6
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 98cdb6
 * Library General Public License for more details.
Packit 98cdb6
 *
Packit 98cdb6
 * You should have received a copy of the GNU Library General Public
Packit 98cdb6
 * License along with this library; if not, write to the
Packit 98cdb6
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 98cdb6
 * Boston, MA 02111-1307, USA.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#ifndef __GTK_DIAL_H__
Packit 98cdb6
#define __GTK_DIAL_H__
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
#include <gdk/gdk.h>
Packit 98cdb6
#include <gtk/gtkadjustment.h>
Packit 98cdb6
#include <gtk/gtkwidget.h>
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
G_BEGIN_DECLS
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
#define GTK_DIAL(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_dial_get_type (), GtkDial)
Packit 98cdb6
#define GTK_DIAL_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, gtk_dial_get_type (), GtkDialClass)
Packit 98cdb6
#define GTK_IS_DIAL(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_dial_get_type ())
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
typedef struct _GtkDial        GtkDial;
Packit 98cdb6
typedef struct _GtkDialClass   GtkDialClass;
Packit 98cdb6
Packit 98cdb6
struct _GtkDial
Packit 98cdb6
{
Packit 98cdb6
  GtkWidget widget;
Packit 98cdb6
Packit 98cdb6
  /* update policy (GTK_UPDATE_[CONTINUOUS/DELAYED/DISCONTINUOUS]) */
Packit 98cdb6
  guint policy : 2;
Packit 98cdb6
Packit 98cdb6
  /* Button currently pressed or 0 if none */
Packit 98cdb6
  guint8 button;
Packit 98cdb6
Packit 98cdb6
  /* Dimensions of dial components */
Packit 98cdb6
  gint radius;
Packit 98cdb6
  gint pointer_width;
Packit 98cdb6
Packit 98cdb6
  /* ID of update timer, or 0 if none */
Packit 98cdb6
  guint32 timer;
Packit 98cdb6
Packit 98cdb6
  /* Current angle */
Packit 98cdb6
  gfloat angle;
Packit 98cdb6
  gfloat last_angle;
Packit 98cdb6
Packit 98cdb6
  /* Old values from adjustment stored so we know when something changes */
Packit 98cdb6
  gfloat old_value;
Packit 98cdb6
  gfloat old_lower;
Packit 98cdb6
  gfloat old_upper;
Packit 98cdb6
Packit 98cdb6
  /* The adjustment object that stores the data for this dial */
Packit 98cdb6
  GtkAdjustment *adjustment;
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
struct _GtkDialClass
Packit 98cdb6
{
Packit 98cdb6
  GtkWidgetClass parent_class;
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
GtkWidget*     gtk_dial_new                    (GtkAdjustment *adjustment);
Packit 98cdb6
GType          gtk_dial_get_type               (void);
Packit 98cdb6
GtkAdjustment* gtk_dial_get_adjustment         (GtkDial      *dial);
Packit 98cdb6
void           gtk_dial_set_update_policy      (GtkDial      *dial,
Packit 98cdb6
						GtkUpdateType  policy);
Packit 98cdb6
Packit 98cdb6
void           gtk_dial_set_adjustment         (GtkDial      *dial,
Packit 98cdb6
						GtkAdjustment *adjustment);
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
G_END_DECLS
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
#endif /* __GTK_DIAL_H__ */