X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=libpurple%2Fnotify.pxd;h=dc76d205219ceacde2394fc4a08bc186b723eb89;hp=c45c60a87429b84dd358c792ac3278c370475cb0;hb=96dcc1db5e3f04349ef4ce92efd3d71d5d1623b5;hpb=f159e4e85c40eec62070f297af3fd54646dba4b0 diff --git a/libpurple/notify.pxd b/libpurple/notify.pxd index c45c60a..dc76d20 100644 --- a/libpurple/notify.pxd +++ b/libpurple/notify.pxd @@ -17,8 +17,79 @@ # along with this program. If not, see . # +cimport glib + +cimport connection + +cdef extern from *: + ctypedef char const_char "const char" + ctypedef int size_t + cdef extern from "libpurple/notify.h": + ctypedef struct PurpleNotifyUserInfoEntry + ctypedef struct PurpleNotifyUserInfo + + ctypedef void (*PurpleNotifyCloseCallback) (glib.gpointer user_data) + + ctypedef enum PurpleNotifyType: + PURPLE_NOTIFY_MESSAGE = 0 + PURPLE_NOTIFY_EMAIL + PURPLE_NOTIFY_EMAILS + PURPLE_NOTIFY_FORMATTED + PURPLE_NOTIFY_SEARCHRESULTS + PURPLE_NOTIFY_USERINFO + PURPLE_NOTIFY_URI + + ctypedef enum PurpleNotifyMsgType: + PURPLE_NOTIFY_MSG_ERROR = 0 + PURPLE_NOTIFY_MSG_WARNING + PURPLE_NOTIFY_MSG_INFO + + ctypedef enum PurpleNotifySearchButtonType: + PURPLE_NOTIFY_BUTTON_LABELED = 0 + PURPLE_NOTIFY_BUTTON_CONTINUE = 1 + PURPLE_NOTIFY_BUTTON_ADD + PURPLE_NOTIFY_BUTTON_INFO + PURPLE_NOTIFY_BUTTON_IM + PURPLE_NOTIFY_BUTTON_JOIN + PURPLE_NOTIFY_BUTTON_INVITE + + ctypedef struct PurpleNotifySearchResults: + glib.GList *columns + glib.GList *rows + glib.GList *buttons + + ctypedef struct PurpleNotifySearchColumn: + char *title + + ctypedef void (*PurpleNotifySearchResultsCallback) (connection.PurpleConnection *c, glib.GList *row, glib.gpointer user_data) + + ctypedef struct purpleNotifySearchButton: + PurpleNotifySearchButtonType type + PurpleNotifySearchResultsCallback callback + char *label + ctypedef struct PurpleNotifyUiOps: - pass + void *(*notify_message) (PurpleNotifyMsgType type, const_char *title, \ + const_char *primary, const_char *secondary) + void *(*notify_email) (connection.PurpleConnection *gc, \ + const_char *subject, const_char *sender, const_char *to, \ + const_char *url) + void *(*notify_emails) (connection.PurpleConnection *gc, + size_t count, glib.gboolean detailed, const_char **subjects, \ + const_char **senders, const_char **tos, const_char **urls) + void *(*notify_formatted) (const_char *title, const_char *primary, \ + const_char *secondary, const_char *text) + void *(*notify_searchresults) (connection.PurpleConnection *gc, \ + const_char *title, const_char *primary, \ + const_char *secondary, PurpleNotifySearchResults *results, \ + glib.gpointer user_data) + void (*notify_searchresults_new_rows) \ + (connection.PurpleConnection *gc, \ + PurpleNotifySearchResults *results, void *data) + void *(*notify_userinfo) (connection.PurpleConnection *gc, \ + const_char *who, PurpleNotifyUserInfo *user_info) + void *(*notify_uri) (const_char *uri) + void (*close_notify) (PurpleNotifyType type, void *ui_handle) void c_purple_notify_set_ui_ops "purple_notify_set_ui_ops" (PurpleNotifyUiOps *ops)