File: gtk-mng-view.h

package info (click to toggle)
libmng 1.0.9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 4,100 kB
  • ctags: 6,056
  • sloc: ansic: 67,786; pascal: 1,726; sh: 150; makefile: 142
file content (64 lines) | stat: -rw-r--r-- 2,093 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* Toy widget for GTK+ for displaying MNG animations.
 *
 * Copyright (C) 2000 The Free Software Foundation
 *
 * Author(s): Volodymyr Babin <vb :at: dwuj.ichf.edu.pl>
 *
 * This code is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GTK_MNG_VIEW_H__
#define __GTK_MNG_VIEW_H__

#include <libmng.h>
#include <gtk/gtkwidget.h>

#define GTK_MNG_VIEW_TYPE        (gtk_mng_view_get_type ())
#define GTK_MNG_VIEW(o)          (GTK_CHECK_CAST ((o), GTK_MNG_VIEW_TYPE, GtkMngView))
#define GTK_MNG_VIEW_CLASS(k)    (GTK_CHECK_CLASS_CAST ((k), GTK_MNG_VIEW_TYPE, GtkMngViewClass))
#define IS_GTK_MNG_VIEW(o)       (GTK_CHECK_TYPE ((o), GTK_MNG_VIEW_TYPE))
#define IS_GTK_MNG_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GTK_MNG_VIEW_TYPE))

typedef struct _GtkMngView GtkMngView;
typedef struct _GtkMngViewClass GtkMngViewClass;

struct _GtkMngView
{
  GtkWidget widget;
  /* private */
  GTimer * timer;
  guint timeout_ID;
  guint width;
  guint height;
  mng_handle MNG_handle;
  guchar * MNG_drawing_buffer;
  guchar * mng_food;
  guint bytes_to_eat;
  guint bytes_eaten;
};

struct _GtkMngViewClass
{
  GtkWidgetClass klass;
};

GtkType gtk_mng_view_get_type (void);
GtkWidget * gtk_mng_view_new (void);

/* returns !FALSE on success */
gboolean gtk_mng_view_load_mng_from_memory (GtkMngView *, guchar *, guint);

#endif /* __GTK_MNG_VIEW_H__ */