2 # Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
4 # This file is part of python-purple.
6 # python-purple is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # python-purple is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 ctypedef char const_char "const char"
28 cdef extern from "libpurple/notify.h":
29 ctypedef struct PurpleNotifyUserInfoEntry
30 ctypedef struct PurpleNotifyUserInfo
32 ctypedef void (*PurpleNotifyCloseCallback) (glib.gpointer user_data)
34 ctypedef enum PurpleNotifyType:
35 PURPLE_NOTIFY_MESSAGE = 0
38 PURPLE_NOTIFY_FORMATTED
39 PURPLE_NOTIFY_SEARCHRESULTS
40 PURPLE_NOTIFY_USERINFO
43 ctypedef enum PurpleNotifyMsgType:
44 PURPLE_NOTIFY_MSG_ERROR = 0
45 PURPLE_NOTIFY_MSG_WARNING
46 PURPLE_NOTIFY_MSG_INFO
48 ctypedef enum PurpleNotifySearchButtonType:
49 PURPLE_NOTIFY_BUTTON_LABELED = 0
50 PURPLE_NOTIFY_BUTTON_CONTINUE = 1
51 PURPLE_NOTIFY_BUTTON_ADD
52 PURPLE_NOTIFY_BUTTON_INFO
53 PURPLE_NOTIFY_BUTTON_IM
54 PURPLE_NOTIFY_BUTTON_JOIN
55 PURPLE_NOTIFY_BUTTON_INVITE
57 ctypedef struct PurpleNotifySearchResults:
62 ctypedef struct PurpleNotifySearchColumn:
65 ctypedef void (*PurpleNotifySearchResultsCallback) (connection.PurpleConnection *c, glib.GList *row, glib.gpointer user_data)
67 ctypedef struct purpleNotifySearchButton:
68 PurpleNotifySearchButtonType type
69 PurpleNotifySearchResultsCallback callback
72 ctypedef struct PurpleNotifyUiOps:
73 void *(*notify_message) (PurpleNotifyMsgType type, const_char *title, \
74 const_char *primary, const_char *secondary)
75 void *(*notify_email) (connection.PurpleConnection *gc, \
76 const_char *subject, const_char *sender, const_char *to, \
78 void *(*notify_emails) (connection.PurpleConnection *gc,
79 size_t count, glib.gboolean detailed, const_char **subjects, \
80 const_char **senders, const_char **tos, const_char **urls)
81 void *(*notify_formatted) (const_char *title, const_char *primary, \
82 const_char *secondary, const_char *text)
83 void *(*notify_searchresults) (connection.PurpleConnection *gc, \
84 const_char *title, const_char *primary, \
85 const_char *secondary, PurpleNotifySearchResults *results, \
86 glib.gpointer user_data)
87 void (*notify_searchresults_new_rows) \
88 (connection.PurpleConnection *gc, \
89 PurpleNotifySearchResults *results, void *data)
90 void *(*notify_userinfo) (connection.PurpleConnection *gc, \
91 const_char *who, PurpleNotifyUserInfo *user_info)
92 void *(*notify_uri) (const_char *uri)
93 void (*close_notify) (PurpleNotifyType type, void *ui_handle)
95 void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops)