index bac1f7ccb9059dd1fdc26ba08c6f8888b9d0fb41..4620375f928f584dfc320eb09f64cd41b32b4fdc 100644 (file)
*/
virtual bool check(Inkscape::Extension::Extension *module);
+ ImplementationDocumentCache * newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * view);
+
/**
*
*/
virtual void save(Inkscape::Extension::Output *module,
SPDocument *doc,
gchar const *filename);
- /**
- *
- */
- virtual Gtk::Widget *prefs_effect(Inkscape::Extension::Effect *module,
- Inkscape::UI::View::View * view);
/**
*
*/
virtual void effect(Inkscape::Extension::Effect *module,
- Inkscape::UI::View::View *doc);
+ Inkscape::UI::View::View *doc,
+ ImplementationDocumentCache * docCache);
virtual bool cancelProcessing (void);
sigc::connection _conn;
Glib::RefPtr<Glib::IOChannel> _channel;
Glib::RefPtr<Glib::MainLoop> _main_loop;
+ bool _dead;
public:
- file_listener () { };
- ~file_listener () {
+ file_listener () : _dead(false) { };
+ virtual ~file_listener () {
_conn.disconnect();
};
+ bool isDead () { return _dead; }
+
void init (int fd, Glib::RefPtr<Glib::MainLoop> main) {
_channel = Glib::IOChannel::create_from_fd(fd);
_channel->set_encoding();
Glib::IOStatus status;
Glib::ustring out;
- status = _channel->read_to_end(out);
+ status = _channel->read_line(out);
+ _string += out;
if (status != Glib::IO_STATUS_NORMAL) {
_main_loop->quit();
+ _dead = true;
return false;
}
- _string += out;
return true;
};
void toFile (const Glib::ustring &name) {
Glib::RefPtr<Glib::IOChannel> stdout_file = Glib::IOChannel::create_from_file(name, "w");
+ stdout_file->set_encoding();
stdout_file->write(_string);
return;
};
const std::list<std::string> &in_params,
const Glib::ustring &filein,
file_listener &fileout);
+
+ void pump_events (void);
+
+ /** \brief A definition of an interpreter, which can be specified
+ in the INX file, but we need to know what to call */
+ struct interpreter_t {
+ gchar const *identity; /**< The ID that is in the INX file */
+ gchar const *prefstring; /**< The preferences key that can override the default */
+ gchar const *defaultval; /**< The default value if there are no preferences */
+ };
+ static interpreter_t const interpreterTab[];
+
+ Glib::ustring resolveInterpreterExecutable(const Glib::ustring &interpNameArg);
+
}; // class Script