コード例 #1
0
static Bool
gridInitDisplay (CompPlugin  *p,
		 CompDisplay *d)
{
    if (!checkPluginABI ("core", CORE_ABIVERSION))
	return FALSE;

    gridSetPutCenterKeyInitiate (d, gridCenter);
    gridSetPutLeftKeyInitiate (d, gridLeft);
    gridSetPutRightKeyInitiate (d, gridRight);
    gridSetPutTopKeyInitiate (d, gridTop);
    gridSetPutBottomKeyInitiate (d, gridBottom);
    gridSetPutTopleftKeyInitiate (d, gridTopLeft);
    gridSetPutToprightKeyInitiate (d, gridTopRight);
    gridSetPutBottomleftKeyInitiate (d, gridBottomLeft);
    gridSetPutBottomrightKeyInitiate (d, gridBottomRight);

    return TRUE;
}
コード例 #2
0
static Bool
gridInitDisplay (CompPlugin  *p,
                 CompDisplay *d)
{
    GridDisplay *gd;

    if (!checkPluginABI ("core", CORE_ABIVERSION))
        return FALSE;

    gridSetPutCenterKeyInitiate (d, gridCenter);
    gridSetPutLeftKeyInitiate (d, gridLeft);
    gridSetPutRightKeyInitiate (d, gridRight);
    gridSetPutTopKeyInitiate (d, gridTop);
    gridSetPutBottomKeyInitiate (d, gridBottom);
    gridSetPutTopleftKeyInitiate (d, gridTopLeft);
    gridSetPutToprightKeyInitiate (d, gridTopRight);
    gridSetPutBottomleftKeyInitiate (d, gridBottomLeft);
    gridSetPutBottomrightKeyInitiate (d, gridBottomRight);
    gridSetPutMaximizeKeyInitiate (d, gridMaximize);

    gd = malloc (sizeof (GridDisplay));
    if (!gd)
        return FALSE;

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

    WRAP (gd, d, handleEvent, gridHandleEvent);

    d->base.privates[displayPrivateIndex].ptr = gd;

    return TRUE;
}