1507
|
1 /* Paranormal - A highly customizable audio visualization library
|
|
2 * Copyright (C) 2001 Jamie Gennis <jgennis@mindspring.com>
|
|
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 Free
|
|
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
17 */
|
|
18
|
|
19 #ifndef __PN_VIS_H__
|
|
20 #define __PN_VIS_H__
|
|
21
|
|
22 #include <glib.h>
|
|
23 #include "pnuserobject.h"
|
|
24 #include "pnactuator.h"
|
|
25 #include "pnimage.h"
|
|
26 #include "pnaudiodata.h"
|
|
27
|
|
28
|
|
29 G_BEGIN_DECLS
|
|
30
|
|
31
|
|
32 #define PN_TYPE_VIS (pn_vis_get_type ())
|
|
33 #define PN_VIS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PN_TYPE_VIS, PnVis))
|
|
34 #define PN_VIS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), PN_TYPE_VIS, PnVisClass))
|
|
35 #define PN_IS_VIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PN_TYPE_VIS))
|
|
36 #define PN_IS_VIS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), PN_TYPE_VIS))
|
|
37 #define PN_VIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PN_TYPE_VIS, PnVisClass))
|
|
38
|
|
39 typedef struct _PnVis PnVis;
|
|
40 typedef struct _PnVisClass PnVisClass;
|
|
41
|
|
42 struct _PnVis
|
|
43 {
|
|
44 PnUserObject parent;
|
|
45
|
|
46 PnActuator *root_actuator;
|
|
47 PnImage *root_image;
|
|
48 };
|
|
49
|
|
50 struct _PnVisClass
|
|
51 {
|
|
52 PnUserObjectClass parent_class;
|
|
53 };
|
|
54
|
|
55 /* Creators */
|
|
56 GType pn_vis_get_type (void);
|
|
57 PnVis *pn_vis_new (guint image_width,
|
|
58 guint image_height);
|
|
59
|
|
60 /* Accessors */
|
|
61 void pn_vis_set_root_actuator (PnVis *vis,
|
|
62 PnActuator *actuator);
|
|
63 PnActuator *pn_vis_get_root_actuator (PnVis *vis);
|
|
64 void pn_vis_set_image_size (PnVis *vis,
|
|
65 guint width,
|
|
66 guint height);
|
|
67
|
|
68 /* Actions */
|
|
69 gboolean pn_vis_save_to_file (PnVis *vis,
|
|
70 const gchar *fname);
|
|
71 gboolean pn_vis_load_from_file (PnVis *vis,
|
|
72 const gchar *fname);
|
|
73 PnImage *pn_vis_render (PnVis *vis,
|
|
74 PnAudioData *audio_data);
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80 #endif /* __PN_VIS_H__ */
|