Ranges are allowed to be any integral type or a double, and `GVariant` doesn't
allow accessing an integer from a differently-sized integer, so we need tests
for all versions.
Testing Done:
Opened plugin viewer and confirmed that all settings were added.
Reviewed at https://reviews.imfreedom.org/r/2152/
Title: Vala Plugin Example
Slug: vala
## Vala Plugins
> You **MUST** have the Vala bindings installed on your system for this to
> work. They are built by the default GPlugin build.
### Example Vala Plugin
Due to the way `GPlugin.PluginInfo` info works, you must subclass it and set
your values in the new constructor. It is recommended that you define this
class in a namespace to avoid collisions with other plugins.
Like all plugins in GPlugin, Vala plugins must also implement the
`gplugin_query`, `gplugin_load`, and `gplugin_unload` functions. These
functions must be in the global namespace.
The following is a basic Vala plugin.
```vala
usingGPlugin;
namespaceBasicPlugin{
/* You need to create a class for your plugin info. This is pretty simple as you
* can see in the example below.
*/
publicclassInfo:GPlugin.PluginInfo{
publicInfo(){
string[]authors={"author1"};
Object(
id:"gplugin/vala-basic-plugin",
abi_version:0x01020304,
name:"basic plugin",
authors:authors,
category:"test",
version:"version",
license_id:"license",
summary:"summary",
website:"website",
description:"description"
);
}
}
}
/* gplugin_query is called when searching for plugins. The function should
* return an instance of the PluginInfo class you created above. If something
* went wrong, you can set error with an error message.