static Bool setScreenOption (CompScreen *screen, char *name, CompOptionValue *value) { CompOption *o; int index; o = compFindOption (screen->opt, NUM_OPTIONS (screen), name, &index); if (!o) return FALSE; switch (index) { case COMP_SCREEN_OPTION_REFRESH_RATE: if (compSetIntOption (o, value)) { screen->redrawTime = 1000 / o->value.i; return TRUE; } default: break; } return FALSE; }
CompOption * compGetScreenOptions (CompScreen *screen, int *count) { *count = NUM_OPTIONS (screen); return screen->opt; }
CompOption * compGetDisplayOptions (CompDisplay *display, int *count) { *count = NUM_OPTIONS (display); return display->opt; }
static Bool videoSetDisplayOption(CompPlugin *plugin, CompDisplay *display, const char *name, CompOptionValue *value) { CompOption *o; int index; VIDEO_DISPLAY(display); o = compFindOption(vd->opt, NUM_OPTIONS(vd), name, &index); if (!o) return FALSE; switch (index) { case VIDEO_DISPLAY_OPTION_YV12: if (compSetBoolOption(o, value)) { CompScreen *s; for (s = display->screens; s; s = s->next) videoSetSupportedHint(s); } default: break; } return FALSE; }
static Bool scaleSetScreenOption (CompPlugin *plugin, CompScreen *screen, const char *name, CompOptionValue *value) { CompOption *o; int index; SCALE_SCREEN (screen); o = compFindOption (ss->opt, NUM_OPTIONS (ss), name, &index); if (!o) return FALSE; switch (index) { case SCALE_SCREEN_OPTION_OPACITY: if (compSetIntOption (o, value)) { ss->opacity = (OPAQUE * o->value.i) / 100; return TRUE; } break; default: return compSetScreenOption (screen, o, value); } return FALSE; }
static Bool fadeSetScreenOption (CompScreen *screen, char *name, CompOptionValue *value) { CompOption *o; int index; FADE_SCREEN (screen); o = compFindOption (fs->opt, NUM_OPTIONS (fs), name, &index); if (!o) return FALSE; switch (index) { case FADE_SCREEN_OPTION_FADE_SPEED: if (compSetFloatOption (o, value)) { fs->fadeTime = 1000.0f / o->value.f; return TRUE; } default: break; } return FALSE; }
static Bool minSetScreenOption(CompPlugin * plugin, CompScreen * screen, const char *name, CompOptionValue * value) { CompOption *o; int index; MIN_SCREEN(screen); o = compFindOption(ms->opt, NUM_OPTIONS(ms), name, &index); if (!o) return FALSE; switch (index) { case MIN_SCREEN_OPTION_SHADE_RESISTANCE: if (compSetIntOption(o, value)) { if (o->value.i) ms->shadeStep = o->rest.i.max - o->value.i + 1; else ms->shadeStep = 0; return TRUE; } break; default: if (compSetOption(o, value)) return TRUE; break; } return FALSE; }
static Bool notifySetDisplayOption (CompPlugin *p, CompDisplay *display, const char *name, CompOptionValue *value) { CompOption *o; int index; NOTIFY_DISPLAY (display); o = compFindOption (nd->opt, NUM_OPTIONS (nd), name, &index); if (!o) return FALSE; switch (index) { case NOTIFY_DISPLAY_OPTION_TIMEOUT: if (compSetIntOption (o, value)) { if (value->i == -1) nd->timeout = value->i; else nd->timeout = value->i * 1000; return TRUE; } default: if (compSetOption (o, value)) return TRUE; break; } return FALSE; }
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 fuseSetDisplayOption(CompPlugin *plugin, CompDisplay *display, const char *name, CompOptionValue *value) { CompOption *o; int index; FUSE_DISPLAY(display); o = compFindOption(fd->opt, NUM_OPTIONS(fd), name, &index); if (!o) return FALSE; switch (index) { case FUSE_DISPLAY_OPTION_MOUNT_POINT: if (compSetStringOption(o, value)) { fuseUnmount(display); fuseMount(display); return TRUE; } default: break; } return FALSE; }
static CompOption *waterGetDisplayOptions(CompPlugin * plugin, CompDisplay * display, int *count) { WATER_DISPLAY(display); *count = NUM_OPTIONS(wd); return wd->opt; }
static CompOption *cloneGetDisplayOptions(CompPlugin * plugin, CompDisplay * display, int *count) { CLONE_DISPLAY(display); *count = NUM_OPTIONS(cd); return cd->opt; }
static CompOption *minGetScreenOptions(CompPlugin * plugin, CompScreen * screen, int *count) { MIN_SCREEN(screen); *count = NUM_OPTIONS(ms); return ms->opt; }
static CompOption * fadeGetScreenOptions (CompScreen *screen, int *count) { FADE_SCREEN (screen); *count = NUM_OPTIONS (fs); return fs->opt; }
static CompOption * notifyGetDisplayOptions (CompPlugin *p, CompDisplay *display, int *count) { NOTIFY_DISPLAY (display); *count = NUM_OPTIONS (nd); return nd->opt; }
static CompOption * sessionGetDisplayOptions (CompPlugin *p, CompDisplay *d, int *count) { SESSION_DISPLAY (d); *count = NUM_OPTIONS (sd); return sd->opt; }
static CompOption * videoGetDisplayOptions(CompPlugin *plugin, CompDisplay *display, int *count) { VIDEO_DISPLAY(display); *count = NUM_OPTIONS(vd); return vd->opt; }
static CompOption * commandsGetDisplayOptions(CompPlugin *p, CompDisplay *d, int *count) { COMMANDS_DISPLAY(d); *count = NUM_OPTIONS(cd); return cd->opt; }
static CompOption * zoomGetDisplayOptions(CompPlugin *plugin, CompDisplay *display, int *count) { ZOOM_DISPLAY(display); *count = NUM_OPTIONS(zd); return zd->opt; }
static CompOption * zoomGetScreenOptions(CompPlugin *plugin, CompScreen *screen, int *count) { ZOOM_SCREEN(screen); *count = NUM_OPTIONS(zs); return zs->opt; }
static CompOption * textGetDisplayOptions (CompPlugin *plugin, CompDisplay *display, int *count) { TEXT_DISPLAY (display); *count = NUM_OPTIONS (td); return td->opt; }
static CompOption * scaleGetScreenOptions (CompPlugin *plugin, CompScreen *screen, int *count) { SCALE_SCREEN (screen); *count = NUM_OPTIONS (ss); return ss->opt; }
static CompOption * svgGetDisplayOptions(CompPlugin *plugin, CompDisplay *display, int *count) { SVG_DISPLAY(display); *count = NUM_OPTIONS(sd); return sd->opt; }
static CompOption * fuseGetDisplayOptions(CompPlugin *plugin, CompDisplay *display, int *count) { FUSE_DISPLAY(display); *count = NUM_OPTIONS(fd); return fd->opt; }
static CompOption * decorGetDisplayOptions (CompPlugin *plugin, CompDisplay *display, int *count) { DECOR_DISPLAY (display); *count = NUM_OPTIONS (dd); return dd->opt; }
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); }
static Bool sessionSetDisplayOption (CompPlugin *p, CompDisplay *d, const char *name, CompOptionValue *value) { CompOption *o; SESSION_DISPLAY (d); o = compFindOption (sd->opt, NUM_OPTIONS (sd), name, NULL); if (!o) return FALSE; return compSetOption (o, value); }
static Bool zoomSetScreenOption(CompPlugin *plugin, CompScreen *screen, const char *name, CompOptionValue *value) { CompOption *o; ZOOM_SCREEN(screen); o = compFindOption(zs->opt, NUM_OPTIONS(zs), name, NULL); if (!o) return FALSE; return compSetScreenOption(screen, o, value); }