comparison src/gtkticker.h @ 430:0cd2ba801eb4

[gaim-migrate @ 440] First pass at a buddy ticker. committer: Tailor Script <tailor@pidgin.im>
author Syd Logan <slogan>
date Sat, 24 Jun 2000 23:15:48 +0000
parents
children c61f9c384413
comparison
equal deleted inserted replaced
429:ccf7fc40263f 430:0cd2ba801eb4
1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
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.
8 *
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.
13 *
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.
18 */
19
20 /*
21 * Copyright 2000 Syd Logan
22 */
23
24 #ifndef __GTK_TICKER_H__
25 #define __GTK_TICKER_H__
26
27
28 #include <gdk/gdk.h>
29 #include <gtk/gtkcontainer.h>
30
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35
36 #define GTK_TYPE_TICKER (gtk_ticker_get_type ())
37 #define GTK_TICKER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TICKER, GtkTicker))
38 #define GTK_TICKER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TICKER, GtkTickerClass))
39 #define GTK_IS_TICKER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TICKER))
40 #define GTK_IS_TICKER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TICKER))
41
42
43 typedef struct _GtkTicker GtkTicker;
44 typedef struct _GtkTickerClass GtkTickerClass;
45 typedef struct _GtkTickerChild GtkTickerChild;
46
47 // XXX children move from right to left, should be able to go other way
48
49 struct _GtkTicker
50 {
51 GtkContainer container;
52 guint interval; // how often to scootch
53 guint spacing; // inter-child horizontal spacing
54 guint scootch; // how many pixels to move each scootch
55 gint timer; // timer object
56 guint total; // total width of widgets
57 guint width; // width of containing window
58 gboolean dirty;
59 GList *children;
60 };
61
62 struct _GtkTickerClass
63 {
64 GtkContainerClass parent_class;
65 };
66
67 struct _GtkTickerChild
68 {
69 GtkWidget *widget;
70 gint x; // current position
71 gint offset; // offset in list
72 };
73
74
75 GtkType gtk_ticker_get_type (void);
76 GtkWidget* gtk_ticker_new (void);
77 void gtk_ticker_add (GtkTicker *ticker,
78 GtkWidget *widget);
79 void gtk_ticker_remove (GtkTicker *ticker,
80 GtkWidget *widget);
81 void gtk_ticker_set_interval (GtkTicker *ticker,
82 gint interval);
83 guint gtk_ticker_get_interval (GtkTicker *ticker);
84 void gtk_ticker_set_spacing (GtkTicker *ticker,
85 gint spacing);
86 guint gtk_ticker_get_spacing (GtkTicker *ticker);
87 void gtk_ticker_set_scootch (GtkTicker *ticker,
88 gint scootch);
89 guint gtk_ticker_get_scootch (GtkTicker *ticker);
90 void gtk_ticker_start_scroll (GtkTicker *ticker);
91 void gtk_ticker_stop_scroll (GtkTicker *ticker);
92
93 #ifdef __cplusplus
94 }
95 #endif /* __cplusplus */
96
97
98 #endif /* __GTK_TICKER_H__ */