diff options
author | Murray Cumming <murrayc@murrayc.com> | 2008-01-08 18:09:10 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2008-01-08 18:09:10 +0000 |
commit | d1e682cf6d879e3faf6b394c63bb36d21bf3a205 (patch) | |
tree | a86113c9b67f79f63f1f20be1b6b89b6cef22144 /gio/src | |
parent | 062ff4276a31e86075702bee00751b701a1f1f41 (diff) | |
download | glibmm-d1e682cf6d879e3faf6b394c63bb36d21bf3a205.tar.gz |
Uncomment GTKMM_DOXYGEN_INPUT_SUBDIRS to fix the reference documentation
2008-01-08 Murray Cumming <murrayc@murrayc.com>
* configure.in: Uncomment GTKMM_DOXYGEN_INPUT_SUBDIRS to fix the
reference documentation build (no idea when this happened) and add
gio to the list of directories.
* glib/src/optioncontext.ccg:
* glib/src/optioncontext.hg: Added get_help().
* gio/src/gio_enums.defs: Regenerated with enums.pl
* gio/src/gio_methods.defs: Regenerated with h2defs.py.
* tools/m4/convert_glib.m4:
* gio/src/fileattribute.hg: Renamed FileAttributeFlags to
FileAttributeInfoFlags, as it is in gio.
* gio/src/fileenumerator.hg:
* gio/src/asyncresult.hg:
* gio/src/cancellable.hg:
* gio/src/drive.hg:
* gio/src/file.hg: Added class documentation, and some method
documentation, based on the C documentation.
Many giomm classes still need documentation.
svn path=/trunk/; revision=492
Diffstat (limited to 'gio/src')
-rw-r--r-- | gio/src/asyncresult.hg | 56 | ||||
-rw-r--r-- | gio/src/cancellable.hg | 11 | ||||
-rw-r--r-- | gio/src/drive.hg | 20 | ||||
-rw-r--r-- | gio/src/file.hg | 24 | ||||
-rw-r--r-- | gio/src/fileattribute.hg | 39 | ||||
-rw-r--r-- | gio/src/fileenumerator.hg | 69 | ||||
-rw-r--r-- | gio/src/gio_enums.defs | 18 | ||||
-rw-r--r-- | gio/src/gio_methods.defs | 694 |
8 files changed, 751 insertions, 180 deletions
diff --git a/gio/src/asyncresult.hg b/gio/src/asyncresult.hg index d54d5d24..0ecd258c 100644 --- a/gio/src/asyncresult.hg +++ b/gio/src/asyncresult.hg @@ -38,9 +38,63 @@ class AsyncResult; * void on_async_ready(Glib::RefPtr<AsyncResult>& result); * @endcode */ - typedef sigc::slot<void, Glib::RefPtr<AsyncResult>& > SlotAsyncReady; +/** Provides a base class for implementing asynchronous function results. + * Asynchronous operations are broken up into two separate operations which are chained together by a SlotAsyncReady. + * To begin an asynchronous operation, provide a SlotAsyncReady to the asynchronous function. This callback will be triggered + * when the operation has completed, and will be passed an AsyncResult instance filled with the details of the operation's success or + * failure, the object the asynchronous function was started for and any error codes returned. The asynchronous callback function is then + * expected to call the corresponding "_finish()" function with the object the function was called for, and the AsyncResult instance, + * and optionally, an error to grab any error conditions that may have occurred. + * + * The purpose of the "_finish()" function is to take the generic result of type AsyncResult and return the specific result that the operation + * in question yields (e.g. a FileEnumerator for an "enumerate children" operation). If the result or error status of the operation is not needed, + * there is no need to call the "_finish()" function and GIO will take care of cleaning up the result and error information after the + * SlotAsyncReady returns. You may also store the AsyncResult and call "_finish()" later. + * + * Example of a typical asynchronous operation flow: + * @code + * void _theoretical_frobnitz_async(const Glib::RefPtr<Theoretical>& t, + * const SlotAsyncReady& slot); + * + * gboolean _theoretical_frobnitz_finish(const Glib::RefPtr<Theoretical>& t, + * const Glib::RefPtr<AsyncResult>& result); + * + * static void + * on_frobnitz_result(Glib::RefPtr<AsyncResult>& result) + * { + * + * Glib::RefPtr<Glib::Object> source_object = result->get_source_object(); + * bool success = _theoretical_frobnitz_finish(source_object, res); + * + * if (success) + * std::cout << "Hurray" << std::endl; + * else + * std::cout << "Uh oh!" << std::endl; + * + * ... + * } + * + * int main (int argc, void *argv[]) + * { + * ... + * + * _theoretical_frobnitz_async (theoretical_data, + * sigc::ptr_fun(&on_frobnitz_result) ); + * + * ... + * } + * @endcode + * + * The async function could also take an optional Glib::Cancellable object, allowing the calling function to cancel the asynchronous operation. + * + * The callback for an asynchronous operation is called only once, and is always called, even in the case of a cancelled operation. + * On cancellation the result is a ERROR_CANCELLED error. + * + * Some ascynchronous operations are implemented using synchronous calls. These are run in a separate GThread, but otherwise they are sent + * to the Main Event Loop and processed in an idle function. So, if you truly need asynchronous operations, make sure to initialize GThread. + */ class AsyncResult : public Glib::Interface { _CLASS_INTERFACE(AsyncResult, GAsyncResult, G_ASYNC_RESULT, GAsyncResultIface) diff --git a/gio/src/cancellable.hg b/gio/src/cancellable.hg index be778ec5..49bbaaa6 100644 --- a/gio/src/cancellable.hg +++ b/gio/src/cancellable.hg @@ -27,6 +27,9 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { +/** Allows actions to be cancelled. + * Cancellable is a thread-safe operation cancellation stack used throughout GIO to allow for cancellation of synchronous and asynchronous operations. + */ class Cancellable : public Glib::Object { _CLASS_GOBJECT(Cancellable, GCancellable, G_CANCELLABLE, Glib::Object, GObject) @@ -41,13 +44,17 @@ public: _IGNORE(g_cancellable_set_error_if_cancelled) - /** May return -1 if fds not supported, or on errors */ + //May return -1 if fds not supported, or on errors . _WRAP_METHOD(int get_fd() const, g_cancellable_get_fd) - /** This is safe to call from another thread */ + //This is safe to call from another thread. _WRAP_METHOD(void cancel(), g_cancellable_cancel) _IGNORE(g_cancellable_get_current) + + /** Gets the top cancellable from the stack. + * @result a Cancellable from the top of the stack, or an invalid RefPtr if the stack is empty. + */ static Glib::RefPtr<Cancellable> get_current(); _WRAP_METHOD(void push_current(), diff --git a/gio/src/drive.hg b/gio/src/drive.hg index e30f5bc3..e3292692 100644 --- a/gio/src/drive.hg +++ b/gio/src/drive.hg @@ -31,6 +31,16 @@ _PINCLUDE(glibmm/private/interface_p.h) namespace Gio { +/** Virtual File System drive management. + * + * This represent a piece of hardware connected to the machine. It's generally only created for removable hardware or hardware with removable media. + * Gio::Drive is a container class for Gio::Volume objects that stem from the same piece of media. As such, Gio::Drive abstracts a drive with + * (or without) removable media and provides operations for querying whether media is available, determing whether media change is automatically + * detected and ejecting the media. + * + * If the Gio::Drive reports that media isn't automatically detected, one can poll for media; typically one should not do this periodically as a + * poll for media operation is potententially expensive and may spin up the drive, creating noise. + */ class Drive : public Glib::Interface { _CLASS_INTERFACE(Drive, GDrive, G_DRIVE, GDriveIface) @@ -50,11 +60,19 @@ public: // TODO: get_volumes, returns a list of GVolumes, we shouldn't take copy // as these are owned by the volume monitor - _IGNORE(g_drive_eject) + + /** Ejects the drive. + * @param cancellable A cancellable object which can be used to cancel the eject. + * @param slot A callback which will be called when the eject is completed or canceled. + */ void eject(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); + /** Ejects the drive. + * @param slot A callback which will be called when the eject is completed. + */ void eject(const SlotAsyncReady& slot); + _IGNORE(g_drive_eject) _WRAP_METHOD(bool eject_finish(Glib::RefPtr<AsyncResult>& result), g_drive_eject_finish, diff --git a/gio/src/file.hg b/gio/src/file.hg index b90ed27d..9f4348ad 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -41,6 +41,28 @@ _WRAP_ENUM(FileCreateFlags, GFileCreateFlags, NO_GTYPE) _WRAP_ENUM(FileCopyFlags, GFileCopyFlags, NO_GTYPE) _WRAP_ENUM(FileMonitorFlags, GFileMonitorFlags, NO_GTYPE) +/** File and directory handling. + * Gio::File is a high level abstraction for manipulating files on a virtual file system. Gio::Files are lightweight, immutable objects that do no + * I/O upon creation. It is necessary to understand that a Gio::File object does not represent a file, merely a handle to a file. All file I/O is + * implemented as streaming operations (see Gio::InputStream and Gio::OutputStream). + * + * A GioFile can be constructed from a path, URI, or a command line argument. + * + * You can move through the filesystem with Gio::File handles with get_parent() to get a handle to the parent directory, + * get_child() to get a handle to a child within a directory, and resolve_relative_path() to resolve a relative path between two Gio::Files. + * + * Many Gio::File operations have both synchronous and asynchronous versions to suit your application. Asynchronous versions of synchronous + * functions simply have _async() appended to their function names. The asynchronous I/O functions call a SlotAsyncReady callback slot which is + * then used to finalize the operation, producing a AsyncResult which is then passed to the function's matching _finish() operation. + * + * Some Gio::File operations do not have synchronous analogs, as they may take a very long time to finish, and blocking may leave an application + * unusable. Notable cases include: mount_mountable() to mount a mountable file, unmount_mountable() to unmount a mountable file, + * and eject_mountable() to eject a mountable file. + * + * One notable feature of Gio::Files are entity tags, or "etags" for short. Entity tags are somewhat like a more abstract version of the + * traditional mtime, and can be used to quickly determine if the file has been modified from the version on the file system. + * See the HTTP 1.1 specification for HTTP Etag headers, which are a very similar concept. + */ class File : public Glib::Interface { _CLASS_INTERFACE(File, GFile, G_FILE, GFileIface) @@ -51,6 +73,8 @@ public: _IGNORE(g_file_new_for_commandline_arg) _IGNORE(g_file_parse_name) +//TODO: Documentation for the methods. + // Although this is an interface, it is possible to create objects using // its static create* members. In the implementation, these would lead // to functions of the default GVfs implementation, which, in case of diff --git a/gio/src/fileattribute.hg b/gio/src/fileattribute.hg index 65e8686c..b87e0e50 100644 --- a/gio/src/fileattribute.hg +++ b/gio/src/fileattribute.hg @@ -26,11 +26,16 @@ _DEFS(giomm,gio) namespace Gio { +//TODO: Fix the need for NO_GTYPE. _WRAP_ENUM(FileAttributeType, GFileAttributeType, NO_GTYPE) -_WRAP_ENUM(FileAttributeFlags, GFileAttributeFlags, NO_GTYPE) +_WRAP_ENUM(FileAttributeInfoFlags, GFileAttributeInfoFlags, NO_GTYPE) _WRAP_ENUM(FileAttributeStatus, GFileAttributeStatus, NO_GTYPE) // GFileAttributeInfo struct hand-wrapped +// TODO: Use _CLASS_GENERIC? + +/** Information about a specific attribute - see FileAttributeInfoList. + */ class FileAttributeInfo { public: @@ -43,14 +48,35 @@ public: std::string get_name() const; FileAttributeType get_type() const; - FileAttributeFlags get_flags() const; + FileAttributeInfoFlags get_flags() const; protected: std::string m_name; FileAttributeType m_type; - FileAttributeFlags m_flags; + FileAttributeInfoFlags m_flags; }; + +/** Key-Value paired file attributes. + * File attributes in GIO consist of a list of key-value pairs. + * + * Keys are strings that contain a key namespace and a key name, separated by a colon, e.g. "namespace:keyname". + * Namespaces are included to sort key-value pairs by namespaces for relevance. Keys can be retreived using wildcards, + * e.g. "standard::*" will return all of the keys in the "standard" namespace. + * + * Values are stored within the list in Gio::FileAttributeValue structures. Values can store different types, listed in the enum + * Gio::FileAttributeType. Upon creation of a Gio::FileAttributeValue, the type will be set to Gio::FILE_ATTRIBUTE_TYPE_INVALID. + * + * The list of possible attributes for a filesystem (pointed to by a Gio::File) is availible as a Gio::FileAttributeInfoList. + * This list is queryable by key names as indicated earlier. + * + * Classes that implement Gio::FileIface will create a Gio::FileAttributeInfoList and install default keys and values for their given file + * system, architecture, and other possible implementation details (e.g., on a UNIX system, a file attribute key will be registered for + * the user id for a given file). + * + * See http://library.gnome.org/devel/gio/unstable/gio-GFileAttribute.html for the list of default namespaces and the list of default keys. + */ + */ class FileAttributeInfoList { _CLASS_OPAQUE_REFCOUNTED(FileAttributeInfoList, GFileAttributeInfoList, @@ -58,7 +84,14 @@ class FileAttributeInfoList g_file_attribute_info_list_ref, g_file_attribute_info_list_unref) public: + + //TODO: Add FileAttributeInfo::empty() or similar so we can represent a NULL GFileAttributeInfo*. + /** Gets the file attribute with the name name from list. + * @param name The name of the attribute to lookup. + * @result A FileAttributeInfo for the name. + */ FileAttributeInfo lookup(const std::string& name) const; + /*TODO: conversion missing _WRAP_METHOD(void add(const std::string& name, FileAttributeType type, FileAttributeInfoFlags flags), g_file_attribute_info_list_add) diff --git a/gio/src/fileenumerator.hg b/gio/src/fileenumerator.hg index 975be4f9..ba8b8d01 100644 --- a/gio/src/fileenumerator.hg +++ b/gio/src/fileenumerator.hg @@ -32,6 +32,19 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { +//TODO: Consider wrapping this like a std::iterator (or at least renaming it), though the asyncness probably makes that unsuitable. + +/** Enumerated Files Routines. + * FileEnumerator allows you to operate on a set of Gio::Files, returning a Gio::FileInfo instance for each file enumerated + * (e.g. Gio::File::enumerate_children() will return a FileEnumerator for each of the children within a directory). + * + * To get the next file's information from a Gio::FileEnumerator, use next_file() or its asynchronous version, next_file_async(). + * Note that the asynchronous version will return a list of Gio::FileInfos, whereas the synchronous version will only return the next + * file in the enumerator. + * + * To close a Gio::FileEnumerator, use FileEnumerator::close(), or its asynchronous version, close_async(). Once a FileEnumerator is closed, + * no further actions may be performed on it. + */ class FileEnumerator : public Glib::Object { _CLASS_GOBJECT(FileEnumerator, GFileEnumerator, G_FILE_ENUMERATOR, Glib::Object, GObject) @@ -45,15 +58,47 @@ public: g_file_enumerator_close, errthrow) - _IGNORE(g_file_enumerator_next_files_async) + + /** Request information for a number of files from the enumerator asynchronously. + * When all I/O for the operation is finished the callback slot will be called with the requested information. + * + * The callback could be called with less than num_files files in case of error or at the end of the enumerator. + * In case of a partial error the callback will be called with any succeeding items and no error, and on the next request the error will be reported. + * If a request is cancelled the callback will be called with ERROR_CANCELLED. + * + * During an async request no other sync and async calls are allowed, and will result in ERROR_PENDING errors. + * + * Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. + * The default priority is PRIORITY_DEFAULT. + * @param num_files The number of file info objects to request. + * @param io_priority The I/O priority of the request. + * @param cancellable An cancellable object which can be used to cancel the request. + * @param slot A callback to call when the request is satisfied. + */ void next_files_async(int num_files, int io_priority, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); + /** Request information for a number of files from the enumerator asynchronously. + * When all I/O for the operation is finished the callback slot will be called with the requested information. + * + * The callback could be called with less than num_files files in case of error or at the end of the enumerator. + * In case of a partial error the callback will be called with any succeeding items and no error, and on the next request the error will be reported. + * If a request is cancelled the callback will be called with ERROR_CANCELLED. + * + * During an async request no other sync and async calls are allowed, and will result in ERROR_PENDING errors. + * + * Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. + * The default priority is PRIORITY_DEFAULT. + * @param num_files The number of file info objects to request. + * @param io_priority The I/O priority of the request. + * @param slot A callback to call when the request is satisfied. + */ void next_files_async(int num_files, int io_priority, const SlotAsyncReady& slot); + _IGNORE(g_file_enumerator_next_files_async) _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<FileInfo> > next_files_finish(const Glib::RefPtr<AsyncResult>& result), g_file_enumerator_next_files_finish, @@ -61,13 +106,23 @@ public: //TODO: next_files_finish: what does the resulting list contain? // FileInfo - _IGNORE(g_file_enumerator_close_async) - void close_async(int io_priority, - const Glib::RefPtr<Cancellable>& cancellable, - const SlotAsyncReady& slot); - void close_async(int io_priority, - const SlotAsyncReady& slot); + + /** Asynchronously closes the file enumerator. + * The operation can be cancelled by triggering the cancellable object from another thread. + * If the operation was cancelled, the error ERROR_CANCELLED will be returned in close_finish(). + * + * @param io_priority The I/O priority of the request. + * @param slot A callback to call when the request is satisfied. + */ + void close_async(int io_priority, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); + + /** Asynchronously closes the file enumerator. + * + * @param io_priority The I/O priority of the request. + */ + void close_async(int io_priority, const SlotAsyncReady& slot); + _IGNORE(g_file_enumerator_close_async) _WRAP_METHOD(bool close_finish(const Glib::RefPtr<AsyncResult>& result), g_file_enumerator_close_finish, diff --git a/gio/src/gio_enums.defs b/gio/src/gio_enums.defs index 68ab992f..cb762ed4 100644 --- a/gio/src/gio_enums.defs +++ b/gio/src/gio_enums.defs @@ -1,4 +1,4 @@ -;; From /home/marko/prefix/include/glib-2.0/gio/gappinfo.h +;; From /home/murrayc/svn/gnome220/glib/gio/gappinfo.h (define-enum-extended AppInfoCreateFlags (in-module "G") @@ -8,7 +8,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gdatainputstream.h +;; From /home/murrayc/svn/gnome220/glib/gio/gdatainputstream.h (define-enum-extended DataStreamByteOrder (in-module "G") @@ -31,7 +31,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfileattribute.h +;; From /home/murrayc/svn/gnome220/glib/gio/gfileattribute.h (define-enum-extended FileAttributeType (in-module "G") @@ -69,7 +69,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfile.h +;; From /home/murrayc/svn/gnome220/glib/gio/gfile.h (define-enum-extended FileQueryInfoFlags (in-module "G") @@ -111,7 +111,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfileinfo.h +;; From /home/murrayc/svn/gnome220/glib/gio/gfileinfo.h (define-enum-extended FileType (in-module "G") @@ -127,7 +127,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfilemonitor.h +;; From /home/murrayc/svn/gnome220/glib/gio/gfilemonitor.h (define-enum-extended FileMonitorEvent (in-module "G") @@ -143,7 +143,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gioerror.h +;; From /home/murrayc/svn/gnome220/glib/gio/gioerror.h (define-enum-extended IOErrorEnum (in-module "G") @@ -183,7 +183,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gmountoperation.h +;; From /home/murrayc/svn/gnome220/glib/gio/gmountoperation.h (define-flags-extended AskPasswordFlags (in-module "G") @@ -207,7 +207,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/goutputstream.h +;; From /home/murrayc/svn/gnome220/glib/gio/goutputstream.h (define-flags-extended OutputStreamSpliceFlags (in-module "G") diff --git a/gio/src/gio_methods.defs b/gio/src/gio_methods.defs index 352baaf8..d578763c 100644 --- a/gio/src/gio_methods.defs +++ b/gio/src/gio_methods.defs @@ -1,187 +1,222 @@ ;; -*- scheme -*- ; object definitions ... -(define-object AppInfo - (in-module "G") +(define-object Info + (in-module "GApp") (c-name "GAppInfo") (gtype-id "G_TYPE_APP_INFO") ) -(define-object AppLaunchContext - (in-module "G") +(define-object LaunchContext + (in-module "GApp") (parent "GObject") (c-name "GAppLaunchContext") (gtype-id "G_TYPE_APP_LAUNCH_CONTEXT") ) -(define-object AsyncResult - (in-module "G") +(define-object Result + (in-module "GAsync") (c-name "GAsyncResult") (gtype-id "G_TYPE_ASYNC_RESULT") ) -(define-object DirectoryMonitor - (in-module "G") - (parent "GObject") - (c-name "GDirectoryMonitor") - (gtype-id "G_TYPE_DIRECTORY_MONITOR") -) - -(define-object Drive - (in-module "G") +(define-object e + (in-module "GDriv") (c-name "GDrive") (gtype-id "G_TYPE_DRIVE") ) -(define-object File - (in-module "G") +(define-object e + (in-module "GFil") (c-name "GFile") (gtype-id "G_TYPE_FILE") ) -(define-object FileEnumerator - (in-module "G") +(define-object Enumerator + (in-module "GFile") (parent "GObject") (c-name "GFileEnumerator") (gtype-id "G_TYPE_FILE_ENUMERATOR") ) -(define-object FileMonitor - (in-module "G") +(define-object Monitor + (in-module "GFile") (parent "GObject") (c-name "GFileMonitor") (gtype-id "G_TYPE_FILE_MONITOR") ) -(define-object Icon - (in-module "G") +(define-object n + (in-module "GIco") (c-name "GIcon") (gtype-id "G_TYPE_ICON") ) -(define-object InputStream - (in-module "G") +(define-object Stream + (in-module "GInput") (parent "GObject") (c-name "GInputStream") (gtype-id "G_TYPE_INPUT_STREAM") ) -(define-object FilterInputStream - (in-module "G") +(define-object InputStream + (in-module "GFilter") (parent "GInputStream") (c-name "GFilterInputStream") (gtype-id "G_TYPE_FILTER_INPUT_STREAM") ) -(define-object BufferedInputStream - (in-module "G") +(define-object InputStream + (in-module "GBuffered") (parent "GFilterInputStream") (c-name "GBufferedInputStream") (gtype-id "G_TYPE_BUFFERED_INPUT_STREAM") ) -(define-object DataInputStream - (in-module "G") +(define-object InputStream + (in-module "GData") (parent "GBufferedInputStream") (c-name "GDataInputStream") (gtype-id "G_TYPE_DATA_INPUT_STREAM") ) -(define-object FileInputStream - (in-module "G") +(define-object InputStream + (in-module "GFile") (parent "GInputStream") (c-name "GFileInputStream") (gtype-id "G_TYPE_FILE_INPUT_STREAM") ) -(define-object LoadableIcon - (in-module "G") +(define-object Icon + (in-module "GLoadable") (c-name "GLoadableIcon") (gtype-id "G_TYPE_LOADABLE_ICON") ) -(define-object MemoryInputStream - (in-module "G") +(define-object DirectoryMonitor + (in-module "GLocal") + (parent "GFileMonitor") + (c-name "GLocalDirectoryMonitor") + (gtype-id "G_TYPE_LOCAL_DIRECTORY_MONITOR") +) + +(define-object FileInputStream + (in-module "GLocal") + (parent "GFileInputStream") + (c-name "GLocalFileInputStream") + (gtype-id "G_TYPE_LOCAL_FILE_INPUT_STREAM") +) + +(define-object FileMonitor + (in-module "GLocal") + (parent "GFileMonitor") + (c-name "GLocalFileMonitor") + (gtype-id "G_TYPE_LOCAL_FILE_MONITOR") +) + +(define-object InputStream + (in-module "GMemory") (parent "GInputStream") (c-name "GMemoryInputStream") (gtype-id "G_TYPE_MEMORY_INPUT_STREAM") ) -(define-object Mount - (in-module "G") +(define-object t + (in-module "GMoun") (c-name "GMount") (gtype-id "G_TYPE_MOUNT") ) -(define-object MountOperation - (in-module "G") +(define-object Operation + (in-module "GMount") (parent "GObject") (c-name "GMountOperation") (gtype-id "G_TYPE_MOUNT_OPERATION") ) -(define-object OutputStream - (in-module "G") +(define-object Stream + (in-module "GOutput") (parent "GObject") (c-name "GOutputStream") (gtype-id "G_TYPE_OUTPUT_STREAM") ) -(define-object MemoryOutputStream - (in-module "G") +(define-object OutputStream + (in-module "GMemory") (parent "GOutputStream") (c-name "GMemoryOutputStream") (gtype-id "G_TYPE_MEMORY_OUTPUT_STREAM") ) -(define-object FilterOutputStream - (in-module "G") +(define-object OutputStream + (in-module "GFilter") (parent "GOutputStream") (c-name "GFilterOutputStream") (gtype-id "G_TYPE_FILTER_OUTPUT_STREAM") ) -(define-object DataOutputStream - (in-module "G") +(define-object OutputStream + (in-module "GData") (parent "GFilterOutputStream") (c-name "GDataOutputStream") (gtype-id "G_TYPE_DATA_OUTPUT_STREAM") ) -(define-object FileOutputStream - (in-module "G") +(define-object OutputStream + (in-module "GFile") (parent "GOutputStream") (c-name "GFileOutputStream") (gtype-id "G_TYPE_FILE_OUTPUT_STREAM") ) -(define-object Seekable - (in-module "G") +(define-object FileOutputStream + (in-module "GLocal") + (parent "GFileOutputStream") + (c-name "GLocalFileOutputStream") + (gtype-id "G_TYPE_LOCAL_FILE_OUTPUT_STREAM") +) + +(define-object e + (in-module "GSeekabl") (c-name "GSeekable") (gtype-id "G_TYPE_SEEKABLE") ) -(define-object Vfs - (in-module "G") +(define-object InputStream + (in-module "GUnix") + (parent "GInputStream") + (c-name "GUnixInputStream") + (gtype-id "G_TYPE_UNIX_INPUT_STREAM") +) + +(define-object OutputStream + (in-module "GUnix") + (parent "GOutputStream") + (c-name "GUnixOutputStream") + (gtype-id "G_TYPE_UNIX_OUTPUT_STREAM") +) + +(define-object s + (in-module "GVf") (parent "GObject") (c-name "GVfs") (gtype-id "G_TYPE_VFS") ) -(define-object Volume - (in-module "G") +(define-object e + (in-module "GVolum") (c-name "GVolume") (gtype-id "G_TYPE_VOLUME") ) -(define-object VolumeMonitor - (in-module "G") +(define-object Monitor + (in-module "GVolume") (parent "GObject") (c-name "GVolumeMonitor") (gtype-id "G_TYPE_VOLUME_MONITOR") ) -(define-object NativeVolumeMonitor - (in-module "G") +(define-object VolumeMonitor + (in-module "GNative") (parent "GVolumeMonitor") (c-name "GNativeVolumeMonitor") (gtype-id "G_TYPE_NATIVE_VOLUME_MONITOR") @@ -189,8 +224,8 @@ ;; Enumerations and flags ... -(define-flags AppInfoCreateFlags - (in-module "G") +(define-flags InfoCreateFlags + (in-module "GApp") (c-name "GAppInfoCreateFlags") (gtype-id "G_TYPE_APP_INFO_CREATE_FLAGS") (values @@ -199,8 +234,8 @@ ) ) -(define-enum DataStreamByteOrder - (in-module "G") +(define-enum StreamByteOrder + (in-module "GData") (c-name "GDataStreamByteOrder") (gtype-id "G_TYPE_DATA_STREAM_BYTE_ORDER") (values @@ -210,8 +245,8 @@ ) ) -(define-enum DataStreamNewlineType - (in-module "G") +(define-enum StreamNewlineType + (in-module "GData") (c-name "GDataStreamNewlineType") (gtype-id "G_TYPE_DATA_STREAM_NEWLINE_TYPE") (values @@ -222,8 +257,8 @@ ) ) -(define-enum FileAttributeType - (in-module "G") +(define-enum AttributeType + (in-module "GFile") (c-name "GFileAttributeType") (gtype-id "G_TYPE_FILE_ATTRIBUTE_TYPE") (values @@ -239,8 +274,8 @@ ) ) -(define-flags FileAttributeInfoFlags - (in-module "G") +(define-flags AttributeInfoFlags + (in-module "GFile") (c-name "GFileAttributeInfoFlags") (gtype-id "G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS") (values @@ -250,8 +285,8 @@ ) ) -(define-enum FileAttributeStatus - (in-module "G") +(define-enum AttributeStatus + (in-module "GFile") (c-name "GFileAttributeStatus") (gtype-id "G_TYPE_FILE_ATTRIBUTE_STATUS") (values @@ -261,8 +296,8 @@ ) ) -(define-flags FileQueryInfoFlags - (in-module "G") +(define-flags QueryInfoFlags + (in-module "GFile") (c-name "GFileQueryInfoFlags") (gtype-id "G_TYPE_FILE_QUERY_INFO_FLAGS") (values @@ -271,8 +306,8 @@ ) ) -(define-flags FileCreateFlags - (in-module "G") +(define-flags CreateFlags + (in-module "GFile") (c-name "GFileCreateFlags") (gtype-id "G_TYPE_FILE_CREATE_FLAGS") (values @@ -281,8 +316,8 @@ ) ) -(define-flags MountUnmountFlags - (in-module "G") +(define-flags UnmountFlags + (in-module "GMount") (c-name "GMountUnmountFlags") (gtype-id "G_TYPE_MOUNT_UNMOUNT_FLAGS") (values @@ -291,8 +326,8 @@ ) ) -(define-flags FileCopyFlags - (in-module "G") +(define-flags CopyFlags + (in-module "GFile") (c-name "GFileCopyFlags") (gtype-id "G_TYPE_FILE_COPY_FLAGS") (values @@ -305,8 +340,8 @@ ) ) -(define-flags FileMonitorFlags - (in-module "G") +(define-flags MonitorFlags + (in-module "GFile") (c-name "GFileMonitorFlags") (gtype-id "G_TYPE_FILE_MONITOR_FLAGS") (values @@ -315,8 +350,8 @@ ) ) -(define-enum FileType - (in-module "G") +(define-enum Type + (in-module "GFile") (c-name "GFileType") (gtype-id "G_TYPE_FILE_TYPE") (values @@ -330,8 +365,8 @@ ) ) -(define-enum FileMonitorEvent - (in-module "G") +(define-enum MonitorEvent + (in-module "GFile") (c-name "GFileMonitorEvent") (gtype-id "G_TYPE_FILE_MONITOR_EVENT") (values @@ -345,8 +380,8 @@ ) ) -(define-enum IOErrorEnum - (in-module "G") +(define-enum Enum + (in-module "GIOError") (c-name "GIOErrorEnum") (gtype-id "G_TYPE_IO_ERROR_ENUM") (values @@ -384,8 +419,8 @@ ) ) -(define-flags AskPasswordFlags - (in-module "G") +(define-flags PasswordFlags + (in-module "GAsk") (c-name "GAskPasswordFlags") (gtype-id "G_TYPE_ASK_PASSWORD_FLAGS") (values @@ -397,8 +432,8 @@ ) ) -(define-enum PasswordSave - (in-module "G") +(define-enum Save + (in-module "GPassword") (c-name "GPasswordSave") (gtype-id "G_TYPE_PASSWORD_SAVE") (values @@ -408,8 +443,8 @@ ) ) -(define-flags OutputStreamSpliceFlags - (in-module "G") +(define-flags StreamSpliceFlags + (in-module "GOutput") (c-name "GOutputStreamSpliceFlags") (gtype-id "G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS") (values @@ -505,6 +540,12 @@ (return-type "gboolean") ) +(define-method supports_files + (of-object "GAppInfo") + (c-name "g_app_info_supports_files") + (return-type "gboolean") +) + (define-method launch_uris (of-object "GAppInfo") (c-name "g_app_info_launch_uris") @@ -520,9 +561,6 @@ (of-object "GAppInfo") (c-name "g_app_info_should_show") (return-type "gboolean") - (parameters - '("const-char*" "desktop_env") - ) ) (define-method set_as_default_for_type @@ -638,6 +676,10 @@ +;; From gasynchelper.h + + + ;; From gasyncresult.h (define-function g_async_result_get_type @@ -971,6 +1013,10 @@ +;; From gcontenttypeprivate.h + + + ;; From gdatainputstream.h (define-function g_data_input_stream_get_type @@ -1233,42 +1279,41 @@ -;; From gdirectorymonitor.h +;; From gdesktopappinfo.h -(define-function g_directory_monitor_get_type - (c-name "g_directory_monitor_get_type") +(define-function g_desktop_app_info_get_type + (c-name "g_desktop_app_info_get_type") (return-type "GType") ) -(define-method cancel - (of-object "GDirectoryMonitor") - (c-name "g_directory_monitor_cancel") - (return-type "gboolean") -) - -(define-method is_cancelled - (of-object "GDirectoryMonitor") - (c-name "g_directory_monitor_is_cancelled") - (return-type "gboolean") +(define-function g_desktop_app_info_new_from_filename + (c-name "g_desktop_app_info_new_from_filename") + (return-type "GDesktopAppInfo*") + (parameters + '("const-char*" "filename") + ) ) -(define-method set_rate_limit - (of-object "GDirectoryMonitor") - (c-name "g_directory_monitor_set_rate_limit") - (return-type "none") +(define-function g_desktop_app_info_new + (c-name "g_desktop_app_info_new") + (is-constructor-of "GDesktopAppInfo") + (return-type "GDesktopAppInfo*") (parameters - '("int" "limit_msecs") + '("const-char*" "desktop_id") ) ) -(define-method emit_event - (of-object "GDirectoryMonitor") - (c-name "g_directory_monitor_emit_event") +(define-method get_is_hidden + (of-object "GDesktopAppInfo") + (c-name "g_desktop_app_info_get_is_hidden") + (return-type "gboolean") +) + +(define-function g_desktop_app_info_set_desktop_env + (c-name "g_desktop_app_info_set_desktop_env") (return-type "none") (parameters - '("GFile*" "child") - '("GFile*" "other_file") - '("GFileMonitorEvent" "event_type") + '("const-char*" "desktop_env") ) ) @@ -1380,6 +1425,10 @@ +;; From gdummyfile.h + + + ;; From gfileattribute.h (define-function g_file_attribute_info_list_new @@ -1428,6 +1477,10 @@ +;; From gfileattribute-priv.h + + + ;; From gfileenumerator.h (define-function g_file_enumerator_get_type @@ -2268,7 +2321,7 @@ (define-method monitor_directory (of-object "GFile") (c-name "g_file_monitor_directory") - (return-type "GDirectoryMonitor*") + (return-type "GFileMonitor*") (parameters '("GFileMonitorFlags" "flags") '("GCancellable*" "cancellable") @@ -3389,6 +3442,10 @@ +;; From gioalias.h + + + ;; From gioenumtypes.h (define-function g_app_info_create_flags_get_type @@ -3499,6 +3556,10 @@ +;; From gio-marshal.h + + + ;; From giomodule.h (define-function g_io_module_get_type @@ -3537,6 +3598,10 @@ +;; From giomodule-priv.h + + + ;; From gioscheduler.h (define-function g_io_scheduler_push_job @@ -3624,6 +3689,48 @@ +;; From glocaldirectorymonitor.h + +(define-function g_local_directory_monitor_get_type + (c-name "g_local_directory_monitor_get_type") + (return-type "GType") +) + + + +;; From glocalfileenumerator.h + + + +;; From glocalfile.h + + + +;; From glocalfileinfo.h + + + +;; From glocalfileinputstream.h + + + +;; From glocalfilemonitor.h + +(define-function g_local_file_monitor_get_type + (c-name "g_local_file_monitor_get_type") + (return-type "GType") +) + + + +;; From glocalfileoutputstream.h + + + +;; From glocalvfs.h + + + ;; From gmemoryinputstream.h (define-function g_memory_input_stream_get_type @@ -3631,36 +3738,33 @@ (return-type "GType") ) -(define-function g_memory_input_stream_from_data - (c-name "g_memory_input_stream_from_data") +(define-function g_memory_input_stream_new + (c-name "g_memory_input_stream_new") + (is-constructor-of "GMemoryInputStream") + (return-type "GInputStream*") +) + +(define-function g_memory_input_stream_new_from_data + (c-name "g_memory_input_stream_new_from_data") (return-type "GInputStream*") (parameters '("const-void*" "data") '("gssize" "len") + '("GDestroyNotify" "destroy") ) ) -(define-method set_free_data +(define-method add_data (of-object "GMemoryInputStream") - (c-name "g_memory_input_stream_set_free_data") + (c-name "g_memory_input_stream_add_data") (return-type "none") (parameters - '("gboolean" "free_data") + '("const-void*" "data") + '("gssize" "len") + '("GDestroyNotify" "destroy") ) ) -(define-method get_data - (of-object "GMemoryInputStream") - (c-name "g_memory_input_stream_get_data") - (return-type "const-void*") -) - -(define-method get_data_size - (of-object "GMemoryInputStream") - (c-name "g_memory_input_stream_get_data_size") - (return-type "gsize") -) - ;; From gmemoryoutputstream.h @@ -3675,32 +3779,23 @@ (is-constructor-of "GMemoryOutputStream") (return-type "GOutputStream*") (parameters - '("GByteArray*" "data") - ) -) - -(define-method set_max_size - (of-object "GMemoryOutputStream") - (c-name "g_memory_output_stream_set_max_size") - (return-type "none") - (parameters - '("guint" "max_size") + '("gpointer" "data") + '("gsize" "len") + '("GReallocFunc" "realloc_fn") + '("GDestroyNotify" "destroy") ) ) (define-method get_data (of-object "GMemoryOutputStream") (c-name "g_memory_output_stream_get_data") - (return-type "GByteArray*") + (return-type "gpointer") ) -(define-method set_free_data +(define-method get_size (of-object "GMemoryOutputStream") - (c-name "g_memory_output_stream_set_free_data") - (return-type "none") - (parameters - '("gboolean" "free_data") - ) + (c-name "g_memory_output_stream_get_size") + (return-type "gsize") ) @@ -3942,6 +4037,10 @@ +;; From gmountprivate.h + + + ;; From gnativevolumemonitor.h (define-function g_native_volume_monitor_get_type @@ -4136,6 +4235,10 @@ +;; From gpollfilemonitor.h + + + ;; From gseekable.h (define-function g_seekable_get_type @@ -4410,6 +4513,274 @@ +;; From gunionvolumemonitor.h + + + +;; From gunixinputstream.h + +(define-function g_unix_input_stream_get_type + (c-name "g_unix_input_stream_get_type") + (return-type "GType") +) + +(define-function g_unix_input_stream_new + (c-name "g_unix_input_stream_new") + (is-constructor-of "GUnixInputStream") + (return-type "GInputStream*") + (parameters + '("int" "fd") + '("gboolean" "close_fd_at_close") + ) +) + + + +;; From gunixmount.h + + + +;; From gunixmounts.h + +(define-function g_unix_mount_free + (c-name "g_unix_mount_free") + (return-type "none") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-method free + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_free") + (return-type "none") +) + +(define-function g_unix_mount_compare + (c-name "g_unix_mount_compare") + (return-type "gint") + (parameters + '("GUnixMountEntry*" "mount1") + '("GUnixMountEntry*" "mount2") + ) +) + +(define-function g_unix_mount_get_mount_path + (c-name "g_unix_mount_get_mount_path") + (return-type "const-char*") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-function g_unix_mount_get_device_path + (c-name "g_unix_mount_get_device_path") + (return-type "const-char*") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-function g_unix_mount_get_fs_type + (c-name "g_unix_mount_get_fs_type") + (return-type "const-char*") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-function g_unix_mount_is_readonly + (c-name "g_unix_mount_is_readonly") + (return-type "gboolean") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-function g_unix_mount_is_system_internal + (c-name "g_unix_mount_is_system_internal") + (return-type "gboolean") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-function g_unix_mount_guess_can_eject + (c-name "g_unix_mount_guess_can_eject") + (return-type "gboolean") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-function g_unix_mount_guess_name + (c-name "g_unix_mount_guess_name") + (return-type "char*") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-function g_unix_mount_guess_icon + (c-name "g_unix_mount_guess_icon") + (return-type "GIcon*") + (parameters + '("GUnixMountEntry*" "mount_entry") + ) +) + +(define-method compare + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_compare") + (return-type "gint") + (parameters + '("GUnixMountPoint*" "mount2") + ) +) + +(define-method get_mount_path + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_get_mount_path") + (return-type "const-char*") +) + +(define-method get_device_path + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_get_device_path") + (return-type "const-char*") +) + +(define-method get_fs_type + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_get_fs_type") + (return-type "const-char*") +) + +(define-method is_readonly + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_is_readonly") + (return-type "gboolean") +) + +(define-method is_user_mountable + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_is_user_mountable") + (return-type "gboolean") +) + +(define-method is_loopback + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_is_loopback") + (return-type "gboolean") +) + +(define-method guess_can_eject + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_guess_can_eject") + (return-type "gboolean") +) + +(define-method guess_name + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_guess_name") + (return-type "char*") +) + +(define-method guess_icon + (of-object "GUnixMountPoint") + (c-name "g_unix_mount_point_guess_icon") + (return-type "GIcon*") +) + +(define-function g_unix_mount_points_get + (c-name "g_unix_mount_points_get") + (return-type "GList*") + (parameters + '("guint64*" "time_read") + ) +) + +(define-function g_unix_mounts_get + (c-name "g_unix_mounts_get") + (return-type "GList*") + (parameters + '("guint64*" "time_read") + ) +) + +(define-function g_unix_mount_at + (c-name "g_unix_mount_at") + (return-type "GUnixMountEntry*") + (parameters + '("const-char*" "mount_path") + '("guint64*" "time_read") + ) +) + +(define-function g_unix_mounts_changed_since + (c-name "g_unix_mounts_changed_since") + (return-type "gboolean") + (parameters + '("guint64" "time") + ) +) + +(define-function g_unix_mount_points_changed_since + (c-name "g_unix_mount_points_changed_since") + (return-type "gboolean") + (parameters + '("guint64" "time") + ) +) + +(define-function g_unix_mount_monitor_get_type + (c-name "g_unix_mount_monitor_get_type") + (return-type "GType") +) + +(define-function g_unix_mount_monitor_new + (c-name "g_unix_mount_monitor_new") + (is-constructor-of "GUnixMountMonitor") + (return-type "GUnixMountMonitor*") +) + +(define-function g_unix_is_mount_path_system_internal + (c-name "g_unix_is_mount_path_system_internal") + (return-type "gboolean") + (parameters + '("const-char*" "mount_path") + ) +) + + + +;; From gunixoutputstream.h + +(define-function g_unix_output_stream_get_type + (c-name "g_unix_output_stream_get_type") + (return-type "GType") +) + +(define-function g_unix_output_stream_new + (c-name "g_unix_output_stream_new") + (is-constructor-of "GUnixOutputStream") + (return-type "GOutputStream*") + (parameters + '("int" "fd") + '("gboolean" "close_fd_at_close") + ) +) + + + +;; From gunixvolume.h + + + +;; From gunixvolumemonitor.h + + + ;; From gvfs.h (define-function g_vfs_get_type @@ -4614,3 +4985,12 @@ ) + +;; From gwin32appinfo.h + +(define-function g_win32_app_info_get_type + (c-name "g_win32_app_info_get_type") + (return-type "GType") +) + + |