-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extension has been reworked to fit the original library
- Loading branch information
Showing
32 changed files
with
792 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.idea/ | ||
*.iml | ||
|
||
build.gradle | ||
gradle/ | ||
/.gradle/ | ||
gradlew | ||
gradlew.bat | ||
|
||
secret.asc | ||
|
||
*.hprof | ||
|
||
out/ | ||
.gradle/ | ||
|
||
*.log | ||
*.tmp | ||
|
||
build/ | ||
|
||
vendor/ | ||
package.*.yml | ||
!package.php.yml | ||
|
||
package-lock.php.yml | ||
|
||
jars/ | ||
bundle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
|
||
namespace nativehook; | ||
|
||
|
||
use nativehook\keyboard\NativeKeyListener; | ||
use nativehook\mouse\NativeMouseListener; | ||
use nativehook\mouse\NativeMouseWheelListener; | ||
|
||
class GlobalScreen{ | ||
public static function registerNativeHook(){} | ||
public static function unregisterNativeHook(){} | ||
public static function isNativeHookRegistered(): bool{} | ||
|
||
public static function addNativeKeyListener(NativeKeyListener $keyListener){} | ||
public static function addNativeMouseListener(NativeMouseListener $mouseListener){} | ||
public static function addNativeMouseMotionListener(NativeMouseListener $mouseMotionListener){} | ||
public static function addNativeMouseWheelListener(NativeMouseWheelListener $mouseWheelListener){} | ||
|
||
public static function removeNativeKeyListener(NativeKeyListener $keyListener){} | ||
public static function removeNativeMouseListener(NativeMouseListener $mouseListener){} | ||
public static function removeNativeMouseMotionListener(NativeMouseListener $mouseMotionListener){} | ||
public static function removeNativeMouseWheelListener(NativeMouseWheelListener $mouseWheelListener){} | ||
|
||
public static function dispatchEvent(NativeInputEvent $e){} | ||
public static function postNativeEvent(NativeInputEvent $e){} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
<?php | ||
namespace nativehook; | ||
|
||
|
||
class NativeInputEvent{ | ||
/** | ||
* @var int | ||
*/ | ||
public $id; | ||
/** | ||
* @var int | ||
*/ | ||
public $when; | ||
<?php | ||
|
||
|
||
namespace nativehook; | ||
|
||
|
||
class NativeInputEvent{ | ||
/** | ||
* @var int | ||
* @readonly | ||
*/ | ||
public $type; | ||
/** | ||
* @var int | ||
*/ | ||
public $modifiers; | ||
/** | ||
* @var int | ||
* @readonly | ||
*/ | ||
public $when; | ||
|
||
public function __construct(int $type, int $when, int $modifiers){ | ||
|
||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function paramString(){ | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
|
||
namespace nativehook\keyboard; | ||
|
||
|
||
use nativehook\NativeInputEvent; | ||
|
||
class NativeKeyEvent extends NativeInputEvent{ | ||
/** | ||
* @var string | ||
* @readonly | ||
*/ | ||
public $keyText; | ||
/** | ||
* @var string | ||
*/ | ||
public $keyChar; | ||
/** | ||
* @var int | ||
*/ | ||
public $keyCode; | ||
/** | ||
* @var int | ||
*/ | ||
public $rawCode; | ||
/** | ||
* @var int | ||
*/ | ||
public $keyLocation; | ||
/** | ||
* @var bool | ||
*/ | ||
public $isActionKey; | ||
|
||
const NATIVE_KEY_PRESSED = 2401; | ||
const NATIVE_KEY_RELEASED = 2402; | ||
const NATIVE_KEY_TYPED = 2400; | ||
|
||
public function __construct(int $id, int $when, int $modifiers, int $rawCode, int $keyCode, string $keyChar, int $keyLocation = 0){ | ||
|
||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public static function getKeyText(int $keyCode){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
|
||
namespace nativehook\keyboard; | ||
|
||
|
||
interface NativeKeyListener{ | ||
/** | ||
* @param NativeKeyEvent $event | ||
* @return void | ||
*/ | ||
public function nativeKeyPressed($event); | ||
/** | ||
* @param NativeKeyEvent $event | ||
* @return void | ||
*/ | ||
public function nativeKeyReleased(NativeKeyEvent $event); | ||
/** | ||
* @param NativeKeyEvent $event | ||
* @return void | ||
*/ | ||
public function nativeKeyTyped(NativeKeyEvent $event); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
|
||
namespace nativehook\mouse; | ||
|
||
|
||
use nativehook\NativeInputEvent; | ||
|
||
class NativeMouseEvent extends NativeInputEvent{ | ||
const NATIVE_MOUSE_CLICKED = 2500; | ||
const NATIVE_MOUSE_PRESSED = 2501; | ||
const NATIVE_MOUSE_RELEASED = 2502; | ||
const NATIVE_MOUSE_MOVED = 2503; | ||
const NATIVE_MOUSE_DRAGGED = 2504; | ||
const NATIVE_MOUSE_WHEEL = 2505; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $button; | ||
/** | ||
* @var int | ||
*/ | ||
public $clickCount; | ||
/** | ||
* @var int | ||
*/ | ||
public $x; | ||
/** | ||
* @var int | ||
*/ | ||
public $y; | ||
|
||
public function __construct(int $id, int $when, int $modifiers, int $x, int $y, int $clickCount, int $button = 0){ | ||
|
||
} | ||
|
||
public function isPrimaryButtonDown(): bool{} | ||
public function isSecondaryButtonDown(): bool{} | ||
public function isMiddleButtonDown(): bool{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
|
||
namespace nativehook\mouse; | ||
|
||
|
||
interface NativeMouseListener{ | ||
public function nativeMouseClicked(NativeMouseEvent $event); | ||
|
||
public function nativeMousePressed(NativeMouseEvent $event); | ||
|
||
public function nativeMouseReleased(NativeMouseEvent $event); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
|
||
namespace nativehook\mouse; | ||
|
||
|
||
interface NativeMouseMotionListener{ | ||
public function nativeMouseMoved(NativeMouseEvent $event); | ||
|
||
public function nativeMouseDragged(NativeMouseEvent $event); | ||
} |
Oops, something went wrong.