Debian Codegraph @

contrib/gcc/gtk-mng-view/gtk-mng-view.h

raw symbols SCIP
1 /* Toy widget for GTK+ for displaying MNG animations.
2 *
3 * Copyright (C) 2000 The Free Software Foundation
4 *
5 * Author(s): Volodymyr Babin <vb :at: dwuj.ichf.edu.pl>
6 *
7 * This code is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23 #ifndef __GTK_MNG_VIEW_H__
24 #define __GTK_MNG_VIEW_H__
25
26 #include <libmng.h>
27 #include <gtk/gtkwidget.h>
28
29 #define GTK_MNG_VIEW_TYPE (gtk_mng_view_get_type ())
30 #define GTK_MNG_VIEW(o) (GTK_CHECK_CAST ((o), GTK_MNG_VIEW_TYPE, GtkMngView))
31 #define GTK_MNG_VIEW_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GTK_MNG_VIEW_TYPE, GtkMngViewClass))
32 #define IS_GTK_MNG_VIEW(o) (GTK_CHECK_TYPE ((o), GTK_MNG_VIEW_TYPE))
33 #define IS_GTK_MNG_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GTK_MNG_VIEW_TYPE))
34
35 typedef struct _GtkMngView GtkMngView;
36 typedef struct _GtkMngViewClass GtkMngViewClass;
37
38 struct _GtkMngView
39 {
40 GtkWidget widget;
41 /* private */
42 GTimer * timer;
43 guint timeout_ID;
44 guint width;
45 guint height;
46 mng_handle MNG_handle;
47 guchar * MNG_drawing_buffer;
48 guchar * mng_food;
49 guint bytes_to_eat;
50 guint bytes_eaten;
51 };
52
53 struct _GtkMngViewClass
54 {
55 GtkWidgetClass klass;
56 };
57
58 GtkType gtk_mng_view_get_type (void);
59 GtkWidget * gtk_mng_view_new (void);
60
61 /* returns !FALSE on success */
62 gboolean gtk_mng_view_load_mng_from_memory (GtkMngView *, guchar *, guint);
63
64 #endif /* __GTK_MNG_VIEW_H__ */