/*
 * Copyright 2010 Collabora Limited
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 * more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#ifndef _MX_WEB_VIEW_H
#define _MX_WEB_VIEW_H

#include <mx/mx.h>
#include <webkit/webkitdefines.h>

G_BEGIN_DECLS

#define MX_TYPE_WEB_VIEW mx_web_view_get_type()

#define MX_WEB_VIEW(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
  MX_TYPE_WEB_VIEW, MxWebView))

#define MX_WEB_VIEW_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), \
  MX_TYPE_WEB_VIEW, MxWebViewClass))

#define MX_IS_WEB_VIEW(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
  MX_TYPE_WEB_VIEW))

#define MX_IS_WEB_VIEW_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
  MX_TYPE_WEB_VIEW))

#define MX_WEB_VIEW_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
  MX_TYPE_WEB_VIEW, MxWebViewClass))

typedef struct _MxWebView MxWebView;
typedef struct _MxWebViewClass MxWebViewClass;
typedef struct _MxWebViewPrivate MxWebViewPrivate;

/**
 * MxWebView:
 *
 * The contents of this structure are private and should only be accessed
 * through the public API.
 */
struct _MxWebView
{
  MxWidget parent;

  MxWebViewPrivate *priv;
};

struct _MxWebViewClass
{
  MxWidgetClass parent_class;

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
};

WEBKIT_API GType mx_web_view_get_type (void) G_GNUC_CONST;

WEBKIT_API ClutterActor *mx_web_view_new (void);

WEBKIT_API void mx_web_view_set_fast_zoom_level(MxWebView* webView, double zoomLevel);
WEBKIT_API void mx_web_view_set_x_scroll_offset(MxWebView* webView, int offset);
WEBKIT_API void mx_web_view_set_y_scroll_offset(MxWebView* webView, int offset);

G_END_DECLS

#endif /* _MX_WEB_VIEW_H */
