1/* GTK - The GIMP Toolkit
2 * Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __GTK_FISHBOWL_H__
19#define __GTK_FISHBOWL_H__
20
21#include <gtk/gtk.h>
22
23G_BEGIN_DECLS
24
25#define GTK_TYPE_FISHBOWL (gtk_fishbowl_get_type ())
26#define GTK_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FISHBOWL, GtkFishbowl))
27#define GTK_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
28#define GTK_IS_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FISHBOWL))
29#define GTK_IS_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FISHBOWL))
30#define GTK_FISHBOWL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
31
32typedef struct _GtkFishbowl GtkFishbowl;
33typedef struct _GtkFishbowlClass GtkFishbowlClass;
34
35typedef GtkWidget * (* GtkFishCreationFunc) (void);
36
37struct _GtkFishbowl
38{
39 GtkWidget parent;
40};
41
42struct _GtkFishbowlClass
43{
44 GtkWidgetClass parent_class;
45};
46
47GType gtk_fishbowl_get_type (void) G_GNUC_CONST;
48
49GtkWidget* gtk_fishbowl_new (void);
50
51guint gtk_fishbowl_get_count (GtkFishbowl *fishbowl);
52void gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
53 guint count);
54gboolean gtk_fishbowl_get_animating (GtkFishbowl *fishbowl);
55void gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
56 gboolean animating);
57gboolean gtk_fishbowl_get_benchmark (GtkFishbowl *fishbowl);
58void gtk_fishbowl_set_benchmark (GtkFishbowl *fishbowl,
59 gboolean animating);
60double gtk_fishbowl_get_framerate (GtkFishbowl *fishbowl);
61gint64 gtk_fishbowl_get_update_delay (GtkFishbowl *fishbowl);
62void gtk_fishbowl_set_update_delay (GtkFishbowl *fishbowl,
63 gint64 update_delay);
64void gtk_fishbowl_set_creation_func (GtkFishbowl *fishbowl,
65 GtkFishCreationFunc creation_func);
66
67G_END_DECLS
68
69#endif /* __GTK_FISHBOWL_H__ */
70

source code of gtk/demos/gtk-demo/gtkfishbowl.h