summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2009-10-02 07:49:31 +0000
committerfcolin2009-10-02 07:49:31 +0000
commit1764eca1207bf5371ba0e76ba02da3baf818dea2 (patch)
tree0b8ad272bd9ed98626257aebc1391e65c2c57f9e
parent0d1b9c6063805958e075b1121227d985a065c6d6 (diff)
downloadivy-cplusplus-1764eca1207bf5371ba0e76ba02da3baf818dea2.zip
ivy-cplusplus-1764eca1207bf5371ba0e76ba02da3baf818dea2.tar.gz
ivy-cplusplus-1764eca1207bf5371ba0e76ba02da3baf818dea2.tar.bz2
ivy-cplusplus-1764eca1207bf5371ba0e76ba02da3baf818dea2.tar.xz
ajout fonction de verouillage
correction bug button down en dehors de la zone
-rw-r--r--IvyCursor/InstIvyCursor/InstIvyCursor.vdproj68
-rw-r--r--IvyCursor/IvyCursor.cpp26
2 files changed, 65 insertions, 29 deletions
diff --git a/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj b/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj
index d631359..969c7a9 100644
--- a/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj
+++ b/IvyCursor/InstIvyCursor/InstIvyCursor.vdproj
@@ -15,38 +15,44 @@
{
"Entry"
{
- "MsmKey" = "8:_06E53427C4BC415290A766A51B2907B5"
- "OwnerKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
+ "MsmKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
+ "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_06E53427C4BC415290A766A51B2907B5"
- "OwnerKey" = "8:_522624C883B2416AAD0D345280C2CB97"
+ "MsmKey" = "8:_522624C883B2416AAD0D345280C2CB97"
+ "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
+ "MsmKey" = "8:_5A688E16C8FB4F969BAAF36ACF9DE131"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_522624C883B2416AAD0D345280C2CB97"
- "OwnerKey" = "8:_UNDEFINED"
+ "MsmKey" = "8:_7D62B99A451B4AB2AAFCD611E80C741A"
+ "OwnerKey" = "8:_3B23F7E390FC40EA8E3083AFEBCFC095"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_5A688E16C8FB4F969BAAF36ACF9DE131"
- "OwnerKey" = "8:_UNDEFINED"
+ "MsmKey" = "8:_7D62B99A451B4AB2AAFCD611E80C741A"
+ "OwnerKey" = "8:_522624C883B2416AAD0D345280C2CB97"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_8E374943E56221993853F7D9051D7B42"
+ "OwnerKey" = "8:_522624C883B2416AAD0D345280C2CB97"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_C0801FE614764695905B7F25FB8EF372"
- "OwnerKey" = "8:_06E53427C4BC415290A766A51B2907B5"
+ "MsmKey" = "8:_92E7CD908F864B6A98B01ABC23963E91"
+ "OwnerKey" = "8:_7D62B99A451B4AB2AAFCD611E80C741A"
"MsmSig" = "8:_UNDEFINED"
}
}
@@ -126,6 +132,26 @@
}
"File"
{
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_8E374943E56221993853F7D9051D7B42"
+ {
+ "SourcePath" = "8:WSOCK32.dll"
+ "TargetName" = "8:WSOCK32.dll"
+ "Tag" = "8:"
+ "Folder" = "8:_4032CB2519934BECBD77C58A883B04AC"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:TRUE"
+ "IsolateTo" = "8:"
+ }
}
"FileType"
{
@@ -182,14 +208,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:IvyCursor"
- "ProductCode" = "8:{6C5CA5FC-4F8A-4DB9-AD00-0871F9AD932D}"
- "PackageCode" = "8:{4851B959-19BA-4D9F-9B7C-B94874DF18BC}"
+ "ProductCode" = "8:{687B5941-010C-4495-94A6-52E0D3331FD7}"
+ "PackageCode" = "8:{18D7DCB8-6F9C-4955-BF45-79F58CDFD0D8}"
"UpgradeCode" = "8:{B9048C4D-4B78-4498-8634-FA5726303A10}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
- "ProductVersion" = "8:2.2.0"
+ "ProductVersion" = "8:2.4.0"
"Manufacturer" = "8:DTI R&D"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
@@ -726,11 +752,11 @@
}
"MergeModule"
{
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_06E53427C4BC415290A766A51B2907B5"
+ "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_7D62B99A451B4AB2AAFCD611E80C741A"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
- "SourcePath" = "8:policy_9_0_Microsoft_VC90_DebugCRT_x86_x64.msm"
+ "SourcePath" = "8:policy_9_0_Microsoft_VC90_CRT_x86_x64.msm"
"Properties"
{
}
@@ -740,11 +766,11 @@
"Feature" = "8:"
"IsolateTo" = "8:"
}
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_C0801FE614764695905B7F25FB8EF372"
+ "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_92E7CD908F864B6A98B01ABC23963E91"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
- "SourcePath" = "8:microsoft_vc90_debugcrt_x86_x64.msm"
+ "SourcePath" = "8:microsoft_vc90_crt_x86_x64.msm"
"Properties"
{
}
@@ -759,7 +785,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_3B23F7E390FC40EA8E3083AFEBCFC095"
{
- "SourcePath" = "8:..\\x64\\Debug\\pcre.dll"
+ "SourcePath" = "8:..\\x64\\Release\\pcre.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_4032CB2519934BECBD77C58A883B04AC"
@@ -787,7 +813,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_522624C883B2416AAD0D345280C2CB97"
{
- "SourcePath" = "8:..\\x64\\Debug\\Ivy.dll"
+ "SourcePath" = "8:..\\x64\\Release\\Ivy.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_4032CB2519934BECBD77C58A883B04AC"
@@ -815,7 +841,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_5A688E16C8FB4F969BAAF36ACF9DE131"
{
- "SourcePath" = "8:..\\x64\\Debug\\IvyCursor.exe"
+ "SourcePath" = "8:..\\x64\\Release\\IvyCursor.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_4032CB2519934BECBD77C58A883B04AC"
diff --git a/IvyCursor/IvyCursor.cpp b/IvyCursor/IvyCursor.cpp
index cb91542..2a018cf 100644
--- a/IvyCursor/IvyCursor.cpp
+++ b/IvyCursor/IvyCursor.cpp
@@ -30,6 +30,7 @@ BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
+bool lock = false;
void ivyCursorMouve(IvyApplication *app, void *user_data, int argc, const char **argv)
{
@@ -78,10 +79,12 @@ void ivyCursorClick(IvyApplication *app, void *user_data, int argc, const char *
_RPT3(_CRT_WARN,"ivyCursorClick can click to x=%d y=%d error=%d\n",x,y,GetLastError());
}
}
-void SendInput ( DWORD flags, float x, float y , int wheel )
+void SendInput ( DWORD flags, double x, double y , int wheel )
{
UINT nb;
INPUT Inputs;
+
+ if ( lock ) return;
Inputs.type = INPUT_MOUSE;
Inputs.mi.dwFlags = flags;
@@ -109,9 +112,9 @@ void ivyPointerEvent(IvyApplication *app, void *user_data, int argc, const char
int predicted_y = atoi(*argv++);
const char *type = *argv++;
int serial_number = atoi(*argv++);
- float time = atof(*argv++);
- float hires_x = atof(*argv++);
- float hires_y = atof(*argv++);
+ double time = atof(*argv++);
+ double hires_x = atof(*argv++);
+ double hires_y = atof(*argv++);
const char *proximity = *argv++; // (In|Out|unchanged)
// hack for tablet PC
@@ -141,9 +144,9 @@ void ivyButtonEvent(IvyApplication *app, void *user_data, int argc, const char *
int predicted_y = atoi(*argv++);
const char *type = *argv++;
int serial_number = atoi(*argv++);
- float time = atof(*argv++);
- float hires_x = atof(*argv++);
- float hires_y = atof(*argv++);
+ double time = atof(*argv++);
+ double hires_x = atof(*argv++);
+ double hires_y = atof(*argv++);
const char *proximity = *argv++; // (In|Out|unchanged)
// hack for tablet PC
@@ -152,7 +155,7 @@ void ivyButtonEvent(IvyApplication *app, void *user_data, int argc, const char *
hires_x *= 86800 / 1400;
hires_y *= 65000 / 1050;
}
- if ( hires_x < 0 || hires_y < 0 )
+ if ( hires_x < 0 || hires_y < 0 || hires_x > 1.0 || hires_y > 1.0 )
{
if ( *status == 'u' && bt_down )
{
@@ -190,6 +193,12 @@ void ivySliderEvent(IvyApplication *app, void *user_data, int argc, const char *
int time = atoi(*argv++);
}
+void ivyLockEvent(IvyApplication *app, void *user_data, int argc, const char **argv)
+{
+ const char* status = *argv++ ; // (lock|unlock)
+ lock = ( *status == 'l' );
+}
+
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
@@ -270,6 +279,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
bus->BindMsg(BUS_CALLBACK(ivyButtonEvent,0), "^button_event device_id=%s:%s:%s button=([-.0-9]+) status=(up|down) x=([-0-9]+) y=([-0-9]+) presure=([-0-9]+) tilt_x=([-0-9]+) tilt_y=([-0-9]+) wheel=([-0-9]+) predicted_x=([-0-9]+) predicted_y=([-0-9]+) type=(.*) serial_number=([-0-9]+) time=([-0-9]+) hires_x=([-.0-9]+) hires_y=([-.0-9]+) proximity=(In|Out|unchanged)", acc, wp, role );
bus->BindMsg(BUS_CALLBACK(ivyPadEvent,0), "^pad_event device_id=%s:%s:%s button=([0-9]+) status=(up|down) time=([-0-9]+)", acc, wp, role);
bus->BindMsg(BUS_CALLBACK(ivySliderEvent,0), "^slider_event device_id=%s:%s:%s value=([-0-9]+) side=(left|right) time=([-0-9]+)", acc, wp, role);
+ bus->BindMsg(BUS_CALLBACK(ivyLockEvent,0), "^lock_event device_id=%s:%s:%s status=(lock|unlock)", acc, wp, role);
bus->start( ivybus );