pidgin/pidginstylecontext.h

Thu, 21 Jul 2022 01:10:22 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 21 Jul 2022 01:10:22 -0500
changeset 41454
7cc69bde919d
parent 41124
95555046173e
permissions
-rw-r--r--

Update pidgin for the purple_account_manager_get_(in)active deprecations

Testing Done:
Compiled and made sure the menus still functioned as expected.

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

40592
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
1 /*
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
2 * Pidgin - Internet Messenger
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40592
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
20 * along with this library; if not, see <https://www.gnu.org/licenses/>.
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
22
40502
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 39277
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 39277
diff changeset
24 # error "only <pidgin.h> may be included directly"
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 39277
diff changeset
25 #endif
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 39277
diff changeset
26
40695
df2674f2d982 Rename the pidgin_style_* api to pidgin_style_context_*
Gary Kramlich <grim@reaperworld.com>
parents: 40592
diff changeset
27 #ifndef PIDGIN_STYLE_CONTEXT_H
df2674f2d982 Rename the pidgin_style_* api to pidgin_style_context_*
Gary Kramlich <grim@reaperworld.com>
parents: 40592
diff changeset
28 #define PIDGIN_STYLE_CONTEXT_H
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <gtk/gtk.h>
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 G_BEGIN_DECLS
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 /**
40713
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
35 * pidgin_style_context_get_background_color:
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
36 * @color: (out): A return address of a #GdkRGBA for the background color.
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
37 *
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
38 * Gets the background color for #GtkWindow in the currently selected theme
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
39 * and sets @color to that value.
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
40 *
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
41 * Since: 3.0.0
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
42 */
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
43 void pidgin_style_context_get_background_color(GdkRGBA *color);
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
44
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
45 /**
40695
df2674f2d982 Rename the pidgin_style_* api to pidgin_style_context_*
Gary Kramlich <grim@reaperworld.com>
parents: 40592
diff changeset
46 * pidgin_style_context_is_dark:
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 *
40592
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
48 * Gets whether or not dark mode is enabled.
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 *
40592
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
50 * Returns: %TRUE if dark mode is enabled and foreground colours should be
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
51 * inverted.
40713
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
52 *
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
53 * Since: 3.0.0
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 */
40713
766bbe6061ec Greatly simplify the nick color generation and properly detect dark themes.
Gary Kramlich <grim@reaperworld.com>
parents: 40695
diff changeset
55 gboolean pidgin_style_context_is_dark(void);
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 G_END_DECLS
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58
40695
df2674f2d982 Rename the pidgin_style_* api to pidgin_style_context_*
Gary Kramlich <grim@reaperworld.com>
parents: 40592
diff changeset
59 #endif /* PIDGIN_STYLE_CONTEXT_H */
40592
559881c7bf92 Rename gtkstyle.[ch] to pidginstyle.[ch] and fix up the dark mode check.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
60

mercurial