Go to file
Pietro Gagliardi cd7c127fcc Oops, accidentally removed the code that actually makes the appdelegateclass. Almost working... 2014-03-01 15:33:17 -05:00
darwintest Removed the NSNotificationCenter stuff since we're not using that to run UI operations on the main thread anymore. 2014-02-28 21:38:06 -05:00
test Major code restructure to allow Cocoa to work correctly. Cocoa requires that the application loop run on the very first OS thread created, not just an any ordinary thread. To support this, your code must now be run by the UI init code. Windows and Unix builds still work fine; Mac OS X fails for reasons I now have to debug. 2014-03-01 15:18:29 -05:00
unmigrated Re-added Windows font grabbing code. I won't use it just yet, since I only now realize I don't actually need it for preferred sizes, but eh 2014-02-24 11:55:38 -05:00
LICENSE Added license and README. 2014-02-17 18:38:50 -05:00
README.md Rewrote the unstable warning at the top of README.md. 2014-02-25 19:19:17 -05:00
bleh_darwin.m Fixed Mac OS X sysData.setWindowSize() to get the window origin. Now to fix the rest of the errors... 2014-03-01 13:58:38 -05:00
button.go Documentation fixups. 2014-02-25 15:43:12 -05:00
callbacks_unix.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
checkbox.go Added Control.preferredSize() and preferredSize() for all the standard Controls. 2014-02-24 10:56:35 -05:00
combobox.go Split NewCombobox() into separate functions NewCombobox() and NewEditableCombobox(). 2014-02-25 15:13:37 -05:00
comctl_windows.go Removed a stray TODO about a constant in comctl_windows.go. 2014-02-25 13:17:22 -05:00
common_windows.go Added Windows implementation of ProgressBar and the requisite comctl32.dll code. 2014-02-25 08:28:10 -05:00
control.go Added Control.preferredSize() and preferredSize() for all the standard Controls. 2014-02-24 10:56:35 -05:00
controlcandidates.md Updated a TODO in the control candidates document related to Windows Common Controls. 2014-02-25 21:43:50 -05:00
controls_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
d32 Added a helper script for building 32-bit darwin binaries. 2014-02-27 20:49:49 -05:00
delegatetypes_darwin.go Fixed the compiler errors on Mac OS X; now to get it running... 2014-03-01 14:05:14 -05:00
dialog.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
dialog_unix.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
dialog_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
grid.go Added Grid.SetStretchy to allow one control in a Grid to fill the parent Control's space, even when resizing. 2014-02-26 07:01:02 -05:00
gtkcalls_unix.go Added password entry fields; they are the alternate mode of LineEdit. 2014-02-25 15:06:51 -05:00
gtkcasts_unix.go Added GTK+ implementation of ProgressBar and added a ProgressBar to the test program. 2014-02-25 00:49:08 -05:00
implementation.md Wrote an implementation guide. 2014-02-17 17:38:52 -05:00
init.go Documentation and TODO changes. 2014-03-01 15:23:49 -05:00
init_windows.go Added Windows implementation of ProgressBar and the requisite comctl32.dll code. 2014-02-25 08:28:10 -05:00
label.go Added Control.preferredSize() and preferredSize() for all the standard Controls. 2014-02-24 10:56:35 -05:00
layoutplan.md Added a new layout plan for Stack. 2014-02-24 10:22:23 -05:00
lineedit.go Added password entry fields; they are the alternate mode of LineEdit. 2014-02-25 15:06:51 -05:00
listbox.go Added Control.preferredSize() and preferredSize() for all the standard Controls. 2014-02-24 10:56:35 -05:00
listbox_unix.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
menus_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
objc_darwin.go Added initial Mac OS X sysData code. Almost ready for first test build, hopefully? 2014-03-01 13:29:24 -05:00
objc_darwin.h Fixed Mac OS X sysData.setWindowSize() to get the window origin. Now to fix the rest of the errors... 2014-03-01 13:58:38 -05:00
plan.md Added version compatibility notes to plan.md. 2014-02-16 16:55:48 -05:00
prefsize_darwin.go Added preferred size code for Mac OS X. 2014-03-01 04:16:42 -05:00
prefsize_unix.go Added the preferred widget size basework and its GTK+ implementation. 2014-02-23 20:04:33 -05:00
prefsize_windows.go Added most of the Windows implementation of ProgressBar. Now to grab the comctl32.dll stuff. 2014-02-25 01:02:16 -05:00
progressbar.go Added GTK+ implementation of ProgressBar and added a ProgressBar to the test program. 2014-02-25 00:49:08 -05:00
restrictions.md Windows sysData has been adjusted to deal with child controls. Rather than storing the parent window, it is passed as an argument to sysData.make(), which does the child ID allocation. Child IDs are now window-local, getting rid of that restriction. 2014-02-12 21:08:10 -05:00
stack.go Lock Stack's mutex lock like with all other Controls. 2014-02-25 19:16:26 -05:00
stdfont_windows.go Re-added Windows font grabbing code. I won't use it just yet, since I only now realize I don't actually need it for preferred sizes, but eh 2014-02-24 11:55:38 -05:00
stdwndclass_windows.go Fixed the unregistered window class error on 64-bit Windows: turns out it was a difference in Go's int vs. what Windows expected (thanks Microsoft for not using your special types here). Fixed all instances of this, even in unmigrated/. Still does not work in wine... 2014-02-21 02:27:59 -05:00
sysdata.go Added password entry fields; they are the alternate mode of LineEdit. 2014-02-25 15:06:51 -05:00
sysdata_darwin.go Fixed Mac OS X sysData.setWindowSize() to get the window origin. Now to fix the rest of the errors... 2014-03-01 13:58:38 -05:00
sysdata_unix.go Added password entry fields; they are the alternate mode of LineEdit. 2014-02-25 15:06:51 -05:00
sysdata_windows.go Added password entry fields; they are the alternate mode of LineEdit. 2014-02-25 15:06:51 -05:00
test.sh Major code restructure to allow Cocoa to work correctly. Cocoa requires that the application loop run on the very first OS thread created, not just an any ordinary thread. To support this, your code must now be run by the UI init code. Windows and Unix builds still work fine; Mac OS X fails for reasons I now have to debug. 2014-03-01 15:18:29 -05:00
todo.md Documentation and TODO changes. 2014-03-01 15:23:49 -05:00
uitask_darwin.go Oops, accidentally removed the code that actually makes the appdelegateclass. Almost working... 2014-03-01 15:33:17 -05:00
uitask_unix.go Major code restructure to allow Cocoa to work correctly. Cocoa requires that the application loop run on the very first OS thread created, not just an any ordinary thread. To support this, your code must now be run by the UI init code. Windows and Unix builds still work fine; Mac OS X fails for reasons I now have to debug. 2014-03-01 15:18:29 -05:00
uitask_windows.go Major code restructure to allow Cocoa to work correctly. Cocoa requires that the application loop run on the very first OS thread created, not just an any ordinary thread. To support this, your code must now be run by the UI init code. Windows and Unix builds still work fine; Mac OS X fails for reasons I now have to debug. 2014-03-01 15:18:29 -05:00
window.go And the uitask message fixed was the issue all along. Now it works. 2014-02-24 14:16:05 -05:00
windows_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
winerrors.md More TODO reduction. 2014-02-15 15:41:50 -05:00

