Function
Pango.parse_enum
Declaration [src]
gboolean
pango_parse_enum (
GType type,
const char* str,
int* value,
gboolean warn,
char** possible_values
)
Description [src]
Parses an enum type and stores the result in value.
If str does not match the nick name of any of the possible values for the
enum and is not an integer, FALSE is returned, a warning is issued
if warn is TRUE, and a
string representing the list of possible values is stored in
possible_values. The list is slash-separated, eg.
“none/start/middle/end”. If failed and possible_values is not NULL,
returned string should be freed using g_free().
Parameters
type |
GType |
enum type to parse, eg. |
|
str |
const char* |
string to parse. May be |
|
Can be NULL | |
| Ownership is not transferred to the callee | |
| The string is a NUL terminated UTF-8 string | |
value |
int* |
integer to store the result in, or |
|
| Direction: out | |
| Ownership of the data is transferred to the callee | |
warn |
gboolean |
if |
|
possible_values |
char** |
place to store list of possible values on failure, or |
|
| Direction: out | |
| Ownership of the data is transferred to the callee | |
| The string is a NUL terminated UTF-8 string |