Mercurial > pidgin
annotate console/libgnt/gntwm.h @ 14701:f063e0bc1f20
[gaim-migrate @ 17453]
Fix chat userlist width saving (use the VBox alloc. width for both saving and loading).
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 10 Oct 2006 00:45:14 +0000 |
parents | ca36763497d9 |
children | 065e7ac30338 |
rev | line source |
---|---|
14335
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 #include <panel.h> |
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 |
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 #include "gntwidget.h" |
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 |
14390
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
5 /* XXX: It might be a good idea to move GntNode from gntmain.c to here. */ |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
6 |
14335
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 typedef struct _GntWM GntWM; |
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 |
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 struct _GntWM |
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 { |
14343
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
11 /* This should return a PANEL for the win */ |
14335
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 PANEL *(*new_window)(GntWidget *win); |
14343
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
13 |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
14 /* This is called when a window is being closed */ |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
15 gboolean (*close_window)(GntWidget *win); |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
16 |
14390
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
17 /* The WM may want to confirm a size for a window first */ |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
18 gboolean (*window_resize_confirm)(GntWidget *win, int *w, int *h); |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
19 |
14362
665b814f8fd7
[gaim-migrate @ 17068]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14343
diff
changeset
|
20 /* Can del_panel the old panel and return a new_panel. |
665b814f8fd7
[gaim-migrate @ 17068]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14343
diff
changeset
|
21 * Otherwise, this should at least do a replace_panel. */ |
665b814f8fd7
[gaim-migrate @ 17068]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14343
diff
changeset
|
22 PANEL *(*window_resized)(PANEL *pan, GntWidget *win); |
665b814f8fd7
[gaim-migrate @ 17068]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14343
diff
changeset
|
23 |
14390
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
24 /* The WM may want to confirm the position of a window */ |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
25 gboolean (*window_move_confirm)(GntWidget *win, int *x, int *y); |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
26 |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
27 void (*window_moved)(PANEL *pan, GntWidget *win); |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
28 |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
29 /* This gets called when: |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
30 * - the title of the window changes |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
31 * - the 'urgency' of the window changes |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
32 */ |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
33 void (*window_update)(PANEL *pan, GntWidget *win); |
d4a26ada1971
[gaim-migrate @ 17096]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14362
diff
changeset
|
34 |
14343
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
35 /* This should usually return NULL if the keys were processed by the WM. |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
36 * If not, the WM can simply return the original string, which will be |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
37 * processed by the default WM. The custom WM can also return a different |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
38 * static string for the default WM to process. |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
39 */ |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
40 const char *(*key_pressed)(const char *key); |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
41 |
14362
665b814f8fd7
[gaim-migrate @ 17068]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14343
diff
changeset
|
42 gboolean (*mouse_clicked)(GntMouseEvent event, int x, int y, GntWidget *widget); |
14343
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
43 |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
44 /* Whatever the WM wants to do when a window is given focus */ |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
45 void (*give_focus)(GntWidget *widget); |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
46 |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
47 /* If something needs to be uninited */ |
14335
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
48 void (*gntwm_uninit)(); |
14343
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
49 |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
50 /* List of windows. Although the WM can keep a list of its own for the windows, |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
51 * it'd be better if there was a way to share between the 'core' and the WM. |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
52 */ |
0387a167f342
[gaim-migrate @ 17044]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14335
diff
changeset
|
53 const GList *(*window_list)(); |
14335
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
54 }; |
b1b76fb9c739
[gaim-migrate @ 17031]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
55 |