Debian Codegraph @

demos/gtk-demo/gtkfishbowl.h

raw
1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2017 Benjamin Otte <[email protected]>
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
23 G_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
32 typedef struct _GtkFishbowl GtkFishbowl;
33 typedef struct _GtkFishbowlClass GtkFishbowlClass;
34
35 typedef GtkWidget * (* GtkFishCreationFunc) (void);
36
37 struct _GtkFishbowl
38 {
39 GtkContainer parent;
40 };
41
42 struct _GtkFishbowlClass
43 {
44 GtkContainerClass parent_class;
45 };
46
47 GType gtk_fishbowl_get_type (void) G_GNUC_CONST;
48
49 GtkWidget* gtk_fishbowl_new (void);
50
51 guint gtk_fishbowl_get_count (GtkFishbowl *fishbowl);
52 void gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
53 guint count);
54 gboolean gtk_fishbowl_get_animating (GtkFishbowl *fishbowl);
55 void gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
56 gboolean animating);
57 gboolean gtk_fishbowl_get_benchmark (GtkFishbowl *fishbowl);
58 void gtk_fishbowl_set_benchmark (GtkFishbowl *fishbowl,
59 gboolean animating);
60 double gtk_fishbowl_get_framerate (GtkFishbowl *fishbowl);
61 gint64 gtk_fishbowl_get_update_delay (GtkFishbowl *fishbowl);
62 void gtk_fishbowl_set_update_delay (GtkFishbowl *fishbowl,
63 gint64 update_delay);
64 void gtk_fishbowl_set_creation_func (GtkFishbowl *fishbowl,
65 GtkFishCreationFunc creation_func);
66
67 G_END_DECLS
68
69 #endif /* __GTK_FISHBOWL_H__ */