From 58d12c80ae75262c4e30c62d25ef0e2410908ff4 Mon Sep 17 00:00:00 2001 From: Elijah Massey Date: Wed, 4 Sep 2024 13:42:51 -0700 Subject: [PATCH] Add mouse actions for scrolling --- Actions/ScrollDownAction.h | 45 ++++++++++++++++++++++ Actions/ScrollDownAction.m | 62 ++++++++++++++++++++++++++++++ Actions/ScrollDownPixelAction.h | 45 ++++++++++++++++++++++ Actions/ScrollDownPixelAction.m | 62 ++++++++++++++++++++++++++++++ Actions/ScrollUpAction.h | 45 ++++++++++++++++++++++ Actions/ScrollUpAction.m | 62 ++++++++++++++++++++++++++++++ Actions/ScrollUpPixelAction.h | 45 ++++++++++++++++++++++ Actions/ScrollUpPixelAction.m | 62 ++++++++++++++++++++++++++++++ Makefile | 4 ++ cliclick.xcodeproj/project.pbxproj | 24 ++++++++++++ 10 files changed, 456 insertions(+) create mode 100644 Actions/ScrollDownAction.h create mode 100644 Actions/ScrollDownAction.m create mode 100644 Actions/ScrollDownPixelAction.h create mode 100644 Actions/ScrollDownPixelAction.m create mode 100644 Actions/ScrollUpAction.h create mode 100644 Actions/ScrollUpAction.m create mode 100644 Actions/ScrollUpPixelAction.h create mode 100644 Actions/ScrollUpPixelAction.m diff --git a/Actions/ScrollDownAction.h b/Actions/ScrollDownAction.h new file mode 100644 index 0000000..fa05527 --- /dev/null +++ b/Actions/ScrollDownAction.h @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "ActionProtocol.h" +#import "MouseBaseAction.h" + +@interface ScrollDownAction : MouseBaseAction { + +} + ++ (NSString *)commandShortcut; + ++ (NSString *)commandDescription; + +- (NSString *)actionDescriptionString:(NSString *)locationDescription; + +- (void)performActionAtPoint:(CGPoint) p; + +@end diff --git a/Actions/ScrollDownAction.m b/Actions/ScrollDownAction.m new file mode 100644 index 0000000..013c080 --- /dev/null +++ b/Actions/ScrollDownAction.m @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "ScrollDownAction.h" +#include + +@implementation ScrollDownAction + +#pragma mark - ActionProtocol + ++ (NSString *)commandShortcut { + return @"sd"; +} + ++ (NSString *)commandDescription { + return @" sd:x,y Will SCROLL DOWN 1 line at the point with the given\n" + " coordinates. One line is usually about 10 pixels.\n" + " Example: “sd:12,34” will scroll down at the point with x\n" + " coordinate 12 and y coordinate 34. Instead of x and y values,\n" + " you may also use “.”, which means: the current position. Using\n" + " “.” is equivalent to using relative zero values “c:+0,+0”."; +} + +#pragma mark - MouseBaseAction + +- (NSString *)actionDescriptionString:(NSString *)locationDescription { + return [NSString stringWithFormat:@"Scroll down 1 line at %@", locationDescription]; +} + +- (void)performActionAtPoint:(CGPoint) p { + // Scroll down 1 line + CGEventRef scrollDown = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitLine, 1, -1); + CGEventPost(kCGHIDEventTap, scrollDown); + CFRelease(scrollDown); +} + +@end diff --git a/Actions/ScrollDownPixelAction.h b/Actions/ScrollDownPixelAction.h new file mode 100644 index 0000000..3813e28 --- /dev/null +++ b/Actions/ScrollDownPixelAction.h @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "ActionProtocol.h" +#import "MouseBaseAction.h" + +@interface ScrollDownPixelAction : MouseBaseAction { + +} + ++ (NSString *)commandShortcut; + ++ (NSString *)commandDescription; + +- (NSString *)actionDescriptionString:(NSString *)locationDescription; + +- (void)performActionAtPoint:(CGPoint) p; + +@end diff --git a/Actions/ScrollDownPixelAction.m b/Actions/ScrollDownPixelAction.m new file mode 100644 index 0000000..3064078 --- /dev/null +++ b/Actions/ScrollDownPixelAction.m @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "ScrollDownPixelAction.h" +#include + +@implementation ScrollDownPixelAction + +#pragma mark - ActionProtocol + ++ (NSString *)commandShortcut { + return @"sdp"; +} + ++ (NSString *)commandDescription { + return @" sdp:x,y Will SCROLL DOWN 1 pixel at the point with the given\n" + " coordinates.\n" + " Example: “sdp:12,34” will scroll down at the point with x\n" + " coordinate 12 and y coordinate 34. Instead of x and y values,\n" + " you may also use “.”, which means: the current position. Using\n" + " “.” is equivalent to using relative zero values “c:+0,+0”."; +} + +#pragma mark - MouseBaseAction + +- (NSString *)actionDescriptionString:(NSString *)locationDescription { + return [NSString stringWithFormat:@"Scroll down 1 pixel at %@", locationDescription]; +} + +- (void)performActionAtPoint:(CGPoint) p { + // Scroll down 1 pixel + CGEventRef scrollDown = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitPixel, 1, -1); + CGEventPost(kCGHIDEventTap, scrollDown); + CFRelease(scrollDown); +} + +@end diff --git a/Actions/ScrollUpAction.h b/Actions/ScrollUpAction.h new file mode 100644 index 0000000..dd35cdc --- /dev/null +++ b/Actions/ScrollUpAction.h @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "ActionProtocol.h" +#import "MouseBaseAction.h" + +@interface ScrollUpAction : MouseBaseAction { + +} + ++ (NSString *)commandShortcut; + ++ (NSString *)commandDescription; + +- (NSString *)actionDescriptionString:(NSString *)locationDescription; + +- (void)performActionAtPoint:(CGPoint) p; + +@end diff --git a/Actions/ScrollUpAction.m b/Actions/ScrollUpAction.m new file mode 100644 index 0000000..a5f9572 --- /dev/null +++ b/Actions/ScrollUpAction.m @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "ScrollUpAction.h" +#include + +@implementation ScrollUpAction + +#pragma mark - ActionProtocol + ++ (NSString *)commandShortcut { + return @"su"; +} + ++ (NSString *)commandDescription { + return @" su:x,y Will SCROLL UP 1 line at the point with the given\n" + " coordinates. One line is usually about 10 pixels.\n" + " Example: “su:12,34” will scroll up at the point with x\n" + " coordinate 12 and y coordinate 34. Instead of x and y values,\n" + " you may also use “.”, which means: the current position. Using\n" + " “.” is equivalent to using relative zero values “c:+0,+0”."; +} + +#pragma mark - MouseBaseAction + +- (NSString *)actionDescriptionString:(NSString *)locationDescription { + return [NSString stringWithFormat:@"Scroll up 1 line at %@", locationDescription]; +} + +- (void)performActionAtPoint:(CGPoint) p { + // Scroll up 1 line + CGEventRef scrollUp = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitLine, 1, 1); + CGEventPost(kCGHIDEventTap, scrollUp); + CFRelease(scrollUp); +} + +@end diff --git a/Actions/ScrollUpPixelAction.h b/Actions/ScrollUpPixelAction.h new file mode 100644 index 0000000..a98d7ab --- /dev/null +++ b/Actions/ScrollUpPixelAction.h @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "ActionProtocol.h" +#import "MouseBaseAction.h" + +@interface ScrollUpPixelAction : MouseBaseAction { + +} + ++ (NSString *)commandShortcut; + ++ (NSString *)commandDescription; + +- (NSString *)actionDescriptionString:(NSString *)locationDescription; + +- (void)performActionAtPoint:(CGPoint) p; + +@end diff --git a/Actions/ScrollUpPixelAction.m b/Actions/ScrollUpPixelAction.m new file mode 100644 index 0000000..ebcf5a8 --- /dev/null +++ b/Actions/ScrollUpPixelAction.m @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2007-2021, Carsten Blüm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * - Neither the name of Carsten Blüm nor the names of his contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "ScrollUpPixelAction.h" +#include + +@implementation ScrollUpPixelAction + +#pragma mark - ActionProtocol + ++ (NSString *)commandShortcut { + return @"sup"; +} + ++ (NSString *)commandDescription { + return @" sup:x,y Will SCROLL UP 1 pixel at the point with the given\n" + " coordinates.\n" + " Example: “sup:12,34” will scroll up at the point with x\n" + " coordinate 12 and y coordinate 34. Instead of x and y values,\n" + " you may also use “.”, which means: the current position. Using\n" + " “.” is equivalent to using relative zero values “c:+0,+0”."; +} + +#pragma mark - MouseBaseAction + +- (NSString *)actionDescriptionString:(NSString *)locationDescription { + return [NSString stringWithFormat:@"Scroll up 1 pixel at %@", locationDescription]; +} + +- (void)performActionAtPoint:(CGPoint) p { + // Scroll up 1 pixel + CGEventRef scrollUp = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitPixel, 1, 1); + CGEventPost(kCGHIDEventTap, scrollUp); + CFRelease(scrollUp); +} + +@end diff --git a/Makefile b/Makefile index 4e0ff7e..4b399af 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,10 @@ cliclick: Actions/ClickAction.o \ Actions/MoveAction.o \ Actions/PrintAction.o \ Actions/RightClickAction.o \ + Actions/ScrollDownAction.o \ + Actions/ScrollDownPixelAction.o \ + Actions/ScrollUpAction.o \ + Actions/ScrollUpPixelAction.o \ Actions/TripleclickAction.o \ Actions/TypeAction.o \ Actions/WaitAction.o \ diff --git a/cliclick.xcodeproj/project.pbxproj b/cliclick.xcodeproj/project.pbxproj index 38dce5e..8b05515 100644 --- a/cliclick.xcodeproj/project.pbxproj +++ b/cliclick.xcodeproj/project.pbxproj @@ -32,6 +32,10 @@ 5B9FEE9A1DDF5E6F0020F6F6 /* RightClickAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B9FEE991DDF5E6F0020F6F6 /* RightClickAction.m */; }; 8DD76F9A0486AA7600D96B5E /* cliclick.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* cliclick.m */; settings = {ATTRIBUTES = (); }; }; 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; + CFE12B432C88FCC2004B36C5 /* ScrollDownAction.m in Sources */ = {isa = PBXBuildFile; fileRef = CFE12B422C88FCC2004B36C5 /* ScrollDownAction.m */; }; + CFE12B462C88FCF9004B36C5 /* ScrollDownPixelAction.m in Sources */ = {isa = PBXBuildFile; fileRef = CFE12B452C88FCF9004B36C5 /* ScrollDownPixelAction.m */; }; + CFE12B492C88FD1B004B36C5 /* ScrollUpAction.m in Sources */ = {isa = PBXBuildFile; fileRef = CFE12B482C88FD1B004B36C5 /* ScrollUpAction.m */; }; + CFE12B4C2C88FD39004B36C5 /* ScrollUpPixelAction.m in Sources */ = {isa = PBXBuildFile; fileRef = CFE12B4B2C88FD39004B36C5 /* ScrollUpPixelAction.m */; }; F0A674F818EE2D0C0062FD29 /* DragDownAction.m in Sources */ = {isa = PBXBuildFile; fileRef = F0A674F718EE2D0C0062FD29 /* DragDownAction.m */; }; F0A674FB18EE3F220062FD29 /* DragUpAction.m in Sources */ = {isa = PBXBuildFile; fileRef = F0A674FA18EE3F220062FD29 /* DragUpAction.m */; }; /* End PBXBuildFile section */ @@ -98,6 +102,14 @@ 5B9FEE981DDF5E6F0020F6F6 /* RightClickAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RightClickAction.h; path = Actions/RightClickAction.h; sourceTree = ""; }; 5B9FEE991DDF5E6F0020F6F6 /* RightClickAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RightClickAction.m; path = Actions/RightClickAction.m; sourceTree = ""; }; 8DD76FA10486AA7600D96B5E /* cliclick */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cliclick; sourceTree = BUILT_PRODUCTS_DIR; }; + CFE12B412C88FCAF004B36C5 /* ScrollDownAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollDownAction.h; path = Actions/ScrollDownAction.h; sourceTree = ""; }; + CFE12B422C88FCC2004B36C5 /* ScrollDownAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScrollDownAction.m; path = Actions/ScrollDownAction.m; sourceTree = ""; }; + CFE12B442C88FCD4004B36C5 /* ScrollDownPixelAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollDownPixelAction.h; path = Actions/ScrollDownPixelAction.h; sourceTree = ""; }; + CFE12B452C88FCF9004B36C5 /* ScrollDownPixelAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScrollDownPixelAction.m; path = Actions/ScrollDownPixelAction.m; sourceTree = ""; }; + CFE12B472C88FD08004B36C5 /* ScrollUpAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollUpAction.h; path = Actions/ScrollUpAction.h; sourceTree = ""; }; + CFE12B482C88FD1B004B36C5 /* ScrollUpAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScrollUpAction.m; path = Actions/ScrollUpAction.m; sourceTree = ""; }; + CFE12B4A2C88FD2B004B36C5 /* ScrollUpPixelAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollUpPixelAction.h; path = Actions/ScrollUpPixelAction.h; sourceTree = ""; }; + CFE12B4B2C88FD39004B36C5 /* ScrollUpPixelAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScrollUpPixelAction.m; path = Actions/ScrollUpPixelAction.m; sourceTree = ""; }; F0A674F618EE2D0C0062FD29 /* DragDownAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DragDownAction.h; path = Actions/DragDownAction.h; sourceTree = ""; }; F0A674F718EE2D0C0062FD29 /* DragDownAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DragDownAction.m; path = Actions/DragDownAction.m; sourceTree = ""; }; F0A674F918EE3F220062FD29 /* DragUpAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DragUpAction.h; path = Actions/DragUpAction.h; sourceTree = ""; }; @@ -199,6 +211,14 @@ 22E5626416BA589200CD5D86 /* MoveAction.m */, 5B9FEE981DDF5E6F0020F6F6 /* RightClickAction.h */, 5B9FEE991DDF5E6F0020F6F6 /* RightClickAction.m */, + CFE12B412C88FCAF004B36C5 /* ScrollDownAction.h */, + CFE12B422C88FCC2004B36C5 /* ScrollDownAction.m */, + CFE12B442C88FCD4004B36C5 /* ScrollDownPixelAction.h */, + CFE12B452C88FCF9004B36C5 /* ScrollDownPixelAction.m */, + CFE12B472C88FD08004B36C5 /* ScrollUpAction.h */, + CFE12B482C88FD1B004B36C5 /* ScrollUpAction.m */, + CFE12B4A2C88FD2B004B36C5 /* ScrollUpPixelAction.h */, + CFE12B4B2C88FD39004B36C5 /* ScrollUpPixelAction.m */, 22E5626716BA589200CD5D86 /* TripleclickAction.h */, 22E5626816BA589200CD5D86 /* TripleclickAction.m */, ); @@ -365,6 +385,7 @@ 22E5626E16BA589200CD5D86 /* KeyPressAction.m in Sources */, 22E5626F16BA589200CD5D86 /* KeyUpAction.m in Sources */, 22C68A501825A8960083A722 /* KeyDownUpBaseAction.m in Sources */, + CFE12B4C2C88FD39004B36C5 /* ScrollUpPixelAction.m in Sources */, 22E5627016BA589200CD5D86 /* MouseBaseAction.m in Sources */, 22760C932052632600467D47 /* OutputHandler.m in Sources */, 2250A92A1966D39000150E07 /* KeycodeInformer.m in Sources */, @@ -374,10 +395,13 @@ 22E5627316BA589200CD5D86 /* TripleclickAction.m in Sources */, 22998C7D197A85A300A4C691 /* TypeAction.m in Sources */, 22E5627416BA589200CD5D86 /* WaitAction.m in Sources */, + CFE12B462C88FCF9004B36C5 /* ScrollDownPixelAction.m in Sources */, 5B9FEE9A1DDF5E6F0020F6F6 /* RightClickAction.m in Sources */, 226347791B998B80003C5D71 /* ColorPickerAction.m in Sources */, 22C0ECEE16BAFD9800E3A46C /* KeyBaseAction.m in Sources */, + CFE12B492C88FD1B004B36C5 /* ScrollUpAction.m in Sources */, F0A674F818EE2D0C0062FD29 /* DragDownAction.m in Sources */, + CFE12B432C88FCC2004B36C5 /* ScrollDownAction.m in Sources */, F0A674FB18EE3F220062FD29 /* DragUpAction.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0;