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

GDK Reference Manual

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

gdk_color_change ()
gbooleangdk_color_change(GdkColormap *colormap,GdkColor *color); 

  Change the value of a color that has already been allocated. If colormap is not a private colormap, then the color must have been allocated using gdk_colormap_alloc_colors() with the writeable set to TRUE.

  colormap : a GdkColormap.

  color : a GdkColor, with the color to change in the pixel field, and the new value in the remaining fields.

  Returns :


gdk_color_equal ()
gintgdk_color_equal (const GdkColor *colora,const GdkColor *colorb); 

  Compare two colors.

  colora : a GdkColor.

  colorb : another GdkColor.

  Returns : TRUE if the two colors compare equal


gdk_color_hash ()
guint gdk_color_hash(const GdkColor *colora,const GdkColor *colorb); 

  A hash function suitable for using for a hash table that stores GdkColor's.

  colora : a GdkColor.

  colorb : NOT USED.

  Returns : The hash function appled to colora

  Color Contexts

  Name

  Color Contexts -- routines for allocating colors (deprecated).

  Synopsis


#include <gdk/gdk.h>
structGdkColorContext;
structGdkColorContextDither;
enumGdkColorContextMode;
GdkColorContext* gdk_color_context_new(GdkVisual *visual,
GdkColormap *colormap);
GdkColorContext* gdk_color_context_new_mono (GdkVisual *visual,
GdkColormap *colormap);
voidgdk_color_context_free(GdkColorContext *cc);
gulonggdk_color_context_get_pixel (GdkColorContext *cc,
gushort red,gushort green,gushort blue,gint *failed);
voidgdk_color_context_get_pixels(GdkColorContext *cc,
gushort *reds,gushort *greens,gushort *blues,
gint ncolors,gulong *colors,gint *nallocated);
voidgdk_color_context_get_pixels_incremental
(GdkColorContext *cc,gushort *reds,gushort *greens,gushort *blues,
gint ncolors,gint *used,gulong *colors,gint *nallocated);
gintgdk_color_context_query_color (GdkColorContext *cc,GdkColor *color);
gintgdk_color_context_query_colors(GdkColorContext *cc,
GdkColor *colors,gint num_colors);
gintgdk_color_context_add_palette (GdkColorContext *cc,
GdkColor *palette,gint num_palette);
voidgdk_color_context_init_dither (GdkColorContext *cc);
voidgdk_color_context_free_dither (GdkColorContext *cc);
gulonggdk_color_context_get_pixel_from_palette
(GdkColorContext *cc,gushort *red,
gushort *green,gushort *blue,gint *failed);
guchargdk_color_context_get_index_from_palette
(GdkColorContext *cc,
gint *red,gint *green,gint *blue,gint *failed); 

  Description

  The GdkColorContext type is used for allocating groups of colors.

  It is now deprecated in favor of the gdk_colormap_*() functions described in the Colormaps and Colors section.

  Details

  struct GdkColorContext


struct GdkColorContext
{
GdkVisual *visual;
GdkColormap *colormap;
gint num_colors;/* available no. of colors in colormap */
gint max_colors;/* maximum no. of colors */
gint num_allocated;/* no. of allocated colors */
GdkColorContextMode mode;
gint need_to_free_colormap;
GdkAtom std_cmap_atom;
gulong *clut;/* color look-up table */
GdkColor *cmap;/* colormap */
GHashTable *color_hash;/* hash table of allocated colors */
GdkColor *palette;/* preallocated palette */
gint num_palette;/* size of palette */
GdkColorContextDither *fast_dither;/* fast dither matrix */
struct
{
gint red;
gint green;
gint blue;
} shifts;

  struct GdkColorContextDither


struct GdkColorContextDither
{
gint fast_rgb[32][32][32]; /* quick look-up table for faster rendering */
gint fast_err[32][32][32]; /* internal RGB error information */
gint fast_erg[32][32][32];
gint fast_erb[32][32][32];
}; 

  enum GdkColorContextMode


typedef enum
{
GDK_CC_MODE_UNDEFINED,
GDK_CC_MODE_BW,
GDK_CC_MODE_STD_CMAP,
GDK_CC_MODE_TRUE,
GDK_CC_MODE_MY_GRAY,
GDK_CC_MODE_PALETTE
} GdkColorContextMode; 
gdk_color_context_new ()
GdkColorContext* gdk_color_context_new(GdkVisual *visual,
GdkColormap *colormap); 

  visual :

  colormap :

  Returns :



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

上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 下一页


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

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
·Motorola微处理器bootloader分析与应用
·Fedora Core5 NFS服务器搭建过程介绍
·Linux系统:让内存不再泄漏的实用技巧
·新手看招 手把手教你安装VMware虚拟机
·“侵权事件” 红帽称微软企图干扰用户
·删除Linux后 如何找回Windows启动菜单
·菜鸟乐园 Linux中常见文件系统格式介绍
·Linux操作系统下IPTables配置方法详解
·实用技巧 Linux系统的经典使用技巧八则
·Linux系统文件优化及磁盘检查方法介绍
Power by linux-cn.com 粤ICP备05006655号