Loading...
Searching...
No Matches
read_xid.c
Go to the documentation of this file.
#include <grass/glocale.h>
#include "cairodriver.h"
void cairo_read_xid(void)
{
#if CAIRO_HAS_XLIB_XRENDER_SURFACE
FILE *fp;
char buf[64];
unsigned long xid;
fp = fopen(ca.file_name, "r");
if (!fp)
G_fatal_error(_("Unable to open input file <%s>"), ca.file_name);
if (!fgets(buf, sizeof(buf), fp))
G_fatal_error(_("Unable to read input file <%s>"), ca.file_name);
if (sscanf(buf, "%lx", &xid) != 1)
G_fatal_error(_("Unable to parse input file <%s>"), ca.file_name);
fclose(fp);
ca.win = (Drawable)xid;
#endif
}
cairodriver.h
GRASS cairo display driver - header file.
ca
struct cairo_state ca
Definition cairodriver/graph.c:42
G_fatal_error
void G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
Definition gis/error.c:159
cairo_read_xid
void cairo_read_xid(void)
Definition read_xid.c:5