|
|
researchv9-SUN3(old)
#include "copyright.h"
/* $Header: /var/lib/cvsd/repos/research/researchv9/X11/src/X.V11R1/lib/X/XCursor.c,v 1.1.1.1 2018/04/24 17:22:00 root Exp $ */
/* Copyright Massachusetts Institute of Technology 1987 */
#include "Xlibint.h"
static XColor foreground = { 0, 0, 0, 0 }; /* black */
static XColor background = { 0, 65535, 65535, 65535 }; /* white */
Cursor XCreateFontCursor(dpy, which)
Display *dpy;
unsigned int which;
{
static Font cfont = 0;
Cursor result;
static Display *olddpy = NULL;
/*
* the cursor font contains the shape glyph followed by the mask
* glyph; so character position 0 contains a shape, 1 the mask for 0,
* 2 a shape, etc. <X11/cursorfont.h> contains hash define names
* for all of these.
*/
if (cfont == 0 || dpy != olddpy) {
if (cfont && dpy) XUnloadFont (olddpy, cfont);
cfont = XLoadFont(dpy, CURSORFONT);
olddpy = dpy;
if (!cfont) return (Cursor) 0;
}
result = XCreateGlyphCursor
(dpy, cfont, cfont, which, which + 1, &foreground, &background);
return(result);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.