Mercurial > pidgin.yaz
annotate pidgin/gtkdocklet.h @ 21364:5a7202fa43a0
I figured a signal firing on a connection error would be useful.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Wed, 24 Oct 2007 17:33:12 +0000 |
parents | 38c4fe48ebb5 |
children | d3e0eb05ac94 |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /* |
15823 | 2 * System tray icon (aka docklet) plugin for Purple |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 * Copyright (C) 2002-3 Robert McQueen <robot101@debian.org> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 * Inspired by a similar plugin by: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * John (J5) Palmieri <johnp@martianrock.com> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * This program is free software; you can redistribute it and/or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * modify it under the terms of the GNU General Public License as |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * published by the Free Software Foundation; either version 2 of the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * License, or (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * This program is distributed in the hope that it will be useful, but |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * along with this program; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16949
diff
changeset
|
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16949
diff
changeset
|
22 * 02111-1301, USA. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 #ifndef _GTKDOCKLET_H_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 #define _GTKDOCKLET_H_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 |
16949
06f6768b6e29
Now that the docklet icon is based on the status from status selector, it
Casey Harkins <charkins@pidgin.im>
parents:
16763
diff
changeset
|
28 #include "status.h" |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 struct docklet_ui_ops |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 void (*create)(void); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 void (*destroy)(void); |
16949
06f6768b6e29
Now that the docklet icon is based on the status from status selector, it
Casey Harkins <charkins@pidgin.im>
parents:
16763
diff
changeset
|
34 void (*update_icon)(PurpleStatusPrimitive, gboolean, gboolean); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 void (*blank_icon)(void); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 void (*set_tooltip)(gchar *); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 GtkMenuPositionFunc position_menu; |
20882
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
38 gboolean (*get_geometry)(gint *x, gint *y, gint *w, gint *h); |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
39 GObject *(*get_gdk_screen)(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
41 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
43 /* functions in gtkdocklet.c */ |
16949
06f6768b6e29
Now that the docklet icon is based on the status from status selector, it
Casey Harkins <charkins@pidgin.im>
parents:
16763
diff
changeset
|
44 void pidgin_docklet_update_icon(void); |
15501
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
45 void pidgin_docklet_clicked(int); |
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
46 void pidgin_docklet_embedded(void); |
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
47 void pidgin_docklet_remove(void); |
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
48 void pidgin_docklet_set_ui_ops(struct docklet_ui_ops *); |
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
49 void pidgin_docklet_unload(void); |
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
50 void pidgin_docklet_init(void); |
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
51 void pidgin_docklet_uninit(void); |
d75099d2567e
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@gmail.com>
parents:
15374
diff
changeset
|
52 void*pidgin_docklet_get_handle(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 |
20882
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
54 /** |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
55 * Get the geometry of the docklet. Any of the parameters may be |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
56 * NULL if that value is not desired. |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
57 * |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
58 * @param x x coordinate of the top left corner of the docklet in screen coordinates |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
59 * @param y y coordinate of the top left corner of the docklet in screen coordinates |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
60 * @param w width of the docklet |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
61 * @param h height of the docklet |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
62 * |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
63 * @return TRUE if the geometry was found, otherwise FALSE |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
64 */ |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
65 gboolean pidgin_docklet_get_geometry(gint *x, gint *y, gint *w, gint *h); |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
66 |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
67 /** |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
68 * Get the GdkScreen of the docklet. If the GdkScreen is not available, including |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
69 * running on versions of Gtk/Gdk where GdkScreen does not exist (<2.2), NULL is |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
70 * returned. |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
71 * |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
72 * @return GdkScreen if available, otherwise NULL |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
73 */ |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
74 GObject *pidgin_docklet_get_gdk_screen(void); |
38c4fe48ebb5
Add new API to the docklet for retrieving the geometry (x,y,w,h) and the
Casey Harkins <charkins@pidgin.im>
parents:
19680
diff
changeset
|
75 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 /* function in gtkdocklet-{x11,win32}.c */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
77 void docklet_ui_init(void); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
79 #endif /* _GTKDOCKLET_H_ */ |