anjuta r4218 - in trunk: . libanjuta manuals/reference/libanjuta
- From: sgranjoux svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4218 - in trunk: . libanjuta manuals/reference/libanjuta
- Date: Tue, 2 Sep 2008 20:29:15 +0000 (UTC)
Author: sgranjoux
Date: Tue Sep 2 20:29:15 2008
New Revision: 4218
URL: http://svn.gnome.org/viewvc/anjuta?rev=4218&view=rev
Log:
* libanjuta/anjuta-sync-command.c,
libanjuta/anjuta-command.c,
manuals/reference/libanjuta/libanjuta-docs.sgml:
Update documentation
Modified:
trunk/ChangeLog
trunk/libanjuta/anjuta-command.c
trunk/libanjuta/anjuta-sync-command.c
trunk/manuals/reference/libanjuta/libanjuta-docs.sgml
Modified: trunk/libanjuta/anjuta-command.c
==============================================================================
--- trunk/libanjuta/anjuta-command.c (original)
+++ trunk/libanjuta/anjuta-command.c Tue Sep 2 20:29:15 2008
@@ -29,7 +29,7 @@
* @short_description: System for creating objects that provide a standard
* interface to external components (libraries, processes,
* etc.)
- * @see_also: #AnjutaAsyncCommand
+ * @see_also: #AnjutaAsyncCommand, #AnjutaSyncCommand
* @include libanjuta/anjuta-command.h
*
* #AnjutaCommand is the base class for objects that are designed to provide
@@ -39,14 +39,17 @@
* to concern themselves with the exact details of how these components work.
*
* To create command objects, plugins derive them from an #AnjutaCommand
- * subclass like #AnjutaAsyncCommand, which runs commands in another thread.
+ * subclass like #AnjutaAsyncCommand, which runs commands in another thread or
+ * #AnjutaSyncCommand, which runs commands synchronously.
+ *
* These classes determine how ::run is called and how signals are emitted.
* ::run is responsible for actually doing the work of the command. It is the
* responsiblity of the command object that does a certain task to implement
* ::run to do its job. Everything else is normally implemented by its parent
* classes at this point
*
- * For an example of how to use #AnjutaCommand, see the Subversion plugin.
+ * For an example of how to use #AnjutaCommand, see the Subversion and Git
+ * plugins.
*/
struct _AnjutaCommandPriv
@@ -180,8 +183,8 @@
* @self: Command object.
*
* Used by base classes derived from #AnjutaCommand to emit the ::data-arrived
- * signal. This method should not be used by client code or #AnjutaCommand
- * objects that are not base classes.
+ * signal. This method should be used by both base command classes and
+ * non-base classes as appropriate.
*/
void
anjuta_command_notify_data_arrived (AnjutaCommand *self)
Modified: trunk/libanjuta/anjuta-sync-command.c
==============================================================================
--- trunk/libanjuta/anjuta-sync-command.c (original)
+++ trunk/libanjuta/anjuta-sync-command.c Tue Sep 2 20:29:15 2008
@@ -24,6 +24,24 @@
#include "anjuta-sync-command.h"
+/**
+ * SECTION: anjuta-sync-command
+ * @short_description: #AnjutaCommand subclass that serves as the base for
+ * commands that run synchronously.
+ * @include: libanjuta/anjuta-sync-command.h
+ *
+ * #AnjutaSyncCommand allows plugins to abstract the work of tasks that do not
+ * need to be run in another thread. This class can provide a base for
+ * abstratraction between client code and asynchronous facilities such as
+ * #AnjutaLauncher or GIO, and is especially useful when complicated tasks
+ * are being performed.
+ *
+ * #AnjutaSyncCommand simply calls ::run directly from ::start, and emits the
+ * command-finished signal as soon as it returns.
+ *
+ * For an example of how #AnjutaSyncCommand is used, see the Git plugin.
+ */
+
G_DEFINE_TYPE (AnjutaSyncCommand, anjuta_sync_command, ANJUTA_TYPE_COMMAND);
static void
Modified: trunk/manuals/reference/libanjuta/libanjuta-docs.sgml
==============================================================================
--- trunk/manuals/reference/libanjuta/libanjuta-docs.sgml (original)
+++ trunk/manuals/reference/libanjuta/libanjuta-docs.sgml Tue Sep 2 20:29:15 2008
@@ -71,6 +71,7 @@
<xi:include href="xml/anjuta-debug.xml"/>
<xi:include href="xml/anjuta-error.xml"/>
<xi:include href="xml/anjuta-command.xml"/>
+ <xi:include href="xml/anjuta-sync-command.xml"/>
<xi:include href="xml/anjuta-async-command.xml"/>
<xi:include href="xml/anjuta-message-area.xml"/>
</chapter>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]