diff --git a/debian/changelog b/debian/changelog index bec1061..e54cdd4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +cdebconf (0.76) UNRELEASED; urgency=low + + NOTE: Not for sarge. + * Colin Watson + - Add draft plugins specification. + + -- Colin Watson Tue, 19 Apr 2005 14:45:09 +1000 + cdebconf (0.75) experimental; urgency=low NOTE: Not for sarge. diff --git a/doc/plugins.txt b/doc/plugins.txt new file mode 100644 index 0000000..6134975 --- /dev/null +++ b/doc/plugins.txt @@ -0,0 +1,48 @@ +cdebconf plugins (custom widgets) +--------------------------------- + +[This is a draft, and is not implemented yet.] + +cdebconf has the facility to load custom implementations for template types +at run-time. This may be used to provide more sophisticated user interfaces +than can be achieved using the standard generic template types. Naturally, +these implementations are per-frontend. + +The CAPB command may be used to query the existence of a given plugin for +the current frontend. If the type "foo" is supported by a plugin, CAPB will +return the capability "plugin-foo". + +Plugins are dynamically-loaded libraries. The library must be in the +following location: + + //plugin-.so + +(The initial "plugin-" is to allow for more convenient testing within the +cdebconf source tree.) + +In the default cdebconf.conf, is /usr/lib/cdebconf/frontend. +Thus, an implementation of the "detect-keyboard" type for the newt frontend +would be stored in: + + /usr/lib/cdebconf/frontend/newt/plugin-detect-keyboard.so + +The library must provide a function with the following name: + + _handler_ + +Any hyphens in here are substituted with underscores, so: + + newt_handler_detect_keyboard + +The required prototype for this function depends on the frontend. For newt +and text, it is (again with hyphens in substituted with underscores): + + int _handler_(struct frontend *obj, struct question *q) + +For gtk, it is: + + int _handler_(struct frontend *obj, struct question *q, GtkWidget *questionbox); + +The handler should return DC_OK (defined in common.h) if all went well, +DC_GOBACK if the user wants to back up to the previous question, or DC_NOTOK +if an error occurred.