summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
AgeCommit message (Collapse)Author
2014-08-30Out with the old...Pietro Gagliardi
2014-07-03Added Post() and implemented it on Windows.Pietro Gagliardi
2014-07-02Moved it all back; the preemptive multitaksing during an event handler kills ↵Pietro Gagliardi
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).
2014-07-02Moved everything out of the way pending rewrite.Pietro Gagliardi
2014-06-30Made Window.Closing a callback closure.Pietro Gagliardi
2014-06-30Restored the previous new API. I'm going to change it so that events are ↵Pietro Gagliardi
callbacks rather than using a window handler, but other than that... yeah.
2014-06-30Reverted everything back to the old API.Pietro Gagliardi
2014-06-28Migrated controlsize_windows.go and stdwndclass_windows.go to the new API.Pietro Gagliardi
2014-06-25Made a quick comment clarificaiton in stdwndclass_windows.go.Pietro Gagliardi
2014-06-25Made the new sizing system work on Windows.Pietro Gagliardi
2014-06-10More go fmt.Pietro Gagliardi
2014-06-08Checked Windows RECT usage and fixed wrong ones.Pietro Gagliardi
2014-06-06Fixed the standard window class focus behavior on Windows from the previous ↵Pietro Gagliardi
commit to work. Also updated the SetFocus() call in area_windows.go to boot and removed the relevant TODO after checking both wine and Windows XP work fine.
2014-06-05Implemented code to save and restore control focus on Windows properly when ↵Pietro Gagliardi
switching away from/back to our program. It's disabled for now though because it doesn't seem to work...
2014-06-05Changed Checkbox on Windows to use BS_CHECKBOX instead of BS_AUTOCHECKBOX; ↵Pietro Gagliardi
this will be necessary to fix the focus issue in todo.md (see http://blogs.msdn.com/b/oldnewthing/archive/2014/05/22/10527522.aspx).
2014-06-04Resolved a TODO in stdwndclass_windows.go about deferring WM_NCCREATE to ↵Pietro Gagliardi
DefWindowProc().
2014-06-03Migrated stdwndclass_windows.go to the new string handling.Pietro Gagliardi
2014-05-30Changed storeSysData() on Windows to write the HWND to the sysData structure ↵Pietro Gagliardi
there. This will be important for removing some of the TODOs from areaWndProc().
2014-05-30Converted the standard Windows window class (for Window) to be a single ↵Pietro Gagliardi
class, rather than having a new one for each Window. Now for Area.
2014-05-30Some quick formatting changes to stdwndclass_windows.go.Pietro Gagliardi
2014-05-30Moved the standard window class (for Window) on Windows to get the sysData ↵Pietro Gagliardi
pointer from CreateWindowEx() and store it in the window memory instead of being given it via a closure. This will lead to having only one window class for all Windows, which will come next. Also fixed an error in windowsconstgen's output related to GetWindowLongPtr()/SetWindowLongPtr().
2014-05-30Normalized DefWindowProc() handling across the Windows files; the ↵Pietro Gagliardi
syscall.LazyProc now has the normalized name _defWindowProc and defWindowProc() is a convenience function that calls _defWindowProc properly. This will also be important for the switch to a single window class per Window/Area.
2014-05-25Removed constants from common_windows.go. Almost done!Pietro Gagliardi
2014-05-17More TODOs (see previous commit).Pietro Gagliardi
2014-05-11Consistency change: all Windows API structure field names now match ↵Pietro Gagliardi
case-wise (some were forcibly exported in the past for historical reasons: I originally started package ui by trying to write a Windows API wrapper, but decided to ditch that and just use the Windows API directly from package ui). Also more TODOs.
2014-04-13Migrated cursors_windows.go and icons_windows.go.Pietro Gagliardi
2014-04-07Split out the common resizing code into its own function so that it's all in ↵Pietro Gagliardi
one place. This will also affect what happens if I switch to DeferWindowPos() on Windows.
2014-03-24Corrected a copy-paste fail in stdwndclass_windows.go that broke compilation ↵Pietro Gagliardi
(this is why you test builds on all platforms, folks!) and added a TODO about resizing on Windows in the meantime.
2014-03-17Changed the new resizing code so that it uses the same allocated slice per ↵Pietro Gagliardi
window instead of making a new one to store all the resize requests each time.
2014-03-17Changed window resizes so that the actual Control.setRect() functions ↵Pietro Gagliardi
appended to an array of requests that the resize() function set all at once instead of having each done individually. This will be necessary for what I think will be a solution to the deadlocks. It doesn't work right now; I'm assuming it's allocating too much memory. I know how to fix this, but I'm committing what I have so far to be safe.
2014-03-12Separated file creation dates from the package comment.Pietro Gagliardi
2014-03-03Fixed Mac OS X control placement flipping. This is done by passing the ↵Pietro Gagliardi
height of the window around setRect() calls to avoid polling the content view frame each time.
2014-02-21Fixed the unregistered window class error on 64-bit Windows: turns out it ↵Pietro Gagliardi
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-19Moved to a proper package; main() is now a test and go test -c is used to ↵Pietro Gagliardi
build. Once I iron out a bug with Windows event handling, I'll add a README.
2014-02-18Made event dispatch asynchronous to avoid deadlocks; right now events that ↵Pietro Gagliardi
cannot be dispatched get dropped.
2014-02-17Fixed the GTK+ crashes (I think) by making resizes synchronous. Since all ↵Pietro Gagliardi
control resizes happen on the UI thread anyway, we don't need to dispatch back; just call the resizing functions directly. Windows gets this fix too for consistency (and also because it gets rid of the only asynchronous oddity in the system).
2014-02-13Fixed the resizing deadlock.Pietro Gagliardi
2014-02-13Added sizing of windows and the main window control. It presently deadlocks; ↵Pietro Gagliardi
I'll need to redo my mutexes...
2014-02-12Fixed compiler errors. New code structure success!Pietro Gagliardi
2014-02-12Whoops, class registration now has to go through the UI task.Pietro Gagliardi
2014-02-12Each control may only need one event, so combine them all into a single ↵Pietro Gagliardi
channel whose use depends on the sysData itself. Also we won't need to save the parentWindow anymore, as the change to the make() function will take care of that for us.
2014-02-12Restructuring the codebase to make things neater. First off: each window now ↵Pietro Gagliardi
has its own class; the sysData knows about children. This updates the window class to become a generator and rewrites the WndProc as well.
2014-02-12Added button events.Pietro Gagliardi
2014-02-11Changed the sysData cache so that if we didn't fill it in yet, getSysData() ↵Pietro Gagliardi
returns nil instead of panicking, and the standard window procedure jumps directly to the default handler. Not what I originally wanted to do, but whatever, it finally works!
2014-02-11Got rid of the reverse HWND->sysData lookup for now, to see if there's a ↵Pietro Gagliardi
mistake elsewhere. Now we're up to a panic... with Success...
2014-02-11It appears the result of syscall.StringToUTF16Ptr() is only temporary, so ↵Pietro Gagliardi
removed all that. Now the program just hangs...
2014-02-11Whoops, copy-paste fail somehow changed init error checks. Now it starts... ↵Pietro Gagliardi
and hangs before creating a window...
2014-02-11All build errors resolved. Now to test...Pietro Gagliardi
2014-02-11Added the init and testing main functions and started fixing errors. Let's ↵Pietro Gagliardi
fix the rest and hope it works...
2014-02-11Filled in the standard window procedure.Pietro Gagliardi