summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spillaz <smspillaz@gmail.com>2008-04-26 21:02:21 +0800
committerSam Spillaz <smspillaz@gmail.com>2008-04-26 21:02:21 +0800
commitafb4797d9de335a313adc8c5d61abf8142c9c460 (patch)
treeddd747f7fbb4aaf53fef4729431e9f666a98afbe
parent705134d13bbcd8311d61c27206bcaa56dde06152 (diff)
downloadwiimote-afb4797d9de335a313adc8c5d61abf8142c9c460.tar.gz
wiimote-afb4797d9de335a313adc8c5d61abf8142c9c460.tar.bz2
* Split inter-plugins communication into communicate.c
-rw-r--r--wiimote.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/wiimote.c b/wiimote.c
index 64f46fd..136186b 100644
--- a/wiimote.c
+++ b/wiimote.c
@@ -66,58 +66,6 @@ wiimotePaintOutput (CompScreen *s,
return status;
}
-/* Inter-Plugin Communication --------------------------------------------------- */
-
-Bool
-sendInfoToPlugin (CompDisplay *d, CompOption *argument, int nArgument, char *pluginName, char *actionName)
-{
- Bool pluginExists = FALSE;
- CompOption *options, *option;
- CompPlugin *p;
- CompObject *o;
- int nOptions;
-
- p = findActivePlugin (pluginName);
- o = compObjectFind (&core.base, COMP_OBJECT_TYPE_DISPLAY, NULL);
-
- if (!o)
- return FALSE;
-
- if (!p || !p->vTable->getObjectOptions)
- {
- compLogMessage (d, "wiimote", CompLogLevelError,
- "Reporting plugin '%s' does not exist!", pluginName);
- return FALSE;
- }
-
- if (p && p->vTable->getObjectOptions)
- {
- options = (*p->vTable->getObjectOptions) (p, o, &nOptions);
- option = compFindOption (options, nOptions, actionName, 0);
- pluginExists = TRUE;
- }
-
- if (pluginExists)
- {
- if (option && option->value.action.initiate)
- {
- (*option->value.action.initiate) (d,
- &option->value.action,
- 0,
- argument,
- nArgument);
- }
- else
- {
- compLogMessage (d, "wiimote", CompLogLevelError,
- "Plugin '%s' does exist, but no option named '%s' was found!", pluginName, actionName);
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
static Bool sendGesture(CompDisplay *d, int wiimoteNumber, int type)
{
CompOption argument[2];