📄 pixwin.h
字号:
#define pw_write(dpw, dx, dy, w, h, op, spr, sx, sy) \ (*(dpw)->pw_ops->pro_rop)((dpw)->pw_opshandle, \ (dx)-(dpw)->pw_opsx, (dy)-(dpw)->pw_opsy, (w), (h), (op), \ (spr), (sx), (sy))#define pw_writebackground(dpw, dx, dy, w, h, op) \ (*(dpw)->pw_ops->pro_rop)((dpw)->pw_opshandle, \ (dx)-(dpw)->pw_opsx, (dy)-(dpw)->pw_opsy, (w), (h), (op), \ (struct pixrect *)0, 0, 0)#define pw_read(dpr, dx, dy, w, h, op, spw, sx, sy) \ (*pw_opsstd_ptr->pro_rop)((dpr), (dx), (dy), (w), (h), \ (op), (spw), (sx)-(spw)->pw_clipdata->pwcd_x_offset, \ (sy)-(spw)->pw_clipdata->pwcd_y_offset)#define pw_copy(dpw, dx, dy, w, h, op, spw, sx, sy) \ (*pw_opsstd_ptr->pro_rop)((dpw), \ (dx)-(dpw)->pw_clipdata->pwcd_x_offset, \ (dy)-(dpw)->pw_clipdata->pwcd_y_offset, (w), (h), (op), \ (spw), (sx)-(spw)->pw_clipdata->pwcd_x_offset, \ (sy)-(spw)->pw_clipdata->pwcd_y_offset)#define pw_batchrop(dpw, x, y, op, sbp, n) \ (*(dpw)->pw_ops->pro_batchrop)((dpw)->pw_opshandle, \ (x)-(dpw)->pw_opsx, (y)-(dpw)->pw_opsy, (op), (sbp), (n))#define pw_stencil(dpw, x, y, w, h, op, stpr, stx, sty, spr, sy, sx) \ (*(dpw)->pw_ops->pro_stencil)((dpw)->pw_opshandle, \ x-(dpw)->pw_opsx, y-(dpw)->pw_opsy, (w), (h), (op), \ (stpr), (stx), (sty), (spr), (sy), (sx))#define pw_destroy(pw) \ (*pw_opsstd_ptr->pro_destroy)((pw))#define pw_get(pw, x, y) \ (*pw_opsstd_ptr->pro_get)((pw), \ (x)-(pw)->pw_clipdata->pwcd_x_offset, \ (y)-(pw)->pw_clipdata->pwcd_y_offset)#define pw_put(pw, x, y, val) \ (*(pw)->pw_ops->pro_put)((pw)->pw_opshandle, \ (x)-(pw)->pw_opsx, (y)-(pw)->pw_opsy, (val))#define pw_vector(pw, x0, y0, x1, y1, op, val) \ (*(pw)->pw_ops->pro_vector)((pw)->pw_opshandle, \ (x0)-(pw)->pw_opsx, (y0)-(pw)->pw_opsy, \ (x1)-(pw)->pw_opsx, (y1)-(pw)->pw_opsy, (op), (val))#define pw_region(pw, x, y, w, h) \ (struct pixwin *)(*pw_opsstd_ptr->pro_region)((pw), \ (x), (y), (w), (h))#define pw_putattributes(pw, planes) \ (*pw_opsstd_ptr->pro_putattributes)((pw), (planes))#define pw_getattributes(pw, planes) \ (*pw_opsstd_ptr->pro_getattributes)((pw), (planes))#define pw_putcolormap(pw, index, count, red, green, blue) \ (*pw_opsstd_ptr->pro_putcolormap)((pw), \ (index), (count), (red), (green), (blue))#define pw_getcolormap(pw, index, count, red, green, blue) \ (*pw_opsstd_ptr->pro_getcolormap)((pw), \ (index), (count), (red), (green), (blue))#define pw_lock(pixwin,rect) \ (*(pixwin)->pw_clipops->pwco_lock)((pixwin), (rect));#define pw_unlock(pixwin) \ (*(pixwin)->pw_clipops->pwco_unlock)((pixwin));#define pw_reset(pixwin) \ (*(pixwin)->pw_clipops->pwco_reset)((pixwin));#define pw_getclipping(pixwin) \ (*(pixwin)->pw_clipops->pwco_getclipping)((pixwin));#else lintextern pw_rop();extern pw_write();extern pw_writebackground();extern pw_read();extern pw_copy();extern pw_batchrop();extern pw_stencil();extern pw_destroy();extern pw_get();extern pw_put();extern pw_vector();extern struct pixwin * pw_region();extern pw_putattributes();extern pw_getattributes();extern pw_putcolormap();extern pw_getcolormap();extern pw_lock();extern pw_unlock();extern pw_reset();extern pw_getclipping();#endif lintextern struct pixwin *pw_open();extern struct pixwin *pw_open_monochrome();extern struct pixfont *pw_pfsysopen();#ifndef PRE_FLAMINGOextern struct pixwin *pw_use_video();#endif ndef PRE_FLAMINGOtypedef struct pw_pixel_cache { Rect r; struct pixrect * plane_group[PIX_MAX_PLANE_GROUPS];} Pw_pixel_cache;#define PW_PIXEL_CACHE_NULL ((Pw_pixel_cache *)0)extern Pw_pixel_cache *pw_save_pixels();extern void pw_restore_pixels();#define pw_primary_cached_mpr(pw, pixel_cache) \ ((pixel_cache)->plane_group[(pw)->pw_clipdata->pwcd_plane_group])#ifdef cplus/* * C Library routine specifically relating to pixel device functions *//* * Pixwin_clipops types */int pwco_lock(struct pixwin *pw, struct rect *affected);void pwco_unlock(struct pixwin *pw);void pwco_reset(struct pixwin *pw);int pwco_getclipping(struct pixwin *pw);/* * Pixwin structure utilities */void pw_open(int windowfd);void pw_open_monochrome(int windowfd);void pw_exposed(struct pixwin *pw);void pw_repairretained(struct pixwin *pw);void pw_damaged(struct pixwin *pw);void pw_donedamaged(struct pixwin *pw);void pw_close(struct pixwin *pw);/* * Pixwin color map segment utilities */void pw_setcmsname(struct pixwin *pw, char cmsname[CMS_NAMESIZE]);void pw_getcmsname(struct pixwin *pw, char cmsname[CMS_NAMESIZE]);void pw_getcmsdata(struct pixwin *pw, struct colormapseg *cms, int *planes);void pw_blackonwhite(struct pixwin *pw, int min, max);void pw_whiteonblack(struct pixwin *pw, int min, max);void pw_reversevideo(struct pixwin *pw, int min, max);void pw_cyclecolormap(struct pixwin *pw, int cycles, begin, length);void pw_preparesurface(struct pixwin *pw, struct rect *rect);/* * Global plane group preference */void pw_set_plane_group_preference(int planes);int pw_get_plane_group_preference();void pw_use_fast_monochrome();/* * Additional write functions */void pw_replrop(struct pixwin *pw, int xw, yw, width, height, int op,\ struct pixrect *pr, int xr, yr);void pw_text(struct pixwin *pw, int xw, yw, int op,\ struct pixfont *pixfont, char *s);void pw_ttext(struct pixwin *pw, int xw, yw, int op,\ struct pixfont *pixfont, char *s);void pw_char(struct pixwin *pw, int xw, yw, int op,\ struct pixfont *pixfont, char c);/* * Font utilities for extern struct pixfont *pf_sys. */struct pixfont *pw_pfsysopen(); pw_pfsysclose();/* * Retained control. */void pw_batch(struct pixwin *pw, Pw_batch_type type);void pw_set_x_offset(struct pixwin *pw, int offset);void pw_set_y_offset(struct pixwin *pw, int offset);void pw_set_xy_offset(struct pixwin *pw, int x_offset, y_offset);int pw_get_x_offset(struct pixwin *pw);int pw_get_y_offset(struct pixwin *pw);/* * Pixel caching (menus and prompt, using fullscreen access) that * accomodate mulitple plane group frame buffers. */Pw_pixel_cache * pw_save_pixels(Pixwin *pw, Rect *r);void pw_restore_pixels(Pixwin *pw, Pw_pixel_cache *pc);/* * Double buffering support functions */ void pw_dbl_access(Pixwin *pw); void pw_dbl_release(Pixwin *pw); void pw_dbl_flip(Pixwin *pw); int pw_dbl_get(Pixwin *pw, Pw_dbl_attribute which_attr); int pw_dbl_set(Pixwin *pw, int va_alist);/* * Fullscreen access operations that accomodate mulitple plane group * frame buffers. * * Anyone calling these fullscreen_pw_* routines is assumed to have * done a fullscreen_init, is using the fullscreen pixwin during * this call, hasn't done any prepare surface under these bits, * and should be using a PIX_NOT(PIX_DST) operation. Also, pw_lock * should not have been called before using these operations. */int fullscreen_pw_vector(Pixwin *pw, int x0, y0, x1, y1, op, cms_index);int fullscreen_pw_write(Pixwin *pw, int xw, yw, width, height, op, struct pixrect *pr, int xr, yr);void fullscreen_pw_copy(Pixwin *pw, int xw, yw, width, height, op, Pixwin *pw_src, int xr, yr);#endif#endif pixwin_DEFINED
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -