1 | /* |
2 | * Copyright © 2021 Benjamin Otte |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2.1 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 | * |
17 | * Authors: Benjamin Otte <otte@gnome.org> |
18 | */ |
19 | |
20 | #ifndef __GDK_MEMORY_CONVERT_PRIVATE_H__ |
21 | #define __GDK_MEMORY_CONVERT_PRIVATE_H__ |
22 | |
23 | #include "gdkenums.h" |
24 | |
25 | G_BEGIN_DECLS |
26 | |
27 | typedef enum { |
28 | GDK_MEMORY_ALPHA_PREMULTIPLIED, |
29 | GDK_MEMORY_ALPHA_STRAIGHT, |
30 | GDK_MEMORY_ALPHA_OPAQUE |
31 | } GdkMemoryAlpha; |
32 | |
33 | gsize gdk_memory_format_alignment (GdkMemoryFormat format) G_GNUC_CONST; |
34 | GdkMemoryAlpha gdk_memory_format_alpha (GdkMemoryFormat format) G_GNUC_CONST; |
35 | gsize gdk_memory_format_bytes_per_pixel (GdkMemoryFormat format) G_GNUC_CONST; |
36 | gboolean gdk_memory_format_prefers_high_depth(GdkMemoryFormat format) G_GNUC_CONST; |
37 | gboolean gdk_memory_format_gl_format (GdkMemoryFormat format, |
38 | gboolean gles, |
39 | guint *out_internal_format, |
40 | guint *out_format, |
41 | guint *out_type); |
42 | |
43 | void gdk_memory_convert (guchar *dest_data, |
44 | gsize dest_stride, |
45 | GdkMemoryFormat dest_format, |
46 | const guchar *src_data, |
47 | gsize src_stride, |
48 | GdkMemoryFormat src_format, |
49 | gsize width, |
50 | gsize height); |
51 | |
52 | |
53 | G_END_DECLS |
54 | |
55 | #endif /* __GDK_MEMORY_CONVERT_PRIVATE_H__ */ |
56 | |