43
by Ken VanDine
* Added missing example file |
1 |
/*
|
2 |
* Copyright (C) 2010 Neil Jagdish Patel
|
|
3 |
* Copyright (C) 2010 Canonical Ltd.
|
|
4 |
*
|
|
5 |
* This library is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU Lesser General Public License
|
|
7 |
* version 3.0 as published by the Free Software Foundation.
|
|
8 |
*
|
|
9 |
* This library is distributed in the hope that it will be useful,
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
* GNU Lesser General Public License version 3.0 for more details.
|
|
13 |
*
|
|
14 |
* You should have received a copy of the GNU Lesser General Public
|
|
15 |
* License along with this library. If not, see
|
|
16 |
* <http://www.gnu.org/licenses/>.
|
|
17 |
*
|
|
18 |
* Authored by Neil Jagdish Patel <neil.patel@canonical.com>
|
|
50
by Ken VanDine
set window titles |
19 |
* Authored by Ken VanDine <ken.vandine@canonical.com>
|
43
by Ken VanDine
* Added missing example file |
20 |
*/
|
21 |
||
80
by Ken VanDine
Simplified the examples a little |
22 |
public class Entry : Gtk.Window |
43
by Ken VanDine
* Added missing example file |
23 |
{
|
80
by Ken VanDine
Simplified the examples a little |
24 |
public Entry () |
43
by Ken VanDine
* Added missing example file |
25 |
{
|
80
by Ken VanDine
Simplified the examples a little |
26 |
}
|
43
by Ken VanDine
* Added missing example file |
27 |
|
80
by Ken VanDine
Simplified the examples a little |
28 |
construct
|
29 |
{
|
|
30 |
this.set_name("Gwibber"); |
|
31 |
this.set_title("Gwibber Poster (Vala)"); |
|
94
by Ken VanDine
ABI bump |
32 |
var entry = new GwibberGtk.Entry (); |
80
by Ken VanDine
Simplified the examples a little |
33 |
this.add (entry); |
34 |
this.show_all (); |
|
43
by Ken VanDine
* Added missing example file |
35 |
}
|
36 |
}
|
|
37 |
||
38 |
static void on_close () |
|
39 |
{
|
|
40 |
Gtk.main_quit(); |
|
41 |
}
|
|
42 |
||
43 |
public static void main (string[] args) |
|
44 |
{
|
|
45 |
Gtk.init (ref args); |
|
46 |
||
80
by Ken VanDine
Simplified the examples a little |
47 |
var w = new Entry (); |
43
by Ken VanDine
* Added missing example file |
48 |
|
49 |
w.show (); |
|
56
by Ken VanDine
change default height in examples |
50 |
w.resize (400, 150); |
43
by Ken VanDine
* Added missing example file |
51 |
w.position = Gtk.WindowPosition.CENTER; |
52 |
w.destroy.connect(on_close); |
|
53 |
Gtk.main (); |
|
54 |
}
|