• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008 Collabora Ltd.
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 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.
18  */
19 
20 #ifndef webkitwebnavigationaction_h
21 #define webkitwebnavigationaction_h
22 
23 #include <glib-object.h>
24 
25 #include <webkit/webkitdefines.h>
26 
27 G_BEGIN_DECLS
28 
29 /*
30  * The order of this enum must be the same as NavigationType in
31  * FrameLoaderTypes.h
32  */
33 typedef enum {
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;
41 
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))
48 
49 typedef struct _WebKitWebNavigationAction WebKitWebNavigationAction;
50 typedef struct _WebKitWebNavigationActionClass WebKitWebNavigationActionClass;
51 typedef struct _WebKitWebNavigationActionPrivate WebKitWebNavigationActionPrivate;
52 
53 struct _WebKitWebNavigationAction {
54     GObject parent_instance;
55 
56     /*< private >*/
57     WebKitWebNavigationActionPrivate* priv;
58 };
59 
60 struct _WebKitWebNavigationActionClass {
61     GObjectClass parent_class;
62 
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);
68 };
69 
70 WEBKIT_API GType
71 webkit_web_navigation_action_get_type(void);
72 
73 WEBKIT_API WebKitWebNavigationReason
74 webkit_web_navigation_action_get_reason(WebKitWebNavigationAction* navigationAction);
75 
76 WEBKIT_API void
77 webkit_web_navigation_action_set_reason(WebKitWebNavigationAction* navigationAction, WebKitWebNavigationReason reason);
78 
79 WEBKIT_API const gchar*
80 webkit_web_navigation_action_get_original_uri(WebKitWebNavigationAction* navigationAction);
81 
82 WEBKIT_API void
83 webkit_web_navigation_action_set_original_uri(WebKitWebNavigationAction* navigationAction, const gchar* originalUri);
84 
85 WEBKIT_API gint
86 webkit_web_navigation_action_get_button(WebKitWebNavigationAction* navigationAction);
87 
88 WEBKIT_API gint
89 webkit_web_navigation_action_get_modifier_state(WebKitWebNavigationAction* navigationAction);
90 
91 WEBKIT_API G_CONST_RETURN gchar *
92 webkit_web_navigation_action_get_target_frame(WebKitWebNavigationAction* navigationAction);
93 
94 G_END_DECLS
95 
96 #endif
97