blob: 616410d03bab4d221a208d28eff6ec9e4bf3b402 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
#include "gdkvisual.h"
#include "gdkprivate-nanox.h"
#include <glib.h>
static GdkVisual system_visual;
void
gdk_visual_init (void)
{
system_visual.type = GDK_VISUAL_TRUE_COLOR;
system_visual.depth = 24;
system_visual.bits_per_rgb = 8;
}
GdkVisual*
gdk_visual_ref (GdkVisual *visual)
{
return visual;
}
void
gdk_visual_unref (GdkVisual *visual)
{
return;
}
gint
gdk_visual_get_best_depth (void)
{
return 24;
}
GdkVisualType
gdk_visual_get_best_type (void)
{
return GDK_VISUAL_TRUE_COLOR;
}
GdkVisual*
gdk_visual_get_system (void)
{
return ((GdkVisual*) &system_visual);
}
GdkVisual*
gdk_visual_get_best (void)
{
return ((GdkVisual*) &system_visual);
}
GdkVisual*
gdk_visual_get_best_with_type (GdkVisualType visual_type)
{
if (visual_type == GDK_VISUAL_TRUE_COLOR)
return &system_visual;
return NULL;
}
GdkVisual*
gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type)
{
if (visual_type == GDK_VISUAL_TRUE_COLOR && depth == 24)
return &system_visual;
return NULL;
}
void
gdk_query_depths (gint **depths,
gint *count)
{
if (count)
*count = 1;
if (depths)
*depths[0] = 24;
}
void
gdk_query_visual_types (GdkVisualType **visual_types,
gint *count)
{
if (count)
*count = 1;
if (visual_types)
*visual_types[0] = GDK_VISUAL_TRUE_COLOR;
}
GList*
gdk_list_visuals (void)
{
return g_list_append(NULL, &system_visual);
}
|