summaryrefslogtreecommitdiff
path: root/endless/eoswindow.c
diff options
context:
space:
mode:
authorP. F. Chimento <philip.chimento@gmail.com>2013-04-29 16:02:18 +0200
committerP. F. Chimento <philip.chimento@gmail.com>2013-04-29 16:02:18 +0200
commit449b4d8e8d7c907020665a7a64324f46de67a8bb (patch)
treec0ac5948257d40b636b2f59c1a625137784ab684 /endless/eoswindow.c
parent65fc04a83bfec371bb7cfb48d4b71c69deff6a79 (diff)
parenta568631122c96468601e08b59e69090e76ab3eb5 (diff)
Merge pull request #22 from endlessm#12
Issues/12 EosWindow based on eos-weather/window.py
Diffstat (limited to 'endless/eoswindow.c')
-rw-r--r--endless/eoswindow.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index 29032a6..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",
@@ -100,6 +122,9 @@ static void
eos_window_init (EosWindow *self)
{
self->priv = WINDOW_PRIVATE (self);
+
+ gtk_window_set_decorated (GTK_WINDOW (self), FALSE);
+ gtk_window_maximize (GTK_WINDOW (self));
}
/* Public API */