| GNOME Video Arcade Reference Manual | ||||
|---|---|---|---|---|
GvaMameAsyncData;
GvaMameAsyncData* gva_mame_async_data_new (GvaMameCallback callback,
gpointer user_data);
void gva_mame_async_data_free (GvaMameAsyncData *data);
gint gva_mame_command (const gchar *arguments,
gchar ***stdout_lines,
gchar ***stderr_lines,
GError **error);
typedef struct {
GvaMameCallback callback;
gpointer user_data;
} GvaMameAsyncData;
This structure is used to pass callback information to asynchronous operations.
GvaMameCallback |
callback function |
gpointer |
user data to pass to the callback function |
GvaMameAsyncData* gva_mame_async_data_new (GvaMameCallback callback, gpointer user_data);
Creates a new GvaMameAsyncData structure and populates it with callback
and user_data. Call gva_mame_async_data_free() to free it.
|
callback function |
|
user data to pass to the callback function |
Returns : |
a new GvaMameAsyncData |
void gva_mame_async_data_free (GvaMameAsyncData *data);
Frees data.
|
a GvaMameAsyncData |
gint gva_mame_command (const gchar *arguments, gchar ***stdout_lines, gchar ***stderr_lines, GError **error);
Spawns MAME with arguments and blocks until the child process exits.
The line-based output from the stdout and stderr pipes are written to
stdout_lines and stderr_lines, respectively, as NULL-terminated
string arrays. The function returns the exit status of the child
process, or -1 if an error occurred while spawning the process.