mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
8a836c07cf
Sat, 6 May 2000 13:31:34 +0200 Paolo Molaro <lupus@linuxcare.com> * gdk/nanox/*: nano-X port work in progress. * gdk/simple.c: simple test for Gdk. * README.nanox: notes about the port: read this first! * gtk/gtk{dnd,plug,selection,window}.c: minimal changes to make gtk compile with nano-X.
96 lines
1.4 KiB
C
96 lines
1.4 KiB
C
|
|
#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);
|
|
}
|
|
|
|
|