aboutsummaryrefslogtreecommitdiffstats
path: root/shell/Evolution-Activity.idl
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-06-23 14:46:13 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-06-23 14:46:13 +0800
commitb106b13525048195d99bcbde31e0e535972cbab4 (patch)
tree87b999777762c5bcea16a9430fbb94cc560de8c0 /shell/Evolution-Activity.idl
parent72ca61d74b9942040638b628a6f1358e02d23d42 (diff)
downloadgsoc2013-evolution-b106b13525048195d99bcbde31e0e535972cbab4.tar.gz
gsoc2013-evolution-b106b13525048195d99bcbde31e0e535972cbab4.tar.zst
gsoc2013-evolution-b106b13525048195d99bcbde31e0e535972cbab4.zip
Implemented an Evolution::Activity interface for keeping track of
background tasks. The Activity interface is added to the shell, and the status of the various tasks is now displayed in a task bar widget at the bottom of the EShellView. I also implemented a simple test component to test all this stuff. svn path=/trunk/; revision=10434
Diffstat (limited to 'shell/Evolution-Activity.idl')
-rw-r--r--shell/Evolution-Activity.idl108
1 files changed, 108 insertions, 0 deletions
diff --git a/shell/Evolution-Activity.idl b/shell/Evolution-Activity.idl
new file mode 100644
index 0000000000..a2296d568b
--- /dev/null
+++ b/shell/Evolution-Activity.idl
@@ -0,0 +1,108 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Activity management for Evolution.
+ *
+ * Authors:
+ * Ettore Perazzoli <ettore@ximian.com>
+ *
+ * Copyright (C) 2000, 2001 Ximian, Inc.
+ */
+
+module GNOME {
+module Evolution {
+
+interface Activity : Bonobo::Unknown {
+ typedef long ActivityID;
+
+ enum DialogType {
+ DIALOG_TYPE_NONE,
+ DIALOG_TYPE_MESSAGE,
+ DIALOG_TYPE_WARNING,
+ DIALOG_TYPE_INPUT,
+ DIALOG_TYPE_ERROR
+ };
+
+ enum DialogAction {
+ DIALOG_ACTION_DISPLAY,
+ DIALOG_ACTION_POSTPONE
+ };
+
+ exception InvalidIcon {};
+ exception IdNotFound {};
+
+ /* Events propagated through the listener:
+
+ - "Clicked": The status widget has been clicked on.
+
+ - "DisplayProgress": Display a nice progress dialog for this
+ operation.
+
+ - "DisplayDialog": The dialog that the component has requested
+ through ::requestDialog() can now be safely displayed.
+
+ - "Cancelled": The user wants the operation to be cancelled.
+ */
+
+ /**
+ * operationStarted:
+ * @component_id: ID of the component starting the operation.
+ * @information: Informative string about the operation being performed.
+ * @cancellable: Whether this operation should be cancellable by
+ * the user from the shell view.
+ * @event_listener: Listener which the events for the activity
+ * widget will be passed to.
+ * @activity_id: A unique ID for the activity, to be used to update the
+ * status of the operation.
+ * @suggest_display: Whether displaying the dialog might be a nice idea.
+ */
+ void operationStarted (in string component_id,
+ in AnimatedIcon icon,
+ in string information,
+ in boolean cancellable,
+ in Bonobo::Listener event_listener,
+ out ActivityID activity_id,
+ out boolean suggest_display)
+ raises (InvalidIcon);
+
+ /**
+ * operationProgressing:
+ * @activity: The unique ID for the activity whose status we want to update.
+ * @information: New informative string. If empty, the informative string
+ * isn't changed.
+ * @progress: A float from 0.0 to 1.0 indicating the status of completion.
+ *
+ * Update the status of the specified @activity.
+ */
+ void operationProgressing (in ActivityID activity,
+ in string information,
+ in float progress)
+ raises (IdNotFound);
+
+ /**
+ * operationFinished:
+ * @activity: The unique ID for the activity that has been completed.
+ *
+ * Report that the specified @activity has been completed. After this
+ * method is invoked, @activity is not considered to be a valid ID
+ * anymore.
+ */
+ void operationFinished (in ActivityID activity);
+
+ /**
+ * requestDialog:
+ *
+ * Inform the shell that the specified @activity requires user input
+ * from a dialog. The returned value specifies whether the shell wants
+ * the dialog to be shown now (%DIALOG_ACTION_DISPLAY) or postponed
+ * (%DIALOG_ACTION_POSTPONE). If the return value is
+ * %DIALOG_ACTION_POSTPONE, the component should wait for the
+ * "DisplayDialog" event before proceeding further. In that case, the
+ * shell will flash the label related to this activity, and emit
+ * "DisplayDialog" through the event source when the user clicks on it.
+ */
+ DialogAction requestDialog (in ActivityID activity,
+ in DialogType dialog_type);
+};
+
+};
+};