Sun, 15 Apr 2007 05:28:07 +0000
The last of the merge fix-ups.
| 4359 | 1 | /** |
| 2 | * @file gtkutils.h GTK+ utility functions | |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
3 | * @ingroup gtkui |
| 4359 | 4 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
5 | * pidgin |
| 4359 | 6 | * |
| 15572 | 7 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 8 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 9 | * source distribution. | |
|
6646
b9a0b5eb74e6
[gaim-migrate @ 7171]
Christian Hammond <chipx86@chipx86.com>
parents:
6372
diff
changeset
|
10 | * |
| 4359 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
25 | #ifndef _PIDGINUTILS_H_ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
26 | #define _PIDGINUTILS_H_ |
| 4359 | 27 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
28 | #include "gtkconv.h" |
| 15577 | 29 | #include "pidgin.h" |
|
5644
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
30 | #include "prpl.h" |
| 12919 | 31 | #include "util.h" |
| 4359 | 32 | |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
33 | typedef enum |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
34 | { |
| 15568 | 35 | PIDGIN_BUTTON_HORIZONTAL, |
| 36 | PIDGIN_BUTTON_VERTICAL | |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
37 | |
| 15568 | 38 | } PidginButtonOrientation; |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
39 | |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
40 | typedef enum |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
41 | { |
| 15568 | 42 | PIDGIN_BUTTON_NONE = 0, |
| 43 | PIDGIN_BUTTON_TEXT, | |
| 44 | PIDGIN_BUTTON_IMAGE, | |
| 45 | PIDGIN_BUTTON_TEXT_IMAGE | |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
46 | |
| 15568 | 47 | } PidginButtonStyle; |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
48 | |
|
15496
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
49 | typedef enum |
|
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
50 | { |
|
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
51 | PIDGIN_PRPL_ICON_SMALL, |
|
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
52 | PIDGIN_PRPL_ICON_MEDIUM, |
|
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
53 | PIDGIN_PRPL_ICON_LARGE |
|
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
54 | } PidginPrplIconSize; |
|
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
55 | |
|
8272
c1e38e0ec1d5
[gaim-migrate @ 8996]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8143
diff
changeset
|
56 | #ifndef _WIN32 |
|
c1e38e0ec1d5
[gaim-migrate @ 8996]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8143
diff
changeset
|
57 | typedef enum |
|
c1e38e0ec1d5
[gaim-migrate @ 8996]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8143
diff
changeset
|
58 | { |
| 15568 | 59 | PIDGIN_BROWSER_DEFAULT = 0, |
| 60 | PIDGIN_BROWSER_CURRENT, | |
| 61 | PIDGIN_BROWSER_NEW_WINDOW, | |
| 62 | PIDGIN_BROWSER_NEW_TAB | |
|
8741
61c5482e0948
[gaim-migrate @ 9496]
Christian Hammond <chipx86@chipx86.com>
parents:
8735
diff
changeset
|
63 | |
| 15568 | 64 | } PidginBrowserPlace; |
|
8272
c1e38e0ec1d5
[gaim-migrate @ 8996]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8143
diff
changeset
|
65 | #endif /* _WIN32 */ |
|
c1e38e0ec1d5
[gaim-migrate @ 8996]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8143
diff
changeset
|
66 | |
| 4359 | 67 | /** |
| 68 | * Sets up a gtkimhtml widget, loads it with smileys, and sets the | |
| 69 | * default signal handlers. | |
| 70 | * | |
| 71 | * @param imhtml The gtkimhtml widget to setup. | |
| 72 | */ | |
| 15568 | 73 | void pidgin_setup_imhtml(GtkWidget *imhtml); |
| 4359 | 74 | |
| 75 | /** | |
|
10175
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
76 | * Create an GtkIMHtml widget and associated GtkIMHtmlToolbar widget. This |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
77 | * functions puts both widgets in a nice GtkFrame. They're separate by an |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
78 | * attractive GtkSeparator. |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
79 | * |
|
13281
3558cb15ebb9
[gaim-migrate @ 15646]
Richard Laager <rlaager@pidgin.im>
parents:
13110
diff
changeset
|
80 | * @param editable @c TRUE if this imhtml should be editable. If this is @c FALSE, |
|
10175
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
81 | * then the toolbar will NOT be created. If this imthml should be |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
82 | * read-only at first, but may become editable later, then pass in |
|
13281
3558cb15ebb9
[gaim-migrate @ 15646]
Richard Laager <rlaager@pidgin.im>
parents:
13110
diff
changeset
|
83 | * @c TRUE here and then manually call gtk_imhtml_set_editable() later. |
|
10175
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
84 | * @param imhtml_ret A pointer to a pointer to a GtkWidget. This pointer |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
85 | * will be set to the imhtml when this function exits. |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
86 | * @param toolbar_ret A pointer to a pointer to a GtkWidget. If editable is |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
87 | * TRUE then this will be set to the toolbar when this function exits. |
|
13281
3558cb15ebb9
[gaim-migrate @ 15646]
Richard Laager <rlaager@pidgin.im>
parents:
13110
diff
changeset
|
88 | * Otherwise this will be set to @c NULL. |
|
3558cb15ebb9
[gaim-migrate @ 15646]
Richard Laager <rlaager@pidgin.im>
parents:
13110
diff
changeset
|
89 | * @param sw_ret This will be filled with a pointer to the scrolled window |
|
3558cb15ebb9
[gaim-migrate @ 15646]
Richard Laager <rlaager@pidgin.im>
parents:
13110
diff
changeset
|
90 | * widget which contains the imhtml. |
|
10175
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
91 | * @return The GtkFrame containing the toolbar and imhtml. |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
92 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
93 | GtkWidget *pidgin_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); |
|
10175
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
94 | |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10061
diff
changeset
|
95 | /** |
| 4359 | 96 | * Toggles the sensitivity of a widget. |
| 97 | * | |
| 98 | * @param widget @c NULL. Used for signal handlers. | |
| 99 | * @param to_toggle The widget to toggle. | |
| 100 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
101 | void pidgin_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); |
| 4359 | 102 | |
| 4687 | 103 | /** |
|
7751
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
104 | * Checks if text has been entered into a GtkTextEntry widget. If |
|
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
105 | * so, the GTK_RESPONSE_OK on the given dialog is set to TRUE. |
|
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
106 | * Otherwise GTK_RESPONSE_OK is set to FALSE. |
|
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
107 | * |
|
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
108 | * @param entry The text entry widget. |
|
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
109 | * @param dialog The dialog containing the text entry widget. |
|
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
110 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
111 | void pidgin_set_sensitive_if_input(GtkWidget *entry, GtkWidget *dialog); |
|
7751
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
112 | |
|
e0dc18b50181
[gaim-migrate @ 8396]
Mark Doliner <markdoliner@pidgin.im>
parents:
7712
diff
changeset
|
113 | /** |
| 5319 | 114 | * Toggles the sensitivity of all widgets in a pointer array. |
| 115 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6646
diff
changeset
|
116 | * @param w @c NULL. Used for signal handlers. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6646
diff
changeset
|
117 | * @param data The array containing the widgets to toggle. |
| 5319 | 118 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
119 | void pidgin_toggle_sensitive_array(GtkWidget *w, GPtrArray *data); |
| 5319 | 120 | |
| 121 | /** | |
|
8901
0a8334a14c2d
[gaim-migrate @ 9670]
Mark Doliner <markdoliner@pidgin.im>
parents:
8866
diff
changeset
|
122 | * Toggles the visibility of a widget. |
|
0a8334a14c2d
[gaim-migrate @ 9670]
Mark Doliner <markdoliner@pidgin.im>
parents:
8866
diff
changeset
|
123 | * |
|
0a8334a14c2d
[gaim-migrate @ 9670]
Mark Doliner <markdoliner@pidgin.im>
parents:
8866
diff
changeset
|
124 | * @param widget @c NULL. Used for signal handlers. |
|
0a8334a14c2d
[gaim-migrate @ 9670]
Mark Doliner <markdoliner@pidgin.im>
parents:
8866
diff
changeset
|
125 | * @param to_toggle The widget to toggle. |
|
0a8334a14c2d
[gaim-migrate @ 9670]
Mark Doliner <markdoliner@pidgin.im>
parents:
8866
diff
changeset
|
126 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
127 | void pidgin_toggle_showhide(GtkWidget *widget, GtkWidget *to_toggle); |
|
8901
0a8334a14c2d
[gaim-migrate @ 9670]
Mark Doliner <markdoliner@pidgin.im>
parents:
8866
diff
changeset
|
128 | |
|
0a8334a14c2d
[gaim-migrate @ 9670]
Mark Doliner <markdoliner@pidgin.im>
parents:
8866
diff
changeset
|
129 | /** |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8289
diff
changeset
|
130 | * Adds a separator to a menu. |
| 4687 | 131 | * |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8289
diff
changeset
|
132 | * @param menu The menu to add a separator to. |
| 4687 | 133 | */ |
| 15568 | 134 | void pidgin_separator(GtkWidget *menu); |
| 4687 | 135 | |
|
5162
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
136 | /** |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
137 | * Creates a menu item. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
138 | * |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
139 | * @param menu The menu to which to append the menu item. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
140 | * @param str The title to use for the newly created menu item. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
141 | * |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
142 | * @return The newly created menu item. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
143 | */ |
| 15568 | 144 | GtkWidget *pidgin_new_item(GtkWidget *menu, const char *str); |
| 5906 | 145 | |
| 146 | /** | |
| 147 | * Creates a check menu item. | |
| 148 | * | |
| 149 | * @param menu The menu to which to append the check menu item. | |
| 150 | * @param str The title to use for the newly created menu item. | |
| 151 | * @param sf A function to call when the menu item is activated. | |
| 152 | * @param data Data to pass to the signal function. | |
| 153 | * @param checked The initial state of the check item | |
| 154 | * | |
| 155 | * @return The newly created menu item. | |
| 156 | */ | |
| 15568 | 157 | GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, |
| 5906 | 158 | GtkSignalFunc sf, gpointer data, gboolean checked); |
|
5162
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
159 | |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
160 | /** |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
161 | * Creates a menu item. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
162 | * |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
163 | * @param menu The menu to which to append the menu item. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
164 | * @param str The title for the menu item. |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
165 | * @param icon An icon to place to the left of the menu item, |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
166 | * or @c NULL for no icon. |
|
5162
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
167 | * @param sf A function to call when the menu item is activated. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
168 | * @param data Data to pass to the signal function. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
169 | * @param accel_key Something. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
170 | * @param accel_mods Something. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
171 | * @param mod Something. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
172 | * |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
173 | * @return The newly created menu item. |
|
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
174 | */ |
| 15568 | 175 | GtkWidget *pidgin_new_item_from_stock(GtkWidget *menu, const char *str, |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
176 | const char *icon, GtkSignalFunc sf, |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
177 | gpointer data, guint accel_key, |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
178 | guint accel_mods, char *mod); |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
179 | |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
180 | /** |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
181 | * Creates a button with the specified text and stock icon. |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
182 | * |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
183 | * @param text The text for the button. |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
184 | * @param icon The stock icon name. |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
185 | * @param style The orientation of the button. |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
186 | * |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
187 | * @return The button. |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
188 | */ |
| 15568 | 189 | GtkWidget *pidgin_pixbuf_button_from_stock(const char *text, const char *icon, |
| 190 | PidginButtonOrientation style); | |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
191 | |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
192 | /** |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
193 | * Creates a toolbar button with the stock icon. |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
194 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6646
diff
changeset
|
195 | * @param stock The stock icon name. |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
196 | * |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
197 | * @return The button. |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
198 | */ |
| 15568 | 199 | GtkWidget *pidgin_pixbuf_toolbar_button_from_stock(const char *stock); |
|
6372
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
200 | |
|
27c3152351ce
[gaim-migrate @ 6877]
Christian Hammond <chipx86@chipx86.com>
parents:
5966
diff
changeset
|
201 | /** |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
202 | * Creates a HIG preferences frame. |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
203 | * |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
204 | * @param parent The widget to put the frame into. |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
205 | * @param title The title for the frame. |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
206 | * |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
207 | * @return The vbox to put things into. |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5319
diff
changeset
|
208 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
209 | GtkWidget *pidgin_make_frame(GtkWidget *parent, const char *title); |
|
5162
f8293b913629
[gaim-migrate @ 5526]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
210 | |
|
5644
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
211 | /** |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
212 | * Creates a drop-down option menu filled with protocols. |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
213 | * |
| 7956 | 214 | * @param id The protocol to select by default. |
|
5644
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
215 | * @param cb The callback to call when a protocol is selected. |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
216 | * @param user_data Data to pass to the callback function. |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
217 | * |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
218 | * @return The drop-down option menu. |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
219 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
220 | GtkWidget *pidgin_protocol_option_menu_new(const char *id, |
|
5644
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
221 | GCallback cb, |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
222 | gpointer user_data); |
|
bc4c2f9f2bf8
[gaim-migrate @ 6058]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
223 | |
|
5877
37695b88b248
[gaim-migrate @ 6309]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
224 | /** |
|
37695b88b248
[gaim-migrate @ 6309]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
225 | * Creates a drop-down option menu filled with accounts. |
|
37695b88b248
[gaim-migrate @ 6309]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
226 | * |
|
8289
234429bac6b5
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8272
diff
changeset
|
227 | * @param default_account The account to select by default. |
|
234429bac6b5
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8272
diff
changeset
|
228 | * @param show_all Whether or not to show all accounts, or just |
|
234429bac6b5
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8272
diff
changeset
|
229 | * active accounts. |
|
234429bac6b5
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8272
diff
changeset
|
230 | * @param cb The callback to call when an account is selected. |
|
234429bac6b5
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8272
diff
changeset
|
231 | * @param filter_func A function for checking if an account should |
|
234429bac6b5
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8272
diff
changeset
|
232 | * be shown. This can be NULL. |
|
234429bac6b5
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8272
diff
changeset
|
233 | * @param user_data Data to pass to the callback function. |
|
5877
37695b88b248
[gaim-migrate @ 6309]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
234 | * |
|
37695b88b248
[gaim-migrate @ 6309]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
235 | * @return The drop-down option menu. |
|
37695b88b248
[gaim-migrate @ 6309]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
236 | */ |
| 15884 | 237 | GtkWidget *pidgin_account_option_menu_new(PurpleAccount *default_account, |
|
6646
b9a0b5eb74e6
[gaim-migrate @ 7171]
Christian Hammond <chipx86@chipx86.com>
parents:
6372
diff
changeset
|
238 | gboolean show_all, GCallback cb, |
| 15884 | 239 | PurpleFilterAccountFunc filter_func, gpointer user_data); |
|
5877
37695b88b248
[gaim-migrate @ 6309]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
240 | |
|
5943
8a052155157a
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
241 | /** |
|
8940
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8901
diff
changeset
|
242 | * Gets the currently selected account from an account drop down box. |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8901
diff
changeset
|
243 | * |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8901
diff
changeset
|
244 | * @param optmenu The GtkOptionMenu created by |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
245 | * pidgin_account_option_menu_new. |
| 15884 | 246 | * @return Returns the PurpleAccount that is currently selected. |
|
8940
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8901
diff
changeset
|
247 | */ |
| 15884 | 248 | PurpleAccount *pidgin_account_option_menu_get_selected(GtkWidget *optmenu); |
|
8940
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8901
diff
changeset
|
249 | |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8901
diff
changeset
|
250 | /** |
|
9910
7b4465b92411
[gaim-migrate @ 10802]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
251 | * Sets the currently selected account for an account drop down box. |
|
7b4465b92411
[gaim-migrate @ 10802]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
252 | * |
|
7b4465b92411
[gaim-migrate @ 10802]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
253 | * @param optmenu The GtkOptionMenu created by |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
254 | * pidgin_account_option_menu_new. |
| 15884 | 255 | * @param account The PurpleAccount to select. |
|
9910
7b4465b92411
[gaim-migrate @ 10802]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
256 | */ |
| 15884 | 257 | void pidgin_account_option_menu_set_selected(GtkWidget *optmenu, PurpleAccount *account); |
|
9910
7b4465b92411
[gaim-migrate @ 10802]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
258 | |
|
7b4465b92411
[gaim-migrate @ 10802]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
259 | /** |
|
13361
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
260 | * Add autocompletion of screenames to an entry. |
|
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
261 | * |
|
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
262 | * @param entry The GtkEntry on which to setup autocomplete. |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
263 | * @param optmenu A menu for accounts, returned by pidgin_account_option_menu_new(). |
|
13361
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
264 | * If @a optmenu is not @c NULL, it'll be updated when a screenname is chosen |
|
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
265 | * from the autocomplete list. |
|
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
266 | * @param all Whether to include screennames from disconnected accounts. |
|
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
267 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
268 | void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, gboolean all); |
|
13361
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
269 | |
|
bb2f64cf6721
[gaim-migrate @ 15733]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13281
diff
changeset
|
270 | /** |
|
6646
b9a0b5eb74e6
[gaim-migrate @ 7171]
Christian Hammond <chipx86@chipx86.com>
parents:
6372
diff
changeset
|
271 | * Check if the given path is a directory or not. If it is, then modify |
|
5966
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
272 | * the given GtkFileSelection dialog so that it displays the given path. |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
273 | * If the given path is not a directory, then do nothing. |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
274 | * |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
275 | * @param path The path entered in the file selection window by the user. |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
276 | * @param filesel The file selection window. |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
277 | * |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
278 | * @return TRUE if given path is a directory, FALSE otherwise. |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
279 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
280 | gboolean pidgin_check_if_dir(const char *path, GtkFileSelection *filesel); |
|
5966
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
281 | |
|
91a208b3e979
[gaim-migrate @ 6413]
Mark Doliner <markdoliner@pidgin.im>
parents:
5943
diff
changeset
|
282 | /** |
|
7538
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
283 | * Sets up GtkSpell for the given GtkTextView, reporting errors |
|
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
284 | * if encountered. |
|
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
285 | * |
| 15572 | 286 | * This does nothing if Pidgin is not compiled with GtkSpell support. |
|
7538
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
287 | * |
|
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
288 | * @param textview The textview widget to setup spellchecking for. |
|
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
289 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
290 | void pidgin_setup_gtkspell(GtkTextView *textview); |
|
7538
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
291 | |
|
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
292 | /** |
| 7420 | 293 | * Save menu accelerators callback |
| 294 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
295 | void pidgin_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, |
|
7538
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
296 | GdkModifierType arg2, GClosure *arg3, |
|
b20dbe9222e2
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7420
diff
changeset
|
297 | gpointer data); |
| 7420 | 298 | |
| 299 | /** | |
| 300 | * Save menu accelerators | |
| 301 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
302 | gboolean pidgin_save_accels(gpointer data); |
| 7420 | 303 | |
| 304 | /** | |
| 305 | * Load menu accelerators | |
| 306 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
307 | void pidgin_load_accels(void); |
| 7420 | 308 | |
|
7712
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
309 | /** |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
310 | * Parses an application/x-im-contact MIME message and returns the |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
311 | * data inside. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
312 | * |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
313 | * @param msg The MIME message. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
314 | * @param all_accounts If TRUE, check all compatible accounts, online or |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
315 | * offline. If FALSE, check only online accounts. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
316 | * @param ret_account The best guess at a compatible protocol, |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
317 | * based on ret_protocol. If NULL, no account was found. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
318 | * @param ret_protocol The returned protocol type. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
319 | * @param ret_username The returned username. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
320 | * @param ret_alias The returned alias. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
321 | * |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
322 | * @return TRUE if the message was parsed for the minimum necessary data. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
323 | * FALSE otherwise. |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
324 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
325 | gboolean pidgin_parse_x_im_contact(const char *msg, gboolean all_accounts, |
| 15884 | 326 | PurpleAccount **ret_account, |
|
7712
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
327 | char **ret_protocol, char **ret_username, |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
328 | char **ret_alias); |
|
74af9358b808
[gaim-migrate @ 8357]
Christian Hammond <chipx86@chipx86.com>
parents:
7538
diff
changeset
|
329 | |
| 8137 | 330 | /** |
| 331 | * Sets an ATK name for a given widget. Also sets the labelled-by | |
| 332 | * and label-for ATK relationships. | |
| 333 | * | |
| 8866 | 334 | * @param w The widget that we want to name. |
| 335 | * @param l A GtkLabel that we want to use as the ATK name for the widget. | |
| 8137 | 336 | */ |
| 15568 | 337 | void pidgin_set_accessible_label(GtkWidget *w, GtkWidget *l); |
|
8143
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
338 | |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
339 | /** |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
340 | * A valid GtkMenuPositionFunc. This is used to determine where |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
341 | * to draw context menu's when the menu is activated with the |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
342 | * keyboard (shift+F10). If the menu is activated with the mouse, |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
343 | * then you should just use GTK's built-in position function, |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
344 | * because it does a better job of positioning the menu. |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
345 | * |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
346 | * @param menu The menu we are positioning. |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
347 | * @param x Address of the gint representing the horizontal position |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
348 | * where the menu shall be drawn. This is an output parameter. |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
349 | * @param y Address of the gint representing the vertical position |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
350 | * where the menu shall be drawn. This is an output parameter. |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
351 | * @param push_in This is an output parameter? |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
352 | * @param user_data Not used by this particular position function. |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
353 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
354 | void pidgin_treeview_popup_menu_position_func(GtkMenu *menu, |
|
8143
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
355 | gint *x, |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
356 | gint *y, |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
357 | gboolean *push_in, |
|
ce4b6383777b
[gaim-migrate @ 8851]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8137
diff
changeset
|
358 | gpointer user_data); |
| 8137 | 359 | |
|
10061
2833056ea11c
[gaim-migrate @ 11033]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9910
diff
changeset
|
360 | /** |
|
10229
39ffee70c286
[gaim-migrate @ 11364]
Alceste Scalas <alceste.scalas@gmx.net>
parents:
10207
diff
changeset
|
361 | * Manages drag'n'drop of files. |
|
39ffee70c286
[gaim-migrate @ 11364]
Alceste Scalas <alceste.scalas@gmx.net>
parents:
10207
diff
changeset
|
362 | * |
|
39ffee70c286
[gaim-migrate @ 11364]
Alceste Scalas <alceste.scalas@gmx.net>
parents:
10207
diff
changeset
|
363 | * @param sd GtkSelectionData for managing drag'n'drop |
|
10233
7b542749ccb6
[gaim-migrate @ 11368]
Mark Doliner <markdoliner@pidgin.im>
parents:
10229
diff
changeset
|
364 | * @param account Account to be used (may be NULL if conv is not NULL) |
|
10229
39ffee70c286
[gaim-migrate @ 11364]
Alceste Scalas <alceste.scalas@gmx.net>
parents:
10207
diff
changeset
|
365 | * @param who Buddy name (may be NULL if conv is not NULL) |
|
39ffee70c286
[gaim-migrate @ 11364]
Alceste Scalas <alceste.scalas@gmx.net>
parents:
10207
diff
changeset
|
366 | */ |
| 15884 | 367 | void pidgin_dnd_file_manage(GtkSelectionData *sd, PurpleAccount *account, const char *who); |
|
10229
39ffee70c286
[gaim-migrate @ 11364]
Alceste Scalas <alceste.scalas@gmx.net>
parents:
10207
diff
changeset
|
368 | |
| 10483 | 369 | /** |
| 15884 | 370 | * Convenience wrapper for purple_buddy_icon_get_scale_size |
| 10483 | 371 | */ |
| 15884 | 372 | void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleIconScaleRules rules, int *width, int *height); |
| 10483 | 373 | |
|
12080
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
374 | /** |
|
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
375 | * Returns the base image to represent the account, based on |
|
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
376 | * the currently selected theme. |
|
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
377 | * |
|
13091
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
378 | * @param account The account. |
|
15496
76b5ca00a36c
I think this takes care of protocol icons. Note there are still places
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
379 | * @param size The size of the icon to return. |
|
12080
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
380 | * |
|
13091
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
381 | * @return A newly-created pixbuf with a reference count of 1, |
|
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
382 | * or NULL if any of several error conditions occurred: |
|
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
383 | * the file could not be opened, there was no loader |
|
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
384 | * for the file's format, there was not enough memory |
|
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
385 | * to allocate the image buffer, or the image file |
|
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
386 | * contained invalid data. |
|
12080
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
387 | */ |
| 15884 | 388 | GdkPixbuf *pidgin_create_prpl_icon(PurpleAccount *account, PidginPrplIconSize size); |
|
12080
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
389 | |
|
2aaca2265a51
[gaim-migrate @ 14377]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12067
diff
changeset
|
390 | /** |
|
15799
ba7af742a0d1
Change some old, busted status icon stuff to use the new hotness
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
391 | * Creates a status icon for a given primitve |
|
13091
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
392 | * |
|
15799
ba7af742a0d1
Change some old, busted status icon stuff to use the new hotness
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
393 | * @param primitive The status primitive |
|
ba7af742a0d1
Change some old, busted status icon stuff to use the new hotness
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
394 | * @param w The widget to render this |
|
ba7af742a0d1
Change some old, busted status icon stuff to use the new hotness
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
395 | * @param size The icon size to render at |
| 16002 | 396 | * @return A GdkPixbuf, created from stock |
|
13091
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
397 | */ |
| 15884 | 398 | GdkPixbuf * pidgin_create_status_icon(PurpleStatusPrimitive primitive, GtkWidget *w, const char *size); |
|
13091
b5ed878998dd
[gaim-migrate @ 15452]
Mark Doliner <markdoliner@pidgin.im>
parents:
12919
diff
changeset
|
399 | |
|
10229
39ffee70c286
[gaim-migrate @ 11364]
Alceste Scalas <alceste.scalas@gmx.net>
parents:
10207
diff
changeset
|
400 | |
| 12919 | 401 | /** |
| 15884 | 402 | * Append a PurpleMenuAction to a menu. |
| 12919 | 403 | * |
|
13785
4ee261bcc567
[gaim-migrate @ 16195]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13470
diff
changeset
|
404 | * @param menu The menu to append to. |
| 15884 | 405 | * @param act The PurpleMenuAction to append. |
|
13785
4ee261bcc567
[gaim-migrate @ 16195]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13470
diff
changeset
|
406 | * @param gobject The object to be passed to the action callback. |
| 12919 | 407 | */ |
| 15884 | 408 | void pidgin_append_menu_action(GtkWidget *menu, PurpleMenuAction *act, |
| 12919 | 409 | gpointer gobject); |
| 410 | ||
|
13435
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
411 | /** |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
412 | * Sets the mouse pointer for a GtkWidget. |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
413 | * |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
414 | * After setting the cursor, the display is flushed, so the change will |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
415 | * take effect immediately. |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
416 | * |
|
13470
5550131ec50b
[gaim-migrate @ 15845]
Richard Laager <rlaager@pidgin.im>
parents:
13435
diff
changeset
|
417 | * If the window for @a widget is @c NULL, this function simply returns. |
|
13435
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
418 | * |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
419 | * @param widget The widget for which to set the mouse pointer |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
420 | * @param cursor_type The type of cursor to set |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
421 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
422 | void pidgin_set_cursor(GtkWidget *widget, GdkCursorType cursor_type); |
|
13435
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
423 | |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
424 | /** |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
425 | * Sets the mouse point for a GtkWidget back to that of its parent window. |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
426 | * |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
427 | * If @a widget is @c NULL, this function simply returns. |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
428 | * |
|
13470
5550131ec50b
[gaim-migrate @ 15845]
Richard Laager <rlaager@pidgin.im>
parents:
13435
diff
changeset
|
429 | * If the window for @a widget is @c NULL, this function simply returns. |
|
13435
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
430 | * |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
431 | * @note The display is not flushed from this function. |
|
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
432 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
433 | void pidgin_clear_cursor(GtkWidget *widget); |
|
13435
4c22eed6e0a6
[gaim-migrate @ 15809]
Richard Laager <rlaager@pidgin.im>
parents:
13361
diff
changeset
|
434 | |
| 14195 | 435 | /** |
| 436 | * Creates a File Selection widget for choosing a buddy icon | |
| 437 | * | |
| 438 | * @param parent The parent window | |
| 439 | * @param callback The callback to call when the window is closed. If the user chose an icon, the char* argument will point to its path | |
| 440 | * @param data Data to pass to @callback | |
| 441 | * @return The file dialog | |
| 442 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
443 | GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); |
| 14195 | 444 | |
| 445 | /** | |
| 446 | * Converts a buddy icon to the required size and format | |
| 447 | * | |
| 448 | * @param plugin The prpl to conver the icon | |
| 449 | * @param path The path of a buddy icon to convert | |
|
14914
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
450 | * @return The name of a new buddy icon |
| 14195 | 451 | */ |
| 15884 | 452 | char* pidgin_convert_buddy_icon(PurplePlugin *plugin, const char *path); |
| 14195 | 453 | |
|
14290
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
454 | #if !GTK_CHECK_VERSION(2,6,0) |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
455 | /** |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
456 | * Creates a new pixbuf by loading an image from a file. The image will |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
457 | * be scaled to fit in the requested size, optionally preserving the image's |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
458 | * aspect ratio. |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
459 | */ |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
460 | GdkPixbuf *gdk_pixbuf_new_from_file_at_scale(const char *filename, int width, int height, |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
461 | gboolean preserve_aspect_ratio, |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
462 | GError **error); |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
463 | #endif |
|
f20819ff8d86
[gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
14253
diff
changeset
|
464 | |
|
14914
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
465 | /** |
|
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
466 | * Set or unset a custom buddyicon for a user. |
|
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
467 | * |
|
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
468 | * @param account The account the user belongs to. |
|
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
469 | * @param who The name of the user. |
|
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
470 | * @param filename The path of the custom icon. If this is @c NULL, then any |
|
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
471 | * previously set custom buddy icon for the user is removed. |
|
290eb2170f38
[gaim-migrate @ 17621]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14290
diff
changeset
|
472 | */ |
| 15884 | 473 | void pidgin_set_custom_buddy_icon(PurpleAccount *account, const char *who, const char *filename); |
| 15084 | 474 | |
| 475 | /** | |
| 476 | * Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing | |
| 477 | * menu items. | |
| 478 | * | |
| 479 | * @param str The text to convert | |
| 480 | * @return A newly allocated string with unicode arrow characters | |
| 481 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
482 | char *pidgin_make_pretty_arrows(const char *str); |
| 15094 | 483 | |
| 484 | /** | |
| 485 | * Creates a "mini-dialog" suitable for embedding in the buddy list scrollbook | |
| 486 | * | |
| 487 | * @param handle A handle | |
| 488 | * @param primary The primary text | |
| 489 | * @param secondary The secondary text | |
| 490 | * @param user_data Data to pass to the callbacks | |
| 491 | * @param ... a NULL-terminated list of button labels and callbacks | |
| 492 | */ | |
| 15884 | 493 | void *pidgin_make_mini_dialog(PurpleConnection *handle, const char* stock_id, |
| 15094 | 494 | const char *primary, const char *secondary, |
| 495 | void *user_data, ...); | |
|
15177
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
496 | |
|
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
497 | /** |
|
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
498 | * This is a callback function to be used for Ctrl+F searching in treeviews. |
|
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
499 | * Sample Use: |
|
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
500 | * gtk_tree_view_set_search_equal_func(treeview, |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
501 | * pidgin_tree_view_search_equal_func, |
|
15177
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
502 | * search_data, search_data_destroy_cb); |
|
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
503 | * |
|
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
504 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
505 | gboolean pidgin_tree_view_search_equal_func(GtkTreeModel *model, gint column, |
|
15177
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
506 | const gchar *key, GtkTreeIter *iter, gpointer data); |
|
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
507 | |
| 15403 | 508 | /** |
| 509 | * Sets or resets a window to 'urgent,' by setting the URGENT hint in X | |
| 510 | * or blinking in the win32 taskbar | |
| 511 | * | |
| 512 | * @param window The window to draw attention to | |
| 513 | * @param urgent Whether to set the urgent hint or not | |
| 514 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
515 | void pidgin_set_urgent(GtkWindow *window, gboolean urgent); |
| 15403 | 516 | |
| 15474 | 517 | /** |
| 518 | * Returns TRUE if the GdkPixbuf is opaque, as determined by no | |
| 519 | * alpha at any of the edge pixels. | |
| 520 | * | |
| 521 | * @param pixbuf The pixbug | |
| 522 | * @return TRUE if the pixbuf is opaque around the edges, FALSE otherwise | |
| 523 | */ | |
| 15568 | 524 | gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf); |
| 15474 | 525 | |
|
15320
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
526 | #if !GTK_CHECK_VERSION(2,2,0) |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
527 | /** |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
528 | * This is copied from Gtk to support Gtk 2.0 |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
529 | * |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
530 | * Creates a new path with @first_index and @varargs as indices. |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
531 | * |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
532 | * @param first_index first integer |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
533 | * @param varargs list of integers terminated by -1 |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
534 | * |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
535 | * @return A newly created GtkTreePath. |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
536 | * |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
537 | */ |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
538 | GtkTreePath *gtk_tree_path_new_from_indices (gint first_index, ...); |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
539 | #endif |
|
c4eea0409712
[gaim-migrate @ 18048]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15301
diff
changeset
|
540 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15496
diff
changeset
|
541 | #endif /* _PIDGINUTILS_H_ */ |
|
15177
8b6c66e09388
[gaim-migrate @ 17901]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15094
diff
changeset
|
542 |