/*
 * This file is autogenerated with bcop:
 * The Compiz option code generator
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <compiz.h>

#define _GROUP_OPTIONS_INTERNAL
#include "group_options.h"

static int displayPrivateIndex;

static CompMetadata groupOptionsMetadata;

static CompPluginVTable *groupPluginVTable = NULL;
CompPluginVTable groupOptionsVTable;

#define GET_GROUP_OPTIONS_DISPLAY(d) \
        ((GroupOptionsDisplay *) (d)->privates[displayPrivateIndex].ptr)

#define GROUP_OPTIONS_DISPLAY(d) \
        GroupOptionsDisplay *od = GET_GROUP_OPTIONS_DISPLAY (d)

#define GET_GROUP_OPTIONS_SCREEN(s, od) \
        ((GroupOptionsScreen *) (s)->privates[(od)->screenPrivateIndex].ptr)

#define GROUP_OPTIONS_SCREEN(s) \
        GroupOptionsScreen *os = GET_GROUP_OPTIONS_SCREEN (s, GET_GROUP_OPTIONS_DISPLAY (s->display))

typedef struct _GroupOptionsDisplay
{
    int screenPrivateIndex;

    CompOption opt[GroupDisplayOptionNum];
    groupDisplayOptionChangeNotifyProc notify[GroupDisplayOptionNum];
} GroupOptionsDisplay;

typedef struct _GroupOptionsScreen
{
    CompOption opt[GroupScreenOptionNum];
    groupScreenOptionChangeNotifyProc notify[GroupScreenOptionNum];
} GroupOptionsScreen;

CompAction * groupGetSelect (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionSelect].value.action;
}

void groupSetSelectInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionSelect].value.action.initiate = init;
}

void groupSetSelectTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionSelect].value.action.terminate = term;
}

CompOption * groupGetSelectOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionSelect];
}

void groupSetSelectNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionSelect] = notify;
}

CompAction * groupGetSelectSingle (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionSelectSingle].value.action;
}

void groupSetSelectSingleInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionSelectSingle].value.action.initiate = init;
}

void groupSetSelectSingleTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionSelectSingle].value.action.terminate = term;
}

CompOption * groupGetSelectSingleOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionSelectSingle];
}

void groupSetSelectSingleNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionSelectSingle] = notify;
}

CompAction * groupGetGroup (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionGroup].value.action;
}

void groupSetGroupInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionGroup].value.action.initiate = init;
}

void groupSetGroupTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionGroup].value.action.terminate = term;
}

CompOption * groupGetGroupOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionGroup];
}

void groupSetGroupNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionGroup] = notify;
}

CompAction * groupGetUngroup (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionUngroup].value.action;
}

void groupSetUngroupInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionUngroup].value.action.initiate = init;
}

void groupSetUngroupTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionUngroup].value.action.terminate = term;
}

CompOption * groupGetUngroupOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionUngroup];
}

void groupSetUngroupNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionUngroup] = notify;
}

CompAction * groupGetRemove (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionRemove].value.action;
}

void groupSetRemoveInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionRemove].value.action.initiate = init;
}

void groupSetRemoveTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionRemove].value.action.terminate = term;
}

CompOption * groupGetRemoveOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionRemove];
}

void groupSetRemoveNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionRemove] = notify;
}

CompAction * groupGetClose (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionClose].value.action;
}

void groupSetCloseInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionClose].value.action.initiate = init;
}

void groupSetCloseTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionClose].value.action.terminate = term;
}

CompOption * groupGetCloseOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionClose];
}

void groupSetCloseNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionClose] = notify;
}

CompAction * groupGetIgnore (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionIgnore].value.action;
}

void groupSetIgnoreInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionIgnore].value.action.initiate = init;
}

void groupSetIgnoreTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionIgnore].value.action.terminate = term;
}

CompOption * groupGetIgnoreOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionIgnore];
}

void groupSetIgnoreNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionIgnore] = notify;
}

CompAction * groupGetTabmode (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionTabmode].value.action;
}

void groupSetTabmodeInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionTabmode].value.action.initiate = init;
}

void groupSetTabmodeTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionTabmode].value.action.terminate = term;
}

CompOption * groupGetTabmodeOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionTabmode];
}

void groupSetTabmodeNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionTabmode] = notify;
}

CompAction * groupGetChangeTabLeft (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionChangeTabLeft].value.action;
}

void groupSetChangeTabLeftInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionChangeTabLeft].value.action.initiate = init;
}

void groupSetChangeTabLeftTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionChangeTabLeft].value.action.terminate = term;
}

CompOption * groupGetChangeTabLeftOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionChangeTabLeft];
}

void groupSetChangeTabLeftNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionChangeTabLeft] = notify;
}

CompAction * groupGetChangeTabRight (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionChangeTabRight].value.action;
}

void groupSetChangeTabRightInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionChangeTabRight].value.action.initiate = init;
}

void groupSetChangeTabRightTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionChangeTabRight].value.action.terminate = term;
}

CompOption * groupGetChangeTabRightOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionChangeTabRight];
}

void groupSetChangeTabRightNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionChangeTabRight] = notify;
}

CompAction * groupGetChangeColor (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionChangeColor].value.action;
}

void groupSetChangeColorInitiate (CompDisplay *d, CompActionCallBackProc init)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionChangeColor].value.action.initiate = init;
}

void groupSetChangeColorTerminate (CompDisplay *d, CompActionCallBackProc term)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->opt[GroupDisplayOptionChangeColor].value.action.terminate = term;
}

CompOption * groupGetChangeColorOption (CompDisplay *d)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[GroupDisplayOptionChangeColor];
}

void groupSetChangeColorNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_DISPLAY(d);
    od->notify[GroupDisplayOptionChangeColor] = notify;
}

Bool groupGetMoveAll (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionMoveAll].value.b;
}

CompOption * groupGetMoveAllOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionMoveAll];
}

void groupSetMoveAllNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionMoveAll] = notify;
}

Bool groupGetResizeAll (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionResizeAll].value.b;
}

CompOption * groupGetResizeAllOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionResizeAll];
}

void groupSetResizeAllNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionResizeAll] = notify;
}

Bool groupGetRaiseAll (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionRaiseAll].value.b;
}

CompOption * groupGetRaiseAllOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionRaiseAll];
}

void groupSetRaiseAllNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionRaiseAll] = notify;
}

Bool groupGetMaximizeUnmaximizeAll (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionMaximizeUnmaximizeAll].value.b;
}

CompOption * groupGetMaximizeUnmaximizeAllOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionMaximizeUnmaximizeAll];
}

void groupSetMaximizeUnmaximizeAllNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionMaximizeUnmaximizeAll] = notify;
}

Bool groupGetMinimizeAll (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionMinimizeAll].value.b;
}

CompOption * groupGetMinimizeAllOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionMinimizeAll];
}

void groupSetMinimizeAllNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionMinimizeAll] = notify;
}

Bool groupGetShadeAll (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionShadeAll].value.b;
}

CompOption * groupGetShadeAllOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionShadeAll];
}

void groupSetShadeAllNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionShadeAll] = notify;
}

Bool groupGetAutoGroup (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionAutoGroup].value.b;
}

CompOption * groupGetAutoGroupOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionAutoGroup];
}

void groupSetAutoGroupNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionAutoGroup] = notify;
}

Bool groupGetAutoUngroup (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionAutoUngroup].value.b;
}

CompOption * groupGetAutoUngroupOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionAutoUngroup];
}

void groupSetAutoUngroupNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionAutoUngroup] = notify;
}

CompMatch * groupGetWindowMatch (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionWindowMatch].value.match;
}

CompOption * groupGetWindowMatchOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionWindowMatch];
}

void groupSetWindowMatchNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionWindowMatch] = notify;
}

int groupGetSelectOpacity (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionSelectOpacity].value.i;
}

CompOption * groupGetSelectOpacityOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionSelectOpacity];
}

void groupSetSelectOpacityNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionSelectOpacity] = notify;
}

int groupGetSelectSaturation (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionSelectSaturation].value.i;
}

CompOption * groupGetSelectSaturationOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionSelectSaturation];
}

void groupSetSelectSaturationNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionSelectSaturation] = notify;
}

int groupGetSelectBrightness (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionSelectBrightness].value.i;
}

CompOption * groupGetSelectBrightnessOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionSelectBrightness];
}

void groupSetSelectBrightnessNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionSelectBrightness] = notify;
}

int groupGetSelectPrecision (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionSelectPrecision].value.i;
}

CompOption * groupGetSelectPrecisionOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionSelectPrecision];
}

void groupSetSelectPrecisionNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionSelectPrecision] = notify;
}

unsigned short * groupGetFillColor (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionFillColor].value.c;
}

unsigned short groupGetFillColorRed (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionFillColor].value.c[0];
}

unsigned short groupGetFillColorGreen (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionFillColor].value.c[1];
}

unsigned short groupGetFillColorBlue (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionFillColor].value.c[2];
}

unsigned short groupGetFillColorAlpha (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionFillColor].value.c[3];
}

CompOption * groupGetFillColorOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionFillColor];
}

void groupSetFillColorNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionFillColor] = notify;
}

unsigned short * groupGetLineColor (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionLineColor].value.c;
}

unsigned short groupGetLineColorRed (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionLineColor].value.c[0];
}

unsigned short groupGetLineColorGreen (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionLineColor].value.c[1];
}

unsigned short groupGetLineColorBlue (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionLineColor].value.c[2];
}

unsigned short groupGetLineColorAlpha (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionLineColor].value.c[3];
}

CompOption * groupGetLineColorOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionLineColor];
}

void groupSetLineColorNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionLineColor] = notify;
}

Bool groupGetMipmaps (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionMipmaps].value.b;
}

CompOption * groupGetMipmapsOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionMipmaps];
}

void groupSetMipmapsNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionMipmaps] = notify;
}

Bool groupGetUntabOnClose (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionUntabOnClose].value.b;
}

CompOption * groupGetUntabOnCloseOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionUntabOnClose];
}

void groupSetUntabOnCloseNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionUntabOnClose] = notify;
}

Bool groupGetAutotabCreate (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionAutotabCreate].value.b;
}

CompOption * groupGetAutotabCreateOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionAutotabCreate];
}

void groupSetAutotabCreateNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionAutotabCreate] = notify;
}

float groupGetTabbarShowDelay (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbarShowDelay].value.f;
}

CompOption * groupGetTabbarShowDelayOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabbarShowDelay];
}

void groupSetTabbarShowDelayNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabbarShowDelay] = notify;
}

float groupGetTabbingSpeed (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbingSpeed].value.f;
}

CompOption * groupGetTabbingSpeedOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabbingSpeed];
}

void groupSetTabbingSpeedNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabbingSpeed] = notify;
}

float groupGetTabbingTimestep (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbingTimestep].value.f;
}

CompOption * groupGetTabbingTimestepOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabbingTimestep];
}

void groupSetTabbingTimestepNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabbingTimestep] = notify;
}

float groupGetFadeTime (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionFadeTime].value.f;
}

CompOption * groupGetFadeTimeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionFadeTime];
}

void groupSetFadeTimeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionFadeTime] = notify;
}

float groupGetPulseTime (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionPulseTime].value.f;
}

CompOption * groupGetPulseTimeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionPulseTime];
}

void groupSetPulseTimeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionPulseTime] = notify;
}

float groupGetReflexTime (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionReflexTime].value.f;
}

CompOption * groupGetReflexTimeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionReflexTime];
}

void groupSetReflexTimeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionReflexTime] = notify;
}

float groupGetFadeTextTime (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionFadeTextTime].value.f;
}

CompOption * groupGetFadeTextTimeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionFadeTextTime];
}

void groupSetFadeTextTimeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionFadeTextTime] = notify;
}

float groupGetVisibilityTime (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionVisibilityTime].value.f;
}

CompOption * groupGetVisibilityTimeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionVisibilityTime];
}

void groupSetVisibilityTimeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionVisibilityTime] = notify;
}

float groupGetChangeAnimationTime (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionChangeAnimationTime].value.f;
}

CompOption * groupGetChangeAnimationTimeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionChangeAnimationTime];
}

void groupSetChangeAnimationTimeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionChangeAnimationTime] = notify;
}

Bool groupGetBarAnimations (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionBarAnimations].value.b;
}

CompOption * groupGetBarAnimationsOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionBarAnimations];
}

void groupSetBarAnimationsNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionBarAnimations] = notify;
}

int groupGetThumbSize (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionThumbSize].value.i;
}

CompOption * groupGetThumbSizeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionThumbSize];
}

void groupSetThumbSizeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionThumbSize] = notify;
}

int groupGetThumbSpace (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionThumbSpace].value.i;
}

CompOption * groupGetThumbSpaceOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionThumbSpace];
}

void groupSetThumbSpaceNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionThumbSpace] = notify;
}

int groupGetBorderRadius (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionBorderRadius].value.i;
}

CompOption * groupGetBorderRadiusOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionBorderRadius];
}

void groupSetBorderRadiusNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionBorderRadius] = notify;
}

int groupGetBorderWidth (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionBorderWidth].value.i;
}

CompOption * groupGetBorderWidthOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionBorderWidth];
}

void groupSetBorderWidthNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionBorderWidth] = notify;
}

unsigned short * groupGetTabBaseColor (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBaseColor].value.c;
}

unsigned short groupGetTabBaseColorRed (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBaseColor].value.c[0];
}

unsigned short groupGetTabBaseColorGreen (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBaseColor].value.c[1];
}

unsigned short groupGetTabBaseColorBlue (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBaseColor].value.c[2];
}

unsigned short groupGetTabBaseColorAlpha (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBaseColor].value.c[3];
}

CompOption * groupGetTabBaseColorOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabBaseColor];
}

void groupSetTabBaseColorNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabBaseColor] = notify;
}

unsigned short * groupGetTabBorderColor (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBorderColor].value.c;
}

unsigned short groupGetTabBorderColorRed (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBorderColor].value.c[0];
}

unsigned short groupGetTabBorderColorGreen (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBorderColor].value.c[1];
}

unsigned short groupGetTabBorderColorBlue (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBorderColor].value.c[2];
}

unsigned short groupGetTabBorderColorAlpha (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabBorderColor].value.c[3];
}

CompOption * groupGetTabBorderColorOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabBorderColor];
}

void groupSetTabBorderColorNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabBorderColor] = notify;
}

unsigned short * groupGetTabHighlightColor (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabHighlightColor].value.c;
}

unsigned short groupGetTabHighlightColorRed (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabHighlightColor].value.c[0];
}

unsigned short groupGetTabHighlightColorGreen (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabHighlightColor].value.c[1];
}

unsigned short groupGetTabHighlightColorBlue (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabHighlightColor].value.c[2];
}

unsigned short groupGetTabHighlightColorAlpha (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabHighlightColor].value.c[3];
}

CompOption * groupGetTabHighlightColorOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabHighlightColor];
}

void groupSetTabHighlightColorNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabHighlightColor] = notify;
}

int groupGetTabStyle (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabStyle].value.i;
}

CompOption * groupGetTabStyleOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabStyle];
}

void groupSetTabStyleNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabStyle] = notify;
}

int groupGetTabbarFontSize (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbarFontSize].value.i;
}

CompOption * groupGetTabbarFontSizeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabbarFontSize];
}

void groupSetTabbarFontSizeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabbarFontSize] = notify;
}

unsigned short * groupGetTabbarFontColor (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbarFontColor].value.c;
}

unsigned short groupGetTabbarFontColorRed (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbarFontColor].value.c[0];
}

unsigned short groupGetTabbarFontColorGreen (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbarFontColor].value.c[1];
}

unsigned short groupGetTabbarFontColorBlue (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbarFontColor].value.c[2];
}

unsigned short groupGetTabbarFontColorAlpha (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionTabbarFontColor].value.c[3];
}

CompOption * groupGetTabbarFontColorOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionTabbarFontColor];
}

void groupSetTabbarFontColorNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionTabbarFontColor] = notify;
}

Bool groupGetSpringModelOnMove (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionSpringModelOnMove].value.b;
}

CompOption * groupGetSpringModelOnMoveOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionSpringModelOnMove];
}

void groupSetSpringModelOnMoveNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionSpringModelOnMove] = notify;
}

Bool groupGetDndUngroupWindow (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionDndUngroupWindow].value.b;
}

CompOption * groupGetDndUngroupWindowOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionDndUngroupWindow];
}

void groupSetDndUngroupWindowNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionDndUngroupWindow] = notify;
}

float groupGetDragHoverTime (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionDragHoverTime].value.f;
}

CompOption * groupGetDragHoverTimeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionDragHoverTime];
}

void groupSetDragHoverTimeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionDragHoverTime] = notify;
}

float groupGetDragSpringK (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionDragSpringK].value.f;
}

CompOption * groupGetDragSpringKOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionDragSpringK];
}

void groupSetDragSpringKNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionDragSpringK] = notify;
}

float groupGetDragFriction (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionDragFriction].value.f;
}

CompOption * groupGetDragFrictionOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionDragFriction];
}

void groupSetDragFrictionNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionDragFriction] = notify;
}

int groupGetDragYDistance (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionDragYDistance].value.i;
}

CompOption * groupGetDragYDistanceOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionDragYDistance];
}

void groupSetDragYDistanceNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionDragYDistance] = notify;
}

int groupGetDragSpeedLimit (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionDragSpeedLimit].value.i;
}

CompOption * groupGetDragSpeedLimitOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionDragSpeedLimit];
}

void groupSetDragSpeedLimitNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionDragSpeedLimit] = notify;
}

Bool groupGetGlow (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionGlow].value.b;
}

CompOption * groupGetGlowOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionGlow];
}

void groupSetGlowNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionGlow] = notify;
}

int groupGetGlowSize (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionGlowSize].value.i;
}

CompOption * groupGetGlowSizeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionGlowSize];
}

void groupSetGlowSizeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionGlowSize] = notify;
}

int groupGetGlowType (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return os->opt[GroupScreenOptionGlowType].value.i;
}

CompOption * groupGetGlowTypeOption (CompScreen *s)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[GroupScreenOptionGlowType];
}

void groupSetGlowTypeNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
{
    GROUP_OPTIONS_SCREEN(s);
    os->notify[GroupScreenOptionGlowType] = notify;
}

CompOption * groupGetDisplayOption (CompDisplay *d, GroupDisplayOptions num)
{
    GROUP_OPTIONS_DISPLAY(d);
    return &od->opt[num];
}

CompOption * groupGetScreenOption (CompScreen *s, GroupScreenOptions num)
{
    GROUP_OPTIONS_SCREEN(s);
    return &os->opt[num];
}

static const CompMetadataOptionInfo groupOptionsDisplayOptionInfo[] = {
    { "select", "action", 0, 0, 0 },
    { "select_single", "action", 0, 0, 0 },
    { "group", "action", 0, 0, 0 },
    { "ungroup", "action", 0, 0, 0 },
    { "remove", "action", 0, 0, 0 },
    { "close", "action", 0, 0, 0 },
    { "ignore", "action", 0, 0, 0 },
    { "tabmode", "action", 0, 0, 0 },
    { "change_tab_left", "action", 0, 0, 0 },
    { "change_tab_right", "action", 0, 0, 0 },
    { "change_color", "action", 0, 0, 0 },
};

static Bool groupOptionsSetDisplayOption (CompPlugin *plugin, CompDisplay *d, char *name, CompOptionValue *value)
{
    GROUP_OPTIONS_DISPLAY(d);
    CompOption *o;
    int        index;

    o = compFindOption (od->opt, GroupDisplayOptionNum, name, &index);

    if (!o)
        return FALSE;

    switch (index)
    {
     case GroupDisplayOptionSelect:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionSelect])
                (*od->notify[GroupDisplayOptionSelect]) (d, o, GroupDisplayOptionSelect);
            return TRUE;
        }
        break;
     case GroupDisplayOptionSelectSingle:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionSelectSingle])
                (*od->notify[GroupDisplayOptionSelectSingle]) (d, o, GroupDisplayOptionSelectSingle);
            return TRUE;
        }
        break;
     case GroupDisplayOptionGroup:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionGroup])
                (*od->notify[GroupDisplayOptionGroup]) (d, o, GroupDisplayOptionGroup);
            return TRUE;
        }
        break;
     case GroupDisplayOptionUngroup:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionUngroup])
                (*od->notify[GroupDisplayOptionUngroup]) (d, o, GroupDisplayOptionUngroup);
            return TRUE;
        }
        break;
     case GroupDisplayOptionRemove:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionRemove])
                (*od->notify[GroupDisplayOptionRemove]) (d, o, GroupDisplayOptionRemove);
            return TRUE;
        }
        break;
     case GroupDisplayOptionClose:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionClose])
                (*od->notify[GroupDisplayOptionClose]) (d, o, GroupDisplayOptionClose);
            return TRUE;
        }
        break;
     case GroupDisplayOptionIgnore:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionIgnore])
                (*od->notify[GroupDisplayOptionIgnore]) (d, o, GroupDisplayOptionIgnore);
            return TRUE;
        }
        break;
     case GroupDisplayOptionTabmode:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionTabmode])
                (*od->notify[GroupDisplayOptionTabmode]) (d, o, GroupDisplayOptionTabmode);
            return TRUE;
        }
        break;
     case GroupDisplayOptionChangeTabLeft:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionChangeTabLeft])
                (*od->notify[GroupDisplayOptionChangeTabLeft]) (d, o, GroupDisplayOptionChangeTabLeft);
            return TRUE;
        }
        break;
     case GroupDisplayOptionChangeTabRight:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionChangeTabRight])
                (*od->notify[GroupDisplayOptionChangeTabRight]) (d, o, GroupDisplayOptionChangeTabRight);
            return TRUE;
        }
        break;
     case GroupDisplayOptionChangeColor:
        if (compSetDisplayOption (d, o, value))
        {
            if (od->notify[GroupDisplayOptionChangeColor])
                (*od->notify[GroupDisplayOptionChangeColor]) (d, o, GroupDisplayOptionChangeColor);
            return TRUE;
        }
        break;
    default:
        break;
    }
    return FALSE;
}

static CompOption * groupOptionsGetDisplayOptions (CompPlugin *plugin, CompDisplay *d, int *count)
{
    GROUP_OPTIONS_DISPLAY(d);
    *count = GroupDisplayOptionNum;
    return od->opt;
}

static const CompMetadataOptionInfo groupOptionsScreenOptionInfo[] = {
    { "move_all", "bool", 0, 0, 0 },
    { "resize_all", "bool", 0, 0, 0 },
    { "raise_all", "bool", 0, 0, 0 },
    { "maximize_unmaximize_all", "bool", 0, 0, 0 },
    { "minimize_all", "bool", 0, 0, 0 },
    { "shade_all", "bool", 0, 0, 0 },
    { "auto_group", "bool", 0, 0, 0 },
    { "auto_ungroup", "bool", 0, 0, 0 },
    { "window_match", "match", 0, 0, 0 },
    { "select_opacity", "int", "<min>0</min><max>100</max>", 0, 0 },
    { "select_saturation", "int", "<min>0</min><max>100</max>", 0, 0 },
    { "select_brightness", "int", "<min>0</min><max>100</max>", 0, 0 },
    { "select_precision", "int", "<min>1</min><max>100</max>", 0, 0 },
    { "fill_color", "color", 0, 0, 0 },
    { "line_color", "color", 0, 0, 0 },
    { "mipmaps", "bool", 0, 0, 0 },
    { "untab_on_close", "bool", 0, 0, 0 },
    { "autotab_create", "bool", 0, 0, 0 },
    { "tabbar_show_delay", "float", "<min>0.0</min><max>10.0</max>", 0, 0 },
    { "tabbing_speed", "float", "<min>0.1</min><max>50.0</max>", 0, 0 },
    { "tabbing_timestep", "float", "<min>0.1</min><max>50.0</max>", 0, 0 },
    { "fade_time", "float", "<min>0.0</min><max>5.0</max>", 0, 0 },
    { "pulse_time", "float", "<min>0.0</min><max>5.0</max>", 0, 0 },
    { "reflex_time", "float", "<min>0.0</min><max>5.0</max>", 0, 0 },
    { "fade_text_time", "float", "<min>0.0</min><max>5.0</max>", 0, 0 },
    { "visibility_time", "float", "<min>0.0</min><max>10.0</max>", 0, 0 },
    { "change_animation_time", "float", "<min>0.0</min><max>5.0</max>", 0, 0 },
    { "bar_animations", "bool", 0, 0, 0 },
    { "thumb_size", "int", "<min>16</min><max>256</max>", 0, 0 },
    { "thumb_space", "int", "<min>1</min><max>20</max>", 0, 0 },
    { "border_radius", "int", "<min>1</min><max>20</max>", 0, 0 },
    { "border_width", "int", "<min>1</min><max>5</max>", 0, 0 },
    { "tab_base_color", "color", 0, 0, 0 },
    { "tab_border_color", "color", 0, 0, 0 },
    { "tab_highlight_color", "color", 0, 0, 0 },
    { "tab_style", "int", "<min>0</min><max>4</max>", 0, 0 },
    { "tabbar_font_size", "int", "<min>6</min><max>24</max>", 0, 0 },
    { "tabbar_font_color", "color", 0, 0, 0 },
    { "spring_model_on_move", "bool", 0, 0, 0 },
    { "dnd_ungroup_window", "bool", 0, 0, 0 },
    { "drag_hover_time", "float", "<min>0.0</min><max>5.0</max>", 0, 0 },
    { "drag_spring_k", "float", "<min>0.1</min><max>30.0</max>", 0, 0 },
    { "drag_friction", "float", "<min>0.1</min><max>100.0</max>", 0, 0 },
    { "drag_y_distance", "int", "<min>10</min><max>2500</max>", 0, 0 },
    { "drag_speed_limit", "int", "<min>0</min><max>2000</max>", 0, 0 },
    { "glow", "bool", 0, 0, 0 },
    { "glow_size", "int", "<min>1</min><max>300</max>", 0, 0 },
    { "glow_type", "int", "<min>0</min><max>1</max>", 0, 0 },
};

static Bool groupOptionsSetScreenOption (CompPlugin *plugin, CompScreen *s, char *name, CompOptionValue *value)
{
    GROUP_OPTIONS_SCREEN(s);
    CompOption *o;
    int        index;

    o = compFindOption (os->opt, GroupScreenOptionNum, name, &index);

    if (!o)
        return FALSE;

    switch (index)
    {
     case GroupScreenOptionMoveAll:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionMoveAll])
                (*os->notify[GroupScreenOptionMoveAll]) (s, o, GroupScreenOptionMoveAll);
            return TRUE;
        }
        break;
     case GroupScreenOptionResizeAll:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionResizeAll])
                (*os->notify[GroupScreenOptionResizeAll]) (s, o, GroupScreenOptionResizeAll);
            return TRUE;
        }
        break;
     case GroupScreenOptionRaiseAll:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionRaiseAll])
                (*os->notify[GroupScreenOptionRaiseAll]) (s, o, GroupScreenOptionRaiseAll);
            return TRUE;
        }
        break;
     case GroupScreenOptionMaximizeUnmaximizeAll:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionMaximizeUnmaximizeAll])
                (*os->notify[GroupScreenOptionMaximizeUnmaximizeAll]) (s, o, GroupScreenOptionMaximizeUnmaximizeAll);
            return TRUE;
        }
        break;
     case GroupScreenOptionMinimizeAll:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionMinimizeAll])
                (*os->notify[GroupScreenOptionMinimizeAll]) (s, o, GroupScreenOptionMinimizeAll);
            return TRUE;
        }
        break;
     case GroupScreenOptionShadeAll:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionShadeAll])
                (*os->notify[GroupScreenOptionShadeAll]) (s, o, GroupScreenOptionShadeAll);
            return TRUE;
        }
        break;
     case GroupScreenOptionAutoGroup:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionAutoGroup])
                (*os->notify[GroupScreenOptionAutoGroup]) (s, o, GroupScreenOptionAutoGroup);
            return TRUE;
        }
        break;
     case GroupScreenOptionAutoUngroup:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionAutoUngroup])
                (*os->notify[GroupScreenOptionAutoUngroup]) (s, o, GroupScreenOptionAutoUngroup);
            return TRUE;
        }
        break;
     case GroupScreenOptionWindowMatch:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionWindowMatch])
                (*os->notify[GroupScreenOptionWindowMatch]) (s, o, GroupScreenOptionWindowMatch);
            return TRUE;
        }
        break;
     case GroupScreenOptionSelectOpacity:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionSelectOpacity])
                (*os->notify[GroupScreenOptionSelectOpacity]) (s, o, GroupScreenOptionSelectOpacity);
            return TRUE;
        }
        break;
     case GroupScreenOptionSelectSaturation:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionSelectSaturation])
                (*os->notify[GroupScreenOptionSelectSaturation]) (s, o, GroupScreenOptionSelectSaturation);
            return TRUE;
        }
        break;
     case GroupScreenOptionSelectBrightness:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionSelectBrightness])
                (*os->notify[GroupScreenOptionSelectBrightness]) (s, o, GroupScreenOptionSelectBrightness);
            return TRUE;
        }
        break;
     case GroupScreenOptionSelectPrecision:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionSelectPrecision])
                (*os->notify[GroupScreenOptionSelectPrecision]) (s, o, GroupScreenOptionSelectPrecision);
            return TRUE;
        }
        break;
     case GroupScreenOptionFillColor:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionFillColor])
                (*os->notify[GroupScreenOptionFillColor]) (s, o, GroupScreenOptionFillColor);
            return TRUE;
        }
        break;
     case GroupScreenOptionLineColor:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionLineColor])
                (*os->notify[GroupScreenOptionLineColor]) (s, o, GroupScreenOptionLineColor);
            return TRUE;
        }
        break;
     case GroupScreenOptionMipmaps:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionMipmaps])
                (*os->notify[GroupScreenOptionMipmaps]) (s, o, GroupScreenOptionMipmaps);
            return TRUE;
        }
        break;
     case GroupScreenOptionUntabOnClose:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionUntabOnClose])
                (*os->notify[GroupScreenOptionUntabOnClose]) (s, o, GroupScreenOptionUntabOnClose);
            return TRUE;
        }
        break;
     case GroupScreenOptionAutotabCreate:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionAutotabCreate])
                (*os->notify[GroupScreenOptionAutotabCreate]) (s, o, GroupScreenOptionAutotabCreate);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabbarShowDelay:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabbarShowDelay])
                (*os->notify[GroupScreenOptionTabbarShowDelay]) (s, o, GroupScreenOptionTabbarShowDelay);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabbingSpeed:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabbingSpeed])
                (*os->notify[GroupScreenOptionTabbingSpeed]) (s, o, GroupScreenOptionTabbingSpeed);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabbingTimestep:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabbingTimestep])
                (*os->notify[GroupScreenOptionTabbingTimestep]) (s, o, GroupScreenOptionTabbingTimestep);
            return TRUE;
        }
        break;
     case GroupScreenOptionFadeTime:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionFadeTime])
                (*os->notify[GroupScreenOptionFadeTime]) (s, o, GroupScreenOptionFadeTime);
            return TRUE;
        }
        break;
     case GroupScreenOptionPulseTime:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionPulseTime])
                (*os->notify[GroupScreenOptionPulseTime]) (s, o, GroupScreenOptionPulseTime);
            return TRUE;
        }
        break;
     case GroupScreenOptionReflexTime:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionReflexTime])
                (*os->notify[GroupScreenOptionReflexTime]) (s, o, GroupScreenOptionReflexTime);
            return TRUE;
        }
        break;
     case GroupScreenOptionFadeTextTime:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionFadeTextTime])
                (*os->notify[GroupScreenOptionFadeTextTime]) (s, o, GroupScreenOptionFadeTextTime);
            return TRUE;
        }
        break;
     case GroupScreenOptionVisibilityTime:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionVisibilityTime])
                (*os->notify[GroupScreenOptionVisibilityTime]) (s, o, GroupScreenOptionVisibilityTime);
            return TRUE;
        }
        break;
     case GroupScreenOptionChangeAnimationTime:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionChangeAnimationTime])
                (*os->notify[GroupScreenOptionChangeAnimationTime]) (s, o, GroupScreenOptionChangeAnimationTime);
            return TRUE;
        }
        break;
     case GroupScreenOptionBarAnimations:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionBarAnimations])
                (*os->notify[GroupScreenOptionBarAnimations]) (s, o, GroupScreenOptionBarAnimations);
            return TRUE;
        }
        break;
     case GroupScreenOptionThumbSize:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionThumbSize])
                (*os->notify[GroupScreenOptionThumbSize]) (s, o, GroupScreenOptionThumbSize);
            return TRUE;
        }
        break;
     case GroupScreenOptionThumbSpace:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionThumbSpace])
                (*os->notify[GroupScreenOptionThumbSpace]) (s, o, GroupScreenOptionThumbSpace);
            return TRUE;
        }
        break;
     case GroupScreenOptionBorderRadius:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionBorderRadius])
                (*os->notify[GroupScreenOptionBorderRadius]) (s, o, GroupScreenOptionBorderRadius);
            return TRUE;
        }
        break;
     case GroupScreenOptionBorderWidth:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionBorderWidth])
                (*os->notify[GroupScreenOptionBorderWidth]) (s, o, GroupScreenOptionBorderWidth);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabBaseColor:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabBaseColor])
                (*os->notify[GroupScreenOptionTabBaseColor]) (s, o, GroupScreenOptionTabBaseColor);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabBorderColor:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabBorderColor])
                (*os->notify[GroupScreenOptionTabBorderColor]) (s, o, GroupScreenOptionTabBorderColor);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabHighlightColor:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabHighlightColor])
                (*os->notify[GroupScreenOptionTabHighlightColor]) (s, o, GroupScreenOptionTabHighlightColor);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabStyle:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabStyle])
                (*os->notify[GroupScreenOptionTabStyle]) (s, o, GroupScreenOptionTabStyle);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabbarFontSize:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabbarFontSize])
                (*os->notify[GroupScreenOptionTabbarFontSize]) (s, o, GroupScreenOptionTabbarFontSize);
            return TRUE;
        }
        break;
     case GroupScreenOptionTabbarFontColor:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionTabbarFontColor])
                (*os->notify[GroupScreenOptionTabbarFontColor]) (s, o, GroupScreenOptionTabbarFontColor);
            return TRUE;
        }
        break;
     case GroupScreenOptionSpringModelOnMove:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionSpringModelOnMove])
                (*os->notify[GroupScreenOptionSpringModelOnMove]) (s, o, GroupScreenOptionSpringModelOnMove);
            return TRUE;
        }
        break;
     case GroupScreenOptionDndUngroupWindow:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionDndUngroupWindow])
                (*os->notify[GroupScreenOptionDndUngroupWindow]) (s, o, GroupScreenOptionDndUngroupWindow);
            return TRUE;
        }
        break;
     case GroupScreenOptionDragHoverTime:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionDragHoverTime])
                (*os->notify[GroupScreenOptionDragHoverTime]) (s, o, GroupScreenOptionDragHoverTime);
            return TRUE;
        }
        break;
     case GroupScreenOptionDragSpringK:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionDragSpringK])
                (*os->notify[GroupScreenOptionDragSpringK]) (s, o, GroupScreenOptionDragSpringK);
            return TRUE;
        }
        break;
     case GroupScreenOptionDragFriction:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionDragFriction])
                (*os->notify[GroupScreenOptionDragFriction]) (s, o, GroupScreenOptionDragFriction);
            return TRUE;
        }
        break;
     case GroupScreenOptionDragYDistance:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionDragYDistance])
                (*os->notify[GroupScreenOptionDragYDistance]) (s, o, GroupScreenOptionDragYDistance);
            return TRUE;
        }
        break;
     case GroupScreenOptionDragSpeedLimit:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionDragSpeedLimit])
                (*os->notify[GroupScreenOptionDragSpeedLimit]) (s, o, GroupScreenOptionDragSpeedLimit);
            return TRUE;
        }
        break;
     case GroupScreenOptionGlow:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionGlow])
                (*os->notify[GroupScreenOptionGlow]) (s, o, GroupScreenOptionGlow);
            return TRUE;
        }
        break;
     case GroupScreenOptionGlowSize:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionGlowSize])
                (*os->notify[GroupScreenOptionGlowSize]) (s, o, GroupScreenOptionGlowSize);
            return TRUE;
        }
        break;
     case GroupScreenOptionGlowType:
        if (compSetScreenOption (s, o, value))
        {
            if (os->notify[GroupScreenOptionGlowType])
                (*os->notify[GroupScreenOptionGlowType]) (s, o, GroupScreenOptionGlowType);
            return TRUE;
        }
        break;
    default:
        break;
    }
    return FALSE;
}

static CompOption * groupOptionsGetScreenOptions (CompPlugin *plugin, CompScreen *s, int *count)
{
    GROUP_OPTIONS_SCREEN(s);
    *count = GroupScreenOptionNum;
    return os->opt;
}

static Bool groupOptionsInitScreen (CompPlugin *p, CompScreen *s)
{
    GroupOptionsScreen *os;
    
    GROUP_OPTIONS_DISPLAY (s->display);

    os = calloc (1, sizeof(GroupOptionsScreen));
    if (!os)
        return FALSE;

    s->privates[od->screenPrivateIndex].ptr = os;

    if (!compInitScreenOptionsFromMetadata (s, &groupOptionsMetadata, groupOptionsScreenOptionInfo, os->opt, GroupScreenOptionNum))
    {
        free (os);
        return FALSE;
    }
    if (groupPluginVTable && groupPluginVTable->initScreen)
        return groupPluginVTable->initScreen (p, s);
    return TRUE;
}

static void groupOptionsFiniScreen (CompPlugin *p, CompScreen *s)
{
    if (groupPluginVTable && groupPluginVTable->finiScreen)
        return groupPluginVTable->finiScreen (p, s);

    GROUP_OPTIONS_SCREEN (s);


    compFiniScreenOptions (s, os->opt, GroupScreenOptionNum);

    free (os);
}

static Bool groupOptionsInitDisplay (CompPlugin *p, CompDisplay *d)
{
    GroupOptionsDisplay *od;
   
    
    od = calloc (1, sizeof(GroupOptionsDisplay));
    if (!od)
        return FALSE;

    od->screenPrivateIndex = allocateScreenPrivateIndex(d);
    if (od->screenPrivateIndex < 0)
    {
        free(od);
        return FALSE;
    }

    d->privates[displayPrivateIndex].ptr = od;

    if (!compInitDisplayOptionsFromMetadata (d, &groupOptionsMetadata, groupOptionsDisplayOptionInfo, od->opt, GroupDisplayOptionNum))
    {
        free (od);
        return FALSE;
    }
    if (groupPluginVTable && groupPluginVTable->initDisplay)
        return groupPluginVTable->initDisplay (p, d);
    return TRUE;
}

static void groupOptionsFiniDisplay (CompPlugin *p, CompDisplay *d)
{
    if (groupPluginVTable && groupPluginVTable->finiDisplay)
        return groupPluginVTable->finiDisplay (p, d);

    GROUP_OPTIONS_DISPLAY (d);

    freeScreenPrivateIndex(d, od->screenPrivateIndex);

    compFiniDisplayOptions (d, od->opt, GroupDisplayOptionNum);

    free (od);
}

static Bool groupOptionsInit (CompPlugin *p)
{
    displayPrivateIndex = allocateDisplayPrivateIndex();
    if (displayPrivateIndex < 0)
        return FALSE;

    if (!compInitPluginMetadataFromInfo (&groupOptionsMetadata, "group",groupOptionsDisplayOptionInfo, GroupDisplayOptionNum, groupOptionsScreenOptionInfo, GroupScreenOptionNum))
        return FALSE;

    compAddMetadataFromFile (&groupOptionsMetadata, "group");
    if (groupPluginVTable && groupPluginVTable->init)
        return groupPluginVTable->init (p);
    return TRUE;
}

static void groupOptionsFini (CompPlugin *p)
{
    if (groupPluginVTable && groupPluginVTable->fini)
        return groupPluginVTable->fini (p);

    if (displayPrivateIndex >= 0)
        freeDisplayPrivateIndex(displayPrivateIndex);

    compFiniMetadata (&groupOptionsMetadata);
}

static CompMetadata *
groupOptionsGetMetadata (CompPlugin *plugin)
{
    return &groupOptionsMetadata;
}

CompPluginVTable *getCompPluginInfo (void)
{
    if (!groupPluginVTable)
    {
        groupPluginVTable = groupOptionsGetCompPluginInfo ();
        memcpy(&groupOptionsVTable, groupPluginVTable, sizeof(CompPluginVTable));
        groupOptionsVTable.getMetadata = groupOptionsGetMetadata;
        groupOptionsVTable.init = groupOptionsInit;
        groupOptionsVTable.fini = groupOptionsFini;
        groupOptionsVTable.initDisplay = groupOptionsInitDisplay;
        groupOptionsVTable.finiDisplay = groupOptionsFiniDisplay;
        groupOptionsVTable.initScreen = groupOptionsInitScreen;
        groupOptionsVTable.finiScreen = groupOptionsFiniScreen;
        groupOptionsVTable.getDisplayOptions = groupOptionsGetDisplayOptions;
	groupOptionsVTable.setDisplayOption = groupOptionsSetDisplayOption;
	groupOptionsVTable.getScreenOptions = groupOptionsGetScreenOptions;
	groupOptionsVTable.setScreenOption = groupOptionsSetScreenOption;
	
    }
    return &groupOptionsVTable;
}



syntax highlighted by Code2HTML, v. 0.9.1