/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * 
 * Copyright (C) Armin Burgmeier 2007 <armin@arbur.net>
 * 
 * c4s-script-view.c is free software.
 * 
 * You may redistribute it and/or modify it under the terms of the
 * GNU General Public License, as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option)
 * any later version.
 * 
 * c4s-script-view.c 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with c4s-script-view.c.  If not, write to:
 * 	The Free Software Foundation, Inc.,
 * 	51 Franklin Street, Fifth Floor
 * 	Boston, MA  02110-1301, USA.
 */

#ifndef _C4S_SCRIPT_VIEW_H_
#define _C4S_SCRIPT_VIEW_H_

#include <glib-object.h>

G_BEGIN_DECLS

#define C4S_TYPE_SCRIPT_VIEW             (c4s_script_view_get_type ())
#define C4S_SCRIPT_VIEW(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), C4S_TYPE_SCRIPT_VIEW, C4sScriptView))
#define C4S_SCRIPT_VIEW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), C4S_TYPE_SCRIPT_VIEW, C4sScriptViewClass))
#define C4S_IS_SCRIPT_VIEW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), C4S_TYPE_SCRIPT_VIEW))
#define C4S_IS_SCRIPT_VIEW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), C4S_TYPE_SCRIPT_VIEW))
#define C4S_SCRIPT_VIEW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), C4S_TYPE_SCRIPT_VIEW, C4sScriptViewClass))

typedef struct _C4sScriptViewClass C4sScriptViewClass;
typedef struct _C4sScriptView C4sScriptView;

struct _C4sScriptViewClass
{
	GtkTextViewClass parent_class;

	/* Signals */
	void(* script_changed) (C4sScriptView *self, const gchar *new_content);
};

struct _C4sScriptView
{
	GtkTextView parent_instance;
};

GType c4s_script_view_get_type (void) G_GNUC_CONST;
GtkWidget* c4s_script_view_new (void);
GtkWidget* c4s_script_view_new_with_buffer (GtkTextBuffer *buffer);

G_END_DECLS

#endif /* _C4S_SCRIPT_VIEW_H_ */