README.md

Native UI library for Go

THIS PACKAGE IS UNSTABLE. Feel free to start using it, but mind: it's far from feature-complete, it's still in need of testing and crash-fixing, and the API can (and will) change. If you can help, please do! Run go test -c to build a test binary which runs a (mostly) feature-complete UI test.

This is a simple library for building cross-platform GUI programs in Go. It targets Windows and all Unix variants (except Mac OS X until further notice) and provides a thread-safe, channel-based API.

The API is no longer frozen; instead I will have to continue without the OS X port and do more work later. Oh well :/

Until then, check todo.md for more.

Future Readme Contents

This is a simple library for building cross-platform GUI programs in Go. It targets Windows, Mac OS X, Linux, and other Unixes, and provides a thread-safe, channel-based API. The API itself is minimal; it aims to provide only what is necessary for GUI program design. That being said, suggestions are welcome. Layout is done using various layout managers, and some effort is taken to conform to the target platform's UI guidelines. Otherwise, the library uses native toolkits.

ui aims to run on all supported versions of supported platforms. To be more precise, the system requirements are:

  • Windows: Windows 2000 or newer. The Windows backend uses package syscall and calls Windows DLLs directly, so does not rely on cgo.
  • Mac OS X: Mac OS X 10.6 (Snow Leopard) or newer. Objective-C dispatch is done by interfacing with libobjc directly, and thus this uses cgo.
  • Other Unixes: The Unix backend uses GTK+, and thus cgo. It requires GTK+ 3.4 or newer; for Ubuntu this means 12.04 LTS (Precise Pangolin) at minimum. Check your distribution.

ui itself has no outside Go package dependencies; it is entirely self-contained.

To install, simply go get this package. On Mac OS X, make sure you have the Apple development headers. On other Unixes, make sure you have the GTK+ development files (for Ubuntu, libgtk-3-dev is sufficient).

Package documentation is available at http://godoc.org/github.com/andlabs/ui.

The following is an example program to illustrate what programming with ui is like:

(see main_test.go)

Contributing

Contributions are welcome. File issues, pull requests, approach me on IRC (pietro10 in #go-nuts; andlabs elsewhere), etc. Even suggestions are welcome: while I'm mainly drawing from my own GUI programming experience, everyone is different.

If you want to dive in, read implementation.md: this is a description of how the library works. (Feel free to suggest improvements to this as well.) The other .md files in this repository contain various development notes.

Please suggest documentation improvements as well.