Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->系统管理 ->正文

GDK Reference Manual

来源:Linux-cn.com 作者:Webmaster 时间:2007-05-05 点击: [收藏] [投稿]

  colormap : a GdkColormap.

  Returns : the visual of the colormap.


gdk_colors_store ()
voidgdk_colors_store(GdkColormap *colormap,
GdkColor *colors,gint ncolors); 

  Change the value of the first ncolors colors in a private colormap. This function is obsolete and should not be used. See gdk_color_change().

  colormap : a GdkColormap.

  colors : the new color values.

  ncolors : the number of colors to change.


gdk_color_copy ()
GdkColor* gdk_color_copy(GdkColor *color); 

  Make a copy of a color structure. The result must be freed using gdk_color_free().

  color : a GdkColor.

  Returns : a copy of color.


gdk_color_free ()
voidgdk_color_free(GdkColor *color); 

  Free a color structure created with gdk_color_copy().

  color : a GdkColor.


gdk_colors_alloc ()
gbooleangdk_colors_alloc(GdkColormap *colormap,
gint contiguous,gulong *planes,gint nplanes,gulong *pixels,gint npixels); 

  Allocate colors from a colormap. This function is obsolete. See gdk_colormap_alloc_colors(). For full documentation of the fields, see the Xlib documentation for XAllocColorCells.

  colormap : a GdkColormap.

  contiguous : if TRUE, the colors should be allocated in contiguous color cells.

  planes : an array in which to store the plane masks.

  nplanes : the number of planes to allocate. (Or zero, to indicate that the color allocation should not be planar.)

  pixels : an array into which to store allocated pixel values.

  npixels : the number of pixels in each plane to allocate.

  Returns :


gdk_colors_free ()
voidgdk_colors_free (GdkColormap *colormap,
gulong *pixels,gint npixels,gulong planes); 

  Free colors allocated with gdk_colors_alloc(). This function is obsolete. See gdk_colormap_free_colors().

  colormap : a GdkColormap.

  pixels : the pixel values of the colors to free.

  npixels : the number of values in pixels.

  planes : the plane masks for all planes to free, OR'd together.


gdk_color_white ()
gbooleangdk_color_white (GdkColormap *colormap,GdkColor *color); 

  Return the white color for a given colormap. The resulting value has already allocated been allocated.

  colormap : a GdkColormap.

  color : the location to store the color.

  Returns : TRUE if the allocation succeeded.


gdk_color_black ()
gbooleangdk_color_black (GdkColormap *colormap,GdkColor *color); 

  Return the black color for a given colormap. The resulting value has already benn allocated.

  colormap : a GdkColormap.

  color : the location to store the color.

  Returns : TRUE if the allocation succeeded.


gdk_color_parse ()
gbooleangdk_color_parse (const gchar *spec,GdkColor *color); 

  Parse a textual specification of a color and fill in the red, green, and blue fields of a GdkColor structure. The color is not allocated, you must call gdk_colormap_alloc_color() yourself. The text string can be in any of the forms accepted by XParseColor; these include name for a color from rgb.txt, such as DarkSlateGray, or a hex specification such as 305050.

  spec : the string specifying the color.

  color : the GdkColor to fill in

  Returns :


gdk_color_alloc ()
gbooleangdk_color_alloc (GdkColormap *colormap,GdkColor *color); 

  Allocate a single color from a colormap. This function is obsolete. See gdk_colormap_alloc_color().

  colormap : a GdkColormap.

  color : The color to allocate. On return, the pixel field will be filled in.

  Returns : TRUE if the allocation succeeded.



 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:GTK v1.2 Tutorial(英文)   下一篇:Java入门(12) 事件与错误处理

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章