9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: hiro <23hiro@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] drawterm source?
Date: Thu, 18 Jun 2015 16:03:11 +0200	[thread overview]
Message-ID: <CAFSF3XMjTmnPZaExU9Kf6dQAhhc32yjZg9XzRkiOChWOboHeug@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

> so why do we have so many un-coordinated versions of drawterm?

because nobody reads their mail ever. perhaps one of you guys can put
this in though?

i think it's good that someone who can't test his code changes doesn't
commit to the "main" repo without giving disclaimers.
In my experience enquiries via mail about the status of the code do
get replies, so it's not too bad :)

---------- Forwarded message ----------
From: hiro <23hiro@gmail.com>
Date: Sat, 14 Jul 2012 16:49:45 +0200
Subject: Re: drawterm 9c9f289188ff
To: Russ Cox <rsc@swtch.com>

you're back, cool
here's a patch for this.

On 7/14/12, Russ Cox <rsc@swtch.com> wrote:
> sorry, i thought it was unused.
> I have put the variable back.
>
> feel free to try mouse wheel support.  i am not sure whether it ever worked.
> my memory of drawterm is fading.
>
> russ
>
>
> On Monday, May 28, 2012 at 8:17 PM, hiro wrote:
>
>> hi russ,
>>
>> this change breaks building the windows drawterm here. What's the
>> rationale behind it?!
>>
>> http://code.swtch.com/drawterm/changeset/9c9f289188ff/raw/
>> Also, did mouswheel support ever work? Would it make sense for me to
>> try working it out?
>>
>> case WM_MOUSEWHEEL:
>> if ((int)(wparam & 0xFFFF0000)>0)
>> b|=8;
>> else
>> b|=16;
>
>
>
>

[-- Attachment #2: russ.patch --]
[-- Type: application/octet-stream, Size: 1459 bytes --]

# HG changeset patch
# User hiro
# Date 1342276922 -7200
# Node ID 80949c5b425d9b2d7fb976a65d86c565c04f408c
# Parent  9822f642bd6182b91b2ba19471cd9400645554ef
make mouseweheel and some keys work.

diff -r 9822f642bd61 -r 80949c5b425d gui-win32/screen.c
--- a/gui-win32/screen.c	Sat Jul 14 10:30:35 2012 -0400
+++ b/gui-win32/screen.c	Sat Jul 14 16:42:02 2012 +0200
@@ -329,6 +329,7 @@
 	int i;
 	Rectangle r;
 
+	b = 0;
 	switch(msg) {
 	case WM_CREATE:
 		break;
@@ -353,7 +354,6 @@
 	case WM_RBUTTONDOWN:
 		x = LOWORD(lparam);
 		y = HIWORD(lparam);
-		b = 0;
 		if(wparam & MK_LBUTTON)
 			b = 1;
 		if(wparam & MK_MBUTTON)
@@ -413,8 +413,19 @@
 			kbdputc(kbdq, Kins);
 			break;
 		case VK_DELETE:
-//			kbdputc(kbdq, Kdel);
-			kbdputc(kbdq, 0x7f);	// should have Kdel in keyboard.h
+			kbdputc(kbdq, Kdel);
+			break;
+		case VK_HOME:
+			kbdputc(kbdq, Khome);
+			break;
+		case VK_END:
+			kbdputc(kbdq, Kend);
+			break;
+		case VK_PRIOR:
+			kbdputc(kbdq, Kpgup);
+			break;
+		case VK_NEXT:
+			kbdputc(kbdq, Kpgdown);
 			break;
 		case VK_UP:
 			kbdputc(kbdq, Kup);
diff -r 9822f642bd61 -r 80949c5b425d include/keyboard.h
--- a/include/keyboard.h	Sat Jul 14 10:30:35 2012 -0400
+++ b/include/keyboard.h	Sat Jul 14 16:42:02 2012 +0200
@@ -23,6 +23,7 @@
 
 enum {
     KF= 0xF000, /* Rune: beginning of private Unicode space */
+    Kdel=   0x7f,
     Spec=   0xF800,
     /* KF|1, KF|2, ..., KF|0xC is F1, F2, ..., F12 */
     Khome=  KF|0x0D,

             reply	other threads:[~2015-06-18 14:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 14:03 hiro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-06-14 23:32 Steve Simon
2015-06-14 23:55 ` Skip Tavakkolian
2015-06-17 15:15   ` Steve Simon
2015-06-18 10:18     ` Michaelian Ennis
2015-06-18 10:25       ` Michaelian Ennis
2015-06-18 10:33     ` David du Colombier
2015-06-18 10:41     ` David du Colombier
2015-06-18 12:37       ` erik quanstrom
2015-06-18 12:42         ` Kurt H Maier
2015-06-18 12:47         ` David du Colombier
2015-06-18 13:05           ` lucio
2015-06-18 13:16           ` Jeff Sickel
2015-06-18 13:56           ` michaelian ennis
2015-06-18 13:01         ` lucio
2015-06-18 14:20           ` Kurt H Maier
2015-06-18 14:23             ` Steve Simon
2015-06-18 15:29             ` Skip Tavakkolian

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=CAFSF3XMjTmnPZaExU9Kf6dQAhhc32yjZg9XzRkiOChWOboHeug@mail.gmail.com \
    --to=23hiro@gmail.com \
    --cc=9fans@9fans.net \
    /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).