grim/guifications3
Clone
Summary
Browse
Changes
Graph
include gflib/gf_intl.h since it's no longer included via gf_lib.h
cmake
2010-12-20, Gary Kramlich
1eb207f1d7ef
include gflib/gf_intl.h since it's no longer included via gf_lib.h
/*
* 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_H
#define GF_PLUGIN_H
#define GF_TYPE_PLUGIN (gf_plugin_get_type())
#define GF_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GF_TYPE_PLUGIN, GfPlugin))
#define GF_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GF_TYPE_PLUGIN, GfPluginClass))
#define GF_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GF_TYPE_PLUGIN))
#define GF_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GF_TYPE_PLUGIN))
#define GF_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GF_TYPE_PLUGIN, GfPluginClass))
typedef
struct
_GfPlugin
GfPlugin
;
typedef
struct
_GfPluginClass
GfPluginClass
;
#include
<gflib/gf_enum.h>
#include
<gflib/gf_object.h>
/**
* GfPluginState:
* @GF_PLUGIN_STATE_UNKNOWN: The plugin is in an unknown state.
* @GF_PLUGIN_STATE_ERROR: The plugin is in an error'd state.
* @GF_PLUGIN_STATE_LOADED: The plugin has been loaded.
* @GF_PLUGIN_STATE_LOAD_FAILED: The plugin failed to load.
* @GF_PLUGIN_STATE_NOT_LOADED: The plugin is not loaded.
* @GF_PLUGIN_STATES: The number of plugin states.
*
* The possible states that a plugin can be in.
*/
typedef
enum
{
GF_PLUGIN_STATE_UNKNOWN
=
-1
,
/*< skip >*/
GF_PLUGIN_STATE_ERROR
=
0
,
/*< nick=Error >*/
GF_PLUGIN_STATE_LOADED
,
/*< nick=Loaded >*/
GF_PLUGIN_STATE_LOAD_FAILED
,
/*< nick=Load Failed >*/
GF_PLUGIN_STATE_NOT_LOADED
,
/*< nick=Not Loaded >*/
GF_PLUGIN_STATES
/*< skip >*/
}
GfPluginState
;
/**
* GfPluginFlags:
* @GF_PLUGIN_FLAGS_NONE: The plugin has no flags
* @GF_PLUGIN_FLAGS_PRELOAD: Preload the plugin
*
* Flags that #GfPlugin's may use via #GfPluginInfo
*/
typedef
enum
{
/*< flags >*/
GF_PLUGIN_FLAGS_NONE
=
1
<<
0
,
/*< nick=None >*/
GF_PLUGIN_FLAGS_PRELOAD
=
1
<<
1
,
/*< nick=Preload >*/
}
GfPluginFlags
;
#include
<gflib/gf_plugin_info.h>
/**
* GfPlugin:
*
* The base class used internally to represent plugins.
*/
struct
_GfPlugin
{
/*< private >*/
GfObject
parent
;
};
struct
_GfPluginClass
{
GfObjectClass
parent
;
void
(
*
_gf_reserved1
)(
void
);
void
(
*
_gf_reserved2
)(
void
);
void
(
*
_gf_reserved3
)(
void
);
void
(
*
_gf_reserved4
)(
void
);
};
G_BEGIN_DECLS
GType
gf_plugin_get_type
(
void
);
const
gchar
*
gf_plugin_get_filename
(
const
GfPlugin
*
plugin
);
GfPluginInfo
*
gf_plugin_get_info
(
GfPlugin
*
plugin
);
GfPluginState
gf_plugin_get_state
(
GfPlugin
*
plugin
);
#define gf_plugin_state_from_string(str) \
gf_enum_from_string(GF_TYPE_PLUGIN_STATE, (str))
#define gf_plugin_state_to_string(state, i18n) \
gf_enum_to_string(GF_TYPE_PLUGIN_STATE, (state), (i18n))
G_END_DECLS
#endif
/* GF_PLUGIN_H */