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/
/*
* Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
#include<glib/gi18n-lib.h>
#include<gplugin/gplugin-core.h>
#include<gplugin/gplugin-loader.h>
#include<gplugin/gplugin-manager.h>
#include<gplugin/gplugin-native-plugin.h>
/**
* GPluginNativePlugin:
*
* An instance of a loaded native plugin. A native plugin is a plugin that was
* compiled to machine native code, typically these are written in C/C++.
*/
/**
* GPluginNativePluginQueryFunc:
* @error: A return address for a #GError.
*
* Specifies the function signature for the query function of a plugin.
*
* Returns: (transfer full): A #GPluginPluginInfo instance on success or %NULL
* with @error set on error.
*
* Since: 0.31.0
*/
/**
* GPluginNativePluginLoadFunc:
* @plugin: The #GPluginPlugin instance.
* @error: A return address for a #GError.
*
* Specifies the function signature for the load function of a plugin.
*
* Returns: %TRUE if @plugin was successfully loaded, or %FALSE with @error
* set on failure.
*
* Since: 0.31.0
*/
/**
* GPluginNativePluginUnloadFunc:
* @plugin: The #GPluginPlugin instance.
* @error: A return address for a #GError.
*
* Specifies the function signature for the unload function of a plugin.
*
* Returns: %TRUE if @plugin was successfully unloaded, or %FALSE with @error
* set on failure.
*
* Since: 0.31.0
*/
/* Apparently clang-format also tries to format code in comments.. But in this
* case it makes it really difficult to understand so we disable it.
*/
/* clang-format off */
/**
* GPLUGIN_NATIVE_PLUGIN_DECLARE:
* @name: The prefix of the user defined function names.
*
* This macro expands to the proper functions that #GPluginNativeLoader looks
* for when querying a plugin. They will call user defined functions named