From 06828fcab9b80b89867ce269a45dbc62aec08c38 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Sun, 8 Mar 2009 22:11:30 +0000 Subject: Add few gio classes. 2009-03-08 Gian Mario Tagliaretti * docs/Makefile.am: * docs/reference/pygio-classes.xml: * docs/reference/pygobject-ref.xml: * docs/reference/pygio-applaunchcontext.xml: * docs/reference/pygio-cancellable.xml: Add few gio classes. svn path=/trunk/; revision=1023 --- docs/Makefile.am | 6 +- docs/reference/pygio-applaunchcontext.xml | 194 ++++++++++++++++++++++++++++++ docs/reference/pygio-cancellable.xml | 159 ++++++++++++++++++++++++ docs/reference/pygio-classes.xml | 12 ++ docs/reference/pygobject-ref.xml | 1 + 5 files changed, 371 insertions(+), 1 deletion(-) create mode 100644 docs/reference/pygio-applaunchcontext.xml create mode 100644 docs/reference/pygio-cancellable.xml create mode 100644 docs/reference/pygio-classes.xml (limited to 'docs') diff --git a/docs/Makefile.am b/docs/Makefile.am index 67de57c..dacdf45 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -14,8 +14,10 @@ HTML_FILES = \ html/class-glibmainloop.html \ html/glib-constants.html \ html/glib-functions.html \ + html/gio-applaunchcontext.html \ html/gobject-class-reference.html \ html/glib-class-reference.html \ + html/gio-class-reference.html \ html/gobject-constants.html \ html/gobject-functions.html \ html/index.html \ @@ -38,7 +40,9 @@ XML_FILES = \ reference/pyglib-constants.xml \ reference/pyglib-functions.xml \ reference/pyglib-maincontext.xml \ - reference/pyglib-mainloop.xml + reference/pyglib-mainloop.xml \ + reference/pygio-classes.xml \ + reference/pygio-applaunchcontext.xml XSL_FILES = \ xsl/common.xsl \ diff --git a/docs/reference/pygio-applaunchcontext.xml b/docs/reference/pygio-applaunchcontext.xml new file mode 100644 index 0000000..0d5edb6 --- /dev/null +++ b/docs/reference/pygio-applaunchcontext.xml @@ -0,0 +1,194 @@ + + + + + + gio.AppLaunchContext + Application launch context. + + + + Synopsis + + + gio.AppLaunchContext + gobject.GObject + + + gio.AppLaunchContext + + + + + get_display + info + files + + + get_startup_notify_id + info + files + + + launch_failed + startup_notify_id + + + + + + + Ancestry + ++-- gobject.GObject + +-- gio.AppLaunchContext + + + + + + Description + + + The gio.AppLaunchContext + is used for integrating the launch with the launching application. This is used to handle for + instance startup notification and launching the new application on the same screen as the launching window. + + + + + Constructor + + + gio.AppLaunchContext + + + + + Returns : + a new + gio.AppLaunchContext. + + + + + + Creates a new application launch context. This is not normally used, instead + you instantiate a subclass of this, such as + gtk.gdk.AppLaunchContext. + + + + + + Methods + + + gio.AppLaunchContext.get_display + + + get_display + info + files + + + + + info : + a + gio.AppInfo + + + + files : + a list of + gio.File + objects. + + + Returns : + a display string for the display. + + + + + + The get_display() method gets the display + string for the display. This is used to ensure new applications + are started on the same display as the launching application. + + + + + gio.AppLaunchContext.get_startup_notify_id + + + get_startup_notify_id + info + files + + + + + info : + a + gio.AppInfo + + + + files : + a list of + gio.File + objects. + + + Returns : + a startup notification ID for the application, + or None if not supported. + + + + + + The get_startup_notify_id() method initiates + startup notification for the application and returns the DESKTOP_STARTUP_ID + for the launched operation, if supported. + + + Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard. + + + + + gio.AppLaunchContext.launch_failed + + + launch_failed + startup_notify_id + + + + + startup_notify_id : + the startup notification id that was returned by + get_startup_notify_id. + + + + Returns : + a startup notification ID for the application, + or None if not supported. + + + + + + The get_startup_notify_id() method is called + when an application has failed to launch, so that it can cancel the application + startup notification started in + get_startup_notify_id + + + + diff --git a/docs/reference/pygio-cancellable.xml b/docs/reference/pygio-cancellable.xml new file mode 100644 index 0000000..d36421c --- /dev/null +++ b/docs/reference/pygio-cancellable.xml @@ -0,0 +1,159 @@ + + + + + + gio.Cancellable + Thread-safe Operation Cancellation Stack. + + + + Synopsis + + + gio.Cancellable + gobject.GObject + + + gio.Cancellable + + + + + cancel + + + + get_fd + + + + is_cancelled + + + + pop_current + + + + push_current + + + + reset + + + + set_error_if_cancelled + + + + + + + + Ancestry + ++-- gobject.GObject + +-- gio.Cancellable + + + + + + Description + + + The gio.Cancellable + is a thread-safe operation cancellation stack used throughout GIO to allow for + cancellation of synchronous and asynchronous operations. + + + + + Constructor + + + gio.Cancellable + + + + + Returns : + a new + gio.Cancellable. + + + + + + Creates a new gio.Cancellable object. + + + Applications that want to start one or more operations that should be cancellable should create a + gio.Cancellable + and pass it to the operations. + + + One gio.Cancellable + can be used in multiple consecutive operations, but not in multiple concurrent operations. + + + + + + Methods + + + gio.Cancellable.cancel + + + cancel + + + + + + + + The cancel() method will set cancellable to cancelled, + and will emit the "cancelled" signal. (However, see the warning about race conditions + in the documentation for that signal if you are planning to connect to it.) + + + This function is thread-safe. In other words, you can safely call it from a thread + other than the one running the operation that was passed the cancellable. + + + The convention within gio is that cancelling an asynchronous operation causes it + to complete asynchronously. That is, if you cancel the operation from the same thread + in which it is running, then the operation's GAsyncReadyCallback will not be invoked + until the application returns to the main loop. + + + + + gio.Cancellable.get_fd + + + get_fd + + + + + + Returns : + A valid file descriptor. -1 if the file descriptor + is not supported, or on errors. + + + + + The get_fd() method gets the file descriptor + for a cancellable job. This can be used to implement cancellable operations + on Unix systems. The returned fd will turn readable when cancellable is cancelled. + + + + diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml new file mode 100644 index 0000000..f4df171 --- /dev/null +++ b/docs/reference/pygio-classes.xml @@ -0,0 +1,12 @@ + + + + +PyGioClass Reference + + + + + diff --git a/docs/reference/pygobject-ref.xml b/docs/reference/pygobject-ref.xml index ee90a55..08dd1dd 100644 --- a/docs/reference/pygobject-ref.xml +++ b/docs/reference/pygobject-ref.xml @@ -24,6 +24,7 @@ module. +