|
1 /* |
|
2 * Copyright (C) 2007 Holger Hans Peter Freyther |
|
3 * |
|
4 * Redistribution and use in source and binary forms, with or without |
|
5 * modification, are permitted provided that the following conditions |
|
6 * are met: |
|
7 * |
|
8 * 1. Redistributions of source code must retain the above copyright |
|
9 * notice, this list of conditions and the following disclaimer. |
|
10 * 2. Redistributions in binary form must reproduce the above copyright |
|
11 * notice, this list of conditions and the following disclaimer in the |
|
12 * documentation and/or other materials provided with the distribution. |
|
13 * 3. Neither the name of Apple, Inc. ("Apple") nor the names of |
|
14 * its contributors may be used to endorse or promote products derived |
|
15 * from this software without specific prior written permission. |
|
16 * |
|
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
|
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
|
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
27 */ |
|
28 |
|
29 #ifndef WEBKIT_FRAME_H |
|
30 #define WEBKIT_FRAME_H |
|
31 |
|
32 #include <glib-object.h> |
|
33 #include <gdk/gdk.h> |
|
34 |
|
35 #include "webkitgtkdefines.h" |
|
36 |
|
37 G_BEGIN_DECLS |
|
38 |
|
39 #define WEBKIT_TYPE_FRAME (webkit_frame_get_type()) |
|
40 #define WEBKIT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_FRAME, WebKitFrame)) |
|
41 #define WEBKIT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_FRAME, WebKitFrameClass)) |
|
42 #define WEBKIT_IS_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_FRAME)) |
|
43 #define WEBKIT_IS_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_FRAME)) |
|
44 #define WEBKIT_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_FRAME, WebKitFrameClass)) |
|
45 |
|
46 |
|
47 struct _WebKitFrame { |
|
48 GObject parent; |
|
49 }; |
|
50 |
|
51 struct _WebKitFrameClass { |
|
52 GObjectClass parent; |
|
53 |
|
54 void (*title_changed) (WebKitFrame* frame, gchar* title, gchar* location); |
|
55 |
|
56 /* |
|
57 * protected virtual methods |
|
58 */ |
|
59 void (*mouse_move_event) (WebKitFrame* frame, GdkEvent* move_event); |
|
60 void (*mouse_press_event) (WebKitFrame* frame, GdkEvent* press_event); |
|
61 void (*mouse_release_event) (WebKitFrame* frame, GdkEvent* mouse_release_event); |
|
62 void (*mouse_double_click_event) (WebKitFrame* frame, GdkEvent* double_click_event); |
|
63 void (*mouse_wheel_event) (WebKitFrame* frame, GdkEvent* wheel_event); |
|
64 }; |
|
65 |
|
66 WEBKIT_API GType |
|
67 webkit_frame_get_type (void); |
|
68 |
|
69 WEBKIT_API GObject* |
|
70 webkit_frame_new (WebKitPage *page); |
|
71 |
|
72 WEBKIT_API WebKitPage* |
|
73 webkit_frame_get_page (WebKitFrame* frame); |
|
74 |
|
75 WEBKIT_API gchar* |
|
76 webkit_frame_get_markup (WebKitFrame* frame); |
|
77 |
|
78 WEBKIT_API gchar* |
|
79 webkit_frame_get_inner_text (WebKitFrame* frame); |
|
80 |
|
81 WEBKIT_API gchar* |
|
82 webkit_frame_get_selected_text (WebKitFrame* frame); |
|
83 |
|
84 WEBKIT_API gchar* |
|
85 webkit_frame_get_title (WebKitFrame* frame); |
|
86 |
|
87 WEBKIT_API gchar* |
|
88 webkit_frame_get_location (WebKitFrame* frame); |
|
89 |
|
90 WEBKIT_API GSList* |
|
91 webkit_frame_get_child_frames (WebKitFrame* frame); |
|
92 |
|
93 WEBKIT_API GdkPoint* |
|
94 webkit_frame_get_position (WebKitFrame* frame); |
|
95 |
|
96 WEBKIT_API GdkRectangle* |
|
97 webkit_frame_get_rectangle (WebKitFrame* frame); |
|
98 |
|
99 WEBKIT_API WebKitPage* |
|
100 webkit_frame_get_page (WebKitFrame* frame); |
|
101 |
|
102 G_END_DECLS |
|
103 |
|
104 #endif |