GitXplorerGitXplorer
B

go-wayland-simple-shm

public
5 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
ceb76c9b944eebb6eb3b93d984a1313fc9451c99

Thanks pq

committed 13 years ago
Unverified
3fc8e10c052d3d8e3668a123015585c596ec2555

More info about getting it working.

committed 13 years ago
Unverified
0308ac2d28c9bc7c9f3686200dea1f0b0eb0255b

Some info

committed 13 years ago
Unverified
ee2bf92e6d44935855ab229b120a1e524ab47f9e

Draws to screen! w00t.

committed 13 years ago
Unverified
27513176bbf22b90a0b045c993345071493dba0f

Initial commit. Build fails.

committed 13 years ago

README

The README file for this repository.

An attempt at porting the "simple-shm" demo client in the wayland-demos repository to Go. Currently, it does paint to the screen, but only does it once.

This is some of the worst code I've ever written and is strictly meant as a "Hey it can be done" sort of thing.

So far, while this is working, I still considered it a failed experiment. Primarily because the Wayland libraries use C function pointers gratuitously, and cgo cannot deal with these elegantly.

Moreover, all of the "callback" functions (prefixed with "go...") must be exported, and for whatever reason, the Wayland structs are not being properly translated to Go types. Thus, the callback functions must be stripped of all struct parameters, and data must be passed using unsafe.Pointer. Not pretty.

Please see https://groups.google.com/group/golang-nuts/browse_thread/thread/21839cae97586b79 for a more in depth description of the exporting problem.

Install

This package is indeed Go gettable, but for it to do anything meaningful, you'll need to have a Wayland compositor running. (This has only been tested with the reference compositor, Weston.)

Run Weston (under X11 is fine) and then run $GOPATH/bin/go-wayland-simple-shm from a terminal.

Build instructions for Wayland can be found here: http://wayland.freedesktop.org/building.html -- If you're lucky, your Linux distribution has packaged it for you.