Function

Gtkaccelerator_parse_with_keycode

since: 3.4

Declaration [src]

void
gtk_accelerator_parse_with_keycode (
  const gchar* accelerator,
  guint* accelerator_key,
  guint** accelerator_codes,
  GdkModifierType* accelerator_mods
)

Description [src]

Parses a string representing an accelerator, similarly to gtk_accelerator_parse() but handles keycodes as well. This is only useful for system-level components, applications should use gtk_accelerator_parse() instead.

If accelerator_codes is given and the result stored in it is non-NULL, the result must be freed with g_free().

If a keycode is present in the accelerator and no accelerator_codes is given, the parse will fail.

If the parse fails, accelerator_key, accelerator_mods and accelerator_codes will be set to 0 (zero).

Available since: 3.4

Parameters

accelerator

Type: const gchar*

String representing an accelerator.

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

Type: guint*

Return location for accelerator keyval, or NULL.

The argument will be set by the function.
The argument can be NULL.
accelerator_codes

Type: An array of guint*

return location for accelerator keycodes, or `NULL`.
The argument will be set by the function.
The argument can be NULL.
The array must be NULL-terminated.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.
accelerator_mods

Type: GdkModifierType

Return location for accelerator modifier mask, NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.