diff options
author | Ryan Lortie <desrt@desrt.ca> | 2009-09-02 12:08:47 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2009-09-02 12:09:38 -0400 |
commit | a9076f6b3f959872d79ce9e25e73b49ff5bd3bbf (patch) | |
tree | 758c2bf4aaa83ba094d8cfb9b3b196bcbc178ef7 /vapi | |
parent | f1f081fff10cf6f56002181cceade73fedf6d19e (diff) | |
download | vala-a9076f6b3f959872d79ce9e25e73b49ff5bd3bbf.tar.gz |
add dconf vapi (hand-written)
Diffstat (limited to 'vapi')
-rw-r--r-- | vapi/Makefile.am | 1 | ||||
-rw-r--r-- | vapi/dconf.vapi | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/vapi/Makefile.am b/vapi/Makefile.am index f8dab9ddb..65f9a1078 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -17,6 +17,7 @@ dist_vapi_DATA = \ cogl-1.0.vapi \ cogl-1.0.deps \ curses.vapi \ + dconf.vapi \ dbus-glib-1.vapi \ enchant.vapi \ fuse.deps \ diff --git a/vapi/dconf.vapi b/vapi/dconf.vapi new file mode 100644 index 000000000..7c0841012 --- /dev/null +++ b/vapi/dconf.vapi @@ -0,0 +1,48 @@ +/* + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * licence, or (at your option) any later version. + * + * See the included COPYING file for more information. + * + * Author: + * Ryan Lortie <desrt@desrt.ca> + */ + +[CCode (cname_prefix = "dconf_", cheader_filename = "dconf.h")] +namespace DConf { + public delegate void AsyncReadyCallback (AsyncResult result); + public struct AsyncResult { } + + public bool is_key (string key); + public bool is_path (string path); + public bool match (string left, string right); + + public GLib.Variant? get (string key); + public string[] list (string path); + public bool get_writable (string path); + public bool get_locked (string path); + + public void set (string key, GLib.Variant value, out string event_id = null) throws GLib.Error; + public void set_async (string key, GLib.Variant value, DConf.AsyncReadyCallback callback); + public void set_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error; + + public void set_locked (string key, bool value) throws GLib.Error; + public void set_locked_async (string key, bool value, DConf.AsyncReadyCallback callback); + public void set_locked_finish (DConf.AsyncResult result) throws GLib.Error; + + public void reset (string key, out string event_id = null) throws GLib.Error; + public void reset_async (string key, DConf.AsyncReadyCallback callback); + public void reset_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error; + + public void merge (string prefix, GLib.Tree tree, out string event_id = null) throws GLib.Error; + public void merge_async (string prefix, GLib.Tree tree, DConf.AsyncReadyCallback callback); + public void merge_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error; + + public delegate void WatchFunc (string prefix, string[] items, string event_id); + public void watch (string path, WatchFunc callback); + public void unwatch (string path, WatchFunc callback); +} |