Commit Graph

57 Commits

Author SHA1 Message Date
Pietro Gagliardi a0e8048b06 Had Area.SetSize() explicitly labelled as repainting the whole Area; made sure it does that on GTK+ (it already did on Windows and Mac). I think we're ready to declare the API as it stands now stable! 2014-06-09 22:47:45 -04:00
Pietro Gagliardi 764010bd81 Areas have worked on all platforms forever now; remove the GTK+ only note from its documentation. 2014-06-09 22:38:22 -04:00
Pietro Gagliardi 37ab5f41a7 Cleaned up the scrollbars documentation in the Overview. 2014-06-09 22:37:43 -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 7adc18caf1 Removed TODO on getting the available button count: this isn't meaningful. (desrt in irc.gimp.net/#gtk+ confirmed that GDK has no such function and both him and mikeash in irc.freenode.net/#macdev pointed out issues with such a function.) 2014-06-08 22:38:42 -04:00
Pietro Gagliardi 77fdd9d1c3 Documented window switch clicks in Area and implemented them on Windows and Mac OS X. 2014-06-07 04:19:37 -04:00
Pietro Gagliardi 83e4f05592 Fixed typo in area.go documentation. 2014-06-07 00:17:50 -04:00
Pietro Gagliardi f539747546 Set Area's preferred size in the documentation and on Windows and Mac OS X. 2014-06-06 23:03:29 -04:00
Pietro Gagliardi b6ca650692 Added Help key handling (as Insert) on Mac OS X. 2014-06-06 19:35:26 -04:00
Pietro Gagliardi 61ed2ea822 Marked a sentence in the Area docs as not being active. 2014-06-06 10:09:18 -04:00
Pietro Gagliardi d7c37671f3 Removed the TODO on memstride: we were already using it?????? It is working correctly... No idea why that TODO was there; I know I added it when I was too tired to think though. 2014-06-03 22:32:24 -04:00
Pietro Gagliardi bf6c29b39c Made multiple modifier keys undefined; removed the TODO there. If I need to change the behavior I can do it later. 2014-06-03 22:26:25 -04:00
Pietro Gagliardi 3745acf57b Decided not to rename MouseEvent.Pos. 2014-06-03 22:23:48 -04:00
Pietro Gagliardi a9ecc296ef Documented the changed event handling of Area. 2014-06-02 11:27:37 -04:00
Pietro Gagliardi 1b23de9c78 Changed the Modifiers behavior in KeyEvent to more properly handle modifier keys. This is just the public interface for now; next comes all the backends. 2014-05-29 11:42:17 -04:00
Pietro Gagliardi 511f774649 Finished the Area clicking stuff: formalized the behavior in documentation in area.go, pointed out that Mac OS X already behaves as expected, updated some comments, and removed the relevant TODO. 2014-05-23 23:48:17 -04:00
Pietro Gagliardi 13397f91ee Changed the meaning of the Modifiers keys to be positional, added Super, and pinned down Meta vs. Alt. All but the Meta/Alt one were done after discussion in #go-nuts about how to handle differences in user expectation properly. This is the portable interface only; each platform implementation comes next. 2014-05-16 18:16:25 -04:00
Pietro Gagliardi fefab429fc Documented dragging issues caused by how Mac OS X handles mouse events; also determined that multiple buttons held at once only generates one mouseDragged: signal. 2014-05-10 14:27:29 -04:00
Pietro Gagliardi 3508239bf7 Completed extending of mouse buttons to the system's limit; defined (as undefined) the mouse drag behavior for buttons >= 3; implemented all that on the GTK+ side, and decided to have MouseEvents.Held[] be sorted (documentation only for now; need to check the code to make sure it follows). Good Lord... 2014-05-07 17:51:04 -04:00
Pietro Gagliardi 6716ce3998 Added a quick disclaimer about Area mouse button numbers and documentation. 2014-04-29 16:27:16 -04:00
Pietro Gagliardi 2528fa9cfd Added extra mouse buttons to Areas on Windows. 2014-04-29 16:26:29 -04:00
Pietro Gagliardi a98072a23b Decided not to cap mouse buttons at 3; reflected this in the public interface and in the TODO file. Platform implementations come next. 2014-04-29 16:03:37 -04:00
Pietro Gagliardi 44b061aa31 More TODOs (because I can't think right now). 2014-04-20 23:29:38 -04:00
Pietro Gagliardi da2d4da15a Added click-to-focus to GTK+ Areas and documented that click-to-focus happens; also TODOs related to that. 2014-04-14 23:11:28 -04:00
Pietro Gagliardi 3cb3d5f97e Clarified the previous commit. 2014-04-14 12:51:20 -04:00
Pietro Gagliardi a29abd11c0 Ensured that pressing Modifiers+Key/ExtKey does not produce an event with just the Key/ExtKey. 2014-04-14 12:47:49 -04:00
Pietro Gagliardi dcc21eb087 Pinned down horizontal scrollbar behavior on Listboxes; also reworded the Area scrollbar behavior sentence a bit to match. Now to actually implement the changes... 2014-04-13 02:00:18 -04:00
Pietro Gagliardi aef419a83e Documented the thread safety of AreaHandler and Area.SetSize(). 2014-04-12 14:07:31 -04:00
Pietro Gagliardi ae4950bbd8 Switched to ARGB drawing in Areas on GTK+. 2014-04-12 13:48:59 -04:00
Pietro Gagliardi e3fdc76c5b Rewrote Area code on Windows to use alpha-premultiplied RGB and only use GDI functions to do it... and it doesn't quite work right yet. 2014-04-11 21:30:19 -04:00
Pietro Gagliardi 57088b9787 Added a general-purpose function to produce a native-endian ARGB representation of the image. I thought cairo image surfaces would work, but they're not designed for reading in images, the cairo functions for reading image data were introduced in the next version (1.12), and GDK-Pixbuf only does non-alpha-premultiplied... This can be used on Windows though. 2014-04-11 18:00:51 -04:00
Pietro Gagliardi 6f0d114a8b Changed from using image.NRGBA to image.RGBA (premultiplied alpha) in Area.Paint() since it'll be easier to work with on Windows after applying what Treeki/Ninjifox suggested I do instead of what I am doing now. 2014-04-11 16:13:18 -04:00
Pietro Gagliardi d6abf79932 Added bounds checking to NewArea() and Area.SetSize() such that an Area must have a valid size. 2014-04-10 20:42:01 -04:00
Pietro Gagliardi 09e92b0eb3 Documented scrollbars on Listbox and Area to the best of my ability, shuffling the appropriate TODOs around. 2014-04-10 16:18:53 -04:00
Pietro Gagliardi 78bb4cdace Fixed Area drawing assuming the first pixel of the *image.NRGBA is at i.Pix[0]. 2014-04-09 18:26:20 -04:00
Pietro Gagliardi 00acf74177 Updated Area's KeyEvent documentation to talk about some window managers on Unix intercepting some events; also updated the keyboard test program to make a note of behaviors related to that. 2014-04-07 12:56:10 -04:00
Pietro Gagliardi 2647d28f2b Removed the initText parameter from sysData.make() and changed all invocations to call sysData.setText() separately; this avoids the need to check if sysData.setText() is valid. Also implemented that on GTK+. 2014-04-01 16:43:56 -04:00
Pietro Gagliardi ce5cd80dba Updated the documentation: Area now works on all platforms, Modifiers behavior on both left and right keys simultaneously is undefined for now, and the way to create custom Controls no longer involves embedding Area. 2014-03-30 19:57:24 -04:00
Pietro Gagliardi 41a7e3dab8 Implemented Area mouse events on Mac OS X. Also fixed a few other things left behind in the previous commits. Also more TODOs. 2014-03-30 17:52:27 -04:00
Pietro Gagliardi efdd60375a Documented that the clip area in AreaHandler.Paint() more properly and indicate that it is cleared on each AreaHandler.Paint() call; (try to) implement that on Windows (GTK+ does it for us; noted that as well). 2014-03-29 19:02:09 -04:00
Pietro Gagliardi 75acdfd9ad Re-added the numeric keypad keys to ExtKey and removed predefkeys in area_unix.go since all are now being handled. 2014-03-29 13:01:42 -04:00
Pietro Gagliardi 76d24be6b0 Removed the numpad constants pending re-evaluation of how to handle those. 2014-03-29 12:33:00 -04:00
Pietro Gagliardi 0d75303dc3 Changed the definition of KeyEvent to be positional. The implementation has not been written, and thus the package will not build yet. 2014-03-28 21:10:42 -04:00
Pietro Gagliardi ab6e7121e4 Added a flag to AreaHandler.Key()/Mouse() to indicate that a repaint is needed after that event has been handled. (Having Repaint() as a method deadlocked for the same reason resizing deadlocked before.) 2014-03-27 20:31:23 -04:00
Pietro Gagliardi cd49e05da8 Fixed a slight documentation error in area.go. 2014-03-23 21:04:47 -04:00
Pietro Gagliardi a41f582866 Added Area resizing. Everything mostly works, but not making things smaller... 2014-03-23 20:54:11 -04:00
Pietro Gagliardi 646e91b25a Had ExtKey start at 1 so KeyEvent.ExtKey can be 0. 2014-03-23 17:08:46 -04:00
Pietro Gagliardi 64d5eb541e Changed the new resizing code so that it uses the same allocated slice per window instead of making a new one to store all the resize requests each time. 2014-03-17 21:09:03 -04:00
Pietro Gagliardi 19227080da Changed window resizes so that the actual Control.setRect() functions 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-17 20:42:36 -04:00
Pietro Gagliardi 4adf1ae5cd Removed the mutexes from Labels and Areas because I'm at my wits end about settling the deadlock between window resizing and setting a Label's text. 2014-03-17 13:37:51 -04:00