Browse Source

Add plugins files missing from earlier commit

master
Gavan Fantom 18 years ago
parent
commit
bc76cfe623
  1. 10
      src/lsi/plugin.h
  2. 23
      src/lsi/plugins.c
  3. 13
      src/lsi/plugins.h

10
src/lsi/plugin.h

@ -0,0 +1,10 @@
/* plugin.h */
struct plugin {
char *pl_name;
int (*pl_init)(void);
void (*pl_shutdown)(void);
int pl_active;
/* function table? */
};

23
src/lsi/plugins.c

@ -0,0 +1,23 @@
/* plugins.c */
/*
* This is the master table of plugins. Add a plugin here
* for it to take effect.
*/
#include "plugin.h"
#include "midi.h"
#include "dmx.h"
#include "beatdetect.h"
#include "mouse.h"
struct plugin plugins_table[] = {
{"midi", midi_init, midi_close, 0},
{"dmx", dmx_init, dmx_close, 0},
{"beatdetect", beatdetect_init, beatdetect_close, 0},
{"mouse", mouse_init, mouse_close, 0},
};
int nplugins = (sizeof(plugins_table) / sizeof(struct plugin));

13
src/lsi/plugins.h

@ -0,0 +1,13 @@
/* plugins.h */
/*
* The master table of plugins is found in plugins.c. This is
* just a declaration to allow the table to be used.
*/
#include "plugin.h"
extern struct plugin plugins_table[];
extern int nplugins;
Loading…
Cancel
Save