Commit Graph

79 Commits

Author SHA1 Message Date
Pietro Gagliardi 8a81650b3d 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). 2014-07-02 22:53:03 -04:00
Pietro Gagliardi 5d339e656b Moved everything out of the way pending rewrite. 2014-07-02 17:13:40 -04:00
Pietro Gagliardi ffa1bbe0b9 Restored the previous new API. I'm going to change it so that events are callbacks rather than using a window handler, but other than that... yeah. 2014-06-30 22:48:12 -04:00
Pietro Gagliardi 990d50e9a1 Rolled back all those changes; I'm stupid. 2014-06-30 22:42:48 -04:00
Pietro Gagliardi e8a7dd0b87 Converted the Mac OS X backend to use uitask() instead of uitask chan func(). 2014-06-30 21:21:55 -04:00
Pietro Gagliardi 33155f7496 Reverted everything back to the old API. 2014-06-30 09:57:44 -04:00
Pietro Gagliardi 3ade409dde FIxed compilation errors in the Mac OS X build. It works, but I still need to fix dialogs before I can push anything. 2014-06-29 14:08:01 -04:00
Pietro Gagliardi ed989a9d9f Migrated sysdata_darwin.go and uitask_darwin.go to the new API. Now to just wait for the answer to my Stack Overflow question so I can migrate dialog_darwin.go... 2014-06-29 09:07:14 -04:00
Pietro Gagliardi 20821c26eb Implemented Checkbox.SetChecked() on Mac OS X and updated the README. 2014-06-26 21:54:14 -04:00
Pietro Gagliardi 8632d0c2f3 Implemented Window.Center() on Mac OS X. 2014-06-11 11:17:00 -04:00
Pietro Gagliardi 3c1a61049b More go fmt. 2014-06-10 10:22:30 -04:00
Pietro Gagliardi fa4094adeb Added Area.RepaintAll() (requested by aybabtme on the Gopher Academy Slack) and implemented it on Mac OS X. 2014-06-09 22:11:08 -04:00
Pietro Gagliardi 4045d50f94 Checked to see if the previous commit worked after removing the leftover Combobox selectIndex() code; it does. Removed the dummy code from the Windows and GTK+ backends as well. 2014-05-29 04:41:07 -04:00
Pietro Gagliardi 946e007e5d Same as previous commit, but for Mac OS X now. The #cgo directives are in uitask_darwin.go. 2014-05-19 22:52:59 -04:00
Pietro Gagliardi be56293e9c Found a method in NSArrayController via Stack Overflow which lets me suppress selection-changing behavior on NSTableView inserts; use that on Listbox in Mac OS X. This means sysData.selectIndices() and its Mac OS X implementation can (and has) gone away, clearing TODOs on Windows and Unix by extension. 2014-05-17 12:42:00 -04:00
Pietro Gagliardi d8a7d9b53e Fixed up a bunch of Mac OS X function names, mostly Listbox-related, to be more clear and more consistent. 2014-05-16 20:44:19 -04:00
Pietro Gagliardi 6d67bce9b1 Moved toBOOL() from sysdata_darwin.go to objc_darwin.go since it's used by other Mac OS X files too. 2014-05-16 20:29:16 -04:00
Pietro Gagliardi ebcbaa129d Combined all the Objective-C headers into objc_darwin.h. 2014-05-16 06:49:29 -04:00
Pietro Gagliardi b7db0e15cd Removed all the objc_getClass() and sel_getUid() calls from the Go code on Mac OS X. Also got rid of a forgotten objc_msgSend(). Now comes the Objective-C half... 2014-05-15 20:14:44 -04:00
Pietro Gagliardi 9d8976abab Migrated everything else to Objective-C native; fixed a few things I missed along the way. 2014-05-15 19:55:16 -04:00
Pietro Gagliardi 791345fa97 Finished migrating sysdata_darwin.go away from calling objc_msgSend() directly. initWithDummyFrame() is still there as other files use it. 2014-05-13 07:09:22 -04:00
Pietro Gagliardi 3949fb94e9 Further refactoring and de-runtime-izing of sysdata_darwin.go. These changes currently untested. 2014-05-12 23:55:56 -04:00
Pietro Gagliardi 37f3d0fafc Converted most of sysdata_darwin.go to regular Objective-C. I'll also standardize the interface for transferring integer values between Objective-C and Go so that they use intptr_t and uintptr_t everywhere, rather than those two in some places and uint64_t/int64_t in others. 2014-05-12 19:34:13 -04:00
Pietro Gagliardi f14614c0c7 Began the migration to native Objective-C by moving the NSWindow functions and some of the shared helper routines. 2014-05-12 15:15:26 -04:00
Pietro Gagliardi e726ee16bd Replaced the hackish indeterminate progress bar animation on Mac OS X (which didn't work on 10.6) with calls to startAnimation: and stopAnimation:; I have no idea how I missed those the first time. Thanks to stal[DirectX] in irc.freenode.net/#macdev for pointing those out to me. 2014-05-11 21:31:20 -04:00
Pietro Gagliardi cc01981999 Added tracking areas to Area on Mac OS X so mouse move events can work; they work now. 2014-05-10 21:03:04 -04:00
Pietro Gagliardi 5819e52f8d Preparation for adding tracking areas to Mac OS X Areas: we need to now pass in the sysData to each control's make() function so Area can save the tracking area somewhere (this will also come in handy when I change alternate from a bool to an integer index). 2014-05-10 14:59:11 -04:00
Pietro Gagliardi 61b3b03418 Added comment explaining the use of -[NSWindow setContentSize:] in Mac OS X sysData.setWindowSize(). 2014-05-01 13:13:10 -04:00
Pietro Gagliardi 3bb9f41305 Fixed Mac OS X so that window sizes do not include the titlebar and frame. 2014-04-13 20:16:05 -04:00
Pietro Gagliardi fb50badf00 Fixed Area test time label weirdness by making Labels truncate their text instead of word-wrapping on all platforms. This doesn't explain GTK+/Wayland, alas. 2014-04-13 18:05:07 -04:00
Pietro Gagliardi d4c79539af Fixed Listboxes on Mac OS X having an initial selection. 2014-04-12 22:05:34 -04:00
Pietro Gagliardi 274fa0c292 Fixed Comboboxes on Mac OS X having an initial selection. This also lays the groundwork for adding Combobox/Listbox.Select() as a public function... 2014-04-12 21:49:41 -04:00
Pietro Gagliardi dc96a73c2f Removed TODO from Mac OS X code about additional label styles; judging from Interface Builder I've got them covered. 2014-04-05 15:26:31 -04:00
Pietro Gagliardi da68adf420 Gave controls their proper fonts on Mac OS X. 2014-04-05 15:10:02 -04:00
Pietro Gagliardi 612eba9de3 Updated sysdata_darwin.go to remove some TODOs and change most, if not all, embedded magic numbers to named constants. 2014-04-05 13:59:11 -04:00
Pietro Gagliardi e35457b968 Removed objc_alloc(). This should be all of them. Now to redo how classes are handled... 2014-04-04 20:34:35 -04:00
Pietro Gagliardi 5a5b486b6a Removed objc_msgSend_rect(). This also consolidates all initWithFrame: calls into a simple initWithDummyFrame(). 2014-04-04 19:51:59 -04:00
Pietro Gagliardi dd4a7b9cbe Removed objc_msgSend_rect_uint_uint_bool(). 2014-04-04 19:14:03 -04:00
Pietro Gagliardi 461b0cc023 Removed objc_msgSend_rect_bool(). 2014-04-04 19:08:25 -04:00
Pietro Gagliardi ba2c1d6d20 Removed objc_msgSend_uint(). 2014-04-04 18:56:37 -04:00
Pietro Gagliardi fbde220ab1 Added a TODO related to the previous commit. 2014-04-04 18:00:22 -04:00
Pietro Gagliardi 1b05312da9 Mac OS X indeterminate progresbars were not animating under certain conditions; fix that. 2014-04-04 17:59:23 -04:00
Pietro Gagliardi 1a7bf4cd89 Got rid of objc_addDelegate(); it was only called in one place (Mac OS X Window creation). Also forgot to mention that the previous commit also disables mouse movements in Cocoa Areas for now; I need to replace the current code with one that uses tracking because mouse movements are system-global. 2014-04-04 15:51:40 -04:00
Pietro Gagliardi be668a965a Fixed Mac OS X Button appearance; turns out it was using the wrong font. Also updated the TODO file to mark this fix and remove other stale/already fixed details. 2014-04-04 14:52:38 -04:00
Pietro Gagliardi 01d9e1b02b Enabled mouse move events on Mac OS X. Mosue events now just got stranger and buggier there... 2014-04-03 18:33:37 -04:00
Pietro Gagliardi 2efda7bc39 Separated initial text from sysData.make() on the Mac OS X backend, completing that set of commits. 2014-04-01 17:05:16 -04:00
Pietro Gagliardi a1830c8883 Fixed Mac OS X Area setAreaSize() not working: I was using the NSWindow setFrame:display: selector instead of sending the two NSView setFrame: and display methods separately. 2014-03-30 13:25:41 -04:00
Pietro Gagliardi 08dfb5da20 Attempted to add the Area bare bones and resizing code to the Mac OS X backend. It complains that initWithFrame: is not implemented... 2014-03-30 11:19:13 -04:00
Pietro Gagliardi 34ce16d586 Separated file creation dates from the package comment. 2014-03-12 21:55:45 -04:00
Pietro Gagliardi 0e7dfc4c8a Added indeterminate ProgressBar code for Mac OS X. 2014-03-12 19:40:01 -04:00