grim/guifications3
Clone
Summary
Browse
Changes
Graph
moved gflib-gtk to the new cmake module
cmake
2010-12-15, Gary Kramlich
b6418db658c1
moved gflib-gtk to the new cmake module
/*
* Guifications - The end-all, be-all notification framework
* Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GF_PLUGIN_LOADER_H
#define GF_PLUGIN_LOADER_H
#define GF_TYPE_PLUGIN_LOADER (gf_plugin_loader_get_type())
#define GF_PLUGIN_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GF_TYPE_PLUGIN_LOADER, GfPluginLoader))
#define GF_IS_PLUGIN_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GF_TYPE_PLUGIN_LOADER))
#define GF_PLUGIN_LOADER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GF_TYPE_PLUGIN_LOADER, GfPluginLoaderIface))
typedef
struct
_GfPluginLoader
GfPluginLoader
;
typedef
struct
_GfPluginLoaderIface
GfPluginLoaderIface
;
#include
<gflib/gf_object.h>
#include
<gflib/gf_plugin.h>
/**
* GfPluginLoaderIface:
* @supported_extensions: A function that returns a #GList of supported extensions.
* @query: A function that will query the plugin at the given filename.
* @load: A function that will load plugin at the given filename.
* @unload: A function that will unload the given plugin.
*
* An interface to be implemented by objects that want to load plugins.
*/
struct
_GfPluginLoaderIface
{
/*< private >*/
GTypeInterface
gparent
;
/*< public >*/
GList
*
(
*
supported_extensions
)(
GfPluginLoader
*
loader
);
GfPluginInfo
*
(
*
query
)(
GfPluginLoader
*
loader
,
const
gchar
*
filename
,
GError
**
error
);
GfPlugin
*
(
*
load
)(
GfPluginLoader
*
loader
,
const
gchar
*
filename
,
GError
**
error
);
gboolean
(
*
unload
)(
GfPluginLoader
*
loader
,
GfPlugin
*
plugin
,
GError
**
error
);
/*< private >*/
void
(
*
_gf_reserved_1
)(
void
);
void
(
*
_gf_reserved_2
)(
void
);
void
(
*
_gf_reserved_3
)(
void
);
void
(
*
_gf_reserved_4
)(
void
);
};
G_BEGIN_DECLS
GType
gf_plugin_loader_get_type
(
void
);
GList
*
gf_plugin_loader_get_supported_extensions
(
GfPluginLoader
*
loader
);
GfPluginInfo
*
gf_plugin_loader_query_plugin
(
GfPluginLoader
*
loader
,
const
gchar
*
filename
,
GError
**
error
);
GfPlugin
*
gf_plugin_loader_load_plugin
(
GfPluginLoader
*
loader
,
const
gchar
*
filename
,
GError
**
error
);
gboolean
gf_plugin_loader_unload_plugin
(
GfPluginLoader
*
loader
,
GfPlugin
*
plugin
,
GError
**
error
);
G_END_DECLS
#endif
/* GF_PLUGIN_LOADER_H */