Add deleted HTTP digest functions to ChangeLog.API.
[pidgin-git.git] / pidgin / pidgininvitedialog.h
blob1f9a769a687e6b40ac0e596db1da88c8ef45ddb6
1 /* pidgin
3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PIDGIN_INVITE_DIALOG_H
23 #define PIDGIN_INVITE_DIALOG_H
25 /**
26 * SECTION:pidgininvitedialog
27 * @section_id: pidgin-invite-dialog
28 * @short_description: A dialog widget to invite others to chat
29 * @title: Invite Dialog
31 * #PidginInviteDialog is a simple #GtkDialog that presents the user with an
32 * interface to invite another user to a conversation. Name completion is
33 * automatically setup as well.
35 * |[<!-- language="C" -->
36 * static void
37 * invite_response(GtkWidget *widget, int resp, gpointer data) {
38 * PidginInviteDialog *dialog = PIDGIN_INVITE_DIALOG(widget);
40 * if(resp == GTK_RESPONSE_ACCEPT) {
41 * g_message(
42 * "user wants to invite %s with message %s",
43 * pidgin_invite_dialog_get_contact(dialog),
44 * pidgin_invite_dialog_get_message(dialog)
45 * );
46 * }
47 * }
49 * static void
50 * invite_prompt(PurpleChatConversation *conv) {
51 * GtkWidget *dialog = pidgin_invite_dialog_new(conv);
52 * g_signal_connect(G_OBJECT(dialog), "response",
53 * G_CALLBACK(invite_response), NULL);
55 * }
56 * ]|
59 #include <gtk/gtk.h>
61 #include <purple.h>
63 G_BEGIN_DECLS
65 #define PIDGIN_TYPE_INVITE_DIALOG pidgin_invite_dialog_get_type()
67 G_DECLARE_FINAL_TYPE(PidginInviteDialog, pidgin_invite_dialog, PIDGIN,
68 INVITE_DIALOG, GtkDialog)
70 /**
71 * pidgin_invite_dialog_new:
72 * @conversation: The #PurpleChatConversation instance.
74 * Creates a new #PidginInviteDialog to invite someone to @conversation.
76 * Returns: (transfer full): The new #PidginInviteDialog instance.
78 * Since: 3.0.0
80 GtkWidget *pidgin_invite_dialog_new(PurpleChatConversation *conversation);
82 /**
83 * pidgin_invite_dialog_set_contact:
84 * @dialog: The #PidginInviteDialog instance.
85 * @contact: The contact to invite.
87 * Sets the contact that should be invited. This function is intended to be
88 * used to prepopulate the dialog in cases where you just need to prompt the
89 * user for an invite message.
91 * Since: 3.0.0
93 void pidgin_invite_dialog_set_contact(PidginInviteDialog *dialog, const gchar *contact);
95 /**
96 * pidgin_invite_dialog_get_contact:
97 * @dialog: #PidginInviteDialog instance.
99 * Gets the contact that was entered in @dialog. This string is only valid as
100 * long as @dialog exists.
102 * Returns: (transfer none): The contact that was entered.
104 * Since: 3.0.0
106 const gchar *pidgin_invite_dialog_get_contact(PidginInviteDialog *dialog);
109 * pidgin_invite_dialog_set_message:
110 * @dialog: The #PidginInviteDialog instance.
111 * @message: The message that should be displayed.
113 * Sets the message to be displayed in @dialog. The main use case is to
114 * prepopulate the message.
116 * Since: 3.0.0
118 void pidgin_invite_dialog_set_message(PidginInviteDialog *dialog, const gchar *message);
121 * pidgin_invite_dialog_get_message:
122 * @dialog: The #PidginInviteDialog instance.
124 * Gets the message that was entered in @dialog. The returned value is only
125 * valid as long as @dialog exists.
127 * Returns: (transfer none): The message that was entered in @dialog.
129 * Since: 3.0.0
131 const gchar *pidgin_invite_dialog_get_message(PidginInviteDialog *dialog);
134 * pidgin_invite_dialog_get_conversation:
135 * @dialog: The #PidginInviteDialog instance.
137 * Gets the #PurpleChatConversation that @dialog was created for.
139 * Returns: (transfer none): The #PurpleChatConversation that @dialog was
140 * created with.
142 * Since: 3.0.0
144 PurpleChatConversation *pidgin_invite_dialog_get_conversation(PidginInviteDialog *dialog);
146 G_END_DECLS
148 #endif /* PIDGIN_INVITE_DIALOG_H */