pidgin/gtkstyle.h

Sat, 07 Nov 2020 02:21:44 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Sat, 07 Nov 2020 02:21:44 -0600
changeset 40588
abf38be27d21
parent 40502
875489636847
permissions
-rw-r--r--

Rename a few things in Jabber SI xfer to be clearer.

A small followup to the previous review, which I noticed while working on Bonjour's version.

Testing Done:
compile only.

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

38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /* pidgin
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * 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
4 * 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
5 * source distribution.
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * 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
8 * 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
9 * 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
10 * (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
11 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * 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
13 * 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
14 * 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
15 * 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
16 *
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 */
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
21
40502
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 39277
diff changeset
22 #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
23 # 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
24 #endif
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 39277
diff changeset
25
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
26 /**
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
27 * SECTION:gtkstyle
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
28 * @section_id: pidgin-gtkstyle
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
29 * @short_description: <filename>gtkstyle.h</filename>
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
30 * @title: Style API
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
31 */
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
32
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 #ifndef _PIDGINSTYLE_H_
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 #define _PIDGINSTYLE_H_
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 #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
37
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 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
39
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 /**
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
41 * pidgin_style_is_dark:
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
42 * @style: The GtkStyle in use, or NULL to use a cached version.
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 *
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
44 * Returns 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
45 *
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
46 * Returns: TRUE if dark mode is enabled and foreground colours should be invertred
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 */
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 gboolean pidgin_style_is_dark(GtkStyle *style);
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 /**
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
52 * pidgin_style_adjust_contrast:
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
53 * @style: The GtkStyle in use.
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
54 * @color: Color to be lightened. Transformed color will be written here.
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 *
38816
9fd4f68ed211 Clean up gobject-introspection for gtkstyle.h
Gary Kramlich <grim@reaperworld.com>
parents: 38699
diff changeset
56 * Lighten a color if 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
57 */
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58
39277
68c17ba18f33 pidgin: Fix GdkColor vs GdkRGBA -Wincompatible-pointer-types warnings
Mike Ruprecht <cmaiku@gmail.com>
parents: 38816
diff changeset
59 void pidgin_style_adjust_contrast(GtkStyle *style, GdkRGBA *color);
38699
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 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
62
e7b5011e4728 Namespace the contrast stuff and move it to it's own file/namespace
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 #endif /* _PIDGINSTYLE_H_ */

mercurial