|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.GObject
org.gnu.gdk.Colormap
This object stores the mapping between the color values stored in memory and the RGB values that are used to display color values.
Field Summary |
Fields inherited from class org.gnu.glib.GObject |
eventsInitialized |
Constructor Summary | |
Colormap()
Create a Colormap initialized to the system's default colormap. |
|
Colormap(Handle handle)
Create a new Colormap from a handle to a native resource. |
|
Colormap(Visual v,
boolean allocate)
Creates a new colormap for the given visual. |
Method Summary | |
boolean |
allocateColor(Color color,
boolean writable,
boolean bestMatch)
Allocates a single color from a colormap. |
boolean[] |
allocateColors(Color[] colors,
boolean writable,
boolean bestMatch)
Allocates colors from a colormap. |
void |
freeColors(Color[] colors)
Frees previously allocated Colors. |
protected static boolean |
gdk_colormap_alloc_color(Handle colormap,
Handle color,
boolean writable,
boolean best_match)
|
protected static int |
gdk_colormap_alloc_colors(Handle colormap,
Handle[] colors,
boolean writable,
boolean bestMatch,
boolean[] success)
|
protected static void |
gdk_colormap_free_colors(Handle colormap,
Handle[] colors)
|
protected static Handle |
gdk_colormap_get_screen(Handle colormap)
|
protected static Handle |
gdk_colormap_get_system()
|
protected static int |
gdk_colormap_get_type()
|
protected static Handle |
gdk_colormap_get_visual(Handle colormap)
|
protected static Handle |
gdk_colormap_new(Handle visual,
boolean allocate)
|
protected static void |
gdk_colormap_query_color(Handle colormap,
long pixel,
Handle result)
|
Screen |
getScreen()
Returns the screen for which the colormap was created. |
static Colormap |
getSystem()
Returns the system's default colormap. |
Visual |
getVisual()
Returns the visual for which the colormap was created. |
Color |
queryColor(long pixel)
Locates the RGB color corresponding to the given hardware pixel. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Colormap()
public Colormap(Handle handle)
public Colormap(Visual v, boolean allocate)
Method Detail |
public static Colormap getSystem()
public Visual getVisual()
public Screen getScreen()
public boolean allocateColor(Color color, boolean writable, boolean bestMatch)
color
- The color to allocatewritable
- If true the color is allocated writable.bestMatch
- If true GDK will attempt to do matching against existing
colors if the color cannot be allocated as requested.public boolean[] allocateColors(Color[] colors, boolean writable, boolean bestMatch)
colors
- writable
- bestMatch
- public void freeColors(Color[] colors)
colors
- public Color queryColor(long pixel)
pixel
- protected static final int gdk_colormap_get_type()
protected static final Handle gdk_colormap_new(Handle visual, boolean allocate)
protected static final Handle gdk_colormap_get_system()
protected static final int gdk_colormap_alloc_colors(Handle colormap, Handle[] colors, boolean writable, boolean bestMatch, boolean[] success)
protected static final boolean gdk_colormap_alloc_color(Handle colormap, Handle color, boolean writable, boolean best_match)
protected static final void gdk_colormap_free_colors(Handle colormap, Handle[] colors)
protected static final void gdk_colormap_query_color(Handle colormap, long pixel, Handle result)
protected static final Handle gdk_colormap_get_visual(Handle colormap)
protected static final Handle gdk_colormap_get_screen(Handle colormap)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |