go fmt. Precursor to bug report filing.

This commit is contained in:
Pietro Gagliardi 2014-10-02 10:05:53 -04:00
parent 09db0bffff
commit 982004d050
50 changed files with 1081 additions and 1078 deletions

View File

@ -4,9 +4,9 @@ package ui
import (
"fmt"
"reflect"
"syscall"
"unsafe"
"reflect"
)
// #include "winapi_windows.h"

View File

@ -31,6 +31,7 @@ type Grid interface {
// Align represents the alignment of a Control in its cell of a Grid.
type Align uint
const (
LeftTop Align = iota
Center
@ -40,6 +41,7 @@ const (
// Side represents a side of a Control to add other Controls to a Grid to.
type Side uint
const (
West Side = iota
East

View File

@ -6,8 +6,8 @@ package ui
import (
"fmt"
"unsafe"
"image"
"unsafe"
)
// #include "gtk_unix.h"

View File

@ -192,7 +192,6 @@ func (s *stack) getAuxResizeInfo(d *sizing) {
// this is to satisfy Control; nothing to do here
}
// Space returns a null Control intended for padding layouts with blank space.
// It appears to its owner as a Control of 0x0 size.
//

View File

@ -4,8 +4,8 @@ package ui
import (
"fmt"
"unsafe"
"reflect"
"unsafe"
)
// #include "winapi_windows.h"

View File

@ -3,10 +3,10 @@
package ui
import (
"reflect"
"runtime"
"sync"
"unsafe"
"reflect"
)
// Go initializes and runs package ui.

View File

@ -3,8 +3,8 @@
package ui
import (
"fmt"
"bytes"
"fmt"
"image"
"image/draw"
_ "image/png"
@ -58,12 +58,12 @@ var icons = []struct {
data []byte
name string
}{
{ __16x16_categories_applications_accessories_png, "16x16/categories/applications-accessories.png", },
{ __16x16_places_folder_png, "16x16/places/folder.png", },
{ __16x16_mimetypes_x_office_spreadsheet_png, "16x16/mimetypes/x-office-spreadsheet.png", },
{ __32x32_categories_applications_accessories_png, "32x32/categories/applications-accessories.png", },
{ __32x32_places_folder_png, "32x32/places/folder.png", },
{ __32x32_mimetypes_x_office_spreadsheet_png, "32x32/mimetypes/x-office-spreadsheet.png", },
{__16x16_categories_applications_accessories_png, "16x16/categories/applications-accessories.png"},
{__16x16_places_folder_png, "16x16/places/folder.png"},
{__16x16_mimetypes_x_office_spreadsheet_png, "16x16/mimetypes/x-office-spreadsheet.png"},
{__32x32_categories_applications_accessories_png, "32x32/categories/applications-accessories.png"},
{__32x32_places_folder_png, "32x32/places/folder.png"},
{__32x32_mimetypes_x_office_spreadsheet_png, "32x32/mimetypes/x-office-spreadsheet.png"},
}
// from http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz, which is public domain

View File

@ -5,15 +5,15 @@ package ui
// This file is called zz_test.go to keep it separate from the other files in this package (and because go test won't accept just test.go)
import (
"fmt"
"flag"
"reflect"
"testing"
"fmt"
"image"
"image/color"
"image/draw"
"time"
"reflect"
"strings"
"testing"
"time"
)
var closeOnClick = flag.Bool("close", false, "close on click")
@ -23,6 +23,7 @@ type dtype struct {
Name string
Address string
}
var ddata = []dtype{
{"alpha", "beta"},
{"gamma", "delta"},
@ -67,6 +68,7 @@ type testwin struct {
type areaHandler struct {
handled bool
}
func (a *areaHandler) Paint(r image.Rectangle) *image.RGBA {
i := image.NewRGBA(r)
draw.Draw(i, r, &image.Uniform{color.RGBA{128, 0, 128, 255}}, image.ZP, draw.Src)