Commit Graph

308 Commits

Author SHA1 Message Date
Matthew Flatt
ca0418d47d ffi/unsafe/objc: remove -A'/+A', add `#:async-apply'
Another run at the problem 57516164de was meant to solve. The
new solution just gives up when a `drawRect:' method is called
in the wrong thread, which might create refresh glitches but
avoids a deadlock in the case that the Racket thread is blocked
on the update happening in the foreign thread.
2013-04-23 13:48:15 -06:00
Matthew Flatt
07fd3676d0 racket/gui cocoa: fix `enable' on window whose ancestor is disabled 2013-04-23 13:48:15 -06:00
Matthew Flatt
a9cc79c89b racket/gui cocoa: fix swapping of buttons with the 'border style
Register a button as a default button every time that it is shown,
so that multiple buttons in a frame can have the 'border style
(as long as only one is shown at a time).
2013-04-20 09:38:56 -06:00
Matthew Flatt
fd8bde94da racket/gui cocoa: avoid focus-setting loop 2013-04-20 09:38:55 -06:00
Matthew Flatt
57516164de ffi/unsafe/obj: add +A' and -A' method modes
On Cocoa, a view's `drawRect:' method can be called from a
heartbeat thread that animates controls. Such a call happens
rarely for a `canvas%' or other class where `drawRect:'
is overridden, but since it can happen, ensure that the
callback runs on the Racket thread.
2013-04-19 07:54:30 -06:00
Matthew Flatt
44d59702c0 racket/gui cocoa: fix `list-box%' visble-cell calculations
There were especially problems with header columns, but
also intercell spacing was not taken into account.

Merge to v5.3.4
2013-04-16 08:58:19 -06:00
Matthew Flatt
69707c9255 racket/gui: gl-config fixes 2013-04-12 18:29:01 -06:00
Matthew Flatt
9420855879 racket/gui cocoa: delay `on-paint' if a GL context isn't ready
The relevant `on-paint' call is one that is forced for a GL
canvas to try to draw a frame's content before the frame is
shown. Sometimes, thread scheduling would let the frame get
sufficiently initialized at the Cocoa level before the `on-paint'
call happened, but sometimes not.
2013-04-12 14:58:53 -06:00
Jay Kominek
0562755be9 OpenGL context sharing 2013-04-12 14:58:53 -06:00
Matthew Flatt
33700427f2 racket/gui: make list-box% columns more consistent across platforms
Cocoa: use ellipses instead of line wrapping
Gtk: allow column sizing below title width

Merge to v5.3.4
2013-04-12 06:36:51 -06:00
Matthew Flatt
e0486a7cf0 racket/gui: add warp-pointer' to window<%>'
Removed the method from `canvas<%>', where it was never implemented
with the `racket/gui' reimplementation.
2013-03-19 15:53:13 -07:00
Eli Barzilay
af6be85ff5 Fix lots of indentation mistakes.
(Found by my ayatollah script...)
2013-03-14 10:55:47 -04:00
Matthew Flatt
d5c1a75e38 racket/gui cocoa: fix over-eager refresh for 'gl canvas% 2013-02-14 19:47:40 -07:00
Robby Findler
5301646baf fix a bug in recently added display-changed method 2013-01-21 13:47:43 -06:00
Robby Findler
19d6f7a15a Rackety 2012-12-21 19:22:59 -06:00
Robby Findler
3f9e60a908 add display-changed method 2012-12-21 19:22:59 -06:00
Samuel Bronson
b366d04792 Typo fixes 2012-11-27 07:55:29 -07:00
Matthew Flatt
7b04571fac racket/gui: add `get-current-mouse-state' 2012-11-07 14:37:39 -07:00
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Matthew Flatt
068240e9fe racket/gui: fix problems with control labels and client/global positions
Closes PR 13232
2012-11-04 08:47:50 -07:00
Matthew Flatt
0c82f54912 racket/gui: add delete' to choice%' and `list-control<%>'
Closes PR 13230
2012-11-04 08:25:43 -07:00
Matthew Flatt
a5d7812732 racket/gui: skip some redundant 'enter & 'leave events 2012-10-02 07:26:25 -06:00
Matthew Flatt
088d1dadb4 add ffi/unsafe/nsalloc' and ffi/unsafe/nsstring' 2012-08-24 15:48:58 -06:00
Matthew Flatt
1800680c6b racket/gui: fix access of scrollbar values for canvas without a scrollbar 2012-08-12 20:17:29 -06:00
Matthew Flatt
58db5f8b46 racket/gui: implement set-clipboard-bitmap' in clipboard<%>'
Closes PR 12689

