/*
    This file is part of the WebKit open source project.
    This file has been generated by generate-bindings.pl. DO NOT MODIFY!

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.
*/

#ifndef WebKitDOMRange_h
#define WebKitDOMRange_h

#include "webkit/webkitdomdefines.h"
#include <glib-object.h>
#include <webkit/webkitdefines.h>
#include "webkit/WebKitDOMObject.h"


G_BEGIN_DECLS
#define WEBKIT_TYPE_DOM_RANGE            (webkit_dom_range_get_type())
#define WEBKIT_DOM_RANGE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOM_RANGE, WebKitDOMRange))
#define WEBKIT_DOM_RANGE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_DOM_RANGE, WebKitDOMRangeClass)
#define WEBKIT_DOM_IS_RANGE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOM_RANGE))
#define WEBKIT_DOM_IS_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_DOM_RANGE))
#define WEBKIT_DOM_RANGE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_DOM_RANGE, WebKitDOMRangeClass))

struct _WebKitDOMRange {
    WebKitDOMObject parent_instance;
};

struct _WebKitDOMRangeClass {
    WebKitDOMObjectClass parent_class;
};

WEBKIT_API GType
webkit_dom_range_get_type (void);

WEBKIT_API void
webkit_dom_range_set_start(WebKitDOMRange* self, WebKitDOMNode* ref_node, glong offset, GError **error);

WEBKIT_API void
webkit_dom_range_set_end(WebKitDOMRange* self, WebKitDOMNode* ref_node, glong offset, GError **error);

WEBKIT_API void
webkit_dom_range_set_start_before(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API void
webkit_dom_range_set_start_after(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API void
webkit_dom_range_set_end_before(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API void
webkit_dom_range_set_end_after(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API void
webkit_dom_range_collapse(WebKitDOMRange* self, gboolean to_start, GError **error);

WEBKIT_API void
webkit_dom_range_select_node(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API void
webkit_dom_range_select_node_contents(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API gshort
webkit_dom_range_compare_boundary_points(WebKitDOMRange* self, gushort how, WebKitDOMRange* source_range, GError **error);

WEBKIT_API void
webkit_dom_range_delete_contents(WebKitDOMRange* self, GError **error);

WEBKIT_API WebKitDOMDocumentFragment*
webkit_dom_range_extract_contents(WebKitDOMRange* self, GError **error);

WEBKIT_API WebKitDOMDocumentFragment*
webkit_dom_range_clone_contents(WebKitDOMRange* self, GError **error);

WEBKIT_API void
webkit_dom_range_insert_node(WebKitDOMRange* self, WebKitDOMNode* new_node, GError **error);

WEBKIT_API void
webkit_dom_range_surround_contents(WebKitDOMRange* self, WebKitDOMNode* new_parent, GError **error);

WEBKIT_API WebKitDOMRange*
webkit_dom_range_clone_range(WebKitDOMRange* self, GError **error);

WEBKIT_API gchar*
webkit_dom_range_to_string(WebKitDOMRange* self, GError **error);

WEBKIT_API void
webkit_dom_range_detach(WebKitDOMRange* self, GError **error);

WEBKIT_API WebKitDOMDocumentFragment*
webkit_dom_range_create_contextual_fragment(WebKitDOMRange* self, const gchar* html, GError **error);

WEBKIT_API gboolean
webkit_dom_range_intersects_node(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API gshort
webkit_dom_range_compare_node(WebKitDOMRange* self, WebKitDOMNode* ref_node, GError **error);

WEBKIT_API gshort
webkit_dom_range_compare_point(WebKitDOMRange* self, WebKitDOMNode* ref_node, glong offset, GError **error);

WEBKIT_API gboolean
webkit_dom_range_is_point_in_range(WebKitDOMRange* self, WebKitDOMNode* ref_node, glong offset, GError **error);

WEBKIT_API void
webkit_dom_range_expand(WebKitDOMRange* self, const gchar* unit, GError **error);

WEBKIT_API WebKitDOMNode*
webkit_dom_range_get_start_container(WebKitDOMRange* self, GError **error);

WEBKIT_API glong
webkit_dom_range_get_start_offset(WebKitDOMRange* self, GError **error);

WEBKIT_API WebKitDOMNode*
webkit_dom_range_get_end_container(WebKitDOMRange* self, GError **error);

WEBKIT_API glong
webkit_dom_range_get_end_offset(WebKitDOMRange* self, GError **error);

WEBKIT_API gboolean
webkit_dom_range_get_collapsed(WebKitDOMRange* self, GError **error);

WEBKIT_API WebKitDOMNode*
webkit_dom_range_get_common_ancestor_container(WebKitDOMRange* self, GError **error);

WEBKIT_API gchar*
webkit_dom_range_get_text(WebKitDOMRange* self);

G_END_DECLS

#endif /* WebKitDOMRange_h */
