Mercurial > pidgin.yaz
comparison console/libgnt/test/tv.c @ 13960:a06f7495af6f
[gaim-migrate @ 16513]
It is possible to have multiple gnt-applications sharing the same screen.
To try this, 'make WM' in console/libgnt/test. It will have a small
'Command' entry. You can give a command like './focus.so' (or one of the
other examples). The applications can also be executed standalone. This
required some tinkering to the Makefile. I am not sure whether there is
an easier way of doing it.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 17 Jul 2006 22:27:26 +0000 |
parents | 8b2306c64efa |
children | 27182f83b79b |
comparison
equal
deleted
inserted
replaced
13959:2ae35c0cf616 | 13960:a06f7495af6f |
---|---|
33 | 33 |
34 int main() | 34 int main() |
35 { | 35 { |
36 GntWidget *hbox, *entry, *view; | 36 GntWidget *hbox, *entry, *view; |
37 | 37 |
38 #ifdef STANDALONE | |
38 freopen(".error", "w", stderr); | 39 freopen(".error", "w", stderr); |
39 | 40 |
40 gnt_init(); | 41 gnt_init(); |
41 | 42 #endif |
42 box(stdscr, 0, 0); | |
43 wrefresh(stdscr); | |
44 | 43 |
45 hbox = gnt_box_new(FALSE, TRUE); | 44 hbox = gnt_box_new(FALSE, TRUE); |
46 gnt_widget_set_name(hbox, "hbox"); | 45 gnt_widget_set_name(hbox, "hbox"); |
47 gnt_box_set_toplevel(GNT_BOX(hbox), TRUE); | 46 gnt_box_set_toplevel(GNT_BOX(hbox), TRUE); |
48 gnt_box_set_fill(GNT_BOX(hbox), FALSE); | 47 gnt_box_set_fill(GNT_BOX(hbox), FALSE); |
65 | 64 |
66 gnt_widget_show(hbox); | 65 gnt_widget_show(hbox); |
67 | 66 |
68 g_signal_connect(G_OBJECT(entry), "key_pressed", G_CALLBACK(key_pressed), view); | 67 g_signal_connect(G_OBJECT(entry), "key_pressed", G_CALLBACK(key_pressed), view); |
69 | 68 |
69 #ifdef STANDALONE | |
70 gnt_main(); | 70 gnt_main(); |
71 | 71 |
72 gnt_quit(); | 72 gnt_quit(); |
73 #endif | |
73 | 74 |
74 return 0; | 75 return 0; |
75 } | 76 } |
76 | 77 |