2 * Copyright (C) 2008 Collabora Ltd.
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.
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.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef webkitwebnavigationaction_h
21 #define webkitwebnavigationaction_h
23 #include <glib-object.h>
25 #include <webkit/webkitdefines.h>
30 * The order of this enum must be the same as NavigationType in
34 WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED,
35 WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED,
36 WEBKIT_WEB_NAVIGATION_REASON_BACK_FORWARD,
37 WEBKIT_WEB_NAVIGATION_REASON_RELOAD,
38 WEBKIT_WEB_NAVIGATION_REASON_FORM_RESUBMITTED,
39 WEBKIT_WEB_NAVIGATION_REASON_OTHER,
40 } WebKitWebNavigationReason;
42 #define WEBKIT_TYPE_WEB_NAVIGATION_ACTION (webkit_web_navigation_action_get_type())
43 #define WEBKIT_WEB_NAVIGATION_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_NAVIGATION_ACTION, WebKitWebNavigationAction))
44 #define WEBKIT_WEB_NAVIGATION_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_NAVIGATION_ACTION, WebKitWebNavigationActionClass))
45 #define WEBKIT_IS_WEB_NAVIGATION_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_NAVIGATION_ACTION))
46 #define WEBKIT_IS_WEB_NAVIGATION_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_NAVIGATION_ACTION))
47 #define WEBKIT_WEB_NAVIGATION_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEB_NAVIGATION_ACTION, WebKitWebNavigationActionClass))
49 typedef struct _WebKitWebNavigationAction WebKitWebNavigationAction;
50 typedef struct _WebKitWebNavigationActionClass WebKitWebNavigationActionClass;
51 typedef struct _WebKitWebNavigationActionPrivate WebKitWebNavigationActionPrivate;
53 struct _WebKitWebNavigationAction {
54 GObject parent_instance;
57 WebKitWebNavigationActionPrivate* priv;
60 struct _WebKitWebNavigationActionClass {
61 GObjectClass parent_class;
63 /* Padding for future expansion */
64 void (*_webkit_reserved0) (void);
65 void (*_webkit_reserved1) (void);
66 void (*_webkit_reserved2) (void);
67 void (*_webkit_reserved3) (void);
71 webkit_web_navigation_action_get_type(void);
73 WEBKIT_API WebKitWebNavigationReason
74 webkit_web_navigation_action_get_reason(WebKitWebNavigationAction* navigationAction);
77 webkit_web_navigation_action_set_reason(WebKitWebNavigationAction* navigationAction, WebKitWebNavigationReason reason);
79 WEBKIT_API const gchar*
80 webkit_web_navigation_action_get_original_uri(WebKitWebNavigationAction* navigationAction);
83 webkit_web_navigation_action_set_original_uri(WebKitWebNavigationAction* navigationAction, const gchar* originalUri);
86 webkit_web_navigation_action_get_button(WebKitWebNavigationAction* navigationAction);
89 webkit_web_navigation_action_get_modifier_state(WebKitWebNavigationAction* navigationAction);
91 WEBKIT_API const gchar *
92 webkit_web_navigation_action_get_target_frame(WebKitWebNavigationAction* navigationAction);