go-wayland-simple-shm's Introduction
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.
go-wayland-simple-shm's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.