From 1db3e163849aa66b87fa82243b5ffebab3458cdd Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 12 Mar 2014 16:58:33 -0400 Subject: [PATCH] Dropped Windows 2000 support. --- README.md | 4 +++- comctl_windows.go | 2 +- controls_windows.go | 2 +- progressbar.go | 2 +- windows_windows.go | 6 +++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index db7f9fa..b70a938 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ # Native UI library for Go ### THIS PACKAGE IS UNDER ACTIVE DEVELOPMENT. 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 `./test` to build a test binary `test/test` which runs a (mostly) feature-complete UI test. Run `./d32 ./test` to build a 32-bit version (you will need a cgo-enabled 32-bit go environment, and I have only tested this on Mac OS X). +### UPDATE 12 March 2014: Windows 2000 is no longer supported [as it is no longer supported by Go](https://codereview.appspot.com/74790043). + 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. +* Windows: Windows XP 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. * Note: you will need Go 1.3 or newer for this verison, as it uses a single .m file due to technical restrictions (read the comments in `bleh_darwin.m` for details), and earlier versions of Go do not auto-build .m files. * 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. diff --git a/comctl_windows.go b/comctl_windows.go index 14ec216..ddcad10 100644 --- a/comctl_windows.go +++ b/comctl_windows.go @@ -8,7 +8,7 @@ import ( ) // pretty much every constant here except _WM_USER is from commctrl.h -// TODO for all: filter out constants not available in Windows 2000 +// TODO for all: filter out constants not available in Windows XP // InitCommonControlsEx constants. const ( diff --git a/controls_windows.go b/controls_windows.go index eeebe20..c50d96d 100644 --- a/controls_windows.go +++ b/controls_windows.go @@ -6,7 +6,7 @@ import ( // "unsafe" ) -// TODO for all: filter any not provided in Windows 2000 +// TODO for all: filter any not provided in Windows XP // Button styles. const ( diff --git a/progressbar.go b/progressbar.go index 4d80c94..e80ff3c 100644 --- a/progressbar.go +++ b/progressbar.go @@ -21,7 +21,7 @@ func NewProgressBar() *ProgressBar { } } -// SetProgress sets the currently indicated progress amount on the ProgressBar. If this amount is outside the range [0,100] (ideally -1), the function will panic (it should allow indeterminate progress bars, alas those are not supported on Windows 2000). +// SetProgress sets the currently indicated progress amount on the ProgressBar. If this amount is outside the range [0,100] (ideally -1), the function will panic (TODO make it indeterminate). func (p *ProgressBar) SetProgress(percent int) { p.lock.Lock() defer p.lock.Unlock() diff --git a/windows_windows.go b/windows_windows.go index c5d4662..d0ecf0d 100644 --- a/windows_windows.go +++ b/windows_windows.go @@ -42,7 +42,7 @@ const ( _WS_EX_ACCEPTFILES = 0x00000010 _WS_EX_APPWINDOW = 0x00040000 _WS_EX_CLIENTEDGE = 0x00000200 -// _WS_EX_COMPOSITED = 0x02000000 // [Windows 2000:This style is not supported.] + _WS_EX_COMPOSITED = 0x02000000 _WS_EX_CONTEXTHELP = 0x00000400 _WS_EX_CONTROLPARENT = 0x00010000 _WS_EX_DLGMODALFRAME = 0x00000001 @@ -105,8 +105,8 @@ const ( _COLOR_INFOBK = 24 _COLOR_INFOTEXT = 23 _COLOR_MENU = 4 -// COLOR_MENUHILIGHT = 29 // [Windows 2000:This value is not supported.] -// COLOR_MENUBAR = 30 // [Windows 2000:This value is not supported.] + COLOR_MENUHILIGHT = 29 + COLOR_MENUBAR = 30 _COLOR_MENUTEXT = 7 _COLOR_SCROLLBAR = 0 _COLOR_WINDOW = 5