From 18bab9e20f4758394bc92b6e218c001f6a8665b5 Mon Sep 17 00:00:00 2001 From: John Finlay Date: Thu, 17 Aug 2006 03:45:15 +0000 Subject: [PATCH] Update docs for gobject functions. * docs/reference/pygobject-functions.xml: Update docs for gobject functions. --- ChangeLog | 5 + docs/reference/pygobject-functions.xml | 292 ++++++++++++++++++++++++- 2 files changed, 296 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 65e8fe8..ce85e85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-08-16 John Finlay + + * docs/reference/pygobject-functions.xml: Update docs for + gobject functions. + 2006-08-15 Murray Cumming * gobject/pygobject-private.h: diff --git a/docs/reference/pygobject-functions.xml b/docs/reference/pygobject-functions.xml index 6a18676..c0c6234 100644 --- a/docs/reference/pygobject-functions.xml +++ b/docs/reference/pygobject-functions.xml @@ -138,6 +138,41 @@ linkend="function-gobject--get-current-time">gobject.get_current_time gobject.main_depth + + gobject.threads_init + + gobject.signal_accumulator_true_handled + + gobject.add_emission_hook + type + name + callback + ... + + gobject.remove_emission_hook + type + name + hook_id + + gobject._install_metaclass + metaclass + + gobject.filename_display_name + filename + + gobject.filename_display_basename + filename + + gobject.filename_from_utf8 + utf8string @@ -1347,7 +1382,7 @@ from the epoch. Returns : - he depth of the stack of calls to the main + the depth of the stack of calls to the main context. @@ -1368,6 +1403,261 @@ method), it returns 2. And so forth. + + gobject.threads_init + + + gobject.threads_init + + + + + Returns : + + + + + This function is available in PyGTK 2.4 and above. + + + The threads_init() function initializes the + the use of Python threading in the gobject module. This function is + different than the gtk.gdk.threads_init() + function as that function also initializes the gdk threads. + + + + + gobject.signal_accumulator_true_handled + + + gobject.signal_accumulator_true_handled + + + + This function is available in PyGTK 2.8 and above. + + + The signal_accumulator_true_handled() + function is only used as accumulator argument when registering + signals. + + + + + gobject.add_emission_hook + + + gobject.add_emission_hook + type + name + callback + ... + + + + type : + a Python GObject instance or + type + + + name : + a signal name + + + callback : + a function + + + ... : + zero or more extra arguments that will be + passed to callback. + + + Returns : + the hook id, for later use with gobject.signal_remove_emission_hook(). + + + + This function is available in PyGTK 2.8 and above. + + + The add_emission_hook() function adds an + emission hook for the signal specified by name, + which will get called for any emission of that signal, independent of + the instance. This is possible only for signals which don't have the + gobject.SIGNAL_NO_HOOKS flag set. + + + + + gobject.remove_emission_hook + + + gobject.remove_emission_hook + type + name + hook_id + + + + type : + a Python GObject instance or + type + + + name : + a signal name + + + hook_id : + the id of the emission hook as returned by the + gobject.add_emission_hook()) + function. + + + Returns : + + + + + This function is available in PyGTK 2.8 and above. + + + The remove_emission_hook() function deletes + an emission hook. + + + + + gobject._install_metaclass + + + gobject._install_metaclass + metaclass + + + + metaclass : + + + + + This function is available in PyGTK 2.10 and above. + + + The _install_metaclass() function installs + the metaclass specified by metaclass. + + + + + gobject.filename_display_name + + + gobject.filename_display_name + filename + + + + filename : + a pathname in the file name + encoding + + + Returns : + an UTF8 rendition of + filename. + + + + This function is available in PyGTK 2.10 and above. + + + The filename_display_name() function + converts a filename into a valid UTF-8 string. The conversion is not + necessarily reversible, so you should keep the original around and use + the return value of this function only for display purposes. Unlike + g_filename_to_utf8(), the result is guaranteed to be non-None even if + the filename actually isn't in the file name encoding. + + If you know the whole pathname of the file you should use the + gobject.filename_display_basename() + function, since that allows location-based translation of + filenames. + + + + + gobject.filename_display_basename + + + gobject.filename_display_basename + filename + + + + filename : + an absolute pathname in the file name + encoding + + + Returns : + an UTF8 rendition of + filename. + + + + This function is available in PyGTK 2.10 and above. + + + The filename_display_basename() function + returns the display basename for the particular filename, guaranteed + to be valid UTF-8. The display name might not be identical to the + filename, for instance there might be problems converting it to UTF-8, + and some files can be translated in the display. + + You must pass the whole absolute pathname to this functions so + that translation of well known locations can be done. + + This function is preferred over the gobject.filename_display_name() + function if you know the whole path, as it allows translation. + + + + + gobject.filename_from_utf8 + + + gobject.filename_from_utf8 + utf8string + + + + utf8string : + a UTF-8 encoded string. + + + Returns : + a filename encoded in the GLib filename + encoding. + + + + This function is available in PyGTK 2.10 and above. + + + The filename_from_utf8() function converts + a string from UTF-8 to the encoding GLib uses for filenames. Note that + on Windows GLib uses UTF-8 for filenames. + + +