File Explorer

/proc/thread-self/root/usr/share/doc/libpeas

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

0 dirs
3 files
README4.3 KB · 102 lines
Introducing libpeas=================== libpeas is a gobject-based plugins engine, and is targetted at giving everyapplication the chance to assume its own extensibility. It is currently used byseveral Gnome applications like gedit and Totem. It takes its roots in the old gedit plugins engine, and provides an extensive setof features mirroring the desiderata of most of the applications providing anextension framework. Documentation------------------------- Documentation can be found at: - Peas-1.0: https://gnome.pages.gitlab.gnome.org/libpeas/libpeas-1.0/.- GtkPeas-1.0: https://gnome.pages.gitlab.gnome.org/libpeas/libpeas-gtk-1.0/. Multiple extension points------------------------- One of the most frustrating limitations of the Gedit plugins engine was that itonly allows extending a single class, called GeditPlugin. With libpeas, thislimitation vanishes, and the application writer is now able to provide a set ofGInterfaces the plugin writer will be able to implement as his plugin requires. On-demand programming language support-------------------------------------- libpeas comes with a set of supported languages (currently, C, Lua 5.1,Python 2 and Python 3). Those languages are supported through “loaders” whichare loaded on demand. What it means is that you only pay for what you use: ifyou have no Python plugin, the Python interpreter won't be loaded in memory.Of course, the same goes for the C loader. Damn simple to use (or at least we try hard)-------------------------------------------- Adding support for libpeas-enabled plugins in your own application is a matterof minutes. You only have to create an instance of the plugins engine, andcall methods on the implementations of the various extension points. That's it,no clock harmed. A shared library for everyone----------------------------- As I noted earlier, the latest improvements of our beloved development platformmade it possible to create bindings for apps very quickly. And with the Gnome 3announcement, this looked like the perfect timing to make the plugins engineand its latest improvements available to everyone, with a library. Also,hopefully it will reduce code duplication and allow bugs to be fixed at theright place, once and for all, improving the quality of our applications. As a member of the Gnome community and as an offspring of gedit, libpeas alreadyshares most of the Gnome infrastructure and philosophy:     * You can download the first release tarball on the Gnome FTP server.    * You can browse the source and contribute using our git repository.    * You can come and discuss with me and others on #libpeas (GimpNet)    * And you can report bug or propose new features through the good old Gnome      Bugzilla, against the libpeas module. A few hints on using libpeas============================ As always for the new projects, it can take some time to grasp all thesubtleties at first. Plugins versus Extensions------------------------- Something that is going to puzzle most of the newcomers is the fact that thelibpeas API talks about both plugins and extensions, two terms that are usuallyused interchangeably, but who have very different meanings in libpeas. Let's try and give a definition of both of these words in this context: - Plugin: In the context of libpeas, a plugin is a logical package. It's what  you will enable or disable from the UI, and at the end it is what the user  will see. An example of plugin for gedit would be the file browser plugin. - Extension. An extension is an object which implements an interface  associated to an extension point. There can be several extensions in a single  plugin. Examples of extensions provided by the file browser plugin would be  the configuration dialog, the left panel pane and a completion provider for  file names. Sample code----------- The libpeas package contains a sample application called peas-demo, and sampleplugins written in C, Lua and Python. The global idea is this one: you create a new PeasEngine instance and give itthe information needed for it to find your plugins. Then you load some plugins(you can use the PeasGtkPluginManager for that purpose) and perform actionsthrough some PeasExtensions objects you can get from the engine.  Copied from http://log.istique.net/2010/announcing-libpeas