Gnome2-GConf

 view release on metacpan or  search on metacpan

xs/GConfClient.xs  view on Meta::CPAN

    OUTPUT:
	RETVAL

##gboolean gconf_client_unset (GConfClient* client, const gchar* key, GError** err);
gboolean
gconf_client_unset (client, key, check_error=TRUE)
	GConfClient * client
	const gchar * key
	gboolean check_error
    PREINIT:
     	GError * err = NULL;
    CODE:
    	if (TRUE == check_error) {
		RETVAL = gconf_client_unset (client, key, &err);
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		RETVAL = gconf_client_unset (client, key, NULL);
	}
    OUTPUT:
     	RETVAL

#if GCONF_CHECK_VERSION (2, 3, 3)

gboolean
gconf_client_recursive_unset (client, key, flags=0, check_error=TRUE)
        GConfClient * client
        const gchar * key
        GConfUnsetFlags flags
        gboolean check_error
    PREINIT:
        GError * err = NULL;
    CODE:
        if (TRUE == check_error) {
                RETVAL = gconf_client_recursive_unset (client, key, flags, &err);
                if (err)
                        gperl_croak_gerror (NULL, err);
        }
        else {
                RETVAL = gconf_client_recursive_unset (client, key, flags, NULL);
        }
    OUTPUT:
        RETVAL

#endif /* GCONF_CHECK_VERSION (2, 3, 3) */

##GSList* gconf_client_all_entries (GConfClient *client, const gchar *dir, GError **err);
=for apidoc
=for signature list = $client->all_entries($dir, $check_error=TRUE)
This method returns an array containing all the entries (as L<Gnome2::GConf::Entry>) of a given directory.
=cut
void
gconf_client_all_entries (client, dir, check_error=TRUE)
	GConfClient * client
	const gchar * dir
	gboolean check_error
    PREINIT:
     	GError * err = NULL;
	GSList * l, * tmp;
    PPCODE:
    	if (TRUE == check_error) {
		l = gconf_client_all_entries (client, dir, &err);
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		l = gconf_client_all_entries (client, dir, NULL);
	}
	for (tmp = l; tmp != NULL; tmp = tmp->next) {
		GConfEntry *entry = (GConfEntry *) tmp->data;
		XPUSHs (sv_2mortal (newSVGConfEntry (entry)));
	}
	g_slist_free (l);

##GSList* gconf_client_all_dirs (GConfClient *client, const gchar *dir, GError **err);
=for apidoc
=for signature list = $client->all_dirs($dir, $check_error=TRUE)

This method returns an array containing all the directories in a given directory.
=cut
void
gconf_client_all_dirs (client, dir, check_error=TRUE)
	GConfClient * client
	const gchar * dir
	gboolean check_error
    PREINIT:
     	GError * err = NULL;
	GSList * l, * tmp;
    PPCODE:
    	if (TRUE == check_error) {
		l = gconf_client_all_dirs (client, dir, &err);
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		l = gconf_client_all_dirs (client, dir, NULL);
	}
	for (tmp = l; tmp != NULL; tmp = tmp->next)
		XPUSHs (sv_2mortal (newSVGChar (tmp->data)));
	g_slist_free (l);

##void gconf_client_suggest_sync (GConfClient* client, GError** err);
void
gconf_client_suggest_sync (client, check_error=TRUE)
	GConfClient * client
	gboolean check_error
    PREINIT:
     	GError * err = NULL;
    CODE:
    	if (TRUE == check_error) {
		gconf_client_suggest_sync (client, &err);
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		gconf_client_suggest_sync (client, NULL);
	}

##gboolean gconf_client_dir_exists (GConfClient* client, const gchar* dir, GError** err);
gboolean
gconf_client_dir_exists (client, dir, check_error=TRUE)
	GConfClient * client
	const gchar * dir
	gboolean check_error
    PREINIT:
	GError * err = NULL;
    CODE:
    	if (TRUE == check_error) {
		RETVAL = gconf_client_dir_exists (client, dir, &err);
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		RETVAL = gconf_client_dir_exists (client, dir, NULL);
	}
    OUTPUT:
     	RETVAL

##gboolean gconf_client_key_is_writable (GConfClient* client, const gchar* key, GError** err);
gboolean
gconf_client_key_is_writable (client, key, check_error=TRUE)
	GConfClient * client
	const gchar * key
	gboolean check_error
    PREINIT:
     	GError * err = NULL;
    CODE:
    	if (TRUE == check_error) {
		RETVAL = gconf_client_key_is_writable (client, key, &err);

xs/GConfClient.xs  view on Meta::CPAN

		RETVAL = gconf_client_set_schema (client, key, schema, &err);
		gconf_schema_free (schema);	/* leaks otherwise */
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		RETVAL = gconf_client_set_schema (client, key, schema, NULL);
		gconf_schema_free (schema);
	}
    OUTPUT:
     	RETVAL

### These methods are implemented in perl, but we still need documentation on
### them, so we cheat with this evil trick.
##/* List should be the same as the one gconf_client_get_list() would return */
##gboolean     gconf_client_set_list    (GConfClient* client, const gchar* key,
##                                       GConfValueType list_type,
##                                       GSList* list,
##                                       GError** err);
##gboolean     gconf_client_set_pair    (GConfClient* client, const gchar* key,
##                                       GConfValueType car_type, GConfValueType cdr_type,
##                                       gconstpointer address_of_car,
##                                       gconstpointer address_of_cdr,
##                                       GError** err);

