WebKit/gtk/webkit/webkitwebframe.h
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2  * Copyright (C) 2007 Holger Hans Peter Freyther
       
     3  * Copyright (C) 2007 Alp Toker <alp@atoker.com>
       
     4  *
       
     5  * This library is free software; you can redistribute it and/or
       
     6  * modify it under the terms of the GNU Library General Public
       
     7  * License as published by the Free Software Foundation; either
       
     8  * version 2 of the License, or (at your option) any later version.
       
     9  *
       
    10  * This library is distributed in the hope that it will be useful,
       
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13  * Library General Public License for more details.
       
    14  *
       
    15  * You should have received a copy of the GNU Library General Public License
       
    16  * along with this library; see the file COPYING.LIB.  If not, write to
       
    17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    18  * Boston, MA 02110-1301, USA.
       
    19  */
       
    20 
       
    21 #ifndef webkitwebframe_h
       
    22 #define webkitwebframe_h
       
    23 
       
    24 #include <glib-object.h>
       
    25 #include <gtk/gtk.h>
       
    26 
       
    27 #include <JavaScriptCore/JSBase.h>
       
    28 
       
    29 #include <webkit/webkitdefines.h>
       
    30 #include <webkit/webkitnetworkrequest.h>
       
    31 #include <webkit/webkitwebdatasource.h>
       
    32 
       
    33 G_BEGIN_DECLS
       
    34 
       
    35 #define WEBKIT_TYPE_WEB_FRAME            (webkit_web_frame_get_type())
       
    36 #define WEBKIT_WEB_FRAME(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFrame))
       
    37 #define WEBKIT_WEB_FRAME_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_WEB_FRAME, WebKitWebFrameClass))
       
    38 #define WEBKIT_IS_WEB_FRAME(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_FRAME))
       
    39 #define WEBKIT_IS_WEB_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_WEB_FRAME))
       
    40 #define WEBKIT_WEB_FRAME_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_WEB_FRAME, WebKitWebFrameClass))
       
    41 
       
    42 typedef struct _WebKitWebFramePrivate WebKitWebFramePrivate;
       
    43 
       
    44 struct _WebKitWebFrame {
       
    45     GObject parent_instance;
       
    46 
       
    47     /*< private >*/
       
    48     WebKitWebFramePrivate *priv;
       
    49 };
       
    50 
       
    51 struct _WebKitWebFrameClass {
       
    52     GObjectClass parent_class;
       
    53 
       
    54     /*< public >*/
       
    55     void (*_webkit_reserved1) (void);
       
    56     void (*_webkit_reserved2) (void);
       
    57     void (*_webkit_reserved3) (void);
       
    58     void (*_webkit_reserved4) (void);
       
    59     void (*_webkit_reserved5) (void);
       
    60     void (*_webkit_reserved6) (void);
       
    61 };
       
    62 
       
    63 /**
       
    64  * WebKitLoadStatus
       
    65  * @WEBKIT_LOAD_PROVISIONAL: No data has been received yet, empty
       
    66  * structures have been allocated to perform the load; the load may
       
    67  * still fail for transport issues such as not being able to resolve a
       
    68  * name, or connect to a port.
       
    69  * @WEBKIT_LOAD_COMMITTED: The first data chunk has arrived, meaning
       
    70  * that the necessary transport requirements are stabilished, and the
       
    71  * load is being performed.
       
    72  * @WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT: The first layout with
       
    73  * actual visible content happened; one or more layouts may have
       
    74  * happened before that caused nothing to be visible on the screen,
       
    75  * because the data available at the time was not significant enough.
       
    76  * @WEBKIT_LOAD_FINISHED: This state means that everything that was
       
    77  * required to display the page has been loaded.
       
    78  * @WEBKIT_LOAD_FAILED: This state means that some error occurred
       
    79  * during the page load that prevented it from being completed. You
       
    80  * can connect to the #WebKitWebView::load-error signal if you want to
       
    81  * know precisely what kind of error occurred.
       
    82  */
       
    83 typedef enum {
       
    84     WEBKIT_LOAD_PROVISIONAL,
       
    85     WEBKIT_LOAD_COMMITTED,
       
    86     WEBKIT_LOAD_FINISHED,
       
    87     WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT,
       
    88     WEBKIT_LOAD_FAILED
       
    89 } WebKitLoadStatus;
       
    90 
       
    91 WEBKIT_API GType
       
    92 webkit_web_frame_get_type           (void);
       
    93 
       
    94 #ifndef WEBKIT_DISABLE_DEPRECATED
       
    95 WEBKIT_API WebKitWebFrame *
       
    96 webkit_web_frame_new                (WebKitWebView        *web_view);
       
    97 #endif
       
    98 
       
    99 WEBKIT_API WebKitWebView *
       
   100 webkit_web_frame_get_web_view       (WebKitWebFrame       *frame);
       
   101 
       
   102 WEBKIT_API G_CONST_RETURN gchar *
       
   103 webkit_web_frame_get_name           (WebKitWebFrame       *frame);
       
   104 
       
   105 WEBKIT_API G_CONST_RETURN gchar *
       
   106 webkit_web_frame_get_title          (WebKitWebFrame       *frame);
       
   107 
       
   108 WEBKIT_API G_CONST_RETURN gchar *
       
   109 webkit_web_frame_get_uri            (WebKitWebFrame       *frame);
       
   110 
       
   111 WEBKIT_API WebKitWebFrame*
       
   112 webkit_web_frame_get_parent         (WebKitWebFrame       *frame);
       
   113 
       
   114 WEBKIT_API void
       
   115 webkit_web_frame_load_uri           (WebKitWebFrame       *frame,
       
   116                                      const gchar          *uri);
       
   117 
       
   118 WEBKIT_API void
       
   119 webkit_web_frame_load_string        (WebKitWebFrame       *frame,
       
   120                                      const gchar          *content,
       
   121                                      const gchar          *mime_type,
       
   122                                      const gchar          *encoding,
       
   123                                      const gchar          *base_uri);
       
   124 
       
   125 WEBKIT_API void
       
   126 webkit_web_frame_load_alternate_string (WebKitWebFrame    *frame,
       
   127                                         const gchar       *content,
       
   128                                         const gchar       *base_url,
       
   129                                         const gchar       *unreachable_url);
       
   130 
       
   131 WEBKIT_API void
       
   132 webkit_web_frame_load_request       (WebKitWebFrame       *frame,
       
   133                                      WebKitNetworkRequest *request);
       
   134 
       
   135 WEBKIT_API void
       
   136 webkit_web_frame_stop_loading       (WebKitWebFrame       *frame);
       
   137 
       
   138 WEBKIT_API void
       
   139 webkit_web_frame_reload             (WebKitWebFrame       *frame);
       
   140 
       
   141 WEBKIT_API WebKitWebFrame *
       
   142 webkit_web_frame_find_frame         (WebKitWebFrame       *frame,
       
   143                                      const gchar          *name);
       
   144 
       
   145 WEBKIT_API JSGlobalContextRef
       
   146 webkit_web_frame_get_global_context (WebKitWebFrame       *frame);
       
   147 
       
   148 WEBKIT_API GtkPrintOperationResult
       
   149 webkit_web_frame_print_full         (WebKitWebFrame       *frame,
       
   150                                      GtkPrintOperation    *operation,
       
   151                                      GtkPrintOperationAction action,
       
   152                                      GError              **error);
       
   153 
       
   154 WEBKIT_API void
       
   155 webkit_web_frame_print              (WebKitWebFrame       *frame);
       
   156 
       
   157 WEBKIT_API WebKitLoadStatus
       
   158 webkit_web_frame_get_load_status    (WebKitWebFrame       *frame);
       
   159 
       
   160 WEBKIT_API GtkPolicyType
       
   161 webkit_web_frame_get_horizontal_scrollbar_policy (WebKitWebFrame        *frame);
       
   162 
       
   163 WEBKIT_API GtkPolicyType
       
   164 webkit_web_frame_get_vertical_scrollbar_policy   (WebKitWebFrame        *frame);
       
   165 
       
   166 WEBKIT_API WebKitWebDataSource *
       
   167 webkit_web_frame_get_data_source             (WebKitWebFrame       *frame);
       
   168 
       
   169 WEBKIT_API WebKitWebDataSource *
       
   170 webkit_web_frame_get_provisional_data_source (WebKitWebFrame       *frame);
       
   171 
       
   172 WEBKIT_API WebKitSecurityOrigin*
       
   173 webkit_web_frame_get_security_origin         (WebKitWebFrame       *frame);
       
   174 
       
   175 WEBKIT_API WebKitNetworkResponse*
       
   176 webkit_web_frame_get_network_response        (WebKitWebFrame       *frame);
       
   177 
       
   178 G_END_DECLS
       
   179 
       
   180 #endif