Cocoa implementation provided by Jens Axel Søgaard
2012-05-26 19:42:48 -06:00
Matthew Flatt
3a9f8eea4f racket/gui cocoa: fix internal ObjC class names
"My" -> "Racket". The "My" prefix was from initial experiments,
of course, and I just never got around to changing it before.
I think these names go into a global namespace, though, at the
ObjC level, so they need to have a distinct and Racket-specific
prefix.
2012-05-16 09:43:23 -06:00
Matthew Flatt
b0409dd232 racket/gui cocoa: fix floating-window event handling
Closes PR 12754
2012-05-16 08:00:50 -06:00
Matthew Flatt
d5b17210e3 racket/gui cocoa: fix 'no-sheet style for `dialog%' 2012-05-16 07:34:44 -06:00
Matthew Flatt
985eecbed7 racket/gui cocoa: fix initial eventspace hook 2012-05-16 07:21:55 -06:00
Matthew Flatt
68e005fb2c racket/draw: make-immutable-{color,brush,pen} => make-{color,brush,pen}
Also, use keywords for `make-pen' and `make-brush'.

Adding `make-pen' and `make-color' creates many conflicts among
teaching libraries, such as `2htdp/image'. These are easy to fix
up in the tree, but adding such obvious names to `racket/draw'
may create other compatibility problems, so we might have to reconsider
the names.

In consultation with Asumu.
2012-05-01 21:04:40 -06:00
Asumu Takikawa
8db45eb557 Add immutable constructors for color%, brush%, pen%
- Make set-immutable a local method and document
    is-immutable? as a public method
  - Add some racket/draw tests
2012-05-01 21:20:52 -04:00
Matthew Flatt
418a3cd83b racket/draw cocoa: adjust default 'script font
Also, adjust the way a font is converted for control labels to
strp away Pango descriptions.
2012-04-25 19:17:16 -06:00
Eli Barzilay
2b76d9e5b0 A bunch of scheme' -> racket' conversions.
I think that there are no user-visible changes from these changes.
2012-04-19 16:02:03 -04:00
Asumu Takikawa
d7fefc848b Fix requires to avoid circular dependencies. 2012-03-30 23:34:34 -04:00
Matthew Flatt
97a64b1166 no callback for `tab-panel%' tab additions and deletions 2012-03-10 10:07:37 -07:00
Eli Barzilay
f7c67b49a4 Big newline at EOF scan. 2012-02-29 00:28:11 -05:00
Robby Findler
1945ff2709 add make-platform-bitmap
also: use it in pict's rendering and
remove redex's platform-specific font choice
(going back to using 'modern on all platforms)

closes PR 12554
2012-02-21 16:19:45 -06:00
Matthew Flatt
01dce00271 racket/gui: correct some casts in GUI bindings 2012-01-23 11:20:21 -07:00
Matthew Flatt
f93c94f6ff add 'shift, 'control, 'rshift, and 'rcontrol events 2011-12-08 15:05:41 -07:00
Robby Findler
b40cc23f60 change file-creator-and-type so that it raises exn:fail:filesystem?
exceptions instead of exn:fail exceptions for errors having to do
with the actual attempt to change/retrieve the creator and type
(but leaving alone the type errors)

closes PR 12400
2011-11-28 15:35:42 -06:00
Matthew Flatt
bc0c2075fd cocoa: make sure app wakes up on file event 2011-11-25 13:19:42 -07:00
Matthew Flatt
4bbb2d41aa cocoa: fix some GL problems 2011-11-03 09:12:13 -06:00
Matthew Flatt
718229387c fix cocoa `get-clipboard-string' to never return #f; fix docs
Merge to 5.2
2011-10-18 06:35:38 -06:00
Matthew Flatt
dc912ee6de third attempt to fix 64-bit Lion hidden-window problem
After all the previous attempts, the problem seems almost trivial:
although Apple documents `NSAnyEventMask' as the constant #xFFFFFFFF,
it's actually NSUIntegerMax (and the difference matters in 64-bit
mode).

Merge to 5.2.
2011-10-10 15:48:30 -06:00
Matthew Flatt
9fd11ac92c Revert "another attempt to fix the 64-bit Lion hidden-window problem"
This reverts commit f6e5468dbb.

Merge to 5.2
2011-10-10 15:38:42 -06:00
Matthew Flatt
bf3f09a3c1 cocoa: fix `show #f' on already unshown frame shows it briefly
Merge to 5.2
2011-10-08 16:47:19 -06:00
Matthew Flatt
f6e5468dbb another attempt to fix the 64-bit Lion hidden-window problem
This fix uses the same`run'-vs-`finishLaunch' technique as before,
but patches up the modal-dialog problem by calling `run' again
with a callback to start a modal loop.

Merge to 5.2.
2011-10-08 06:12:17 -06:00
Matthew Flatt
9aa93ab5ae Revert "cocoa: change the way the app is initialied"
This reverts commit 60101618db.

While this changes fixes a 64-bit Lion problem, it creates a
worse problem of breaking file and print dialogs.
2011-10-07 15:25:31 -06:00
Matthew Flatt
60101618db cocoa: change the way the app is initialied
Calling NSApplication's `run' works better than calling `finishLaunching'
directly, particularly in 64-bit Lion for some reason.

Relevant to PR 12102
Relevant to PR 12257
2011-10-07 08:05:15 -06:00
Matthew Flatt
3941a5d04f cocoa: make grow-box-spacer zero-width for 10.7 2011-10-04 12:59:18 -06:00