[ruby-gnome2-doc-cvs] [Hiki] update - GConf::Client

Back to archive index

ruby-****@lists***** ruby-****@lists*****
2003年 4月 13日 (日) 21:47:22 JST


-------------------------
REMOTE_ADDR = 213.113.203.231
REMOTE_HOST = 
-------------------------
= class GConf::Client
GConf::Client is the main class for accessing GConf functionality.  All interfacing between the GConf daemon and the client application goes through this class.

== super class
* GLib::Object

== class methods
--- GConf::Client.new(engine = nil)
    creates a new GConf::Client.  A client for a specific engine may be created, or a default engine may be used otherwise.
    * engine:  a GConf::Engine to create the client for
    * Returns: a new GConf::Client

--- add_dir(dir, preload_type = nil)
    Add a directory to the list of directories this GConf::Client will watch.  Any changes to a key in this directory or any sub-directory will trigger the "value_changed" signal.  A preloading method may also be specified for this directory.  It is not possible to add sub-directories to any directories already added in this way, doing so will cause an exception.  It is, however, possible to add the same directory multiple times, and it will be watched until it has been removed, by GConf::Client#remove_dir, an equal number of times.
     * dir: the directory to add
     * preload_type: ((<PreloadType|GConf::Client#PreloadType>)) to use for preloading; defaults to ((<PRELOAD_NONE|GConf::Client#PreloadType::PRELOAD_NONE>))
     * Returns: self

=== PreloadType
--- PRELOAD_NONE
    Nothing gets preloaded.
--- PRELOAD_ONELEVEL
    Preload the immediate children of the directory.
--- PRELOAD_RECURSIVE
    Preload all sub-directories to the directory as well.
-------------------------
= class GConf::Client
GConf::Client is the main class for accessing GConf functionality.  All interfacing between the GConf daemon and the client application goes through this class.

== super class
* GLib::Object

== class methods
--- GConf::Client.new(engine = nil)
    creates a new GConf::Client.  A client for a specific engine may be created, or a default engine may be used otherwise.
    * engine:  a GConf::Engine to create the client for
    * Returns: a new GConf::Client

--- add_dir(dir, preload_type = nil)
    Add a directory to the list of directories this GConf::Client will watch.  Any changes to a key in this directory or any sub-directory will trigger the "value_changed" signal.  A preloading method may also be specified for this directory.  It is not possible to add sub-directories to any directories already added in this way, doing so will cause an exception.  It is, however, possible to add the same directory multiple times, and it will be watched until it has been removed, by GConf::Client#remove_dir, an equal number of times.
     * dir: the directory to add
     * preload_type: ((<PreloadType|GConf::Client#PreloadType>)) to use for preloading; defaults to ((<PRELOAD_NONE|GConf::Client#PreloadType::PRELOAD_NONE>))
     * Returns: self

--- remove_dir(dir)
    Remove a directory from the list of directories previously added by GConf::Client#add_dir.
    * dir: the directory to remove
    * Returns: self

--- notify_add(namespace) { |client, entry| ... }
    Add a notification callback.  The block gets called whenever a change is made to the key ((|namespace|)) or any sub-keys.  For notifications to take place, ((|namespace|)) must be equal to or below any directories added by GConf::Client#add_dir.  Using GConf::Client#remove_dir on such a directory thus temporarily disables notifications there.  The notification itself may later be removed with GConf::Client#notify_remove, passing it the return id from this method.
     * namespace: where to listen for changes
     * client: the GConf::Client that the notify is connected to
     * entry: the GConf::Entry that has been modified. GConf::Entry#value is the new value, or nil if it has been unset.  Do not modify the entry's value, as it is only a temporary one.
     * Returns: an identifier that may later be used by GConf::Client#notify_remove

--- notify_remove(id)
    Remove a previously added notification, identified by the return value of GConf::Client#notify_add.
    * id: the notification to remove
    * Returns: self

--- clear_cache
    Clear the client-side cache of this GConf::Client.  Use this method if you know you are not going to use this GConf::Client for a while to save some memory.
    * Returns: self

--- preload(dir, preload_type)
    Preload a directory.  This is usually done when you call GConf::Client#add_dir, but may be useful if you have called GConf::Client#clear_cache since then.
    * dir: the directory to preload
    * preload_type: ((<PreloadType|GConf::Client#PreloadType>)) to use for preloading
    * Returns: self

=== PreloadType
--- PRELOAD_NONE
    Nothing gets preloaded.
--- PRELOAD_ONELEVEL
    Preload the immediate children of the directory.
--- PRELOAD_RECURSIVE
    Preload all sub-directories to the directory as well.



ruby-gnome2-cvs メーリングリストの案内
Back to archive index