2009-02-18 12:20 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* include/hbextern.ch
  * common.mak
  * source/rtl/Makefile
  * source/rtl/mouse53.c
    + Added HB_MMIDDLEDOWN() functions, plus MMIDDLEDOWN() alias.
      These are always available regardless of the CLIP53
      compatibility setting.

    ; TOFIX: K_MM*DOWN events _override_ C5.3 compatible
             K_MOUSEMOVE events (in GTWVT only), which created
             an unfortunate incompatibility with our target
             C5.x compiler when using some specific GT. Ideas 
             are welcome how to fix this. We should probably
             either send out both codes and let the inkey queue
             do the filtering as requested by app (we need a
             new filter then), or remove these event code and 
             generate proper K_MOUSEMOVE events instead. Apps
             using this these incompatible keycodes are encouraged 
             to replace expressions:
             '( key == K_KK*DOWN )' with the compatible:
             '( key == K_MOUSEMOVE .AND. M*DOWN() )' to prepare
             for the fix.
This commit is contained in:
Viktor Szakats
2009-02-18 11:26:39 +00:00
parent fbe97f53ab
commit 4710155eb2
5 changed files with 36 additions and 3 deletions

View File

@@ -8,6 +8,30 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-18 12:20 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* include/hbextern.ch
* common.mak
* source/rtl/Makefile
* source/rtl/mouse53.c
+ Added HB_MMIDDLEDOWN() functions, plus MMIDDLEDOWN() alias.
These are always available regardless of the CLIP53
compatibility setting.
; TOFIX: K_MM*DOWN events _override_ C5.3 compatible
K_MOUSEMOVE events (in GTWVT only), which created
an unfortunate incompatibility with our target
C5.x compiler when using some specific GT. Ideas
are welcome how to fix this. We should probably
either send out both codes and let the inkey queue
do the filtering as requested by app (we need a
new filter then), or remove these event code and
generate proper K_MOUSEMOVE events instead. Apps
using this these incompatible keycodes are encouraged
to replace expressions:
'( key == K_KK*DOWN )' with the compatible:
'( key == K_MOUSEMOVE .AND. M*DOWN() )' to prepare
for the fix.
2009-02-18 12:17 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/source/vm/hvm.c

View File

@@ -577,6 +577,7 @@ RTL_LIB_OBJS = \
$(OBJ_DIR)\mod$(OBJEXT) \
$(OBJ_DIR)\mouse53$(OBJEXT) \
$(OBJ_DIR)\mouseapi$(OBJEXT) \
$(OBJ_DIR)\mousehb$(OBJEXT) \
$(OBJ_DIR)\mousex$(OBJEXT) \
$(OBJ_DIR)\mtran$(OBJEXT) \
$(OBJ_DIR)\natmsg$(OBJEXT) \

View File

@@ -337,6 +337,7 @@ EXTERNAL DBEXISTS
EXTERNAL FIELDLEN
EXTERNAL FIELDDEC
EXTERNAL FIELDTYPE
EXTERNAL MMIDDLEDOWN
/* HiPer-SEEK / CFTS compatible functions */
@@ -896,6 +897,7 @@ EXTERNAL HB_RUN
EXTERNAL HB_GETREADVAR
EXTERNAL HB_DISABLEWAITLOCKS
EXTERNAL HB_MACROBLOCK
EXTERNAL HB_MMIDDLEDOWN
EXTERNAL HB_INISETCOMMENT
EXTERNAL HB_INIREAD

View File

@@ -94,6 +94,7 @@ C_SOURCES=\
mod.c \
mouse53.c \
mouseapi.c \
mousehb.c \
mousex.c \
mtran.c \
natmsg.c \

View File

@@ -6,7 +6,7 @@
* Harbour Project source code:
* Mouse API
*
* Copyright 1999-2001 Viktor Szakats <viktor.szakats@syenar.hu>
* Copyright 1999-2009 Viktor Szakats <viktor.szakats@syenar.hu>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
@@ -54,12 +54,12 @@
/* HARBOUR callable interface */
#ifdef HB_COMPAT_C53
#define M_BUTTON_LEFT 0
#define M_BUTTON_RIGHT 1
#define M_BUTTON_MIDDLE 2
#ifdef HB_COMPAT_C53
HB_FUNC( MPRESENT )
{
hb_retl( hb_mouseIsPresent() );
@@ -167,3 +167,8 @@ HB_FUNC( MSETBOUNDS )
}
#endif
HB_FUNC( HB_MMIDDLEDOWN )
{
hb_retl( hb_mouseButtonState( M_BUTTON_MIDDLE ) );
}