Esempio n. 1
0
static void
GrSendClientDataWrapper(void *r)
{
	nxSendClientDataReq *req = r;

	GrSendClientData(req->wid, req->did, req->serial, req->len,
		GetReqVarLen(req), GetReqData(req));
}
Esempio n. 2
0
/* FIXME: fails with pointtable size > 64k if sizeof(int) == 2*/
static void
GrFillPolyWrapper(void *r)
{
	nxPolyReq *req = r;
	int        count;

	count = GetReqVarLen(req) / sizeof(GR_POINT);
	GrFillPoly(req->drawid, req->gcid, count, (GR_POINT *)GetReqData(req));
}
Esempio n. 3
0
static void
GrSetWMPropertiesWrapper(void *r)
{
	nxSetWMPropertiesReq *req = r;
	GR_WM_PROPERTIES *props = GetReqData(req);

	if(GetReqVarLen(req) - sizeof(GR_WM_PROPERTIES)) 
		props->title = (GR_CHAR *)props + sizeof(GR_WM_PROPERTIES);
	else
		props->title = NULL;
	GrSetWMProperties(req->windowid, props);
}
Esempio n. 4
0
static void
GrGetGCTextSizeWrapper(void *r)
{
	nxGetGCTextSizeReq *req = r;
	GR_SIZE             retwidth, retheight, retbase;

	GrGetGCTextSize(req->gcid, GetReqData(req), GetReqVarLen(req),
		req->flags, &retwidth, &retheight, &retbase);

 	GsWriteType(current_fd,GrNumGetGCTextSize);
	GsWrite(current_fd, &retwidth, sizeof(retwidth));
	GsWrite(current_fd, &retheight, sizeof(retheight));
	GsWrite(current_fd, &retbase, sizeof(retbase));
}
Esempio n. 5
0
static void
GrNewPolygonRegionWrapper(void *r)
{
	GR_REGION_ID region;
	nxNewPolygonRegionReq *req = r;
	int count;
	
	/* FIXME: unportable method, depends on sizeof(int) in GR_POINT*/
	count = GetReqVarLen(req) / sizeof(GR_POINT);	
	region = GrNewPolygonRegion(req->mode, count,
		(GR_POINT *)GetReqData(req));
	
	GsWriteType(current_fd, GrNumNewPolygonRegion);
	GsWrite(current_fd, &region, sizeof(region));
}
Esempio n. 6
0
static void
GrNewCursorWrapper(void *r)
{
	nxNewCursorReq *req = r;
	int		varlen;
	char *          bitmap;
	GR_CURSOR_ID	cursorid;

	varlen = GetReqVarLen(req);
	bitmap = GetReqData(req);

	cursorid = GrNewCursor(req->width, req->height,
		req->hotx, req->hoty, req->fgcolor, req->bgcolor,
		(GR_BITMAP *)bitmap, (GR_BITMAP *)(bitmap+varlen/2));

	GsWriteType(current_fd, GrNumNewCursor);
	GsWrite(current_fd, &cursorid, sizeof(cursorid));
}