summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
authorP. F. Chimento <philip.chimento@gmail.com>2013-04-24 15:14:59 +0200
committerP. F. Chimento <philip.chimento@gmail.com>2013-04-25 10:45:17 +0200
commita568631122c96468601e08b59e69090e76ab3eb5 (patch)
tree08efd6e47203a281bec4534aaeb7af244e72d715 /endless
parent5fb8eb9516b8462f4fa4acc6469cbdb868c97556 (diff)
Testing and documentation improvements for EosWindow
[#12]
Diffstat (limited to 'endless')
-rw-r--r--endless/eoswindow.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index 62345b2..7cd7f28 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -12,7 +12,22 @@
* @short_description: A window for your application
* @title: Window
*
- * Stub
+ * The #EosWindow class is where you put your application's user interface.
+ * You should create a class that extends #EosWindow.
+ *
+ * Create the interface in your window class's _init() function, like this:
+ * |[
+ * const SmokeGrinderWindow = new Lang.Class({
+ * Name: 'SmokeGrinderWindow',
+ * Extends: Endless.Window,
+ *
+ * _init(): function (props) {
+ * this.parent(props);
+ * this._button = Gtk.Button({label: 'Push me'});
+ * this.add(this._button);
+ * },
+ * });
+ * ]|
*/
G_DEFINE_TYPE (EosWindow, eos_window, GTK_TYPE_APPLICATION_WINDOW)
@@ -87,6 +102,13 @@ eos_window_class_init (EosWindowClass *klass)
object_class->get_property = eos_window_get_property;
object_class->set_property = eos_window_set_property;
+ /**
+ * EosWindow:application:
+ *
+ * The #EosApplication that this window is associated with. See also
+ * #GtkWindow:application; the difference is that #EosWindow:application
+ * cannot be %NULL and must be an #EosApplication.
+ */
eos_window_props[PROP_APPLICATION] =
g_param_spec_object ("application", "Application",
"Application associated with this window",