X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkrange.h;h=8495cdb78fa64c8da73cf4aade61c2897eec1ba4;hb=0cc688aa92b8fe5452b63fb49c51204498a2988b;hp=d4ed7ef2fbf3e6c31c602c4ff91b0277b0436811;hpb=1814ea6abd361bccf55004309b81860cc39152fb;p=~andy%2Fgtk diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h index d4ed7ef2f..8495cdb78 100644 --- a/gtk/gtkrange.h +++ b/gtk/gtkrange.h @@ -12,9 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ /* @@ -24,15 +22,14 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ -#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) -#error "Only can be included directly." -#endif - #ifndef __GTK_RANGE_H__ #define __GTK_RANGE_H__ -#include +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only can be included directly." +#endif + #include @@ -46,60 +43,15 @@ G_BEGIN_DECLS #define GTK_IS_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RANGE)) #define GTK_RANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_RANGE, GtkRangeClass)) -/* These two are private/opaque types, ignore */ -typedef struct _GtkRangeLayout GtkRangeLayout; -typedef struct _GtkRangeStepTimer GtkRangeStepTimer; - -typedef struct _GtkRange GtkRange; -typedef struct _GtkRangeClass GtkRangeClass; +typedef struct _GtkRange GtkRange; +typedef struct _GtkRangePrivate GtkRangePrivate; +typedef struct _GtkRangeClass GtkRangeClass; struct _GtkRange { GtkWidget widget; - GtkAdjustment *GSEAL (adjustment); - GtkUpdateType GSEAL (update_policy); - guint GSEAL (inverted) : 1; - - /*< protected >*/ - - guint GSEAL (flippable) : 1; - - /* Steppers are: < > ---- < > - * a b c d - */ - - guint GSEAL (has_stepper_a) : 1; - guint GSEAL (has_stepper_b) : 1; - guint GSEAL (has_stepper_c) : 1; - guint GSEAL (has_stepper_d) : 1; - - guint GSEAL (need_recalc) : 1; - - guint GSEAL (slider_size_fixed) : 1; - - gint GSEAL (min_slider_size); - - GtkOrientation GSEAL (orientation); - - /* Area of entire stepper + trough assembly in widget->window coords */ - GdkRectangle GSEAL (range_rect); - /* Slider range along the long dimension, in widget->window coords */ - gint GSEAL (slider_start); - gint GSEAL (slider_end); - - /* Round off value to this many digits, -1 for no rounding */ - gint GSEAL (round_digits); - - /*< private >*/ - guint GSEAL (trough_click_forward) : 1; /* trough click was on the forward side of slider */ - guint GSEAL (update_pending) : 1; /* need to emit value_changed */ - GtkRangeLayout *GSEAL (layout); - GtkRangeStepTimer *GSEAL (timer); - gint GSEAL (slide_initial_slider_position); - gint GSEAL (slide_initial_coordinate); - guint GSEAL (update_timeout_id); - GdkWindow *GSEAL (event_window); + GtkRangePrivate *priv; }; struct _GtkRangeClass @@ -130,15 +82,12 @@ struct _GtkRangeClass void (*_gtk_reserved1) (void); void (*_gtk_reserved2) (void); void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); }; GType gtk_range_get_type (void) G_GNUC_CONST; -void gtk_range_set_update_policy (GtkRange *range, - GtkUpdateType policy); -GtkUpdateType gtk_range_get_update_policy (GtkRange *range); - void gtk_range_set_adjustment (GtkRange *range, GtkAdjustment *adjustment); GtkAdjustment* gtk_range_get_adjustment (GtkRange *range); @@ -191,19 +140,26 @@ gboolean gtk_range_get_restrict_to_fill_level (GtkRange *range void gtk_range_set_fill_level (GtkRange *range, gdouble fill_level); gdouble gtk_range_get_fill_level (GtkRange *range); +void gtk_range_set_round_digits (GtkRange *range, + gint round_digits); +gint gtk_range_get_round_digits (GtkRange *range); /* internal API */ -gdouble _gtk_range_get_wheel_delta (GtkRange *range, - GdkScrollDirection direction); - +gdouble _gtk_range_get_wheel_delta (GtkRange *range, + GdkEventScroll *event); +void _gtk_range_set_has_origin (GtkRange *range, + gboolean has_origin); +gboolean _gtk_range_get_has_origin (GtkRange *range); void _gtk_range_set_stop_values (GtkRange *range, gdouble *values, gint n_values); gint _gtk_range_get_stop_positions (GtkRange *range, - gint **values); -void _gtk_range_set_round_digits (GtkRange *range, - gint round_digits); - + gint **values); +void _gtk_range_set_steppers (GtkRange *range, + gboolean has_a, + gboolean has_b, + gboolean has_c, + gboolean has_d); G_END_DECLS