[maemo-commits] [maemo-commits] r9407 - in projects/haf/branches/hildon-libs/hildon-1: . doc src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jan 29 14:23:50 EET 2007
Author: mdk
Date: 2007-01-29 14:23:48 +0200 (Mon, 29 Jan 2007)
New Revision: 9407

Modified:
   projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
   projects/haf/branches/hildon-libs/hildon-1/doc/Makefile.am
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-hvolumebar.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-note.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-number-editor.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-program.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-range-editor.c
Log:
Moving the sgml documentation to code.


Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-01-29 12:22:58 UTC (rev 9406)
+++ projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-01-29 12:23:48 UTC (rev 9407)
@@ -1,6 +1,15 @@
 2007-01-29  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
 
 	* doc/Makefile.am:
+	* src/hildon-hvolumebar.c:
+	* src/hildon-note.c:
+	* src/hildon-number-editor.c:
+	* src/hildon-program.c:
+	* src/hildon-range-editor.c: Moving thesgml documentation to code.
+
+2007-01-29  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
+
+	* doc/Makefile.am:
 	* src/hildon-calendar-popup.c:
 	* src/hildon-color-button.c:
 	* src/hildon-color-chooser-dialog.h:

Modified: projects/haf/branches/hildon-libs/hildon-1/doc/Makefile.am
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/doc/Makefile.am	2007-01-29 12:22:58 UTC (rev 9406)
+++ projects/haf/branches/hildon-libs/hildon-1/doc/Makefile.am	2007-01-29 12:23:48 UTC (rev 9407)
@@ -3,10 +3,6 @@
 						  hildon-undocumented.txt		\
 						  version.xml
 
-CLEANFILES					= version.xml
-
-
-
 DOC_MODULE					= hildon
 
 DOC_MAIN_SGML_FILE				= $(DOC_MODULE)-docs.sgml

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-hvolumebar.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-hvolumebar.c	2007-01-29 12:22:58 UTC (rev 9406)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-hvolumebar.c	2007-01-29 12:23:48 UTC (rev 9407)
@@ -30,6 +30,15 @@
  * The #HildonHVolumebar widget displays a horizontal volume bar that allows
  * increasing or decreasing volume within a pre-defined range, and includes 
  * a mute icon which users can click to mute the sound.
+ * 
+ * <example>
+ * <programlisting>
+ * GtkWidget *volbar = hildon_hvolumebar_new ();
+ * g_signal_connect (G_OBJECT(volbar), "mute_toggled", G_CALLBACK(mute_toggle), NULL);
+ * g_signal_connect (G_OBJECT(volbar), "level_changed", G_CALLBACK(level_change), NULL);
+ * </programlisting>
+ * </example>
+ *
  */
 
 #include                                        "hildon-hvolumebar.h"

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-note.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-note.c	2007-01-29 12:22:58 UTC (rev 9406)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-note.c	2007-01-29 12:23:48 UTC (rev 9407)
@@ -30,6 +30,22 @@
  * A simple note contains an information text and an OK button to be
  * pressed.  Additional features such as progress bars or animation can
  * also be included. 
+ * 
+ * <example>
+ * <title>HildonNote example</title>
+ * <programlisting>
+ * <!-- -->
+ * hildon_note_new_confirmation (window, "Confirmation message...");
+ * <!-- -->
+ * i = gtk_dialog_run (GTK_DIALOG (note));
+ * gtk_widget_destroy (GTK_WIDGET (note));
+ * <!-- -->
+ * if (i == GTK_RESPONSE_OK)
+ *      gtk_infoprint (window, "User pressed 'OK' button'");
+ * else
+ *      gtk_infoprint (window, "User pressed 'Cancel' button" );
+ * </programlisting>
+ * </example>
  */
 
 #ifdef                                          HAVE_CONFIG_H

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-number-editor.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-number-editor.c	2007-01-29 12:22:58 UTC (rev 9406)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-number-editor.c	2007-01-29 12:23:48 UTC (rev 9407)
@@ -29,6 +29,14 @@
  * HildonNumberEditor is used to enter a number from a specific range. 
  * There are two buttons to scroll the value in number field. 
  * Manual input is also possible.
