63
by Ken VanDine
* Renamed the example source files to be more reflective of what the example is |
1 |
/*
|
2 |
* Copyright (C) 2010 Canonical Ltd.
|
|
3 |
*
|
|
4 |
* This library is free software; you can redistribute it and/or modify
|
|
5 |
* it under the terms of the GNU Lesser General Public License
|
|
6 |
* version 3.0 as published by the Free Software Foundation.
|
|
7 |
*
|
|
8 |
* This library 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 Lesser General Public License version 3.0 for more details.
|
|
12 |
*
|
|
13 |
* You should have received a copy of the GNU Lesser General Public
|
|
14 |
* License along with this library. If not, see
|
|
15 |
* <http://www.gnu.org/licenses/>.
|
|
16 |
*
|
|
17 |
* Authored by Ken VanDine <ken.vandine@canonical.com>
|
|
18 |
*/
|
|
19 |
||
20 |
#include <gtk/gtk.h> |
|
21 |
#include <gwibber-gtk.h> |
|
22 |
||
80
by Ken VanDine
Simplified the examples a little |
23 |
void my_gwibber_entry() |
63
by Ken VanDine
* Renamed the example source files to be more reflective of what the example is |
24 |
{
|
25 |
GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
|
26 |
||
27 |
gtk_window_set_default_size(GTK_WINDOW(window), 400, 150); |
|
28 |
gtk_window_set_title(GTK_WINDOW(window), "Gwibber Poster (C)"); |
|
94
by Ken VanDine
ABI bump |
29 |
GwibberGtkEntry* entry = gwibber_gtk_entry_new (); |
63
by Ken VanDine
* Renamed the example source files to be more reflective of what the example is |
30 |
gtk_container_add ((GtkContainer*) window, (GtkWidget*) entry); |
81
by Ken VanDine
use g_signal_connect, gtk_signal_connect is deprecated |
31 |
g_signal_connect(GTK_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL); |
63
by Ken VanDine
* Renamed the example source files to be more reflective of what the example is |
32 |
|
33 |
gtk_widget_show_all(window); |
|
34 |
}
|
|
35 |
||
36 |
int main(int argc, char *argv[]) |
|
37 |
{
|
|
38 |
gtk_init(&argc, &argv); |
|
39 |
||
80
by Ken VanDine
Simplified the examples a little |
40 |
my_gwibber_entry(); |
63
by Ken VanDine
* Renamed the example source files to be more reflective of what the example is |
41 |
|
42 |
gtk_main(); |
|
43 |
||
44 |
return 0; |
|
45 |
}
|