]> Pileus Git - ~andy/gtk/blob - gdk/gdkvisual.c
c98e384ad2659f9fc9d6c802af27c7e59af4ade7
[~andy/gtk] / gdk / gdkvisual.c
1 /* GDK - The GTK+ Drawing Kit
2  * gdkvisual.c
3  * 
4  * Copyright 2001 Sun Microsystems Inc. 
5  *
6  * Erwann Chenede <erwann.chenede@sun.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #include "config.h"
25 #include "gdkvisual.h"
26 #include "gdkscreen.h"
27 #include "gdkalias.h"
28
29 /**
30  * gdk_list_visuals:
31  * 
32  * Lists the available visuals for the default screen.
33  * (See gdk_screen_list_visuals())
34  * A visual describes a hardware image data format.
35  * For example, a visual might support 24-bit color, or 8-bit color,
36  * and might expect pixels to be in a certain format.
37  *
38  * Call g_list_free() on the return value when you're finished with it.
39  * 
40  * Return value: a list of visuals; the list must be freed, but not its contents
41  **/
42 GList*
43 gdk_list_visuals (void)
44 {
45   return gdk_screen_list_visuals (gdk_screen_get_default ());
46 }
47
48 /**
49  * gdk_visual_get_system:
50  * 
51  * Get the system'sdefault visual for the default GDK screen.
52  * This is the visual for the root window of the display.
53  * The return value should not be freed.
54  * 
55  * Return value: system visual
56  **/
57 GdkVisual*
58 gdk_visual_get_system (void)
59 {
60   return gdk_screen_get_system_visual (gdk_screen_get_default());
61 }
62
63 #define __GDK_VISUAL_C__
64 #include "gdkaliasdef.c"