+ *
+ * <example>
+ * <title>HildonNumberEditor example</title>
+ * <programlisting>
+ * number_editor = hildon_number_editor_new (-250, 500);
+ * hildon_number_editor_set_range (number_editor, 0, 100);
+ * </programlisting>
+ * </example>
  */
 
 #ifdef                                          HAVE_CONFIG_H

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-program.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-program.c	2007-01-29 12:22:58 UTC (rev 9406)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-program.c	2007-01-29 12:23:48 UTC (rev 9407)
@@ -24,10 +24,55 @@
 
 /**
  * SECTION:hildon-program
- * @short_description: An object used to control a hildon program.
+ * @short_description: An object that represents an application running in the Hildon framework.
  *
- * HildonProgram is not a widget itself nor a container. HildonProgram can 
- * contain one or more @HildonWindow. 
+ * The HildonProgram is an object used to represent an application running
+ * in the Hildon framework.
+ * 
+ * Such an application is thought to have one or more HildonWindow. These
+ * shall be registered to the HildonProgram with hildon_program_add_window,
+ * and can be unregistered similarly with hildon_program_remove_window.
+ * 
+ * The HildonProgram provides the programmer with commodities such
+ * as applying a common toolbar and menu to all the HildonWindow
+ * registered to it. This is done with hildon_program_set_common_menu()
+ * and hildon_program_set_common_toolbar().
+ * 
+ * The HildonProgram is also used to apply program-wide properties that
+ * are specific to the Hildon framework. For instance
+ * hildon_program_set_can_hibernate() sets whether or not an application
+ * can be set to hibernate by the Hildon task navigator, in situations of
+ * low memory.
+ * 
+ * <example>
+ * <programlisting>
+ * HildonProgram *program;
+ * HildonWindow *first_window;
+ * HildonWindow *second_window;
+ * GtkToolbar *common_toolbar, *window_specific_toolbar;
+ * GtkMenu *menu;
+ * <!-- -->
+ * program = HILDON_PROGRAM (hildon_program_new ());
+ * <!-- -->
+ * window1 = HILDON_WINDOW (hildon_window_new ());
+ * window2 = HILDON_WINDOW (hildon_window_new ());
+ * <!-- -->
+ * common_toolbar = create_common_toolbar ();
+ * window_specific_toolbar = create_window_specific_toolbar ();
+ * <!-- -->
+ * menu = create_menu ();
+ * <!-- -->
+ * hildon_program_add (program, window1);
+ * hildon_program_add (program, window2);
+ * <!-- -->
+ * hildon_program_set_common_menu (program, menu);
+ * <!-- -->
+ * hildon_program_set_common_toolbar (program, common_toolbar);
+ * hildon_window_add_toolbar (first_window, window_specific_toolbar);
+ * <!-- -->
+ * hildon_program_set_can_hibernate (program, TRUE);
+ * </programlisting>
+ * </example>
  */
 
 #ifdef                                          HAVE_CONFIG_H

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-range-editor.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-range-editor.c	2007-01-29 12:22:58 UTC (rev 9406)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-range-editor.c	2007-01-29 12:23:48 UTC (rev 9407)
@@ -29,6 +29,14 @@
  * HidlonRangeEditor allows entering a pair of integers, e.g. the lower
  * and higher bounds of a range. A minimum and maximum can also be set
  * for the bounds.
+ * 
+ * <example>
+ * <programlisting>
+ *      range_editor = hildon_range_editor_new ();
+ *      hildon_range_editor_set_limits (editor, start, end );
+ *      hildon_range_editor_get_range (editor, &amp;start, &amp;end);
+ * </programlisting>
+ * </example>
  */
 
 #ifdef                                          HAVE_CONFIG_H


More information about the maemo-commits mailing list