/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Interface for the HTML Editor.
 *
 * Authors:
 *   Larry Ewing <lewing@helixcode.com>
 *   Radek Doulik <rodo@helixcode.com>
 *
 * Copyright (C) 2000 Helix Code, Inc.
 */

#include <Bonobo.idl>

module HTMLEditor {
	interface Resolver : Bonobo::Unknown {
		exception NotFound {};
		
		void loadURL (in Bonobo::ProgressiveDataSink sink, in string url) raises (NotFound);
	};

	struct Arg {
		any value;
	};
	typedef sequence<Arg> ListenerArgs;

	interface Listener : Bonobo::Unknown {
		void event (in string name, in ListenerArgs args);
	};

	interface Engine : Bonobo::Unknown {
		attribute Listener listener;

		/*
		 * return data of current paragraph
		 */
		any  get_paragraph_data (in string key);

		/*
		 * sets data on current paragraph
		 */
		void set_paragraph_data (in string key, in any value);

		/*
		 * set data which are set to objects of given type while inserting
		 * we will use that to mark original text paragraph(s) in composer
		 * and use that data later in editing to implement better reply
		 * editing
		 */
		void set_object_data_by_type (in string type_name, in string key, in any data);

		/*
		 * execute editor command
		 */
		void command (in string command);
	};
};