parse_enum
Description:
[ Version ( deprecated = true , deprecated_since = "1.38" , since = "1.16" ) ]
public bool parse_enum (Type type, string? str, out int value, bool warn, out string possible_values)
Warning: parse_enum is deprecated since 1.38.
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 |
enum type to parse, eg. pango_type_ellipsize_mode |
str |
string to parse |
value |
integer to store the result in |
warn |
if true, issue a warning on bad input |
possible_values |
place to store list of possible values on failure |
Returns:
true if |
Namespace: Pango
Package: pango