?? xshades.h
字號:
/*---------------------------------------------------------------------- File : xshades.h Contents: X11 functions for color and grey shades allocation Author : Christian Borgelt History : 07.01.2000 file created 09.01.2000 color offset saved in structure 30.01.2000 definition of SHD_MAXCNT added----------------------------------------------------------------------*/#ifndef __XSHADES__#define __XSHADES__#include <X11/Xlib.h>/*---------------------------------------------------------------------- Preprocessor Definitions----------------------------------------------------------------------*/#define SHD_BLACK 0 /* shade from black */#define SHD_WHITE 1 /* shade from white */#define SHD_MAXCNT 256 /* maximum number of shades *//*---------------------------------------------------------------------- Type Definitions----------------------------------------------------------------------*/typedef unsigned long PIXEL; /* --- pixel -- */typedef struct { /* --- shades --- */ Display *disp; /* display */ Colormap colmap; /* colormap */ double coloff; /* color offset (in degrees) */ int colcnt; /* number of colors */ int shdbase; /* shade base (SHD_BLACK/SHD_WHITE) */ int shdcnt; /* number of shades per color */ PIXEL *pixels[1]; /* pixel values of color shades */} SHADES; /* (shades) *//*---------------------------------------------------------------------- Functions----------------------------------------------------------------------*/extern SHADES* shd_create (Display *disp, Colormap colmap, double coloff, int colcnt, int shdbase, int shdcnt);extern void shd_delete (SHADES *shds);extern double shd_coloff (SHADES *shds);extern int shd_colcnt (SHADES *shds);extern int shd_shdbase (SHADES *shds);extern int shd_shdcnt (SHADES *shds);extern PIXEL shd_pixel (SHADES *shds, int color, int shade);#ifndef NDEBUGextern void shd_show (SHADES *shds);#endif/*---------------------------------------------------------------------- Preprocessor Definitions----------------------------------------------------------------------*/#define shd_coloff(s) ((s)->coloff)#define shd_colcnt(s) ((s)->colcnt)#define shd_shdbase(s) ((s)->shdbase)#define shd_shdcnt(s) ((s)->shdcnt)#define shd_pixel(t,c,s) ((t)->pixels[c][s])#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -