Go bindings for the X protocol, similar to XCB
  • Go 99.9%
  • Makefile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-04-16 22:41:29 +01:00
bigreq update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
cmd/xgbgen update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
composite update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
damage update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
dpms update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
dri2 update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
ge update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
internal fix internal.Map[...].Add() 2023-09-16 16:00:26 +01:00
pkg finish adding code comments 2024-03-26 21:27:00 +00:00
randr update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
record update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
render update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
res update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
screensaver update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
shape update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
shm update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xcmisc update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xevie update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xf86dri update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xf86vidmode update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xfixes update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xinerama update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xkeys add xkeys constants 2024-07-27 22:00:11 +01:00
xprint update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xproto update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xselinux update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xtest update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xv update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
xvmc update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
.gitignore fir stcommit 2021-10-31 19:22:10 +00:00
auth.go finish adding code comments 2024-03-26 21:27:00 +00:00
AUTHORS latest update after rewrite 2022-12-03 12:13:33 +00:00
conn.go lots of updates and reshuffling around 2024-01-30 21:28:44 +00:00
CONTRIBUTORS latest update after rewrite 2022-12-03 12:13:33 +00:00
debug_off.go update deps, temp. break/fix the broken ewmh package deps 2024-01-02 22:49:30 +00:00
debug_on.go update deps, temp. break/fix the broken ewmh package deps 2024-01-02 22:49:30 +00:00
dialer.go finish adding code comments 2024-03-26 21:27:00 +00:00
ext.go lots of updates and reshuffling around 2024-01-30 21:28:44 +00:00
go.mod update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
go.sum update codegen to skip unnecessary arguments, make vars consts when possible 2025-04-16 22:41:29 +01:00
LICENSE fir stcommit 2021-10-31 19:22:10 +00:00
Makefile update makefile to use go run instead of build, update xproto def 2023-06-08 21:39:01 +01:00
README.md update readme 2024-03-26 21:27:28 +00:00
xgb_test.go latest update after rewrite 2022-12-03 12:13:33 +00:00
xid.go more improvements 2023-05-25 19:00:12 +01:00

go-xgb

XGB is the X protocol Go language Binding.

It is the Go equivalent of XCB, the X protocol C-language Binding (http://xcb.freedesktop.org/).

gruf's Fork

This is a fork of jezek's go-xgb repository. It is not yet complete...

  • ewmh, xcursor, icccm packages are unsupported
  • tests are not yet updated

It is a complete rewrite of the dialer, underlying X connection and generated code itself. Though the existing xgbgen code generator was still used as the basis for parsing xcb definition files.

The primary differences intended were:

  • more idiomatic Go code
  • more idiomatic logging
  • support debug output via debug build tag
  • rely on memory pooling where possible

jezek's Fork

I've forked the XGB repository from BurntSushi's github to apply some patches which caused panics and memory leaks upon close and tests were added, to test multiple server close scenarios.

BurntSushi's Fork

I've forked the XGB repository from Google Code due to inactivty upstream.

Godoc documentation can be found here: https://godoc.org/github.com/BurntSushi/xgb

Much of the code has been rewritten in an effort to support thread safety and multiple extensions. Namely, go_client.py has been thrown away in favor of an xgbgen package.

The biggest parts that haven't been rewritten by me are the connection and authentication handshakes. They're inherently messy, and there's really no reason to re-work them. The rest of XGB has been completely rewritten.

I like to release my code under the WTFPL, but since I'm starting with someone else's work, I'm leaving the original license/contributor/author information in tact.

I suppose I can legitimately release xgbgen under the WTFPL. To be fair, it is at least as complex as XGB itself. sigh

Unless otherwise noted, the XGB source files are distributed under the BSD-style license found in the LICENSE file.

Contributions should follow the same procedure as for the Go project: http://golang.org/doc/contribute.html