summaryrefslogtreecommitdiff
path: root/fluid/Fl_Type.h
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-01-24 00:20:26 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-01-24 00:20:26 +0000
commit092c86c7048a6633a0d8c37538d48d2416840ff1 (patch)
treec6f360edd32670b0ee123614fc0e7f9dff33bf4f /fluid/Fl_Type.h
parent416f5b0dcd3e2cf4993acf4dff02a7477be835e2 (diff)
This is a very simple implementation of the host side of plugins. Plugins can be linked at compile time to extend Fluid with new command line options. A sample plugin will follow soon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Type.h')
-rw-r--r--fluid/Fl_Type.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h
index cfe1292d2..e80842ab8 100644
--- a/fluid/Fl_Type.h
+++ b/fluid/Fl_Type.h
@@ -36,6 +36,7 @@
#include <FL/Fl_Widget.H>
#include <FL/Fl_Menu.H>
+#include <FL/Fl_Plugin.H>
#include "Fluid_Image.h"
#include <FL/fl_draw.H>
@@ -792,6 +793,23 @@ int storestring(const char *n, const char * & p, int nostrip=0);
extern int include_H_from_C;
extern int use_FL_COMMAND;
+/*
+ * This class is needed for additional command line plugins.
+ */
+class Fl_Commandline_Plugin : public Fl_Plugin {
+public:
+ Fl_Commandline_Plugin(const char *name)
+ : Fl_Plugin(klass(), name) { }
+ virtual const char *klass() { return "commandline"; }
+ // return a unique name for this plugin
+ virtual const char *name() = 0;
+ // return a help text for all supported commands
+ virtual const char *help() = 0;
+ // handle a command and return the number of args used, or 0
+ virtual int arg(int argc, char **argv, int &i) = 0;
+};
+
+
//
// End of "$Id$".
//