[compiz] Plugin Library Interface
Mike Dransfield
mike at blueroot.co.uk
Wed Mar 7 09:50:48 PST 2007
Dennis Kasprzyk wrote:
> Am Mittwoch, 7. März 2007 16:59 schrieb Mike Dransfield:
>
>> Danny Baumann wrote:
>>
>>>> What are the major pros/cons of using this method over plain old
>>>> libraries?
>>>>
>>> They plug into the normal plugin infrastructure and don't add the need
>>> for plugin writers to mess around with dlopen(), dlsym() and such.
>>> Basically, they work like normal libraries and look like a plugin. A
>>> large advantage is that every plugin gets a notify whenever a library
>>> plugin is loaded or unloaded.
>>>
>> The amount of code in the text library is very small and
>> seems like it would do just as well as a normal c library.
>>
>> Other than being notified when it is added or removed I
>> don't see how it is beneficial. Using a library would mean
>> that the functionality could always be guaranteed.
>>
>>
>
> The idea behind this is, that no new dependencies are needed in a plugin, if
> you use this system. Currently text depends on cairo and pango, but each
> plugin that uses the library interface does not need to depend on it. If the
> text plugin is not available the text is simply not rendered. There could
> also be another text plugin that uses qt to render the text.
>
This would make sense if you wanted to add textToPixmap
to core and then use different plugins to wrap it, in the same
way as the image plugins do now. But this is not what you are
proposing. Maybe that could solve your particular text problem
better?
More information about the compiz
mailing list