9fans archive / 2006 / 10 / 436 prev next
From: Joel Salomon <joelcsalomon@gma...>
Subject: Anyone to try to convert Acme to full UI (w/graphics)
Date: Mon, 30 Oct 2006 14:05:02 -0500
On 10/26/06, rog@vit... <rog@vit...> wrote:
> int
> getscreensize(int *minx, int *miny, int *maxx, int *maxy)
> {
> char buf[12*12+1];
> int fd;
>
> buf[sizeof(buf) - 1] = 0;
> fd = open("#i/draw/new", OREAD);
> if(fd < 0)
> return -1;
> if(read(fd, buf, sizeof buf - 1) != sizeof buf - 1){
> close(fd);
> return -1;
> }
> close(fd);
> *minx = atoi(buf+4*12);
> *miny = atoi(buf+5*12);
> *maxx = atoi(buf+6*12);
> *maxy = atoi(buf+7*12);
> return 0;
> }
How would I get rio's size rather than the screen size, for example
for use in a rio subwindow?
--Joel