mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Do not name callback parameters "user_data"
Calling a callback parameter "user_data" implicitly adds the "closure" attribute in the documentation which is wrong for callbacks.
This commit is contained in:
parent
b24f6ca27d
commit
fc70f2c057
@ -263,7 +263,7 @@ typedef struct _GVolumeMonitor GVolumeMonitor;
|
|||||||
* GAsyncReadyCallback:
|
* GAsyncReadyCallback:
|
||||||
* @source_object: (nullable): the object the asynchronous operation was started with.
|
* @source_object: (nullable): the object the asynchronous operation was started with.
|
||||||
* @res: a #GAsyncResult.
|
* @res: a #GAsyncResult.
|
||||||
* @user_data: user data passed to the callback.
|
* @data: user data passed to the callback.
|
||||||
*
|
*
|
||||||
* Type definition for a function that will be called back when an asynchronous
|
* Type definition for a function that will be called back when an asynchronous
|
||||||
* operation within GIO has been completed. #GAsyncReadyCallback
|
* operation within GIO has been completed. #GAsyncReadyCallback
|
||||||
@ -280,13 +280,13 @@ typedef struct _GVolumeMonitor GVolumeMonitor;
|
|||||||
**/
|
**/
|
||||||
typedef void (*GAsyncReadyCallback) (GObject *source_object,
|
typedef void (*GAsyncReadyCallback) (GObject *source_object,
|
||||||
GAsyncResult *res,
|
GAsyncResult *res,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GFileProgressCallback:
|
* GFileProgressCallback:
|
||||||
* @current_num_bytes: the current number of bytes in the operation.
|
* @current_num_bytes: the current number of bytes in the operation.
|
||||||
* @total_num_bytes: the total number of bytes in the operation.
|
* @total_num_bytes: the total number of bytes in the operation.
|
||||||
* @user_data: user data passed to the callback.
|
* @data: user data passed to the callback.
|
||||||
*
|
*
|
||||||
* When doing file operations that may take a while, such as moving
|
* When doing file operations that may take a while, such as moving
|
||||||
* a file or copying a file, a progress callback is used to pass how
|
* a file or copying a file, a progress callback is used to pass how
|
||||||
@ -294,13 +294,13 @@ typedef void (*GAsyncReadyCallback) (GObject *source_object,
|
|||||||
**/
|
**/
|
||||||
typedef void (*GFileProgressCallback) (goffset current_num_bytes,
|
typedef void (*GFileProgressCallback) (goffset current_num_bytes,
|
||||||
goffset total_num_bytes,
|
goffset total_num_bytes,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GFileReadMoreCallback:
|
* GFileReadMoreCallback:
|
||||||
* @file_contents: the data as currently read.
|
* @file_contents: the data as currently read.
|
||||||
* @file_size: the size of the data currently read.
|
* @file_size: the size of the data currently read.
|
||||||
* @callback_data: (closure): data passed to the callback.
|
* @callback_data: data passed to the callback.
|
||||||
*
|
*
|
||||||
* When loading the partial contents of a file with g_file_load_partial_contents_async(),
|
* When loading the partial contents of a file with g_file_load_partial_contents_async(),
|
||||||
* it may become necessary to determine if any more data from the file should be loaded.
|
* it may become necessary to determine if any more data from the file should be loaded.
|
||||||
@ -319,7 +319,7 @@ typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
|
|||||||
* @current_size: the current cumulative size measurement
|
* @current_size: the current cumulative size measurement
|
||||||
* @num_dirs: the number of directories visited so far
|
* @num_dirs: the number of directories visited so far
|
||||||
* @num_files: the number of non-directory files encountered
|
* @num_files: the number of non-directory files encountered
|
||||||
* @user_data: the data passed to the original request for this callback
|
* @data: the data passed to the original request for this callback
|
||||||
*
|
*
|
||||||
* This callback type is used by g_file_measure_disk_usage() to make
|
* This callback type is used by g_file_measure_disk_usage() to make
|
||||||
* periodic progress reports when measuring the amount of disk spaced
|
* periodic progress reports when measuring the amount of disk spaced
|
||||||
@ -355,13 +355,13 @@ typedef void (* GFileMeasureProgressCallback) (gboolean reporting,
|
|||||||
guint64 current_size,
|
guint64 current_size,
|
||||||
guint64 num_dirs,
|
guint64 num_dirs,
|
||||||
guint64 num_files,
|
guint64 num_files,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GIOSchedulerJobFunc:
|
* GIOSchedulerJobFunc:
|
||||||
* @job: a #GIOSchedulerJob.
|
* @job: a #GIOSchedulerJob.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @user_data: the data to pass to callback function
|
* @data: data passed to the callback function
|
||||||
*
|
*
|
||||||
* I/O Job function.
|
* I/O Job function.
|
||||||
*
|
*
|
||||||
@ -373,7 +373,7 @@ typedef void (* GFileMeasureProgressCallback) (gboolean reporting,
|
|||||||
**/
|
**/
|
||||||
typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job,
|
typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GSimpleAsyncThreadFunc:
|
* GSimpleAsyncThreadFunc:
|
||||||
@ -392,7 +392,7 @@ typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res,
|
|||||||
* GSocketSourceFunc:
|
* GSocketSourceFunc:
|
||||||
* @socket: the #GSocket
|
* @socket: the #GSocket
|
||||||
* @condition: the current condition at the source fired.
|
* @condition: the current condition at the source fired.
|
||||||
* @user_data: data passed in by the user.
|
* @data: data passed in by the user.
|
||||||
*
|
*
|
||||||
* This is the function type of the callback used for the #GSource
|
* This is the function type of the callback used for the #GSource
|
||||||
* returned by g_socket_create_source().
|
* returned by g_socket_create_source().
|
||||||
@ -403,13 +403,13 @@ typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res,
|
|||||||
*/
|
*/
|
||||||
typedef gboolean (*GSocketSourceFunc) (GSocket *socket,
|
typedef gboolean (*GSocketSourceFunc) (GSocket *socket,
|
||||||
GIOCondition condition,
|
GIOCondition condition,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GDatagramBasedSourceFunc:
|
* GDatagramBasedSourceFunc:
|
||||||
* @datagram_based: the #GDatagramBased
|
* @datagram_based: the #GDatagramBased
|
||||||
* @condition: the current condition at the source fired
|
* @condition: the current condition at the source fired
|
||||||
* @user_data: data passed in by the user
|
* @data: data passed in by the user
|
||||||
*
|
*
|
||||||
* This is the function type of the callback used for the #GSource
|
* This is the function type of the callback used for the #GSource
|
||||||
* returned by g_datagram_based_create_source().
|
* returned by g_datagram_based_create_source().
|
||||||
@ -421,7 +421,7 @@ typedef gboolean (*GSocketSourceFunc) (GSocket *socket,
|
|||||||
*/
|
*/
|
||||||
typedef gboolean (*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based,
|
typedef gboolean (*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based,
|
||||||
GIOCondition condition,
|
GIOCondition condition,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GInputVector:
|
* GInputVector:
|
||||||
@ -573,7 +573,7 @@ typedef struct _GDBusNodeInfo GDBusNodeInfo;
|
|||||||
/**
|
/**
|
||||||
* GCancellableSourceFunc:
|
* GCancellableSourceFunc:
|
||||||
* @cancellable: the #GCancellable
|
* @cancellable: the #GCancellable
|
||||||
* @user_data: data passed in by the user.
|
* @data: data passed in by the user.
|
||||||
*
|
*
|
||||||
* This is the function type of the callback used for the #GSource
|
* This is the function type of the callback used for the #GSource
|
||||||
* returned by g_cancellable_source_new().
|
* returned by g_cancellable_source_new().
|
||||||
@ -583,12 +583,12 @@ typedef struct _GDBusNodeInfo GDBusNodeInfo;
|
|||||||
* Since: 2.28
|
* Since: 2.28
|
||||||
*/
|
*/
|
||||||
typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable,
|
typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GPollableSourceFunc:
|
* GPollableSourceFunc:
|
||||||
* @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
|
* @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
|
||||||
* @user_data: data passed in by the user.
|
* @data: data passed in by the user.
|
||||||
*
|
*
|
||||||
* This is the function type of the callback used for the #GSource
|
* This is the function type of the callback used for the #GSource
|
||||||
* returned by g_pollable_input_stream_create_source() and
|
* returned by g_pollable_input_stream_create_source() and
|
||||||
@ -599,7 +599,7 @@ typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable,
|
|||||||
* Since: 2.28
|
* Since: 2.28
|
||||||
*/
|
*/
|
||||||
typedef gboolean (*GPollableSourceFunc) (GObject *pollable_stream,
|
typedef gboolean (*GPollableSourceFunc) (GObject *pollable_stream,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
typedef struct _GDBusInterface GDBusInterface; /* Dummy typedef */
|
typedef struct _GDBusInterface GDBusInterface; /* Dummy typedef */
|
||||||
typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton;
|
typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton;
|
||||||
@ -615,7 +615,7 @@ typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer;
|
|||||||
* @manager: A #GDBusObjectManagerClient.
|
* @manager: A #GDBusObjectManagerClient.
|
||||||
* @object_path: The object path of the remote object.
|
* @object_path: The object path of the remote object.
|
||||||
* @interface_name: (nullable): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
|
* @interface_name: (nullable): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
|
||||||
* @user_data: User data.
|
* @data: data passed in by the user.
|
||||||
*
|
*
|
||||||
* Function signature for a function used to determine the #GType to
|
* Function signature for a function used to determine the #GType to
|
||||||
* use for an interface proxy (if @interface_name is not %NULL) or
|
* use for an interface proxy (if @interface_name is not %NULL) or
|
||||||
@ -634,7 +634,7 @@ typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer;
|
|||||||
typedef GType (*GDBusProxyTypeFunc) (GDBusObjectManagerClient *manager,
|
typedef GType (*GDBusProxyTypeFunc) (GDBusObjectManagerClient *manager,
|
||||||
const gchar *object_path,
|
const gchar *object_path,
|
||||||
const gchar *interface_name,
|
const gchar *interface_name,
|
||||||
gpointer user_data);
|
gpointer data);
|
||||||
|
|
||||||
typedef struct _GTestDBus GTestDBus;
|
typedef struct _GTestDBus GTestDBus;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ typedef enum
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* GSpawnChildSetupFunc:
|
* GSpawnChildSetupFunc:
|
||||||
* @user_data: user data to pass to the function.
|
* @data: user data passed to the function.
|
||||||
*
|
*
|
||||||
* Specifies the type of the setup function passed to g_spawn_async(),
|
* Specifies the type of the setup function passed to g_spawn_async(),
|
||||||
* g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
|
* g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
|
||||||
@ -137,7 +137,7 @@ typedef enum
|
|||||||
* and g_environ_unsetenv(), and then pass the complete environment
|
* and g_environ_unsetenv(), and then pass the complete environment
|
||||||
* list to the `g_spawn...` function.
|
* list to the `g_spawn...` function.
|
||||||
*/
|
*/
|
||||||
typedef void (* GSpawnChildSetupFunc) (gpointer user_data);
|
typedef void (* GSpawnChildSetupFunc) (gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GSpawnFlags:
|
* GSpawnFlags:
|
||||||
|
Loading…
Reference in New Issue
Block a user