libpurple/purpledebugui.h

Mon, 22 Aug 2022 21:40:04 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Mon, 22 Aug 2022 21:40:04 -0500
branch
gtk4
changeset 41567
517ac516af27
parent 41207
d91e963b0a1c
child 41686
9bcd6ad114eb
permissions
-rw-r--r--

Inline pidgin_make_scrollable

We need to change it for GTK4, and there are few enough that it can be inlined. Eventually, that code might be a `.ui` anyway.

Testing Done:
Compile only.

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

40950
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_DEBUG_UI_H
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_DEBUG_UI_H
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib-object.h>
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 G_BEGIN_DECLS
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 /**
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 * PURPLE_TYPE_DEBUG_UI:
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 * The standard _get_type macro for #PurpleDebugUi.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 */
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #define PURPLE_TYPE_DEBUG_UI (purple_debug_ui_get_type())
41207
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
41
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
42 /**
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
43 * PurpleDebugUi:
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
44 *
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
45 * #PurpleDebugUiInterface defines the behavior that libpurple uses to
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
46 * interface the debug API with the user interface.
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
47 *
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
48 * Since: 3.0.0
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 40950
diff changeset
49 */
40950
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 G_DECLARE_INTERFACE(PurpleDebugUi, purple_debug_ui, PURPLE, DEBUG_UI, GObject)
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 #include "debug.h"
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 /**
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * PurpleDebugUiInterface:
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * @print: Called to output a debug string to the UI.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 * @is_enabled: Returns if debug printing is enabled in the UI for a @level and
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 * @category.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 * Debug UI operations.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 */
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 struct _PurpleDebugUiInterface {
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 /*< private >*/
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 GTypeInterface parent_iface;
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 /*< public >*/
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 void (*print)(PurpleDebugUi *ui, PurpleDebugLevel level, const gchar *category, const gchar *arg_s);
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 gboolean (*is_enabled)(PurpleDebugUi *ui, PurpleDebugLevel level, const gchar *category);
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 /*< private >*/
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 gpointer reserved[4];
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 };
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 /**
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * purple_debug_ui_is_enabled:
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * @ui: The #PurpleDebugUi instance.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * @level: The #PurpleDebugLevel.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 * @category: An optional category.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * Checks if the ui should output messages at the given level and optional
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * category.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 * Typically this function will not need to be called outside of libpurple.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * Returns: %TRUE if the given level and category will be output by @ui, %FALSE
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 * otherwise.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * Since: 3.0.0
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 */
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 gboolean purple_debug_ui_is_enabled(PurpleDebugUi *ui, PurpleDebugLevel level, const gchar *category);
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 /**
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 * purple_debug_ui_print:
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 * @ui: The #PurpleDebugUi instance.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 * @level: The #PurpleDebugLevel.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 * @category: An optional category.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 * @arg_s: The debug string to output.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 * Outputs @arg_s via @ui with the given @level and optional @category.
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 *
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 * Since: 3.0.0
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 */
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 void purple_debug_ui_print(PurpleDebugUi *ui, PurpleDebugLevel level, const gchar *category, const gchar *arg_s);
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 G_END_DECLS
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 #endif /* PURPLE_DEBUG_UI_H */
c3fc77a3c015 Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108

mercurial