annotate src/gtkticker.h @ 807:632d781c29da

[gaim-migrate @ 817] ha! actually, this shouldn't do anything. i just think it's fun to print the same message over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 31 Aug 2000 02:12:58 +0000
parents 0cd2ba801eb4
children c61f9c384413
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
430
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
1 /* GTK - The GIMP Toolkit
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
3 *
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
4 * This library is free software; you can redistribute it and/or
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
5 * modify it under the terms of the GNU Library General Public
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
6 * License as published by the Free Software Foundation; either
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
7 * version 2 of the License, or (at your option) any later version.
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
8 *
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
9 * This library is distributed in the hope that it will be useful,
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
12 * Library General Public License for more details.
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
13 *
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
14 * You should have received a copy of the GNU Library General Public
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
15 * License along with this library; if not, write to the
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
17 * Boston, MA 02111-1307, USA.
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
18 */
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
19
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
20 /*
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
21 * Copyright 2000 Syd Logan
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
22 */
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
23
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
24 #ifndef __GTK_TICKER_H__
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
25 #define __GTK_TICKER_H__
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
26
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
27
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
28 #include <gdk/gdk.h>
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
29 #include <gtk/gtkcontainer.h>
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
30
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
31
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
32 #ifdef __cplusplus
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
33 extern "C" {
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
34 #endif /* __cplusplus */
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
35
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
36 #define GTK_TYPE_TICKER (gtk_ticker_get_type ())
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
37 #define GTK_TICKER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TICKER, GtkTicker))
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
38 #define GTK_TICKER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TICKER, GtkTickerClass))
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
39 #define GTK_IS_TICKER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TICKER))
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
40 #define GTK_IS_TICKER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TICKER))
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
41
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
42
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
43 typedef struct _GtkTicker GtkTicker;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
44 typedef struct _GtkTickerClass GtkTickerClass;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
45 typedef struct _GtkTickerChild GtkTickerChild;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
46
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
47 // XXX children move from right to left, should be able to go other way
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
48
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
49 struct _GtkTicker
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
50 {
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
51 GtkContainer container;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
52 guint interval; // how often to scootch
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
53 guint spacing; // inter-child horizontal spacing
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
54 guint scootch; // how many pixels to move each scootch
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
55 gint timer; // timer object
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
56 guint total; // total width of widgets
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
57 guint width; // width of containing window
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
58 gboolean dirty;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
59 GList *children;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
60 };
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
61
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
62 struct _GtkTickerClass
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
63 {
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
64 GtkContainerClass parent_class;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
65 };
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
66
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
67 struct _GtkTickerChild
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
68 {
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
69 GtkWidget *widget;
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
70 gint x; // current position
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
71 gint offset; // offset in list
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
72 };
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
73
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
74
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
75 GtkType gtk_ticker_get_type (void);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
76 GtkWidget* gtk_ticker_new (void);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
77 void gtk_ticker_add (GtkTicker *ticker,
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
78 GtkWidget *widget);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
79 void gtk_ticker_remove (GtkTicker *ticker,
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
80 GtkWidget *widget);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
81 void gtk_ticker_set_interval (GtkTicker *ticker,
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
82 gint interval);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
83 guint gtk_ticker_get_interval (GtkTicker *ticker);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
84 void gtk_ticker_set_spacing (GtkTicker *ticker,
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
85 gint spacing);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
86 guint gtk_ticker_get_spacing (GtkTicker *ticker);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
87 void gtk_ticker_set_scootch (GtkTicker *ticker,
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
88 gint scootch);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
89 guint gtk_ticker_get_scootch (GtkTicker *ticker);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
90 void gtk_ticker_start_scroll (GtkTicker *ticker);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
91 void gtk_ticker_stop_scroll (GtkTicker *ticker);
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
92
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
93 #ifdef __cplusplus
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
94 }
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
95 #endif /* __cplusplus */
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
96
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
97
0cd2ba801eb4 [gaim-migrate @ 440]
Syd Logan <slogan>
parents:
diff changeset
98 #endif /* __GTK_TICKER_H__ */