| 30 |
30 |
| 31 #include <purple.h> |
31 #include <purple.h> |
| 32 |
32 |
| 33 #include "pidginversion.h" |
33 #include "pidginversion.h" |
| 34 |
34 |
| 35 PIDGIN_AVAILABLE_TYPE_IN_2_1 |
|
| 36 typedef struct { |
|
| 37 gboolean is_buddy; |
|
| 38 PurpleBuddy *buddy; |
|
| 39 } PidginBuddyCompletionEntry; |
|
| 40 |
|
| 41 PIDGIN_AVAILABLE_TYPE_IN_2_1 |
|
| 42 typedef gboolean (*PidginFilterBuddyCompletionEntryFunc) (const PidginBuddyCompletionEntry *completion_entry, gpointer user_data); |
|
| 43 |
|
| 44 |
35 |
| 45 G_BEGIN_DECLS |
36 G_BEGIN_DECLS |
| 46 |
|
| 47 /** |
|
| 48 * pidgin_setup_screenname_autocomplete: |
|
| 49 * @entry: The GtkEntry on which to setup autocomplete. |
|
| 50 * @chooser: A menu for accounts, returned by pidgin_account_chooser_new(). If |
|
| 51 * @chooser is not %NULL, it'll be updated when a username is chosen |
|
| 52 * from the autocomplete list. |
|
| 53 * @filter_func: (scope call): A function for checking if an autocomplete entry |
|
| 54 * should be shown. This can be %NULL. |
|
| 55 * @user_data: The data to be passed to the filter_func function. |
|
| 56 * |
|
| 57 * Add autocompletion of screenames to an entry, supporting a filtering |
|
| 58 * function. |
|
| 59 * |
|
| 60 * Since: 2.0.0 |
|
| 61 */ |
|
| 62 PIDGIN_AVAILABLE_IN_ALL |
|
| 63 void pidgin_setup_screenname_autocomplete( |
|
| 64 GtkWidget *entry, GtkWidget *chooser, |
|
| 65 PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data); |
|
| 66 |
|
| 67 /** |
|
| 68 * pidgin_screenname_autocomplete_default_filter: |
|
| 69 * @completion_entry: The completion entry to filter. |
|
| 70 * @all_accounts: If this is %FALSE, only the autocompletion entries |
|
| 71 * which belong to an online account will be filtered. |
|
| 72 * |
|
| 73 * The default filter function for username autocomplete. |
|
| 74 * |
|
| 75 * Returns: Returns %TRUE if the autocompletion entry is filtered. |
|
| 76 * |
|
| 77 * Since: 2.1.0 |
|
| 78 */ |
|
| 79 PIDGIN_AVAILABLE_IN_2_1 |
|
| 80 gboolean pidgin_screenname_autocomplete_default_filter(const PidginBuddyCompletionEntry *completion_entry, gpointer all_accounts); |
|
| 81 |
37 |
| 82 /** |
38 /** |
| 83 * pidgin_retrieve_user_info: |
39 * pidgin_retrieve_user_info: |
| 84 * @conn: The connection to get information from. |
40 * @conn: The connection to get information from. |
| 85 * @name: The user to get information about. |
41 * @name: The user to get information about. |