27#ifndef _PURPLE_NOTIFY_H_
28#define _PURPLE_NOTIFY_H_
31#include <glib-object.h>
34typedef struct _PurpleNotifyUserInfoEntry PurpleNotifyUserInfoEntry;
35typedef struct _PurpleNotifyUserInfo PurpleNotifyUserInfo;
79 PURPLE_NOTIFY_BUTTON_CONTINUE = 1,
80 PURPLE_NOTIFY_BUTTON_ADD,
81 PURPLE_NOTIFY_BUTTON_INFO,
82 PURPLE_NOTIFY_BUTTON_IM,
83 PURPLE_NOTIFY_BUTTON_JOIN,
84 PURPLE_NOTIFY_BUTTON_INVITE
104 PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR = 0,
105 PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK,
106 PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER
147 const char *primary,
const char *secondary);
150 const char *subject,
const char *from,
151 const char *to,
const char *url);
154 size_t count, gboolean detailed,
155 const char **subjects,
const char **froms,
156 const char **tos,
const char **urls);
158 void *(*notify_formatted)(
const char *title,
const char *primary,
159 const char *secondary,
const char *text);
162 const char *primary,
const char *secondary,
170 PurpleNotifyUserInfo *user_info);
172 void *(*notify_uri)(
const char *uri);
176 void (*_purple_reserved1)(void);
177 void (*_purple_reserved2)(void);
178 void (*_purple_reserved3)(void);
179 void (*_purple_reserved4)(void);
212 const char *primary,
const char *secondary,
295#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
316#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
337#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
357 unsigned int row_id);
360#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
378 unsigned int column_id);
403 const char *title,
const char *primary,
422 const char *from,
const char *to,
446 const char **subjects,
const char **froms,
447 const char **tos,
const char **urls,
468 const char *primary,
const char *secondary,
579#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
742#define purple_notify_info(handle, title, primary, secondary) \
743 purple_notify_message((handle), PURPLE_NOTIFY_MSG_INFO, (title), \
744 (primary), (secondary), NULL, NULL)
749#define purple_notify_warning(handle, title, primary, secondary) \
750 purple_notify_message((handle), PURPLE_NOTIFY_MSG_WARNING, (title), \
751 (primary), (secondary), NULL, NULL)
756#define purple_notify_error(handle, title, primary, secondary) \
757 purple_notify_message((handle), PURPLE_NOTIFY_MSG_ERROR, (title), \
758 (primary), (secondary), NULL, NULL)
void * purple_notify_email(void *handle, const char *subject, const char *from, const char *to, const char *url, PurpleNotifyCloseCallback cb, gpointer user_data)
Displays a single email notification to the user.
PurpleNotifySearchButtonType
The types of buttons.
@ PURPLE_NOTIFY_BUTTON_LABELED
special use, see _button_add_labeled
PurpleNotifyUserInfoEntryType
Types of PurpleNotifyUserInfoEntry objects.
void * purple_notify_message(void *handle, PurpleNotifyMsgType type, const char *title, const char *primary, const char *secondary, PurpleNotifyCloseCallback cb, gpointer user_data)
Displays a notification message to the user.
char * purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline)
Create a textual representation of a PurpleNotifyUserInfo, separating entries with newline.
PurpleNotifyUserInfoEntry * purple_notify_user_info_entry_new(const char *label, const char *value)
Create a new PurpleNotifyUserInfoEntry.
void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, PurpleNotifyUserInfoEntryType type)
Set the type of a PurpleNotifyUserInfoEntry.
PurpleNotifyMsgType
Notification message types.
@ PURPLE_NOTIFY_MSG_INFO
Information notification.
@ PURPLE_NOTIFY_MSG_WARNING
Warning notification.
@ PURPLE_NOTIFY_MSG_ERROR
Error notification.
void purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value)
Set the value for a PurpleNotifyUserInfoEntry.
char * purple_notify_searchresults_column_get_title(PurpleNotifySearchResults *results, unsigned int column_id)
Returns a title of the search results object's column.
void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops)
Sets the UI operations structure to be used when displaying a notification.
GList * purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info)
Retrieve the array of PurpleNotifyUserInfoEntry objects from a PurpleNotifyUserInfo.
PurpleNotifySearchColumn * purple_notify_searchresults_column_new(const char *title)
Returns a newly created search result column object.
guint purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results)
Returns a number of the rows in the search results object.
PurpleNotifyUserInfo * purple_notify_user_info_new(void)
Create a new PurpleNotifyUserInfo which is suitable for passing to purple_notify_userinfo()
void * purple_notify_get_handle(void)
Returns the notify subsystem handle.
void(* PurpleNotifySearchResultsCallback)(PurpleConnection *c, GList *row, gpointer user_data)
Callback for a button in a search result.
void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info)
Remove the last item which was added to a PurpleNotifyUserInfo.
void purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value)
Prepend a label/value pair to a PurpleNotifyUserInfo object.
void purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label)
Set the label for a PurpleNotifyUserInfoEntry.
void purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value)
Add a label/value pair to a PurpleNotifyUserInfo object.
void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results, GList *row)
Adds a new row of the results to the search results object.
void purple_notify_close(PurpleNotifyType type, void *ui_handle)
Closes a notification.
void * purple_notify_emails(void *handle, size_t count, gboolean detailed, const char **subjects, const char **froms, const char **tos, const char **urls, PurpleNotifyCloseCallback cb, gpointer user_data)
Displays a notification for multiple emails to the user.
void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info)
Destroy a PurpleNotifyUserInfo.
PurpleNotifyUiOps * purple_notify_get_ui_ops(void)
Returns the UI operations structure to be used when displaying a notification.
PurpleNotifySearchResults * purple_notify_searchresults_new(void)
Returns a newly created search results object.
PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry)
Get the type of a PurpleNotifyUserInfoEntry.
GList * purple_notify_searchresults_row_get(PurpleNotifySearchResults *results, unsigned int row_id)
Returns a row of the results from the search results object.
void purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info)
Prepend a section break.
void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results, const char *label, PurpleNotifySearchResultsCallback cb)
Adds a plain labelled button that will be displayed in the search results dialog.
void * purple_notify_uri(void *handle, const char *uri)
Opens a URI or somehow presents it to the user.
void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label)
Add a section header.
void purple_notify_close_with_handle(void *handle)
Closes all notifications registered with the specified handle.
void purple_notify_init(void)
Initializes the notify subsystem.
void purple_notify_searchresults_free(PurpleNotifySearchResults *results)
Frees a PurpleNotifySearchResults object.
void purple_notify_searchresults_new_rows(PurpleConnection *gc, PurpleNotifySearchResults *results, void *data)
Replace old rows with the new.
void purple_notify_user_info_add_pair_plaintext(PurpleNotifyUserInfo *user_info, const char *label, const char *value)
Like purple_notify_user_info_add_pair, but value should be plaintext and will be escaped using g_mark...
void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry)
Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object without freeing the entry.
void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info)
Add a section break.
void purple_notify_searchresults_column_add(PurpleNotifySearchResults *results, PurpleNotifySearchColumn *column)
Adds a new column to the search result object.
guint purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results)
Returns a number of the columns in the search results object.
void(* PurpleNotifyCloseCallback)(gpointer user_data)
Notification close callbacks.
void * purple_notify_searchresults(PurpleConnection *gc, const char *title, const char *primary, const char *secondary, PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb, gpointer user_data)
Search results notification API
const gchar * purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry)
Get the label for a PurpleNotifyUserInfoEntry.
void purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label)
Prepend a section header.
void * purple_notify_formatted(void *handle, const char *title, const char *primary, const char *secondary, const char *text, PurpleNotifyCloseCallback cb, gpointer user_data)
Displays a notification with formatted text.
const gchar * purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry)
Get the value for a PurpleNotifyUserInfoEntry.
void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results, PurpleNotifySearchButtonType type, PurpleNotifySearchResultsCallback cb)
Adds a stock button that will be displayed in the search results dialog.
void * purple_notify_userinfo(PurpleConnection *gc, const char *who, PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, gpointer user_data)
Displays user information with formatted text, passing information giving the connection and username...
void purple_notify_uninit(void)
Uninitializes the notify subsystem.
PurpleNotifyType
Notification types.
@ PURPLE_NOTIFY_EMAIL
Single email notification.
@ PURPLE_NOTIFY_MESSAGE
Message notification.
@ PURPLE_NOTIFY_URI
URI notification or display.
@ PURPLE_NOTIFY_FORMATTED
Formatted text.
@ PURPLE_NOTIFY_SEARCHRESULTS
Buddy search results.
@ PURPLE_NOTIFY_USERINFO
Formatted userinfo text.
@ PURPLE_NOTIFY_EMAILS
Multiple email notification.
Single column of a search result.
char * title
Title of the column.
GList * buttons
List of buttons to display.
GList * rows
List of rows in the result.
GList * columns
List of the search column objects.
Notification UI operations.