GDK Reference Manual
Create a new colormap for the given visual. visual : a GdkVisual. allocate : if TRUE, the newly created colormap will be a private colormap, and all colors in it will be allocated for the applications use. Returns : the new GdkColormap.
Increase the reference count of a colormap. cmap : a GdkColormap. Returns : cmap
Decrease the reference count of a colormap. If the resulting reference count is zero, destroys the colormap. cmap : a GdkColormap.
Returns the system's default colormap. Returns : the default colormap.
Returns the size of the system's default colormap. (See the description of struct GdkColormap for an explanation of the size of a colormap.) Returns : the size of the system's default colormap.
Change the value of the first ncolors in a private colormap to match the values in the colors array in the color map. This function is obsolete and should not be used. See gdk_color_change(). colormap : a GdkColormap. ncolors : the number of colors to change.
Allocates colors from a colormap. colormap : a GdkColormap. colors : The color values to allocate. On return, the pixel values for allocated colors will be filled in. ncolors : The number of colors in colors. writeable : If TRUE, the colors are allocated writeable (their values can later be changed using gdk_color_change()). Writeable colors cannot be shared between applications. best_match : If TRUE, GDK will attempt to do matching against existing colors if the colors cannot be allocated as requested. success : An array of length ncolors. On return, this indicates whether the corresponding color in colors was sucessfully allocated or not. Returns : The number of colors that were not sucessfully allocated.
Allocate a single color from a colormap. colormap : a GdkColormap. color : the color to allocate. On return the pixel field will be filled in if allocation succeeds. writeable : If TRUE, the color is allocated writeable (their values can later be changed using gdk_color_change()). Writeable colors cannot be shared between applications. best_match : If TRUE, GDK will attempt to do matching against existing colors if the color cannot be allocated as requested. Returns : TRUE if the allocation succeeded.
Free previously allocated colors. colormap : a GdkColormap. colors : the colors to free. ncolors : the number of colors in colors.
Return the visual for which a given colormap was created. 上一篇:GTK v1.2 Tutorial(英文) 下一篇:Java入门(12) 事件与错误处理 更多相关文章
|
推荐文章
精彩文章
|