1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Copyright 2000 Syd Logan
24 #ifndef __GTK_TICKER_H__
25 #define __GTK_TICKER_H__
29 #include <gtk/gtkcontainer.h>
30 #include <gtk/gtkmain.h>
35 #endif /* __cplusplus */
37 #define GTK_TYPE_TICKER (gtk_ticker_get_type ())
38 #define GTK_TICKER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TICKER, GtkTicker))
39 #define GTK_TICKER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TICKER, GtkTickerClass))
40 #define GTK_IS_TICKER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TICKER))
41 #define GTK_IS_TICKER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TICKER))
44 typedef struct _GtkTicker GtkTicker
;
45 typedef struct _GtkTickerClass GtkTickerClass
;
46 typedef struct _GtkTickerChild GtkTickerChild
;
48 /* XXX children move from right to left, should be able to go other way */
52 GtkContainer container
;
53 guint interval
; /* how often to scootch */
54 guint spacing
; /* inter-child horizontal spacing */
55 guint scootch
; /* how many pixels to move each scootch */
56 gint timer
; /* timer object */
57 guint total
; /* total width of widgets */
58 guint width
; /* width of containing window */
63 struct _GtkTickerClass
65 GtkContainerClass parent_class
;
68 struct _GtkTickerChild
71 gint x
; /* current position */
72 gint offset
; /* offset in list */
76 GtkType
gtk_ticker_get_type (void);
77 GtkWidget
* gtk_ticker_new (void);
78 void gtk_ticker_add (GtkTicker
*ticker
,
80 void gtk_ticker_remove (GtkTicker
*ticker
,
82 void gtk_ticker_set_interval (GtkTicker
*ticker
,
84 guint
gtk_ticker_get_interval (GtkTicker
*ticker
);
85 void gtk_ticker_set_spacing (GtkTicker
*ticker
,
87 guint
gtk_ticker_get_spacing (GtkTicker
*ticker
);
88 void gtk_ticker_set_scootch (GtkTicker
*ticker
,
90 guint
gtk_ticker_get_scootch (GtkTicker
*ticker
);
91 void gtk_ticker_start_scroll (GtkTicker
*ticker
);
92 void gtk_ticker_stop_scroll (GtkTicker
*ticker
);
96 #endif /* __cplusplus */
99 #endif /* __GTK_TICKER_H__ */