Function

GLibOptionArgFunc

Declaration

gboolean
(* GOptionArgFunc) (
  const gchar* option_name,
  const gchar* value,
  gpointer data,
  GError** error
)

Description

The type of function to be passed as callback for G_OPTION_ARG_CALLBACK options.

Parameters

option_name const gchar*
 

The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
value const gchar*
 

The value to be parsed.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
data gpointer
 

User data added to the GOptionGroup containing the option when it was created with g_option_group_new()

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if the option was successfully parsed, FALSE if an error occurred, in which case error should be set with g_set_error()