Example #1
0
File: fuse.c Project: zmike/compiz
static Bool
fuseInit(CompPlugin *p)
{
   if (!compInitPluginMetadataFromInfo(&fuseMetadata,
                                       p->vTable->name,
                                       fuseDisplayOptionInfo,
                                       FUSE_DISPLAY_OPTION_NUM,
                                       0, 0))
     return FALSE;

   inodes = fuseAddInode(NULL, FUSE_INODE_TYPE_ROOT, ".");
   if (!inodes)
     {
        compFiniMetadata(&fuseMetadata);
        return FALSE;
     }

   displayPrivateIndex = allocateDisplayPrivateIndex();
   if (displayPrivateIndex < 0)
     {
        fuseRemoveInode(NULL, inodes);
        compFiniMetadata(&fuseMetadata);
        return FALSE;
     }

   compAddMetadataFromFile(&fuseMetadata, p->vTable->name);

   return TRUE;
}
Example #2
0
static Bool
kconfigInit (CompPlugin *p)
{
    if (!compInitPluginMetadataFromInfo (&kconfigMetadata, p->vTable->name,
					 0, 0, 0, 0))
	return FALSE;

    corePrivateIndex = allocateCorePrivateIndex ();
    if (corePrivateIndex < 0)
    {
	compFiniMetadata (&kconfigMetadata);
	return FALSE;
    }

    kInstance = new KInstance ("compiz-kconfig");
    if (!kInstance)
    {
	freeCorePrivateIndex (corePrivateIndex);
	compFiniMetadata (&kconfigMetadata);
	return FALSE;
    }

    compAddMetadataFromFile (&kconfigMetadata, p->vTable->name);

    return TRUE;
}
static Bool
textInit (CompPlugin *p)
{
    if (!compInitPluginMetadataFromInfo (&textMetadata,
					 p->vTable->name,
					 textDisplayOptionInfo,
					 TEXT_DISPLAY_OPTION_NUM,
					 NULL, 0))
	return FALSE;

    displayPrivateIndex = allocateDisplayPrivateIndex ();
    if (displayPrivateIndex < 0)
    {
	compFiniMetadata (&textMetadata);
	return FALSE;
    }

    functionsPrivateIndex = allocateDisplayPrivateIndex ();
    if (functionsPrivateIndex < 0)
    {
	freeDisplayPrivateIndex (displayPrivateIndex);
	compFiniMetadata (&textMetadata);
	return FALSE;
    }

    compAddMetadataFromFile (&textMetadata, p->vTable->name);

    return TRUE;
}
Example #4
0
static Bool
svgInit (CompPlugin *p)
{
    if (!compInitPluginMetadataFromInfo (&svgMetadata,
					 p->vTable->name,
					 svgDisplayOptionInfo,
					 SVG_DISPLAY_OPTION_NUM,
					 0, 0))
	return FALSE;

    displayPrivateIndex = allocateDisplayPrivateIndex ();
    if (displayPrivateIndex < 0)
    {
	compFiniMetadata (&svgMetadata);
	return FALSE;
    }

#if !LIBRSVG_CHECK_VERSION (2, 36, 0)
    rsvg_init ();
#endif

    compAddMetadataFromFile (&svgMetadata, p->vTable->name);

    return TRUE;
}
Example #5
0
static Bool waterInit(CompPlugin * p)
{
	if (!compInitPluginMetadataFromInfo(&waterMetadata,
					    p->vTable->name,
					    waterDisplayOptionInfo,
					    WATER_DISPLAY_OPTION_NUM, 0, 0))
		return FALSE;

	displayPrivateIndex = allocateDisplayPrivateIndex();
	if (displayPrivateIndex < 0) {
		compFiniMetadata(&waterMetadata);
		return FALSE;
	}

	compAddMetadataFromFile(&waterMetadata, p->vTable->name);

	return TRUE;
}
static Bool
pngInit (CompPlugin *p)
{
    if (!compInitPluginMetadataFromInfo (&pngMetadata, p->vTable->name,
					 0, 0, 0, 0))
	return FALSE;

    displayPrivateIndex = allocateDisplayPrivateIndex ();
    if (displayPrivateIndex < 0)
    {
	compFiniMetadata (&pngMetadata);
	return FALSE;
    }

    compAddMetadataFromFile (&pngMetadata, p->vTable->name);

    return TRUE;
}
static Bool
ccpInit (CompPlugin *p)
{
    if (!compInitPluginMetadataFromInfo (&ccpMetadata, p->vTable->name,
					 0, 0, 0, 0))
	return FALSE;

    corePrivateIndex = allocateCorePrivateIndex ();
    if (corePrivateIndex < 0)
    {
	compFiniMetadata (&ccpMetadata);
	return FALSE;
    }

    compAddMetadataFromFile (&ccpMetadata, p->vTable->name);

    return TRUE;
}
Example #8
0
static Bool minInit(CompPlugin * p)
{
	if (!compInitPluginMetadataFromInfo(&minMetadata,
					    p->vTable->name, 0, 0,
					    minScreenOptionInfo,
					    MIN_SCREEN_OPTION_NUM))
		return FALSE;

	displayPrivateIndex = allocateDisplayPrivateIndex();
	if (displayPrivateIndex < 0) {
		compFiniMetadata(&minMetadata);
		return FALSE;
	}

	compAddMetadataFromFile(&minMetadata, p->vTable->name);

	return TRUE;
}
Example #9
0
static Bool
commandsInit(CompPlugin *p)
{
   if (!compInitPluginMetadataFromInfo(&commandsMetadata,
                                       p->vTable->name,
                                       commandsDisplayOptionInfo,
                                       COMMANDS_DISPLAY_OPTION_NUM, 0, 0))
     return FALSE;

   displayPrivateIndex = allocateDisplayPrivateIndex();
   if (displayPrivateIndex < 0)
     {
        compFiniMetadata(&commandsMetadata);
        return FALSE;
     }

   compAddMetadataFromFile(&commandsMetadata, p->vTable->name);

   return TRUE;
}
static int
sessionInit (CompPlugin *p)
{
    if (!compInitPluginMetadataFromInfo (&sessionMetadata, p->vTable->name,
					 sessionDisplayOptionInfo,
					 SESSION_DISPLAY_OPTION_NUM,
					 0, 0))
	return FALSE;

    corePrivateIndex = allocateCorePrivateIndex ();
    if (corePrivateIndex < 0)
    {
	compFiniMetadata (&sessionMetadata);
	return FALSE;
    }

    compAddMetadataFromFile (&sessionMetadata, p->vTable->name);

    return TRUE;
}
Example #11
0
static Bool
decorInit (CompPlugin *p)
{
    if (!compInitPluginMetadataFromInfo (&decorMetadata,
					 p->vTable->name,
					 decorDisplayOptionInfo,
					 DECOR_DISPLAY_OPTION_NUM,
					 0, 0))
	return FALSE;

    corePrivateIndex = allocateCorePrivateIndex ();
    if (corePrivateIndex < 0)
    {
	compFiniMetadata (&decorMetadata);
	return FALSE;
    }

    compAddMetadataFromFile (&decorMetadata, p->vTable->name);

    return TRUE;
}
Example #12
0
File: zoom.c Project: zmike/compiz
static Bool
zoomInit(CompPlugin *p)
{
   if (!compInitPluginMetadataFromInfo(&zoomMetadata,
                                       p->vTable->name,
                                       zoomDisplayOptionInfo,
                                       ZOOM_DISPLAY_OPTION_NUM,
                                       zoomScreenOptionInfo,
                                       ZOOM_SCREEN_OPTION_NUM))
     return FALSE;

   displayPrivateIndex = allocateDisplayPrivateIndex();
   if (displayPrivateIndex < 0)
     {
        compFiniMetadata(&zoomMetadata);
        return FALSE;
     }

   compAddMetadataFromFile(&zoomMetadata, p->vTable->name);

   return TRUE;
}