2
* Copyright (C) 2009 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by Gordon Allott <gord.allott@canonical.com>
23
public interface UnderlayWindow : Gtk.Window
25
public abstract void setup_window ();
26
public abstract void set_fullscreen ();
31
public signal void workarea_changed ();
44
update_net_workarea ();
48
public void update_net_workarea ()
50
/* FIXME - steal code from the old liblauncher to do this (launcher-session.c)
51
* this is just fake code to get it running
61
public class Window : Gtk.Window, UnderlayWindow
64
private GtkClutter.Embed gtk_clutter;
65
public Clutter.Stage stage;
66
private Workarea workarea_size;
68
public void setup_window ()
70
this.decorated = false;
71
this.skip_taskbar_hint = true;
72
this.skip_pager_hint = true;
73
this.type_hint = Gdk.WindowTypeHint.NORMAL;
78
public void set_fullscreen ()
83
width = this.workarea_size.right - this.workarea_size.left;
84
height = this.workarea_size.bottom - this.workarea_size.top;
86
resize (width, height);
87
this.stage.set_size(width, height);
93
this.workarea_size = new Workarea ();
94
this.workarea_size.update_net_workarea ();
98
this.gtk_clutter = new GtkClutter.Embed ();
99
this.add (this.gtk_clutter);
100
this.gtk_clutter.realize ();
102
this.stage = (Clutter.Stage)this.gtk_clutter.get_stage ();
103
Clutter.Color stage_bg = Clutter.Color ()
110
this.stage.set_color (stage_bg);
112
this.stage.show_all ();