From c0acaedfe7f4e488a490e07e3184f0709e1fadc2 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Mon, 22 Jun 2009 23:13:36 +0200 Subject: Add docs for gio functions (mostly for content types) --- docs/Makefile.am | 2 + docs/reference/pygio-classes.xml | 1 + docs/reference/pygio-functions.xml | 395 +++++++++++++++++++++++++++++++++++++ 3 files changed, 398 insertions(+) create mode 100644 docs/reference/pygio-functions.xml diff --git a/docs/Makefile.am b/docs/Makefile.am index 6c8dafb..9cf8046 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -53,6 +53,7 @@ HTML_FILES = \ html/class-giovolume.html \ html/class-giovolumemonitor.html \ html/gio-constants.html \ + html/gio-functions.html \ html/gio-class-reference.html \ html/gobject-constants.html \ html/gobject-functions.html \ @@ -79,6 +80,7 @@ XML_FILES = \ reference/pyglib-mainloop.xml \ reference/pygio-classes.xml \ reference/pygio-constants.xml \ + reference/pygio-functions.xml \ reference/pygio-applaunchcontext.xml \ reference/pygio-appinfo.xml \ reference/pygio-asyncresult.xml \ diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml index b46ca91..6c96c58 100644 --- a/docs/reference/pygio-classes.xml +++ b/docs/reference/pygio-classes.xml @@ -43,6 +43,7 @@ + diff --git a/docs/reference/pygio-functions.xml b/docs/reference/pygio-functions.xml new file mode 100644 index 0000000..c690a2f --- /dev/null +++ b/docs/reference/pygio-functions.xml @@ -0,0 +1,395 @@ + + + + + + gio Functions + + + + + Synopsis + + + gio.content_type_can_be_executable + type + + gio.content_type_equals + type1 + type2 + + gio.content_type_from_mime_type + mime_type + + gio.content_type_get_description + type + + gio.content_type_get_icon + type + + gio.content_type_get_mime_type + type + + gio.content_type_guess + filename + data + want_uncertain + + gio.content_type_is_a + type + supertype + + gio.content_type_is_unknown + type + + gio.content_types_get_registered + + + gio.io_error_from_errno + err_no + + + + + + Description + + + These functions are part of the PyGObject gio module + but are not directly associated with a specific class + + + + + Functions + + + gio.content_type_can_be_executable + + + content_type_can_be_executable + type + + + + + type : + a content type string. + + + + Returns : + True if the file type corresponds + to a type that can be executable, False otherwise. + + + + + + The content_type_can_be_executable() function checks + if a content type can be executable. Note that for instance things like text files + can be executables (i.e. scripts and batch files). + + + + + gio.content_type_equals + + + content_type_equals + type1 + type2 + + + + + type1 : + a content type string. + + + + type2 : + a content type string. + + + + Returns : + True if the two strings are + identical or equivalent, False otherwise. + + + + + + The content_type_equals() function compares + two content types for equality. + + + + + gio.content_type_from_mime_type + + + content_type_from_mime_type + mime_type + + + + + mime_type : + a mime type string. + + + + Returns : + The content type or None when does not know. + + + + + + The content_type_from_mime_type() function tries + to find a content type based on the mime type name. + + + + + gio.content_type_get_description + + + content_type_get_description + type + + + + + type : + a content type string. + + + + Returns : + a short description of the content type type. + + + + + + The content_type_get_description() function + gets the human readable description of the content type. + + + + + gio.content_type_get_icon + + + content_type_get_icon + type + + + + + type : + a content type string. + + + + Returns : + A gio.Icon + corresponding to the content type. + + + + + + The content_type_get_icon() function + gets the icon for a content type. + + + + + gio.content_type_get_mime_type + + + content_type_get_mime_type + type + + + + + type : + a content type string. + + + + Returns : + the registered mime-type for the given type, + or None if unknown. + + + + + + The content_type_get_mime_type() function + gets the mime-type for the content type. If one is registered + + + + + gio.content_type_guess + + + content_type_guess + filename + data + want_uncertain + + + + + filename : + a string, or None. + + + + data : + a stream of data, or None. + + + + want_uncertain : + a flag indicating the certainty of the result. + + + + Returns : + a string indicating a guessed content type for the given data. + + + + + + The content_type_guess() function guesses + the content type based on example data. If the function is uncertain, + result_uncertain will be set to True. Either filename + or data may be None, in which case the guess will be + based solely on the other argument. + + + + + gio.content_type_is_a + + + content_type_is_a + type + supertype + + + + + type : + a content type string. + + + + supertype : + a string. + + + + Returns : + True if type is a kind of + supertype, False otherwise. + + + + + + The content_type_is_a() function determines + if type is a subset of supertype. + + + + + gio.content_type_is_unknown + + + content_type_is_unknown + type + + + + + type : + a content type string. + + + + Returns : + True if the type is the unknown type. + + + + + + The content_type_is_unknown() function checks if + the content type is the generic "unknown" type. On unix this is the + "application/octet-stream" mimetype, while on win32 it is "*". + + + + + gio.content_types_get_registered + + + content_types_get_registered + + + + + + Returns : + a list of the registered content types. + + + + + + The content_types_get_registered() function + gets a list of strings containing all the registered content types + known to the system. + + + + + gio.io_error_from_errno + + + io_error_from_errno + err_no + + + + + err_no : + Error number. + + + + Returns : + a + + + + + + + The io_error_from_errno() function converts + error codes into GIO error codes. + + + + -- cgit