mirror of https://github.com/GNOME/gimp.git
gir: Make use of typedefs for GimpProgressVtable vfuncs
GObject introspection has issues handling random vfuncs (i.e. not part of a GObject). Most of all, it needs to be able to give these a name (so they can be used to cast in some higher level languages for example). As such, give each vfunc in `GimpProgressVtable` a separate typedef.
This commit is contained in:
parent
4729fc8dec
commit
b680945752
|
@ -27,6 +27,62 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GimpProgressVtableStartFunc:
|
||||||
|
* @message:
|
||||||
|
* @cancelable:
|
||||||
|
* @user_data: (closure):
|
||||||
|
*
|
||||||
|
* Starts the progress
|
||||||
|
*/
|
||||||
|
typedef void (* GimpProgressVtableStartFunc) (const gchar *message,
|
||||||
|
gboolean cancelable,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GimpProgressVtableEndFunc:
|
||||||
|
* @user_data: (closure):
|
||||||
|
*
|
||||||
|
* Ends the progress
|
||||||
|
*/
|
||||||
|
typedef void (* GimpProgressVtableEndFunc) (gpointer user_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GimpProgressVtableSetTextFunc:
|
||||||
|
* @message:
|
||||||
|
* @user_data: (closure):
|
||||||
|
*
|
||||||
|
* Sets a new text on the progress.
|
||||||
|
*/
|
||||||
|
typedef void (* GimpProgressVtableSetTextFunc) (const gchar *message,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GimpProgressVtableSetValueFunc:
|
||||||
|
* @percentage:
|
||||||
|
* @user_data: (closure):
|
||||||
|
*
|
||||||
|
* Sets a new percentage on the progress.
|
||||||
|
*/
|
||||||
|
typedef void (* GimpProgressVtableSetValueFunc) (gdouble percentage,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GimpProgressVtablePulseFunc:
|
||||||
|
* @user_data: (closure):
|
||||||
|
*
|
||||||
|
* Makes the progress pulse
|
||||||
|
*/
|
||||||
|
typedef void (* GimpProgressVtablePulseFunc) (gpointer user_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GimpProgressVtableGetWindowFunc:
|
||||||
|
* @user_data: (closure):
|
||||||
|
*
|
||||||
|
* Returns: the ID of the window where the progress is displayed.
|
||||||
|
*/
|
||||||
|
typedef guint32 (* GimpProgressVtableGetWindowFunc) (gpointer user_data);
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpProgressVtable GimpProgressVtable;
|
typedef struct _GimpProgressVtable GimpProgressVtable;
|
||||||
|
|
||||||
|
@ -49,17 +105,12 @@ typedef struct _GimpProgressVtable GimpProgressVtable;
|
||||||
**/
|
**/
|
||||||
struct _GimpProgressVtable
|
struct _GimpProgressVtable
|
||||||
{
|
{
|
||||||
void (* start) (const gchar *message,
|
GimpProgressVtableStartFunc start;
|
||||||
gboolean cancelable,
|
GimpProgressVtableEndFunc end;
|
||||||
gpointer user_data);
|
GimpProgressVtableSetTextFunc set_text;
|
||||||
void (* end) (gpointer user_data);
|
GimpProgressVtableSetValueFunc set_value;
|
||||||
void (* set_text) (const gchar *message,
|
GimpProgressVtablePulseFunc pulse;
|
||||||
gpointer user_data);
|
GimpProgressVtableGetWindowFunc get_window;
|
||||||
void (* set_value) (gdouble percentage,
|
|
||||||
gpointer user_data);
|
|
||||||
void (* pulse) (gpointer user_data);
|
|
||||||
|
|
||||||
guint32 (* get_window) (gpointer user_data);
|
|
||||||
|
|
||||||
/* Padding for future expansion. Must be initialized with NULL! */
|
/* Padding for future expansion. Must be initialized with NULL! */
|
||||||
void (* _gimp_reserved1) (void);
|
void (* _gimp_reserved1) (void);
|
||||||
|
|
Loading…
Reference in New Issue