Requests the list (gconf_value_list) stored at key.
Automatically performs type-checking, so if a non-list is stored at key, or the list does not contain elements of type
list_type, an error is returned. If no value is set or an error occurs, <symbol>NULL</symbol> is returned. Note
that <symbol>NULL</symbol> is also the empty list, so if you need to distinguish the empty list from an unset value, you must
use gconf_engine_get () to obtain a raw Value.
<emphasis>Remember that GConf lists can only store primitive types: gconf_value_float, gconf_value_int, gconf_value_bool, gconf_value_string, gconf_value_schema.</emphasis> Also remember that lists must be uniform, you may not mix types in the same list.
The type of the list elements depends on list_type. A Value with type
gconf_value_list normally stores a list of more Value
objects. get_list automatically converts to primitive C types. Thus, the list->data fields in the
returned list contain:
<informaltable pgwide="1" frame="none"> <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/> < tbody>
<row> <entry>gconf_value_int</entry> <entry>The integer itself, converted with to_pointer</entry> </row>
<row> <entry>gconf_value_bool</entry> <entry>The bool itself, converted with to_pointer</entry> </row>
<row> <entry>gconf_value_float</entry> <entry>A pointer to double, which should be freed with g_free</entry> </row>
<row> <entry>gconf_value_string</entry> <entry>A pointer to char, which should be freed with g_free</entry> </row>
<row> <entry>gconf_value_schema</entry> <entry>A pointer to
Schema, which should be freed with gconf_schema_free</entry> </row>
</tbody></tgroup></informaltable>
In the gconf_value_float and gconf_value_string cases, you must
g_free each list element. In the gconf_value_schema
case you must gconf_schema_free each element. In all cases you must free the list itself with g_slist_free
.
| this |
a Engine. |
| key |
key you want the value of. |
| list_type |
type of each list element. |
|
an allocated list, with elements as described above. |