2
* Copyright (C) 2010 Savoir-Faire Linux Inc.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 3 of the License, or
7
* (at your option) any later version.
9
* This program 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
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
* Additional permission under GNU GPL version 3 section 7:
20
* If you modify this program, or any covered work, by linking or
21
* combining it with the OpenSSL project's OpenSSL library (or a
22
* modified version of that library), containing parts covered by the
23
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
24
* grants you additional permission to convey the resulting work.
25
* Corresponding Source for a non-source form of such a combination
26
* shall include the source code for the parts of OpenSSL used as well
27
* as that of the covered work.
31
#ifndef __WEB_WIDGET_H__
32
#define __WEB_WIDGET_H__
35
#include <webkit/webkit.h>
39
#define WEB_WIDGET_TYPE (im_widget_get_type())
40
#define WEB_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEB_WIDGET_TYPE, WebWidget))
41
#define IM_WIDGET_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), IM_WIDGET_TYPE, WebWidgetClass))
42
#define IS_IM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), IM_WIDGET_TYPE))
43
#define IS_IM_WIDGET_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), IM_WIDGET_TYPE))
44
#define IM_WIDGET_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS((inst), IM_WIDGET_TYPE, WebWidgetClass))
46
typedef struct _WebWidget WebWidget;
47
typedef struct _WebWidgetClass WebWidgetClass;
50
WebKitWebView parent_instance;
53
WebKitWebFrame *web_frame; // Our web frame
54
JSGlobalContextRef js_context; // The frame's global JS context
55
JSObjectRef js_global; // The frame's global context JS object
58
struct _WebWidgetClass {
59
WebKitWebViewClass parent_class;
63
GType im_widget_get_type (void) G_GNUC_CONST;
64
GtkWidget *im_widget_new (void);
68
#endif /* __IM_WIDGET_H__ */