Dear Sir,
Thanks for GRX provides lot of powerful and useful mouse event handling functions, But it seems to does not support using of the “mouse wheel”. Is there any alternate method to enable the mouse wheel in GRX ? Thanks in advanced.
Regards,
JH
Le 16/11/2011 04:31, jhliu a écrit :
Thanks for GRX provides lot of powerful and useful mouse event handling functions, But it seems to does not support using of the “mouse wheel”. Is there any alternate method to enable the mouse wheel in GRX ?
Please apply the attached diff to grx 2.4.8. Do not bother for offset and fuzz warnings: it is a diff from my copy of grx with various patches, but I have checked that it applies correctly to the original grx 2.4.8 This is an approximate backport from mgrx. It implements P4 and P5 "buttons" when you rotate the wheel forward or backward. Each makes two down / up mouse events. Try the test/mousetst program, maybe by replacing GrSleep(1) by GrSleep(500) to see clearly what happens. It works with X11, win32 and SDL drivers. with djgpp and probably linux console (I have presently no way to check) it is probably ineffective, but do not hamper normal use.
Maurice
Dear ALL,
Thanks for Maurice's patch and it works on my GPC+GRX 2.4.8+CentOS5 environment, except the following code is added to grx.pas
Gr_M_P4_Down = $0400; Gr_M_P4_Up = $0800; Gr_M_P5_Down = $2000; Gr_M_P5_Up = $4000; Gr_M_Button_Down = Gr_M_Left_Down or Gr_M_Middle_Down or Gr_M_Right_Down or Gr_M_P4_Down or Gr_M_P5_Down; Gr_M_Button_Up = Gr_M_Left_Up or Gr_M_Middle_Up or Gr_M_Right_Up or Gr_M_P4_Up or Gr_M_P5_Up;
Regards,
JH
-----原始郵件----- From: Maurice Lombardi Sent: Friday, November 25, 2011 11:04 PM To: grx@gnu.de Subject: Re: How to use "mouse wheel" in GRX
Le 16/11/2011 04:31, jhliu a écrit :
Thanks for GRX provides lot of powerful and useful mouse event handling functions, But it seems to does not support using of the “mouse wheel”. Is there any alternate method to enable the mouse wheel in GRX ?
Please apply the attached diff to grx 2.4.8. Do not bother for offset and fuzz warnings: it is a diff from my copy of grx with various patches, but I have checked that it applies correctly to the original grx 2.4.8 This is an approximate backport from mgrx. It implements P4 and P5 "buttons" when you rotate the wheel forward or backward. Each makes two down / up mouse events. Try the test/mousetst program, maybe by replacing GrSleep(1) by GrSleep(500) to see clearly what happens. It works with X11, win32 and SDL drivers. with djgpp and probably linux console (I have presently no way to check) it is probably ineffective, but do not hamper normal use.
Maurice
Le 08/12/2011 01:57, jhliu a écrit :
Dear ALL,
Thanks for Maurice's patch and it works on my GPC+GRX 2.4.8+CentOS5 environment, except the following code is added to grx.pas
Gr_M_P4_Down = $0400; Gr_M_P4_Up = $0800; Gr_M_P5_Down = $2000; Gr_M_P5_Up = $4000; Gr_M_Button_Down = Gr_M_Left_Down or Gr_M_Middle_Down or Gr_M_Right_Down or Gr_M_P4_Down or Gr_M_P5_Down; Gr_M_Button_Up = Gr_M_Left_Up or Gr_M_Middle_Up or Gr_M_Right_Up or Gr_M_P4_Up or Gr_M_P5_Up;
You are right ! I checked only the C part. There are two more changes in grx.pas (mouse index bits). Attached is a diff which contains everything (C and pascal changes), if somebody else wants to try.
Maurice
-----原始郵件----- From: Maurice Lombardi Sent: Friday, November 25, 2011 11:04 PM To: grx@gnu.de Subject: Re: How to use "mouse wheel" in GRX
Le 16/11/2011 04:31, jhliu a écrit :
Thanks for GRX provides lot of powerful and useful mouse event handling functions, But it seems to does not support using of the “mouse wheel”. Is there any alternate method to enable the mouse wheel in GRX ?
Please apply the attached diff to grx 2.4.8. Do not bother for offset and fuzz warnings: it is a diff from my copy of grx with various patches, but I have checked that it applies correctly to the original grx 2.4.8 This is an approximate backport from mgrx. It implements P4 and P5 "buttons" when you rotate the wheel forward or backward. Each makes two down / up mouse events. Try the test/mousetst program, maybe by replacing GrSleep(1) by GrSleep(500) to see clearly what happens. It works with X11, win32 and SDL drivers. with djgpp and probably linux console (I have presently no way to check) it is probably ineffective, but do not hamper normal use.
Maurice