Mercurial > pidgin
annotate src/gtkticker.h @ 2475:ba7ee4c1908c
[gaim-migrate @ 2488]
BMiller's fixes so gg compiles on solaris
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Wed, 10 Oct 2001 20:03:17 +0000 |
| parents | 6190f75950ff |
| children | 04a5f68f640c |
| rev | line source |
|---|---|
| 430 | 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> | |
|
1114
c61f9c384413
[gaim-migrate @ 1124]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
430
diff
changeset
|
30 #include <gtk/gtkmain.h> |
| 430 | 31 |
| 32 | |
| 33 #ifdef __cplusplus | |
| 34 extern "C" { | |
| 35 #endif /* __cplusplus */ | |
| 36 | |
| 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)) | |
| 42 | |
| 43 | |
| 44 typedef struct _GtkTicker GtkTicker; | |
| 45 typedef struct _GtkTickerClass GtkTickerClass; | |
| 46 typedef struct _GtkTickerChild GtkTickerChild; | |
| 47 | |
|
2387
6190f75950ff
[gaim-migrate @ 2400]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1114
diff
changeset
|
48 /* XXX children move from right to left, should be able to go other way */ |
| 430 | 49 |
| 50 struct _GtkTicker | |
| 51 { | |
| 52 GtkContainer container; | |
|
2387
6190f75950ff
[gaim-migrate @ 2400]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1114
diff
changeset
|
53 guint interval; /* how often to scootch */ |
|
6190f75950ff
[gaim-migrate @ 2400]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1114
diff
changeset
|
54 guint spacing; /* inter-child horizontal spacing */ |
|
6190f75950ff
[gaim-migrate @ 2400]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1114
diff
changeset
|
55 guint scootch; /* how many pixels to move each scootch */ |
|
6190f75950ff
[gaim-migrate @ 2400]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1114
diff
changeset
|
56 gint timer; /* timer object */ |
|
6190f75950ff
[gaim-migrate @ 2400]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1114
diff
changeset
|
57 guint total; /* total width of widgets */ |
|
6190f75950ff
[gaim-migrate @ 2400]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1114
diff
changeset
|
58 guint width; /* width of containing window */ |
| 430 | 59 gboolean dirty; |
| 60 GList *children; | |
| 61 }; | |
| 62 | |
| 63 struct _GtkTickerClass | |
| 64 { | |
| 65 GtkContainerClass parent_class; | |
| 66 }; | |
| 67 | |
| 68 struct _GtkTickerChild | |
| 69 { | |
| 70 GtkWidget *widget; | |
| 71 gint x; // current position | |
| 72 gint offset; // offset in list | |
| 73 }; | |
| 74 | |
| 75 | |
| 76 GtkType gtk_ticker_get_type (void); | |
| 77 GtkWidget* gtk_ticker_new (void); | |
| 78 void gtk_ticker_add (GtkTicker *ticker, | |
| 79 GtkWidget *widget); | |
| 80 void gtk_ticker_remove (GtkTicker *ticker, | |
| 81 GtkWidget *widget); | |
| 82 void gtk_ticker_set_interval (GtkTicker *ticker, | |
| 83 gint interval); | |
| 84 guint gtk_ticker_get_interval (GtkTicker *ticker); | |
| 85 void gtk_ticker_set_spacing (GtkTicker *ticker, | |
| 86 gint spacing); | |
| 87 guint gtk_ticker_get_spacing (GtkTicker *ticker); | |
| 88 void gtk_ticker_set_scootch (GtkTicker *ticker, | |
| 89 gint scootch); | |
| 90 guint gtk_ticker_get_scootch (GtkTicker *ticker); | |
| 91 void gtk_ticker_start_scroll (GtkTicker *ticker); | |
| 92 void gtk_ticker_stop_scroll (GtkTicker *ticker); | |
| 93 | |
| 94 #ifdef __cplusplus | |
| 95 } | |
| 96 #endif /* __cplusplus */ | |
| 97 | |
| 98 | |
| 99 #endif /* __GTK_TICKER_H__ */ |
