9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* a simple graphical application in Go?
@ 2020-04-04 13:54 Kim Lassila
  2020-04-04 20:32 ` [9fans] " Jeremy Jackins
  2020-04-04 21:37 ` Chris McGee
  0 siblings, 2 replies; 9+ messages in thread
From: Kim Lassila @ 2020-04-04 13:54 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

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);
}


[-- Attachment #2: Type: text/html, Size: 7029 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-06  9:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 13:54 a simple graphical application in Go? Kim Lassila
2020-04-04 20:32 ` [9fans] " Jeremy Jackins
2020-04-04 21:50   ` Skip Tavakkolian
2020-04-05  4:15   ` Fazlul Shahriar
2020-04-05  4:37     ` Skip Tavakkolian
2020-04-06  9:58     ` Lucio De Re
2020-04-04 21:37 ` Chris McGee
2020-04-05  0:40   ` ori
2020-04-05  4:11   ` Kim Lassila

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).