destroy the window when exiting
[swfdec.git] / vivified / ui / vivi_widget.h
blobb861ed1139e48f2fe04041162104d86d6d9cbacb
1 /* Vivi
2 * Copyright (C) 2006-2007 Benjamin Otte <otte@gnome.org>
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.1 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.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef _VIVI_WIDGET_H_
21 #define _VIVI_WIDGET_H_
23 #include <libswfdec-gtk/swfdec-gtk.h>
24 #include <vivified/core/vivified-core.h>
26 G_BEGIN_DECLS
28 typedef struct _ViviWidget ViviWidget;
29 typedef struct _ViviWidgetClass ViviWidgetClass;
31 #define VIVI_TYPE_WIDGET (vivi_widget_get_type())
32 #define VIVI_IS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_WIDGET))
33 #define VIVI_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_WIDGET))
34 #define VIVI_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_WIDGET, ViviWidget))
35 #define VIVI_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_WIDGET, ViviWidgetClass))
37 struct _ViviWidget
39 SwfdecGtkWidget widget;
41 ViviApplication * app;
43 int x;
44 int y;
45 int button;
48 struct _ViviWidgetClass
50 SwfdecGtkWidgetClass widget_class;
53 GType vivi_widget_get_type (void);
55 GtkWidget * vivi_widget_new (ViviApplication * app);
57 void vivi_widget_set_application (ViviWidget * widget,
58 ViviApplication * app);
61 G_END_DECLS
62 #endif