Home | History | Annotate | Download | only in webkit
      1 /*
      2  * Copyright (C) 2008 Jan Michael C. Alonzo <jmalonzo (at) unpluggable.com>
      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 webkitwebbackforwardlist_h
     21 #define webkitwebbackforwardlist_h
     22 
     23 #include <glib.h>
     24 #include <glib-object.h>
     25 
     26 #include <webkit/webkitdefines.h>
     27 #include <webkit/webkitwebhistoryitem.h>
     28 
     29 G_BEGIN_DECLS
     30 
     31 #define WEBKIT_TYPE_WEB_BACK_FORWARD_LIST            (webkit_web_back_forward_list_get_type())
     32 #define WEBKIT_WEB_BACK_FORWARD_LIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_BACK_FORWARD_LIST, WebKitWebBackForwardList))
     33 #define WEBKIT_WEB_BACK_FORWARD_LIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_WEB_BACK_FORWARD_LIST, WebKitWebBackForwardListClass))
     34 #define WEBKIT_IS_WEB_BACK_FORWARD_LIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_BACK_FORWARD_LIST))
     35 #define WEBKIT_IS_WEB_BACK_FORWARD_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_WEB_BACK_FORWARD_LIST))
     36 #define WEBKIT_WEB_BACK_FORWARD_LIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_WEB_BACK_FORWARD_LIST, WebKitWebBackForwardListClass))
     37 
     38 typedef struct _WebKitWebBackForwardListPrivate WebKitWebBackForwardListPrivate;
     39 
     40 struct _WebKitWebBackForwardList {
     41     GObject parent_instance;
     42 
     43     /*< private >*/
     44     WebKitWebBackForwardListPrivate *priv;
     45 };
     46 
     47 struct _WebKitWebBackForwardListClass {
     48     GObjectClass parent_class;
     49 
     50     /* Padding for future expansion */
     51     void (*_webkit_reserved0) (void);
     52     void (*_webkit_reserved1) (void);
     53     void (*_webkit_reserved2) (void);
     54     void (*_webkit_reserved3) (void);
     55 };
     56 
     57 WEBKIT_API GType
     58 webkit_web_back_forward_list_get_type (void);
     59 
     60 WEBKIT_API WebKitWebBackForwardList *
     61 webkit_web_back_forward_list_new_with_web_view           (WebKitWebView *web_view);
     62 
     63 WEBKIT_API void
     64 webkit_web_back_forward_list_go_forward                  (WebKitWebBackForwardList *web_back_forward_list);
     65 
     66 WEBKIT_API void
     67 webkit_web_back_forward_list_go_back                     (WebKitWebBackForwardList *web_back_forward_list);
     68 
     69 WEBKIT_API gboolean
     70 webkit_web_back_forward_list_contains_item               (WebKitWebBackForwardList *web_back_forward_list,
     71                                                           WebKitWebHistoryItem     *history_item);
     72 
     73 WEBKIT_API void
     74 webkit_web_back_forward_list_go_to_item                  (WebKitWebBackForwardList *web_back_forward_list,
     75                                                           WebKitWebHistoryItem     *history_item);
     76 
     77 WEBKIT_API GList *
     78 webkit_web_back_forward_list_get_forward_list_with_limit (WebKitWebBackForwardList *web_back_forward_list,
     79                                                           gint                      limit);
     80 
     81 WEBKIT_API GList *
     82 webkit_web_back_forward_list_get_back_list_with_limit    (WebKitWebBackForwardList *web_back_forward_list,
     83                                                           gint                      limit);
     84 
     85 WEBKIT_API WebKitWebHistoryItem *
     86 webkit_web_back_forward_list_get_back_item               (WebKitWebBackForwardList *web_back_forward_list);
     87 
     88 WEBKIT_API WebKitWebHistoryItem *
     89 webkit_web_back_forward_list_get_current_item            (WebKitWebBackForwardList *web_back_forward_list);
     90 
     91 WEBKIT_API WebKitWebHistoryItem *
     92 webkit_web_back_forward_list_get_forward_item            (WebKitWebBackForwardList *web_back_forward_list);
     93 
     94 WEBKIT_API WebKitWebHistoryItem *
     95 webkit_web_back_forward_list_get_nth_item                (WebKitWebBackForwardList *web_back_forward_list,
     96                                                           gint                      index);
     97 
     98 WEBKIT_API gint
     99 webkit_web_back_forward_list_get_back_length             (WebKitWebBackForwardList *web_back_forward_list);
    100 
    101 WEBKIT_API gint
    102 webkit_web_back_forward_list_get_forward_length          (WebKitWebBackForwardList *web_back_forward_list);
    103 
    104 WEBKIT_API gint
    105 webkit_web_back_forward_list_get_limit                   (WebKitWebBackForwardList *web_back_forward_list);
    106 
    107 WEBKIT_API void
    108 webkit_web_back_forward_list_set_limit                   (WebKitWebBackForwardList *web_back_forward_list,
    109                                                           gint                      limit);
    110 WEBKIT_API void
    111 webkit_web_back_forward_list_add_item                    (WebKitWebBackForwardList *web_back_forward_list,
    112                                                           WebKitWebHistoryItem     *history_item);
    113 
    114 G_END_DECLS
    115 
    116 
    117 #endif /* webkitwebbackforwardlist_h */
    118