aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw/devdraw.h
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-01-12 14:53:46 -0500
committerRuss Cox <rsc@swtch.com>2020-01-13 16:46:14 -0500
commit50923426bf684402160dd7748f14560afd447b73 (patch)
treeddabd607a5936424e70920e4aed7790bec61cca1 /src/cmd/devdraw/devdraw.h
parent892b3c4687eacf6b090bb9a5196ce882e113c423 (diff)
devdraw: x11 working again
Need to think a bit more about locking, but overall it's a working devdraw. Multiclient mode may not be working but nothing is using it yet.
Diffstat (limited to 'src/cmd/devdraw/devdraw.h')
-rw-r--r--src/cmd/devdraw/devdraw.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/cmd/devdraw/devdraw.h b/src/cmd/devdraw/devdraw.h
index 06ce4f8a..4980ed90 100644
--- a/src/cmd/devdraw/devdraw.h
+++ b/src/cmd/devdraw/devdraw.h
@@ -85,7 +85,7 @@ struct Client
// Only accessed/modified by the graphics thread.
const void* view;
-
+
// eventlk protects the keyboard and mouse events.
QLock eventlk;
Kbdbuf kbd;
@@ -204,14 +204,19 @@ void rpc_setmouse(Client*, Point);
void rpc_shutdown(void);
void rpc_topwin(Client*);
void rpc_main(void);
-
-// TODO: rpc_flush is called from draw_datawrite,
-// which holds c->drawlk. Is this OK?
+void rpc_bouncemouse(Client*, Mouse);
void rpc_flush(Client*, Rectangle);
+// rpc_gfxdrawlock and rpc_gfxdrawunlock
+// are called around drawing operations to lock and unlock
+// access to the graphics display, for systems where the
+// individual memdraw operations use the graphics display (X11, not macOS).
+void rpc_gfxdrawlock(void);
+void rpc_gfxdrawunlock(void);
+
// draw* routines are called on the RPC thread,
// invoked by the RPC server to do pixel pushing.
-// c->drawlk is held on entry.
+// No locks are held on entry.
int draw_dataread(Client*, void*, int);
int draw_datawrite(Client*, void*, int);
void draw_initdisplaymemimage(Client*, Memimage*);