summaryrefslogtreecommitdiff
path: root/IvyCursor
diff options
context:
space:
mode:
authorfcolin2010-02-18 08:36:40 +0000
committerfcolin2010-02-18 08:36:40 +0000
commit74c0ac487332231e8dd6ba35580b07166ffbcfe2 (patch)
tree9701376529ae517ff148ebddadcffba69edf47f5 /IvyCursor
parent47ef2ac6357971a3feedd8f32462874ca7566c26 (diff)
downloadivy-cplusplus-74c0ac487332231e8dd6ba35580b07166ffbcfe2.zip
ivy-cplusplus-74c0ac487332231e8dd6ba35580b07166ffbcfe2.tar.gz
ivy-cplusplus-74c0ac487332231e8dd6ba35580b07166ffbcfe2.tar.bz2
ivy-cplusplus-74c0ac487332231e8dd6ba35580b07166ffbcfe2.tar.xz
mise en conformité de la reponse au Ping avec les autres implementations
Diffstat (limited to 'IvyCursor')
-rw-r--r--IvyCursor/InstIvyCursor/InstIvyCursor.vdproj34
-rw-r--r--IvyCursor/IvyCursor.cpp48
2 files changed, 62 insertions, 20 deletions
diff --git a/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj b/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj
index 969c7a9..a36b2cc 100644
--- a/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj
+++ b/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj
@@ -15,44 +15,44 @@
{
"Entry"
{
- "MsmKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
- "OwnerKey" = "8:_UNDEFINED"
+ "MsmKey" = "8:_3242670360DB45C0B11B781FBA2B6EA5"
+ "OwnerKey" = "8:_F33F0737CB7D442EBA793478C3AD99C3"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_522624C883B2416AAD0D345280C2CB97"
+ "MsmKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_5A688E16C8FB4F969BAAF36ACF9DE131"
+ "MsmKey" = "8:_522624C883B2416AAD0D345280C2CB97"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_7D62B99A451B4AB2AAFCD611E80C741A"
- "OwnerKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
+ "MsmKey" = "8:_5A688E16C8FB4F969BAAF36ACF9DE131"
+ "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_7D62B99A451B4AB2AAFCD611E80C741A"
+ "MsmKey" = "8:_8E374943E56221993853F7D9051D7B42"
"OwnerKey" = "8:_522624C883B2416AAD0D345280C2CB97"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8E374943E56221993853F7D9051D7B42"
- "OwnerKey" = "8:_522624C883B2416AAD0D345280C2CB97"
+ "MsmKey" = "8:_F33F0737CB7D442EBA793478C3AD99C3"
+ "OwnerKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_92E7CD908F864B6A98B01ABC23963E91"
- "OwnerKey" = "8:_7D62B99A451B4AB2AAFCD611E80C741A"
+ "MsmKey" = "8:_F33F0737CB7D442EBA793478C3AD99C3"
+ "OwnerKey" = "8:_522624C883B2416AAD0D345280C2CB97"
"MsmSig" = "8:_UNDEFINED"
}
}
@@ -148,7 +148,7 @@
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
- "Exclude" = "11:FALSE"
+ "Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
@@ -209,7 +209,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:IvyCursor"
"ProductCode" = "8:{687B5941-010C-4495-94A6-52E0D3331FD7}"
- "PackageCode" = "8:{18D7DCB8-6F9C-4955-BF45-79F58CDFD0D8}"
+ "PackageCode" = "8:{9F678DD6-2BF7-46EF-92C8-61C718D1BC0A}"
"UpgradeCode" = "8:{B9048C4D-4B78-4498-8634-FA5726303A10}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
@@ -752,11 +752,11 @@
}
"MergeModule"
{
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_7D62B99A451B4AB2AAFCD611E80C741A"
+ "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_3242670360DB45C0B11B781FBA2B6EA5"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
- "SourcePath" = "8:policy_9_0_Microsoft_VC90_CRT_x86_x64.msm"
+ "SourcePath" = "8:microsoft_vc90_crt_x86_x64.msm"
"Properties"
{
}
@@ -766,11 +766,11 @@
"Feature" = "8:"
"IsolateTo" = "8:"
}
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_92E7CD908F864B6A98B01ABC23963E91"
+ "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_F33F0737CB7D442EBA793478C3AD99C3"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
- "SourcePath" = "8:microsoft_vc90_crt_x86_x64.msm"
+ "SourcePath" = "8:policy_9_0_Microsoft_VC90_CRT_x86_x64.msm"
"Properties"
{
}
diff --git a/IvyCursor/IvyCursor.cpp b/IvyCursor/IvyCursor.cpp
index 2a018cf..5b1a3d4 100644
--- a/IvyCursor/IvyCursor.cpp
+++ b/IvyCursor/IvyCursor.cpp
@@ -129,6 +129,47 @@ void ivyPointerEvent(IvyApplication *app, void *user_data, int argc, const char
}
+UINT TabletToMouseButton( int button , bool down )
+{
+ UINT mouse_bttton;
+ if ( down )
+ {
+ switch ( button )
+ {
+ case 1:
+ mouse_bttton = MOUSEEVENTF_LEFTDOWN;
+ break;
+ case 2:
+ mouse_bttton = MOUSEEVENTF_MIDDLEDOWN;
+ break;
+ case 3:
+ mouse_bttton = MOUSEEVENTF_RIGHTDOWN;
+ break;
+ default:
+ mouse_bttton = MOUSEEVENTF_LEFTDOWN;
+ break;
+ }
+ }
+ else
+ {
+ switch ( button )
+ {
+ case 1:
+ mouse_bttton = MOUSEEVENTF_LEFTUP;
+ break;
+ case 2:
+ mouse_bttton = MOUSEEVENTF_MIDDLEUP;
+ break;
+ case 3:
+ mouse_bttton = MOUSEEVENTF_RIGHTUP;
+ break;
+ default:
+ mouse_bttton = MOUSEEVENTF_LEFTUP;
+ break;
+ }
+ }
+ return button;
+}
void ivyButtonEvent(IvyApplication *app, void *user_data, int argc, const char **argv)
{
static int bt_down = 0;
@@ -149,6 +190,7 @@ void ivyButtonEvent(IvyApplication *app, void *user_data, int argc, const char *
double hires_y = atof(*argv++);
const char *proximity = *argv++; // (In|Out|unchanged)
+
// hack for tablet PC
if ( serial_number ==0 )
{
@@ -159,7 +201,7 @@ void ivyButtonEvent(IvyApplication *app, void *user_data, int argc, const char *
{
if ( *status == 'u' && bt_down )
{
- SendInput ( MOUSEEVENTF_LEFTUP, hires_x, hires_y , wheel );
+ SendInput ( TabletToMouseButton( button,false ), hires_x, hires_y , wheel );
bt_down = 0;
}
@@ -168,12 +210,12 @@ void ivyButtonEvent(IvyApplication *app, void *user_data, int argc, const char *
{
if ( (*status) == 'd' )
{
- SendInput ( MOUSEEVENTF_WHEEL | MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN , hires_x, hires_y , wheel );
+ SendInput ( MOUSEEVENTF_WHEEL | MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE | TabletToMouseButton( button,true ) , hires_x, hires_y , wheel );
bt_down = 1;
}
else
{
- SendInput ( MOUSEEVENTF_WHEEL | MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP , hires_x, hires_y , wheel );
+ SendInput ( MOUSEEVENTF_WHEEL | MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE | TabletToMouseButton( button,false ) , hires_x, hires_y , wheel );
bt_down = 0;
}
}