annotate plugins/ticker/gtkticker.h @ 11274:67a929d50cfe

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