pidgin/pidginstatusprimitivestore.h

Tue, 23 Aug 2022 01:58:39 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 23 Aug 2022 01:58:39 -0500
branch
gtk4
changeset 41573
2c4955b639a1
parent 41276
03f98ece6b26
permissions
-rw-r--r--

Port add contact notification to GTK4

Testing Done:
Compiled only; I don't have a menu to trigger the demo action.

Reviewed at https://reviews.imfreedom.org/r/1627/

41268
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
41276
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41268
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41268
diff changeset
24 # error "only <pidgin.h> may be included directly"
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41268
diff changeset
25 #endif
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41268
diff changeset
26
41268
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PIDGIN_STATUS_PRIMITIVE_STORE_H
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PIDGIN_STATUS_PRIMITIVE_STORE_H
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <gtk/gtk.h>
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #include <purple.h>
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 G_BEGIN_DECLS
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 /**
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 * PidginStatusPrimitiveStore:
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 * A [class@Gtk.ListStore] for use with [class@PidginStatusPrimitiveChooser].
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 * Since: 3.0.0
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 */
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 #define PIDGIN_TYPE_STATUS_PRIMITIVE_STORE (pidgin_status_primitive_store_get_type())
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 G_DECLARE_FINAL_TYPE(PidginStatusPrimitiveStore, pidgin_status_primitive_store,
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 PIDGIN, STATUS_PRIMITIVE_STORE, GtkListStore)
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 /**
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 * pidgin_status_primitive_store_new:
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 * Creates a new [class@Gtk.ListStore] that contains status primitives in
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 * purple.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 * Returns: (transfer full): The new list store.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * Since: 3.0.0
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 */
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 GtkListStore *pidgin_status_primitive_store_new(void);
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 /**
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * pidgin_status_primitive_store_set_account:
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * @store: The status primitive store instance.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 * @account: (nullable): The account to use.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 * Sets the [class@Purple.Account] whose status primitives to show. If %NULL,
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * all status primitives will be displayed.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 * Since: 3.0.0
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 */
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 void pidgin_status_primitive_store_set_account(PidginStatusPrimitiveStore *store, PurpleAccount *account);
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 /**
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 * pidgin_status_primitive_store_get_account:
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 * @store: The store instance.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * Gets the [class@Purple.Account] that's associated with @store.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 * Returns: (transfer none): The account of %NULL.
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 *
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * Since: 3.0.0
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 */
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 PurpleAccount *pidgin_status_primitive_store_get_account(PidginStatusPrimitiveStore *store);
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 G_END_DECLS
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85
4adf517478fc Create new widget and store for choosing status primitives
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 #endif /* PIDGIN_STATUS_PRIMITIVE_STORE_H */

mercurial