9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Gorka Guardiola Múzquiz" <paurea@lsub.org>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] cooked mouse mode.
Date: Fri, 14 Jan 2005 02:06:32 +0100	[thread overview]
Message-ID: <004101c4f9d5$4a45dfa0$0200000a@urjc1> (raw)
In-Reply-To: <666eb841359a58c552d3281e4f8041ba@vitanuova.com>

We wanted to make explicit to choose between cooked events or raw events, no 
to expose the two interfaces at the same time, which may get applications
into a kludge. You must choose cooked or raw, not being able to see both at 
the same time.

We also put it there because this is related with the buttons of the mouse 
and all that stuff in mouse.h, so
putting the flags and things in mouse.h seems a good place for it. Yet 
another is that we tried to make it as much as possible "backwards 
compatible",
so it could be used (some issues which are referred in the manual appart), 
from programs already written without many modifications (calling 
setmousemode). Anyway, the code
modified is very little (in mouse.c the multiplexation and in mouse.h the 
flags and a macro). The main part of the code is in cook.c another file
completely separated which does exactly what you say, if you are in cooked 
mode, the events go to a thread which cooks them and writes them back to the 
output chan.

----- Original Message ----- 
From: <rog@vitanuova.com>
To: <9fans@cse.psu.edu>
Sent: Thursday, January 13, 2005 8:59 PM
Subject: Re: [9fans] cooked mouse mode.


>
> is there a particular reason why this has to be a patch in mouse(2)?
> could it not be implemented simply by a simple thread that receives
> events from the usual mouse channel, translates to "cooked" mouse messages
> and sends these down another channel, to be received by the application?
>
> say:
> Channel *cookedmouse(Channel *);
>
> that way none of the existing code needs to change; it seems to me
> that this is the kind of thing that the channel idiom is tailor-made
> for.
>
> i'm probably missing something.
> 



  reply	other threads:[~2005-01-14  1:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-13 16:30 Gorka Guardiola
2005-01-13 20:59 ` rog
2005-01-14  1:06   ` Gorka Guardiola Múzquiz [this message]
2005-01-14 13:57     ` rog
2005-01-14 13:54       ` Fco. J. Ballesteros
2005-01-14 14:05         ` rog
2005-01-14 14:02           ` Fco. J. Ballesteros
2005-01-14 14:26             ` rog
2005-01-14 14:24               ` Gorka Guardiola
2005-01-14 14:58                 ` rog
2005-01-14 14:57                   ` Fco. J. Ballesteros
2005-01-14 14:59                   ` Gorka Guardiola
2005-01-14 15:09                     ` rog
2005-01-14 15:06                       ` Gorka Guardiola
2005-01-14 16:43                         ` Rob Pike
2005-01-14 13:57       ` Gorka Guardiola
2005-01-14 14:18         ` Charles Forsyth
2005-01-14 14:06           ` Fco. J. Ballesteros
2005-01-14 14:12             ` Gorka Guardiola
2005-01-14 14:13             ` Gorka Guardiola
2005-01-14 14:15               ` Gorka Guardiola
2005-01-14 14:26             ` Charles Forsyth
2005-01-14 14:15               ` Fco. J. Ballesteros
2005-01-14 14:17                 ` Gorka Guardiola
2005-01-14 14:24                   ` Fco. J. Ballesteros
2005-01-14 14:38             ` Charles Forsyth
2005-01-14 14:28               ` Gorka Guardiola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004101c4f9d5$4a45dfa0$0200000a@urjc1' \
    --to=paurea@lsub.org \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).