⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vnc.h

📁 ReactOS是一些高手根据Windows XP的内核编写出的类XP。内核实现机理和API函数调用几乎相同。甚至可以兼容XP的程序。喜欢研究系统内核的人可以看一看。
💻 H
字号:
#ifndef VNC_H
#define VNC_H

#define BOOL rfb_BOOL
#include <rfb/rfb.h>
#undef BOOL

typedef unsigned int vncPixel;

typedef struct
{
	uint16_t w, h;
	uint16_t linew;
	rfbPixelFormat *format;
	char *data;
	BOOL owner;
}
vncBuffer;

extern int vncPreparedClientSocket;
extern int vncPreparedServerSocket;

/* - Buffer management */
extern vncBuffer *vncNewBuffer(int w, int h, int depth);
extern vncBuffer *vncDupBuffer(vncBuffer * b);
extern void vncDeleteBuffer(vncBuffer * b);

/* - Colourmaps */
typedef struct
{
	uint8_t r, g, b;
}
vncColour;

extern void vncSetColourMap(rfbScreenInfoPtr s, rfbColourMap * m);
extern rfbColourMap *vncNewColourMap(rfbScreenInfoPtr s, int n);
extern void vncSetColourMapEntry(rfbColourMap * m, int i, vncPixel r, vncPixel g, vncPixel b);
extern void vncDeleteColourMap(rfbColourMap * m);

/* - Simple pixel manipulation */
extern vncPixel vncGetPixel(vncBuffer * b, int x, int y);
extern void vncSetPixel(vncBuffer * b, int x, int y, vncPixel c);

/* - Drawing primitives */
extern void vncSetRect(rfbScreenInfoPtr s, int x, int y, int w, int h, vncPixel c);
extern void vncCopyBlit(rfbScreenInfoPtr s, int x, int y, int w, int h, int srcx, int srcy);
extern void vncCopyBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h,
			    vncBuffer * b, int srcx, int srcy);
extern void vncTransBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h,
			     vncBuffer * b, int srcx, int srcy, int bg);
extern void vncXorBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h,
			   vncBuffer * b, int srcx, int srcy);
extern void vncAndBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h,
			   vncBuffer * b, int srcx, int srcy);
extern vncBuffer *vncGetRect(rfbScreenInfoPtr s, int x, int y, int w, int h);

// - Low level VNC update primitives upon which the rest are based
extern void vncQueueCopyRect(rfbScreenInfoPtr s, int x, int y, int w, int h, int src_x, int src_y);
extern void vncQueueUpdate(rfbScreenInfoPtr s, int x, int y, int w, int h);

/* cursor */
extern rfbCursorPtr vncNewCursor(vncBuffer * mask, vncBuffer * pointer, int hotx, int hoty);
extern void vncSetCursor(rfbScreenInfoPtr s, rfbCursorPtr c);

int vncListenAtTcpAddr(unsigned short port);
void vncPrintStats();

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -