mirror of https://github.com/GNOME/gimp.git
libgmp: reorder GimpPlugIn's query(), init(), quit()
in plug-in lifecycle order.
This commit is contained in:
parent
5f8d0ef27b
commit
1e2efcf95e
|
@ -43,17 +43,6 @@ static void gimp_plug_in_temp_proc_run (GimpPlugIn *plug_in,
|
|||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
_gimp_plug_in_init (GimpPlugIn *plug_in)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
|
||||
|
||||
if (! GIMP_PLUG_IN_GET_CLASS (plug_in)->init_procedures)
|
||||
return;
|
||||
|
||||
gimp_plug_in_register (plug_in, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
_gimp_plug_in_query (GimpPlugIn *plug_in)
|
||||
{
|
||||
|
@ -65,6 +54,17 @@ _gimp_plug_in_query (GimpPlugIn *plug_in)
|
|||
gimp_plug_in_register (plug_in, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
_gimp_plug_in_init (GimpPlugIn *plug_in)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
|
||||
|
||||
if (! GIMP_PLUG_IN_GET_CLASS (plug_in)->init_procedures)
|
||||
return;
|
||||
|
||||
gimp_plug_in_register (plug_in, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
_gimp_plug_in_quit (GimpPlugIn *plug_in)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,8 @@ struct _GimpPlugInPrivate
|
|||
};
|
||||
|
||||
|
||||
void _gimp_plug_in_init (GimpPlugIn *plug_in);
|
||||
void _gimp_plug_in_query (GimpPlugIn *plug_in);
|
||||
void _gimp_plug_in_init (GimpPlugIn *plug_in);
|
||||
void _gimp_plug_in_quit (GimpPlugIn *plug_in);
|
||||
|
||||
gboolean _gimp_plug_in_extension_read (GIOChannel *channel,
|
||||
|
|
|
@ -54,13 +54,23 @@ struct _GimpPlugInClass
|
|||
GObjectClass parent_class;
|
||||
|
||||
/**
|
||||
* GimpPlugInClass::quit:
|
||||
* GimpPlugInClass::query_procedures:
|
||||
* @plug_in: a #GimpPlugIn.
|
||||
* @n_procedures: (out): number of procedures.
|
||||
*
|
||||
* This method can be overridden by a plug-in which needs to perform
|
||||
* some actions upon quitting.
|
||||
* This method can be overridden by all plug-ins to return a newly
|
||||
* allocated array of allocated strings naming the procedures
|
||||
* registered by this plug-in.
|
||||
* This array of strings must be NULL-terminated (i.e. freeable by
|
||||
* g_strfreev()).
|
||||
*
|
||||
* See documentation of init_procedures() for differences.
|
||||
*
|
||||
* Returns: (array length=n_procedures) (transfer full):
|
||||
* the names of the procedures registered by @plug_in.
|
||||
*/
|
||||
void (* quit) (GimpPlugIn *plug_in);
|
||||
gchar ** (* query_procedures) (GimpPlugIn *plug_in,
|
||||
gint *n_procedures);
|
||||
|
||||
/**
|
||||
* GimpPlugInClass::init_procedures:
|
||||
|
@ -87,25 +97,6 @@ struct _GimpPlugInClass
|
|||
*/
|
||||
gchar ** (* init_procedures) (GimpPlugIn *plug_in,
|
||||
gint *n_procedures);
|
||||
/**
|
||||
* GimpPlugInClass::query_procedures:
|
||||
* @plug_in: a #GimpPlugIn.
|
||||
* @n_procedures: (out): number of procedures.
|
||||
*
|
||||
* This method can be overridden by all plug-ins to return a newly
|
||||
* allocated array of allocated strings naming the procedures
|
||||
* registered by this plug-in.
|
||||
* This array of strings must be NULL-terminated (i.e. freeable by
|
||||
* g_strfreev()).
|
||||
*
|
||||
* See documentation of init_procedures() for differences.
|
||||
*
|
||||
* Returns: (array length=n_procedures) (transfer full):
|
||||
* the names of the procedures registered by @plug_in.
|
||||
*/
|
||||
gchar ** (* query_procedures) (GimpPlugIn *plug_in,
|
||||
gint *n_procedures);
|
||||
|
||||
/**
|
||||
* GimpPlugInClass::create_procedure:
|
||||
* @plug_in: a #GimpPlugIn.
|
||||
|
@ -122,6 +113,15 @@ struct _GimpPlugInClass
|
|||
GimpProcedure * (* create_procedure) (GimpPlugIn *plug_in,
|
||||
const gchar *name);
|
||||
|
||||
/**
|
||||
* GimpPlugInClass::quit:
|
||||
* @plug_in: a #GimpPlugIn.
|
||||
*
|
||||
* This method can be overridden by a plug-in which needs to perform
|
||||
* some actions upon quitting.
|
||||
*/
|
||||
void (* quit) (GimpPlugIn *plug_in);
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (* _gimp_reserved1) (void);
|
||||
void (* _gimp_reserved2) (void);
|
||||
|
|
Loading…
Reference in New Issue