• Stars
    star
    8,336
  • Rank 4,410 (Top 0.09 %)
  • Language
    Go
  • License
    Other
  • Created almost 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Platform-native GUI library for Go.

ui: platform-native GUI library for Go

This is a library that aims to provide simple GUI software development in Go. It is based on my libui, a simple cross-platform library that does the same thing, but written in C.

It runs on/requires:

  • Windows: cgo, Windows Vista SP2 with Platform Update and newer
  • Mac OS X: cgo, Mac OS X 10.8 and newer
  • other Unixes: cgo, GTK+ 3.10 and newer
    • Debian, Ubuntu, etc.: sudo apt-get install libgtk-3-dev
    • Red Hat/Fedora, etc.: sudo dnf install gtk3-devel

It also requires Go 1.8 or newer.

It currently aligns to libui's Alpha 4.1, with only a small handful of functions not available.

Status

Package ui is currently mid-alpha software. Much of what is currently present runs stabily enough for the examples and perhaps some small programs to work, but the stability is still a work-in-progress, much of what is already there is not feature-complete, some of it will be buggy on certain platforms, and there's a lot of stuff missing. The libui README has more information.

Installation

Once you have the dependencies installed, a simple

go get github.com/andlabs/ui/...

should suffice.

Documentation

The in-code documentation is sufficient to get started, but needs improvement.

Some simple example programs are in the examples directory. You can go build each of them individually.

Windows manifests

Package ui requires a manifest that specifies Common Controls v6 to run on Windows. It should at least also state as supported Windows Vista and Windows 7, though to avoid surprises with other packages (or with Go itself; see this issue) you should state compatibility with higher versions of Windows too.

The simplest option is provided as a subpackage winmanifest; you can simply import it without a name, and it'll set things up properly:

import _ "github.com/andlabs/ui/winmanifest"

You do not have to worry about importing this in non-Windows-only files; it does nothing on non-Windows platforms.

If you wish to use your own manifest instead, you can use the one in winmanifest as a template to see what's required and how. You'll need to specify the template in a .rc file and use windres in MinGW-w64 to generate a .syso file as follows:

windres -i resources.rc -o winmanifest_windows_GOARCH.syso -O coff

You may also be interested in the github.com/akavel/rsrc and github.com/josephspurrier/goversioninfo packages, which provide other Go-like options for embedding the manifest.

Note that if you choose to ship a manifest as a separate .exe.manifest file instead of embedding it in your binary, and you use Cygwin or MSYS2 as the source of your MinGW-w64, Cygwin and MSYS2 instruct gcc to embed a default manifest of its own if none is specified. This default will override your manifest file! See this issue for more details, including workaround instructions.

macOS program execution

If you run a macOS program binary directly from the command line, it will start in the background. This is intentional; see this for more details.

More Repositories

1

libui

Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
C
10,723
star
2

qo

Another build system for C/C++, I guess? Inspired by 'go build'
Go
307
star
3

reallymine

WD MyBook encrypted hard drive decryption (still WIP).
Go
214
star
4

wakeup

Simple alarm clock program; also a demonstration of andlabs/ui.
Go
54
star
5

utf

[development paused; issues and PRs still welcome] Portable UTF-8 and UTF-16 routines in a single C source file.
C
46
star
6

65816disasm

A disassembler for WDC 65816 binaries, specifically SNES ROMs for now.
Go
33
star
7

ews

quick and dirty Go package to send emails via Exchange using EWS instead of SMTP
Go
27
star
8

screentext

Go API for rendering text for on-screen display, using native APIs and system fonts.
Go
13
star
9

idapyscripts

Assorted IDAPython scripts for ROM hacking/research.
Python
13
star
10

a68

A simple, sane Motorola MC68000 assembler.
Go
9
star
11

pcmio

Raw PCM I/O library for Go.
Go
9
star
12

dl

libdl wrapper for Go.
Go
8
star
13

mamefuse

A FUSE filesystem that serves MAME ROMs from various places on your hard disk.
Go
8
star
14

huc6280disasm

A disassembler for HuC6280 binaries, specifically TurboGrafx-16/PC Engine ROMs for now.
Go
7
star
15

dumpattachments

Program to bulk-dump attachments from an IMAP account.
Go
7
star
16

barspy

[development paused; issues and PRs still welcome] Spy++-like program for inspecting Toolbars and Rebars.
C++
6
star
17

misctestprogs

Some miscellaneous test programs.
C
6
star
18

tms34010disasm

A disassembler for Texas Instruments TMS34010 binaries.
Go
5
star
19

mdlist

Mega Drive/Genesis game info list
Go
5
star
20

wintable

Windows API Table control, split from package ui. Not ready for general use.
C
5
star
21

e4jexamine

manual ext4 journal examining and data block extraction
Go
5
star
22

fmux

File multiplexer/interleaver.
Go
5
star
23

pgidl

small custom interface description language package and tools
Go
5
star
24

e4itblcmp

compares ext4 inode table blocks in a bunch of ways
Go
5
star
25

irksome

personal chat client
C
4
star
26

nointrochk

ROM set verifier for clrmamepro datfiles from no-intro dat-o-matic
Go
4
star
27

winiconview

Windows bulk icon resource viewer toy project.
C
4
star
28

enpipe

Force Unix programs to work in pipelines.
C
4
star
29

ohv

Oh! V, or the Omniscient Help Viewer, or the Offline Help Viewer, or whatever other thing you can think of...
C
4
star
30

macgetalbums

[development paused; issues and PRs still welcome] List all the albums you have in iTunes as a text file with the year of earliest release, among other things.
Objective-C
4
star
31

gtkcontrolspy

A silly thing to play around with GTK+ widgets in a sandbox. Inspired by Microsoft's Control Spy (http://msdn.microsoft.com/en-us/library/windows/desktop/bb773165(v=vs.85).aspx).
C
4
star
32

segaret_scans

The scan tracker used by Sega Retro; might be useful to you too
Go
3
star
33

simplesale

Dead-simple point of sale system. Because seriously. [IN ITS INFANCY, BEING REWRITTEN AGAIN]
C
3
star
34

mmbnmapdump

Shell
3
star
35

gogir

GObject Introspection-based bindings generator for Go [IN ITS INFANCY; WILL NOT ACTUALLY PRODUCE USABLE CODE NOW]
Go
3
star
36

windlgunits

An attempt at trying to make sense of the Windows API's dialog base units.
C
2
star
37

gcdown

Google Code scraping file downloader (for the Downloads tab)
Go
2
star
38

mshc2devhelp

Converts Microsoft Help Viewer mshc databases to devhelp files.
Go
2
star
39

ctlineboundstest

[development paused; issues and PRs still welcome] Core Text line height playground
Objective-C
2
star
40

gtkdatetimepicker

GTK+ Date-Time Picker control. Still in its infancy.
C
2
star
41

mwuploadbulk

Simple command-line MediaWiki bulk file uploader.
Go
2
star
42

ym2612

A hardware-accurate Yamaha YM2612 sound chip emulator, written in C and Go and using its concurrency features.
1
star