#if 0

gboolean
gconf_client_set_list (client, key, list_type, list, check_error=TRUE)
	GConfClient * client
	const gchar * key
	const gchar * list_type
	SV * list
	gboolean check_error

gboolean
gconf_client_set_pair (client, key, car, cdr, check_error=TRUE)
	GConfClient * client
	const gchar * key
	GConfValue * car
	GConfValue * cdr
	gboolean check_error

#endif

##/* Functions to emit signals */
##void         gconf_client_error                  (GConfClient* client, GError* error);
=for apidoc
=for arg error a L<Glib::Error>

You should not use this method.
This method emits the "error" signal.

=cut
void
gconf_client_error (client, error)
	GConfClient * client
	SV * error
    PREINIT:
	GError * err = NULL;
    PPCODE:
	gperl_gerror_from_sv (error, &err);
    	gconf_client_error (client, err);
	/* free err, otherwise we'd leak it. */
	g_error_free (err);

##void         gconf_client_unreturned_error       (GConfClient* client, GError* error);
=for apidoc
=for arg error a L<Glib::Error>

You should not use this method.
This method emits the "unreturned-error" signal.

=cut
void
gconf_client_unreturned_error (client, error)
	GConfClient * client
	SV * error
    PREINIT:
    	GError * err = NULL;
    PPCODE:
	gperl_gerror_from_sv (error, &err);
	gconf_client_unreturned_error (client, err);
	/* free err, otherwise we'd leak it. */
	g_error_free (err);

##void         gconf_client_value_changed          (GConfClient* client,
##                                                  const gchar* key,
##                                                  GConfValue* value);
=for apidoc

You should not use this method.
This method emits the "value-changed" signal.

=cut
void
gconf_client_value_changed (client, key, value)
	GConfClient * client
	const gchar * key
	GConfValue * value
    PPCODE:
	gconf_client_value_changed (client, key, value);
	gconf_value_free (value);	/* leaks otherwise */

##/*
## * Change set stuff
## */
##
##gboolean        gconf_client_commit_change_set   (GConfClient* client,
##                                                  GConfChangeSet* cs,
##                                                  /* remove all
##                                                     successfully
##                                                     committed changes
##                                                     from the set */
##                                                  gboolean remove_committed,
##                                                  GError** err);
=for apidoc
=for signature boolean = $client->commit_change_set ($cs, $remove_committed, $check_error=TRUE)
=for signature (boolean, changeset) = $client->commit_change_set ($cs, $remove_committed, $check_error=TRUE)

Commit a given L<Gnome2::GConf::ChangeSet>.  In scalar context, or if
I<$remove_committed> is FALSE, return a boolean value; otherwise, return the
boolean value and the L<Gnome2::GConf::ChangeSet> I<$cs>, pruned of the
successfully committed changes.

=cut
void
gconf_client_commit_change_set (client, cs, remove_committed, check_error=TRUE)
	GConfClient * client
	GConfChangeSet * cs
	gboolean remove_committed
	gboolean check_error
    PREINIT:
	GError * err = NULL;
	gboolean res;
    PPCODE:
    	if (TRUE == check_error) {
		res = gconf_client_commit_change_set (client, cs, remove_committed, &err);
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		res = gconf_client_commit_change_set (client, cs, remove_committed, NULL);
	}
	
	if ((GIMME_V != G_ARRAY) || (! remove_committed)) {
		/* push on the stack the returned boolean value if the user
		 * wants only that, or if the user does not want to remove
		 * the successfully committed keys. */
		XPUSHs (sv_2mortal (newSViv (res)));
		gconf_change_set_unref (cs);
	}
	else {
		/* push on the stack the returned value AND the reduced set. */
		XPUSHs (sv_2mortal (newSViv (res)));
		XPUSHs (sv_2mortal (newSVGConfChangeSet (cs)));
	}

##/* Create a change set that would revert the given change set for the given GConfClient */
##GConfChangeSet* gconf_client_reverse_change_set  (GConfClient* client,
##                                                  GConfChangeSet* cs,
##                                                  GError** err);
=for apidoc
Reverse the given L<Gnome2::GConf::ChangeSet>.
=cut
GConfChangeSet *
gconf_client_reverse_change_set (client, cs, check_error=TRUE)
	GConfClient * client
	GConfChangeSet * cs
	gboolean check_error
    PREINIT:
     	GError * err = NULL;
    CODE:
    	if (TRUE == check_error) {
		RETVAL = gconf_client_reverse_change_set (client, cs, &err);
		if (err)
			gperl_croak_gerror (NULL, err);
	}
	else {
		RETVAL = gconf_client_reverse_change_set (client, cs, NULL);
	}
    OUTPUT:
	RETVAL

### Gnome2::GConf::Client::change_set_from_current is really
### change_set_from_currentv for implementation ease, but the calling signature
### is the same of change_set_from_current, so here it goes.
##GConfChangeSet* gconf_client_change_set_from_currentv (GConfClient* client,
##                                                       const gchar** keys,
##                                                       GError** err);
##GConfChangeSet* gconf_client_change_set_from_current (GConfClient* client,
##                                                      GError** err,
##                                                      const gchar* first_key,
##                                                      ...);
=for apidoc
=for arg key (__hide__)



( run in 0.599 second using v1.01-cache-2.11-cpan-5511b514fd6 )