Has anyone written a graphical application in Go on Plan 9? How would the Go
equivalent of black.c (thank you fgb) look like?
- - - clip - - -
#include <u.h>
#include <libc.h>
#include <draw.h>
void
main(int, char *argv[])
{
Rectangle rect;
Image *black;
fmtinstall('R', Rfmt);
if(initdraw(nil, nil, argv[0]) < 0)
sysfatal("initdraw: %r");
rect = screen->r;
black = display->black;
draw(screen, rect, black, nil, ZP);
flushimage(display, 1);
sleep(5 * 1000);
closedisplay(display);
print("rectangle was %R\n", rect);
exits(nil);
}
------------------------------------------
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-M9cbad5709834cc595acc4061
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription