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

GDK Reference Manual

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


gdk_colormap_new ()
GdkColormap* gdk_colormap_new (GdkVisual *visual,gint allocate); 

  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.


gdk_colormap_ref ()
GdkColormap* gdk_colormap_ref (GdkColormap *cmap); 

  Increase the reference count of a colormap.

  cmap : a GdkColormap.

  Returns : cmap


gdk_colormap_unref ()
voidgdk_colormap_unref(GdkColormap *cmap); 

  Decrease the reference count of a colormap. If the resulting reference count is zero, destroys the colormap.

  cmap : a GdkColormap.


gdk_colormap_get_system ()
GdkColormap* gdk_colormap_get_system(void); 

  Returns the system's default colormap.

  Returns : the default colormap.


gdk_colormap_get_system_size ()
gintgdk_colormap_get_system_size(void); 

  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.


gdk_colormap_change ()
voidgdk_colormap_change (GdkColormap *colormap,gint ncolors); 

  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.


gdk_colormap_alloc_colors ()
gintgdk_colormap_alloc_colors (GdkColormap *colormap,GdkColor *colors,
gint ncolors,gboolean writeable,gboolean best_match,gboolean *success); 

  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.


gdk_colormap_alloc_color ()
gbooleangdk_colormap_alloc_color(GdkColormap *colormap,
GdkColor *color,gboolean writeable,gboolean best_match); 

  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.


gdk_colormap_free_colors ()
voidgdk_colormap_free_colors(GdkColormap *colormap,
GdkColor *colors,gint ncolors); 

  Free previously allocated colors.

  colormap : a GdkColormap.

  colors : the colors to free.

  ncolors : the number of colors in colors.


gdk_colormap_get_visual ()
GdkVisual*gdk_colormap_get_visual (GdkColormap *colormap); 

  Return the visual for which a given colormap was created.

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



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

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号