static Bool zoomSetDisplayOption(CompPlugin *plugin, CompDisplay *display, const char *name, CompOptionValue *value) { CompOption *o; int index; ZOOM_DISPLAY(display); o = compFindOption(zd->opt, NUM_OPTIONS(zd), name, &index); if (!o) return FALSE; switch (index) { case ZOOM_DISPLAY_OPTION_OUT_BUTTON: if (compSetActionOption(o, value)) return TRUE; break; default: return compSetDisplayOption(display, o, value); } return FALSE; }
static Bool waterSetDisplayOption (CompPlugin *plugin, CompDisplay *display, const char *name, CompOptionValue *value) { CompOption *o; int index; WATER_DISPLAY (display); o = compFindOption (wd->opt, NUM_OPTIONS (wd), name, &index); if (!o) return FALSE; switch (index) { case WATER_DISPLAY_OPTION_OFFSET_SCALE: if (compSetFloatOption (o, value)) { wd->offsetScale = o->value.f * 50.0f; return TRUE; } break; case WATER_DISPLAY_OPTION_RAIN_DELAY: if (compSetIntOption (o, value)) { CompScreen *s; for (s = display->screens; s; s = s->next) { WATER_SCREEN (s); if (!ws->rainHandle) continue; compRemoveTimeout (ws->rainHandle); ws->rainHandle = compAddTimeout (value->i, (float)value->i * 1.2, waterRainTimeout, s); } return TRUE; } break; default: return compSetDisplayOption (display, o, value); } return FALSE; }
static Bool cloneSetDisplayOption(CompPlugin * plugin, CompDisplay * display, const char *name, CompOptionValue * value) { CompOption *o; CLONE_DISPLAY(display); o = compFindOption(cd->opt, NUM_OPTIONS(cd), name, NULL); if (!o) return FALSE; return compSetDisplayOption(display, o, value); }
static CompBool commandsSetDisplayOption(CompPlugin *p, CompDisplay *d, const char *name, CompOptionValue *value) { CompOption *o; COMMANDS_DISPLAY(d); o = compFindOption(cd->opt, NUM_OPTIONS(cd), name, NULL); if (!o) return FALSE; return compSetDisplayOption(d, o, value); }