void GrMouseSetInternalCursor(int type, GrColor fg, GrColor bg) { static char arrow12x16[] = { 0,1,0,0,0,0,0,0,0,0,0,0, 1,2,1,0,0,0,0,0,0,0,0,0, 1,2,2,1,0,0,0,0,0,0,0,0, 1,2,2,2,1,0,0,0,0,0,0,0, 1,2,2,2,2,1,0,0,0,0,0,0, 1,2,2,2,2,2,1,0,0,0,0,0, 1,2,2,2,2,2,2,1,0,0,0,0, 1,2,2,2,2,2,2,2,1,0,0,0, 1,2,2,2,2,2,2,2,2,1,0,0, 1,2,2,2,2,2,2,2,2,2,1,0, 1,2,2,2,2,2,2,2,2,2,2,1, 1,2,2,2,2,1,1,1,1,1,1,0, 1,2,2,2,1,0,0,0,0,0,0,0, 1,2,2,1,0,0,0,0,0,0,0,0, 1,2,1,0,0,0,0,0,0,0,0,0, 0,1,0,0,0,0,0,0,0,0,0,0, }; static char cross13x13[] = { 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 1,1,1,1,1,1,2,1,1,1,1,1,1,0, 1,2,2,2,2,2,1,2,2,2,2,2,1,0, 1,1,1,1,1,1,2,1,1,1,1,1,1,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, 0,0,0,0,0,1,2,1,0,0,0,0,0,0, }; GrCursor *newc; GrColor cols[3]; if (MOUINFO->displayed) return; cols[0] = 2; cols[1] = bg; cols[2] = fg; if (type == GR_MCUR_TYPE_CROSS ) newc = GrBuildCursor(cross13x13, 14, 13, 13, 6, 6, cols); else newc = GrBuildCursor(arrow12x16, 12, 12, 16, 1, 1, cols); if (!newc) return; GrMouseSetCursor(newc); MOUINFO->owncursor = TRUE; }
/* init cursor structure (which is whatever you want). w=width, h=height, xo,yo=hot spot, colortable maps colors in data to colors on screen. */ ws_cursor *ws_initcursor(char *data, int w, int h, int xo, int yo, GrColorTableP colortable) { return (ws_cursor *)GrBuildCursor(data, w, w, h, xo, yo, colortable); }