Mon, 31 Mar 2025 20:55:49 -0500
Prepare for the 2.91.0 release
Testing Done:
Ran `meson dist`
Reviewed at https://reviews.imfreedom.org/r/3927/
|
40951
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PIDGIN_COLOR_H |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PIDGIN_COLOR_H |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <gtk/gtk.h> |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
42466
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41124
diff
changeset
|
32 | #include "pidginversion.h" |
|
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41124
diff
changeset
|
33 | |
|
40951
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | G_BEGIN_DECLS |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | /** |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * pidgin_color_calculate_for_text: |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * @text: The text to calculate a color for. |
|
41086
631e6cba8635
Fix typos in Pidgin
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40951
diff
changeset
|
39 | * @color: (out): The return address for a #GdkRGBA that will receive the |
|
40951
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * color. |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * This function is based heavily on the implementation that gajim uses from |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * python-nbxmpp in nbxmpp.util.text_to_color. However, we don't have an |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * implementation of HSL let alone HSLuv, so we're using HSV which is why |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * the value is 1.0 instead of a luminance of 0.5. |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | * Currently there is no caching as GCache is deprecated and writing a fast LRU |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | * in glib is going to take a bit of finesse. Also we'll need to figure out how |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | * to scale to ginormous Twitch channels which will constantly bust the cache. |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
51 | * Since: 3.0 |
|
40951
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | */ |
|
42466
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41124
diff
changeset
|
53 | PIDGIN_AVAILABLE_IN_3_0 |
|
40951
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | void pidgin_color_calculate_for_text(const gchar *text, GdkRGBA *color); |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | G_END_DECLS |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | |
|
c83bf354d142
Add support for the author-name-color property to PidginMessage and wire it up in PurpleMessage as well
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | #endif /* PIDGIN_COLOR_H */ |