From 04d307068875e640d7e5046951c44b1f78363272 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Sun, 22 Mar 2009 16:57:24 +0000 Subject: Add gio.FileIcon and gio.FileEnumerator in docs. 2009-03-22 Gian Mario Tagliaretti * docs/Makefile.am: * docs/reference/pygio-classes.xml: * docs/reference/pygio-fileicon.xml: * docs/reference/pygio-fileenumerator.xml: Add gio.FileIcon and gio.FileEnumerator in docs. * docs/reference/pygio-constants.xml: Add gio.ERROR_* constants. * docs/reference/pygio-applaunchcontext.xml: * docs/reference/pygio-emblemedicon.xml: Fix a couple of typos. svn path=/trunk/; revision=1029 --- docs/reference/ChangeLog | 13 + docs/reference/pygio-applaunchcontext.xml | 2 +- docs/reference/pygio-classes.xml | 2 + docs/reference/pygio-constants.xml | 210 +++++++++++++ docs/reference/pygio-emblemedicon.xml | 2 +- docs/reference/pygio-fileenumerator.xml | 488 ++++++++++++++++++++++++++++++ docs/reference/pygio-fileicon.xml | 109 +++++++ 7 files changed, 824 insertions(+), 2 deletions(-) create mode 100644 docs/reference/pygio-fileenumerator.xml create mode 100644 docs/reference/pygio-fileicon.xml (limited to 'docs/reference') diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 8246465..1afd7f7 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,16 @@ +2009-03-22 Gian Mario Tagliaretti + + * docs/Makefile.am: + * docs/reference/pygio-classes.xml: + * docs/reference/pygio-fileicon.xml: + * docs/reference/pygio-fileenumerator.xml: Add gio.FileIcon and + gio.FileEnumerator in docs. + + * docs/reference/pygio-constants.xml: Add gio.ERROR_* constants. + + * docs/reference/pygio-applaunchcontext.xml: + * docs/reference/pygio-emblemedicon.xml: Fix a couple of typos. + 2009-03-09 Gian Mario Tagliaretti * docs/Makefile.am: diff --git a/docs/reference/pygio-applaunchcontext.xml b/docs/reference/pygio-applaunchcontext.xml index 0d5edb6..66bb229 100644 --- a/docs/reference/pygio-applaunchcontext.xml +++ b/docs/reference/pygio-applaunchcontext.xml @@ -2,7 +2,7 @@ - + gio.AppLaunchContext Application launch context. diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml index c94cd0f..5a9ec86 100644 --- a/docs/reference/pygio-classes.xml +++ b/docs/reference/pygio-classes.xml @@ -12,6 +12,8 @@ + + diff --git a/docs/reference/pygio-constants.xml b/docs/reference/pygio-constants.xml index 37e4143..dd85126 100644 --- a/docs/reference/pygio-constants.xml +++ b/docs/reference/pygio-constants.xml @@ -13,6 +13,7 @@ + @@ -54,6 +55,215 @@ + + + Gio Error Constants + + + GIOError Error codes returned by GIO functions. + + + + + gio.ERROR_ALREADY_MOUNTED + + File is already mounted. + + + + gio.ERROR_BUSY + + File is busy. + + + + gio.ERROR_CANCELLED + + Operation was cancelled. See + gio.Cancellable. + + + + + gio.ERROR_CANT_CREATE_BACKUP + + Backup couldn't be created. + + + + gio.ERROR_CLOSED + + File was closed. + + + + gio.ERROR_EXISTS + + File already exists error. + + + + gio.ERROR_FAILED + + Generic error condition for when any operation fails. + + + + gio.ERROR_FAILED_HANDLED + + Operation failed and a helper program has already interacted with + the user. Do not display any error dialog. + + + + gio.ERROR_FILENAME_TOO_LONG + + Filename is too many characters. + + + + gio.ERROR_HOST_NOT_FOUND + + Host couldn't be found (remote operations). + + + + gio.ERROR_INVALID_ARGUMENT + + Invalid argument. + + + + gio.ERROR_INVALID_FILENAME + + Filename is invalid or contains invalid characters. + + + + gio.ERROR_IS_DIRECTORY + + File is a directory error. + + + + gio.ERROR_NOT_DIRECTORY + + File is not a directory. + + + + gio.ERROR_NOT_EMPTY + + File is a directory that isn't empty. + + + + gio.ERROR_NOT_FOUND + + File not found error. + + + + gio.ERROR_NOT_MOUNTABLE_FILE + + File cannot be mounted. + + + + gio.ERROR_NOT_MOUNTED + + File isn't mounted. + + + + gio.ERROR_NOT_REGULAR_FILE + + File is not a regular file. + + + + gio.ERROR_NOT_SUPPORTED + + Operation not supported for the current backend. + + + + gio.ERROR_NOT_SYMBOLIC_LINK + + File is not a symbolic link. + + + + gio.ERROR_NO_SPACE + + No space left on drive. + + + + gio.ERROR_PENDING + + Operations are still pending. + + + + gio.ERROR_PERMISSION_DENIED + + Permission denied. + + + + gio.ERROR_READ_ONLY + + File is read only. + + + + gio.ERROR_TIMED_OUT + + Operation timed out. + + + + gio.ERROR_TOO_MANY_LINKS + + File contains too many symbolic links. + + + + + gio.ERROR_WOULD_BLOCK + + Operation would block. + + + + gio.ERROR_WOULD_MERGE + + Operation would merge files. + + + + gio.ERROR_WOULD_RECURSE + + Operation would be recursive. + + + + gio.ERROR_WRONG_ETAG + + File's Entity Tag was incorrect. + + + + diff --git a/docs/reference/pygio-emblemedicon.xml b/docs/reference/pygio-emblemedicon.xml index f4582b8..9b5ef8a 100644 --- a/docs/reference/pygio-emblemedicon.xml +++ b/docs/reference/pygio-emblemedicon.xml @@ -72,7 +72,7 @@ - + Constructor diff --git a/docs/reference/pygio-fileenumerator.xml b/docs/reference/pygio-fileenumerator.xml new file mode 100644 index 0000000..4b16bf6 --- /dev/null +++ b/docs/reference/pygio-fileenumerator.xml @@ -0,0 +1,488 @@ + + + + + + gio.FileEnumerator + Enumerated Files Routines. + + + + Synopsis + + + gio.FileEnumerator + gobject.GObject + + + close + cancellableNone + + + close_async + callback + io_priorityglib.PRIORITY_DEFAULT + cancellableNone + user_dataNone + + + close_finish + result + + + get_container + + + + has_pending + + + + is_closed + + + + next_file + cancellableNone + + + next_files_async + num_files + callback + io_priorityglib.PRIORITY_DEFAULT + cancellableNone + user_dataNone + + + next_files_finish + result + + + set_pending + pending + + + + + + + + Ancestry + ++-- gobject.GObject + +-- gio.FileEnumerator + + + + + + gio.FileEnumerator Properties + +
+ + + + + + + + "container" + Write - Construct only + The container that is being enumerated. + + + + +
+ +
+ + + Description + + + The gio.FileEnumerator + allows you to operate on a set of + gio.Files + returning a + gio.FileInfo + structure for each file enumerated (e.g. + gio.File.enumerate_children() + will return a The gio.FileEnumerator + for each of the children within a directory). + + + To get the next file's information from a + The gio.FileEnumerator use + gio.FileEnumerator.next_file() + or its asynchronous version, + gio.FileEnumerator.next_files_async(). + Note that the asynchronous version will return a list of + gio.FileInfos, + whereas the synchronous will only return the next file in the enumerator. + + + To close a gio.FileEnumerator + use close, + or its asynchronous version, + close_async. + Once a gio.FileEnumerator + is closed, no further actions may be performed on it. + + + + + Methods + + + gio.FileEnumerator.close + + + close + + cancellableNone + + + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + Returns : + True on success or + False on error. + + + + + + The close() method releases all resources used by this + enumerator, making the + + return gio.ERROR_CLOSED on all calls. + + + This will be automatically called when the last reference is dropped, + but you might want to call this function to make sure resources are released + as early as possible. + + + + + gio.FileEnumerator.close_async + + + close_async + + callback + + + io_priorityglib.PRIORITY_DEFAULT + + + cancellableNone + + + user_dataNone + + + + + + callback : + A GAsyncReadyCallback to call when the request is satisfied. + + + + io_priority : + The + of the request. + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + user_data : + The data to pass to callback function. + + + + + + The close_async() method asynchronously closes the file enumerator. + + + If cancellable is not None, then the operation can be cancelled by + triggering the cancellable object from another thread. If the operation was cancelled, + the error gio.ERROR_CANCELLED will be returned in + gio.FileEnumerator.close_finish(). + + + + + gio.FileEnumerator.close_finish + + + close_finish + result + + + + + result : + a GAsyncResult. + + + + Returns : + True if the close operation + has finished successfully. + + + + + The close_finish() method finishes closing a file enumerator, started from + gio.FileEnumerator.close_async(). + + + If the file enumerator was already closed when + gio.FileEnumerator.close_async() + was called, then this function will report gio.ERROR_CLOSED in error, and return False. + If the file enumerator had pending operation when the close operation was started, then this function will report + gio.ERROR_PENDING, and return False. If cancellable was not None, then the operation + may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled, + the error gio.ERROR_CANCELLED will be set, and False will be returned. + + + + + gio.FileEnumerator.get_container + + + get_container + + + + + + Returns : + the gio.File + which is being enumerated. + + + + + The get_container() method gets the + gio.File + container which is being enumerated. + + + + + gio.FileEnumerator.has_pending + + + has_pending + + + + + + Returns : + True if the enumerator has pending operations. + + + + + The has_pending() method checks if the file enumerator has pending operations. + + + + + gio.FileEnumerator.is_closed + + + is_closed + + + + + + Returns : + True if the enumerator is closed. + + + + + The is_closed() method checks if the file enumerator has been closed. + + + + + gio.FileEnumerator.next_file + + + next_file + cancellableNone + + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + Returns : + A gio.FileInfo + or None on error or end of enumerator. + + + + + + The next_file() method returns information for the next + file in the enumerated object. Will block until the information is available. + The gio.FileInfo + returned from this function will contain attributes that match the attribute string + that was passed when the GFileEnumerator was created. + + + On error, returns None and sets error to the error. If the enumerator + is at the end, None will be returned and error will be unset. + + + + + gio.FileEnumerator.next_files_async + + + next_files_async + num_files + callback + + io_priorityglib.PRIORITY_DEFAULT + + + cancellableNone + + + user_dataNone + + + + + + num_files : + The number of file info objects to request. + + + + callback : + A GAsyncReadyCallback to call when the request is satisfied. + + + + io_priority : + The + of the request. + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + user_data : + The data to pass to callback function. + + + + + + The next_files_async() method requests information for a number + of files from the enumerator asynchronously. When all i/o for the operation is finished + the callback will be called with the requested information. + + + The callback can 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 gio.ERROR_CANCELLED. + + + During an async request no other sync and async calls are allowed, and will result in gio.ERROR_PENDING errors. + + + Any outstanding i/o request with higher priority (lower numerical value) will be executed + before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT. + + + + + gio.FileEnumerator.next_files_finish + + + next_files_finish + result + + + + + result : + a GAsyncResult. + + + + Returns : + A list of + gio.FileInfos. + + + + + + The next_files_finish() method finishes the + asynchronous operation started with + gio.FileEnumerator.next_files_async(). + + + + + gio.FileEnumerator.set_pending + + + set_pending + pending + + + + + pending : + A boolean value. + + + + + + The push_current() method sets the file enumerator as having pending operations. + + + +
diff --git a/docs/reference/pygio-fileicon.xml b/docs/reference/pygio-fileicon.xml new file mode 100644 index 0000000..d4a443b --- /dev/null +++ b/docs/reference/pygio-fileicon.xml @@ -0,0 +1,109 @@ + + + + + + gio.FileIcon + Icons pointing to an image file. + + + + Synopsis + + + gio.FileIcon + gobject.GObject + gio.Icon + gio.LoadableIcon + + + gio.FileIcon + file + + + + get_file + + + + + + + + + Ancestry + ++-- gobject.GObject + +-- gio.FileIcon + + + + + + Description + + + The gio.FileIcon + specifies an icon by pointing to an image file to be used as icon. + + + + + Constructor + + + gio.FileIcon + file + + + + file : + a + gio.File + + + + Returns : + a new + gio.FileIcon + for the given file, or None on error. + + + + + + Creates a new icon for a file. + + + + + + Methods + + + gio.FileIcon.get_file + + + get_file + + + + + + Returns : + a + gio.File + or None. + + + + + + The get_file() method gets the + gio.File + associated with the given icon. + + + + -- cgit