From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 13 Sep 2011 10:22:03 -0700 Message-ID: From: David Leimbach To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=20cf300512f2e2c9a904acd5e153 Subject: Re: [9fans] plan9port: cocoa programmer needed Topicbox-Message-UUID: 1cd0f98e-ead7-11e9-9d60-3106f5b1d025 --20cf300512f2e2c9a904acd5e153 Content-Type: text/plain; charset=ISO-8859-1 Thanks for all of your work on this! On Tue, Sep 13, 2011 at 8:59 AM, david jeannot wrote: > > So I will send my code in the next few days, > > unless there is a need. > > I'm 9 days late, but here it is: the Cocoa version > of Devdraw. I just submitted it to Codereview: > > http://codereview.appspot.com/5015042 > > I removed live resizing, because I found no way to > make it perfect: the window now becomes gray while > resizing. > > > About gestures now. > > A swipe gesture needs 3 fingers (with trackpads at > least). If you want to use them, you must > reconfigure OS X Lion to use 4 fingers instead of > 3 (to swipe between spaces, or to swipe to > "Mission Control" for example). > > As previously discussed, OS X Lion doesn't send > swipe events anymore for vertical swipes. So I > reimplemented swipe gestures with lower-level > touch events. All that I can say is that it works > well with a late 2010 MacBook Air's trackpad. > Unfortunately, it seems only for trackpads: not > for "Magic Mouse". The higher-level gesture > events seem compatible with "Magic Mouse" (though > I don't know to how many fingers a swipe gesture > corresponds), but the lower-level touch events > seem incompatible (I may be mistaken). > > If you want to use the reimplemented swipes, you > have to set the "reimplementswipe" variable at the > beginning of cocoa-screen.m (the file's name may > change soon). > > One advantage of this reimplementation is that we > can now detect 3-finger taps. If you set the > "usecopygesture" variable as well, you have now > the following gestures: > > 3-finger swipe-left to cut (cmd+x), > 3-finger swipe-right to paste (cmd+v), > 3-finger swipe-up to copy (cmd+c), > 3-finger swipe-down to execute with arguments (2-1 chord), > 3-finger tap to execute (button 2), > pinch to toggle fullscreen. > > Else you have: > > swipe-left to cut (cmd+x), > swipe-right to paste (cmd+v), > swipe-up to execute (button 2), > swipe-down to execute with arguments (2-1 chord), > pinch to toggle fullscreen. > > In both cases, horizontal swipes cancel each > other if your fingers remain on the device in > between. That is to say, the second swipe sends > undo (cmd+z): a command only recognized by Acme > currently. An annoyance is the behavior of Acme's > Undo when we are in the window's tag. Acme only > seems to undo filename change, else it undoes the > last change in the window's body. For example, if > you want to copy from the tag, (unless you use the > copy gesture) you will have to lift the fingers > between the left and the right swipe, else it will > undo the window's body, and you will be completely > puzzled. > > I wish this announcement will not cause too much > disappointment among "Magic Mouse" users. I knew > nothing of Mac programming before to begin this > project one month ago, and I certainly generalize > too much. (I didn't understood what was the > mysterious "multitouch" code in Carbon's Devdraw, > until some days ago, where I fell upon a similar > code to communicate with the "Magic Mouse" here: > http://www.iphonesmartapps.org/aladino/?a=multitouch) > > > If OS X Lion's users prefer the old fullscreen > mode, they can set the "useoldfullscreen" > variable. > > (Currently, Devdraw can't accept arguments, and as > it is so hard to compile anything with current > Xcode 4.1, I didn't try to modify Libdraw. This > is why you have to set variables instead of using > optional arguments.) > > > Be sure to read the description on Codereview for > the remaining bugs, to avoid further > disappointment. > > > If you need binaries running on Lion (Cocoa's > Devdraw, Acme supporting "cmd+z", etc.), I will be > happy to provide them. > > --20cf300512f2e2c9a904acd5e153 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for all of your work on this!

On T= ue, Sep 13, 2011 at 8:59 AM, david jeannot <djeannot24@gmail.com> wrote:
> So I will send my code in the next few days,
> unless there is a need.

I'm 9 days late, but here it is: the Cocoa version
of Devdraw. =A0I just submitted it to Codereview:

=A0 =A0 =A0 =A0http://codereview.appspot.com/5015042

I removed live resizing, because I found no way to
make it perfect: the window now becomes gray while
resizing.


About gestures now.

A swipe gesture needs 3 fingers (with trackpads at
least). =A0If you want to use them, you must
reconfigure OS X Lion to use 4 fingers instead of
3 (to swipe between spaces, or to swipe to
"Mission Control" for example).

As previously discussed, OS X Lion doesn't send
swipe events anymore for vertical swipes. =A0So I
reimplemented swipe gestures with lower-level
touch events. =A0All that I can say is that it works
well with a late 2010 MacBook Air's trackpad.
Unfortunately, it seems only for trackpads: not
for "Magic Mouse". =A0The higher-level gesture
events seem compatible with "Magic Mouse" (though
I don't know to how many fingers a swipe gesture
corresponds), but the lower-level touch events
seem incompatible (I may be mistaken).

If you want to use the reimplemented swipes, you
have to set the "reimplementswipe" variable at the
beginning of cocoa-screen.m (the file's name may
change soon).

One advantage of this reimplementation is that we
can now detect 3-finger taps. =A0If you set the
"usecopygesture" variable as well, you have now
the following gestures:

=A0 =A0 =A0 =A03-finger swipe-left to cut (cmd+x),
=A0 =A0 =A0 =A03-finger swipe-right to paste (cmd+v),
=A0 =A0 =A0 =A03-finger swipe-up to copy (cmd+c),
=A0 =A0 =A0 =A03-finger swipe-down to execute with arguments (2-1 chord),<= br> =A0 =A0 =A0 =A03-finger tap to execute (button 2),
=A0 =A0 =A0 =A0pinch to toggle fullscreen.

Else you have:

=A0 =A0 =A0 swipe-left to cut (cmd+x),
=A0 =A0 =A0 swipe-right to paste (cmd+v),
=A0 =A0 =A0 swipe-up to execute (button 2),
=A0 =A0 =A0 swipe-down to execute with arguments (2-1 chord),
=A0 =A0 =A0 pinch to toggle fullscreen.

In both cases, horizontal swipes cancel each
other if your fingers remain on the device in
between. =A0That is to say, the second swipe sends
undo (cmd+z): a command only recognized by Acme
currently. =A0An annoyance is the behavior of Acme's
Undo when we are in the window's tag. =A0Acme only
seems to undo filename change, else it undoes the
last change in the window's body. =A0For example, if
you want to copy from the tag, (unless you use the
copy gesture) you will have to lift the fingers
between the left and the right swipe, else it will
undo the window's body, and you will be completely
puzzled.

I wish this announcement will not cause too much
disappointment among "Magic Mouse" users. =A0I knew
nothing of Mac programming before to begin this
project one month ago, and I certainly generalize
too much. =A0(I didn't understood what was the
mysterious "multitouch" code in Carbon's Devdraw,
until some days ago, where I fell upon a similar
code to communicate with the "Magic Mouse" here:
http://www.iphonesmartapps.org/aladino/?a=3Dmultitouch)


If OS X Lion's users prefer the old fullscreen
mode, they can set the "useoldfullscreen"
variable.

(Currently, Devdraw can't accept arguments, and as
it is so hard to compile anything with current
Xcode 4.1, I didn't try to modify Libdraw. =A0This
is why you have to set variables instead of using
optional arguments.)


Be sure to read the description on Codereview for
the remaining bugs, to avoid further
disappointment.


If you need binaries running on Lion (Cocoa's
Devdraw, Acme supporting "cmd+z", etc.), I will be
happy to provide them.


--20cf300512f2e2c9a904acd5e153--