Top |
void | gdk_query_depths () |
void | gdk_query_visual_types () |
GList * | gdk_list_visuals () |
gint | gdk_visual_get_best_depth () |
GdkVisualType | gdk_visual_get_best_type () |
GdkVisual * | gdk_visual_get_system () |
GdkVisual * | gdk_visual_get_best () |
GdkVisual * | gdk_visual_get_best_with_depth () |
GdkVisual * | gdk_visual_get_best_with_type () |
GdkVisual * | gdk_visual_get_best_with_both () |
#define | gdk_visual_ref() |
#define | gdk_visual_unref() |
GdkScreen * | gdk_visual_get_screen () |
gint | gdk_visual_get_bits_per_rgb () |
void | gdk_visual_get_blue_pixel_details () |
GdkByteOrder | gdk_visual_get_byte_order () |
gint | gdk_visual_get_colormap_size () |
gint | gdk_visual_get_depth () |
void | gdk_visual_get_green_pixel_details () |
void | gdk_visual_get_red_pixel_details () |
GdkVisualType | gdk_visual_get_visual_type () |
void gdk_query_depths (gint **depths
,gint *count
);
This function returns the available bit depths for the default
screen. It's equivalent to listing the visuals
(gdk_list_visuals()
) and then looking at the depth field in each
visual, removing duplicates.
The array returned by this function should not be freed.
void gdk_query_visual_types (GdkVisualType **visual_types
,gint *count
);
This function returns the available visual types for the default
screen. It's equivalent to listing the visuals
(gdk_list_visuals()
) and then looking at the type field in each
visual, removing duplicates.
The array returned by this function should not be freed.
GList *
gdk_list_visuals (void
);
Lists the available visuals for the default screen.
(See gdk_screen_list_visuals()
)
A visual describes a hardware image data format.
For example, a visual might support 24-bit color, or 8-bit color,
and might expect pixels to be in a certain format.
Call g_list_free()
on the return value when you're finished with it.
gint
gdk_visual_get_best_depth (void
);
Get the best available depth for the default GDK screen. "Best" means "largest," i.e. 32 preferred over 24 preferred over 8 bits per pixel.
GdkVisualType
gdk_visual_get_best_type (void
);
Return the best available visual type for the default GDK screen.
GdkVisual *
gdk_visual_get_system (void
);
Get the system's default visual for the default GDK screen. This is the visual for the root window of the display. The return value should not be freed.
GdkVisual *
gdk_visual_get_best (void
);
Get the visual with the most available colors for the default GDK screen. The return value should not be freed.
GdkVisual *
gdk_visual_get_best_with_depth (gint depth
);
Get the best visual with depth depth
for the default GDK screen.
Color visuals and visuals with mutable colormaps are preferred
over grayscale or fixed-colormap visuals. The return value should not
be freed. NULL
may be returned if no visual supports depth
.
GdkVisual *
gdk_visual_get_best_with_type (GdkVisualType visual_type
);
Get the best visual of the given visual_type
for the default GDK screen.
Visuals with higher color depths are considered better. The return value
should not be freed. NULL
may be returned if no visual has type
visual_type
.
GdkVisual * gdk_visual_get_best_with_both (gint depth
,GdkVisualType visual_type
);
Combines gdk_visual_get_best_with_depth()
and gdk_visual_get_best_with_type()
.
#define gdk_visual_ref(v) g_object_ref(v)
gdk_visual_ref
is deprecated and should not be used in newly-written code.
#define gdk_visual_unref(v) g_object_unref(v)
gdk_visual_unref
is deprecated and should not be used in newly-written code.
GdkScreen *
gdk_visual_get_screen (GdkVisual *visual
);
Gets the screen to which this visual belongs
Since: 2.2
gint
gdk_visual_get_bits_per_rgb (GdkVisual *visual
);
Returns the number of significant bits per red, green and blue value.
Since: 2.22
void gdk_visual_get_blue_pixel_details (GdkVisual *visual
,guint32 *mask
,gint *shift
,gint *precision
);
Obtains values that are needed to calculate blue pixel values in TrueColor and DirectColor. The "mask" is the significant bits within the pixel. The "shift" is the number of bits left we must shift a primary for it to be in position (according to the "mask"). Finally, "precision" refers to how much precision the pixel value contains for a particular primary.
visual |
||
mask |
A pointer to a guint32 to be filled in, or |
[out][allow-none] |
shift |
A pointer to a gint to be filled in, or |
[out][allow-none] |
precision |
A pointer to a gint to be filled in, or |
[out][allow-none] |
Since: 2.22
GdkByteOrder
gdk_visual_get_byte_order (GdkVisual *visual
);
Returns the byte order of this visual.
Since: 2.22
gint
gdk_visual_get_colormap_size (GdkVisual *visual
);
Returns the size of a colormap for this visual.
Since: 2.22
gint
gdk_visual_get_depth (GdkVisual *visual
);
Returns the bit depth of this visual.
Since: 2.22
void gdk_visual_get_green_pixel_details (GdkVisual *visual
,guint32 *mask
,gint *shift
,gint *precision
);
Obtains values that are needed to calculate green pixel values in TrueColor and DirectColor. The "mask" is the significant bits within the pixel. The "shift" is the number of bits left we must shift a primary for it to be in position (according to the "mask"). Finally, "precision" refers to how much precision the pixel value contains for a particular primary.
visual |
||
mask |
A pointer to a guint32 to be filled in, or |
[out][allow-none] |
shift |
A pointer to a gint to be filled in, or |
[out][allow-none] |
precision |
A pointer to a gint to be filled in, or |
[out][allow-none] |
Since: 2.22
void gdk_visual_get_red_pixel_details (GdkVisual *visual
,guint32 *mask
,gint *shift
,gint *precision
);
Obtains values that are needed to calculate red pixel values in TrueColor and DirectColor. The "mask" is the significant bits within the pixel. The "shift" is the number of bits left we must shift a primary for it to be in position (according to the "mask"). Finally, "precision" refers to how much precision the pixel value contains for a particular primary.
visual |
A GdkVisual. |
|
mask |
A pointer to a guint32 to be filled in, or |
[out][allow-none] |
shift |
A pointer to a gint to be filled in, or |
[out][allow-none] |
precision |
A pointer to a gint to be filled in, or |
[out][allow-none] |
Since: 2.22
GdkVisualType
gdk_visual_get_visual_type (GdkVisual *visual
);
Returns the type of visual this is (PseudoColor, TrueColor, etc).
Since: 2.22
typedef struct { GObject parent_instance; GdkVisualType GSEAL (type); gint GSEAL (depth); GdkByteOrder GSEAL (byte_order); gint GSEAL (colormap_size); gint GSEAL (bits_per_rgb); guint32 GSEAL (red_mask); gint GSEAL (red_shift); gint GSEAL (red_prec); guint32 GSEAL (green_mask); gint GSEAL (green_shift); gint GSEAL (green_prec); guint32 GSEAL (blue_mask); gint GSEAL (blue_shift); gint GSEAL (blue_prec); } GdkVisual;