summaryrefslogtreecommitdiff
path: root/prevlib/sysdata.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-02 22:53:03 -0400
committerPietro Gagliardi <[email protected]>2014-07-02 22:53:03 -0400
commit8a81650b3da7ce00725336df9e03b38e935c5a65 (patch)
tree08af843f0460e7226f305cf7162021ef54e8c3f7 /prevlib/sysdata.go
parent4dd5ceb11d62bd6b9af4847936314a9d8c45707f (diff)
Moved it all back; the preemptive multitaksing during an event handler kills us on all platforms. Going to have to restrict ALL GUI accss to happening from one t hread, so going to need to drop uitask entirely and have just a start() callback for startup code and a post() function for posting requests to windows (like channel sends but into a perpetual buffer).
Diffstat (limited to 'prevlib/sysdata.go')
-rw-r--r--prevlib/sysdata.go61
1 files changed, 0 insertions, 61 deletions
diff --git a/prevlib/sysdata.go b/prevlib/sysdata.go
deleted file mode 100644
index 006595c..0000000
--- a/prevlib/sysdata.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// 11 february 2014
-
-package ui
-
-// The sysData type contains all system data. It provides the system-specific underlying implementation. It is guaranteed to have the following by embedding:
-type cSysData struct {
- ctype int
- allocate func(x int, y int, width int, height int, d *sysSizeData) []*allocation
- spaced bool
- alternate bool // editable for Combobox, multi-select for listbox, password for lineedit
- handler AreaHandler // for Areas; TODO rename to areahandler
- close func() bool // provided by each Window
- event func() // provided by each control
-}
-
-// this interface is used to make sure all sysDatas are synced
-var _xSysData interface {
- sysDataSizingFunctions
- make(window *sysData) error
- firstShow() error
- show()
- hide()
- setText(text string)
- setRect(x int, y int, width int, height int, winheight int) error
- isChecked() bool
- text() string
- append(string)
- insertBefore(string, int)
- selectedIndex() int
- selectedIndices() []int
- selectedTexts() []string
- setWindowSize(int, int) error
- setProgress(int)
- len() int
- setAreaSize(int, int)
- repaintAll()
- center()
- setChecked(bool)
-} = &sysData{} // this line will error if there's an inconsistency
-
-const (
- c_window = iota
- c_button
- c_checkbox
- c_combobox
- c_lineedit
- c_label
- c_listbox
- c_progressbar
- c_area
- nctypes
-)
-
-func mksysdata(ctype int) *sysData {
- s := &sysData{
- cSysData: cSysData{
- ctype: ctype,
- },
- }
- return s
-}