Skip to content

Commit 51d8f0b

Browse files
authored
Add files via upload
1 parent 5b39a94 commit 51d8f0b

19 files changed

+546
-0
lines changed

api-docs/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## nativehook
2+
> version 1.0.2, created by JPPM.
3+
4+
5+
### Install
6+
```
7+
8+
```
9+
10+
### API
11+
**Classes**
12+
13+
#### `nativehook`
14+
15+
- [`NativeHook`](classes/nativehook/NativeHook.md)
16+
- [`NativeInputEvent`](classes/nativehook/NativeInputEvent.md)
17+
- [`NativeKeyEvent`](classes/nativehook/NativeKeyEvent.md)
18+
- [`NativeMouseEvent`](classes/nativehook/NativeMouseEvent.md)
19+
- [`NativeMouseWheelEvent`](classes/nativehook/NativeMouseWheelEvent.md)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# NativeHook
2+
3+
- **class** `NativeHook` (`nativehook\NativeHook`)
4+
- **source** `nativehook/NativeHook.php`
5+
6+
---
7+
8+
#### Methods
9+
10+
- `->`[`__construct()`](#method-__construct)
11+
- `->`[`on()`](#method-on)
12+
- `->`[`off()`](#method-off)
13+
- `->`[`start()`](#method-start) - _Начать слушать события_
14+
- `->`[`stop()`](#method-stop) - _Прекратить слушать события_
15+
16+
---
17+
# Methods
18+
19+
<a name="method-__construct"></a>
20+
21+
### __construct()
22+
```php
23+
__construct(): void
24+
```
25+
26+
---
27+
28+
<a name="method-on"></a>
29+
30+
### on()
31+
```php
32+
on(string $event, callable $handler): void
33+
```
34+
35+
---
36+
37+
<a name="method-off"></a>
38+
39+
### off()
40+
```php
41+
off(string $event): void
42+
```
43+
44+
---
45+
46+
<a name="method-start"></a>
47+
48+
### start()
49+
```php
50+
start(): void
51+
```
52+
Начать слушать события
53+
54+
---
55+
56+
<a name="method-stop"></a>
57+
58+
### stop()
59+
```php
60+
stop(): void
61+
```
62+
Прекратить слушать события
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# NativeInputEvent
2+
3+
- **class** `NativeInputEvent` (`nativehook\NativeInputEvent`)
4+
- **source** `nativehook/NativeInputEvent.php`
5+
6+
**Child Classes**
7+
8+
> [NativeKeyEvent](classes/nativehook/NativeKeyEvent.md), [NativeMouseEvent](classes/nativehook/NativeMouseEvent.md)
9+
10+
---
11+
12+
#### Properties
13+
14+
- `->`[`id`](#prop-id) : `int`
15+
- `->`[`when`](#prop-when) : `int`
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# NativeKeyEvent
2+
3+
- **class** `NativeKeyEvent` (`nativehook\NativeKeyEvent`) **extends** [`NativeInputEvent`](classes/nativehook/NativeInputEvent.md)
4+
- **source** `nativehook/NativeKeyEvent.php`
5+
6+
---
7+
8+
#### Properties
9+
10+
- `->`[`key`](#prop-key) : `string` - _Имя клавиши_
11+
- `->`[`code`](#prop-code) : `int` - _Код клавиши_
12+
- *See also in the parent class* [NativeInputEvent](classes/nativehook/NativeInputEvent.md).
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# NativeMouseEvent
2+
3+
- **class** `NativeMouseEvent` (`nativehook\NativeMouseEvent`) **extends** [`NativeInputEvent`](classes/nativehook/NativeInputEvent.md)
4+
- **source** `nativehook/NativeMouseEvent.php`
5+
6+
**Child Classes**
7+
8+
> [NativeMouseWheelEvent](classes/nativehook/NativeMouseWheelEvent.md)
9+
10+
---
11+
12+
#### Properties
13+
14+
- `->`[`button`](#prop-button) : `int`
15+
- `->`[`clickCount`](#prop-clickcount) : `int`
16+
- `->`[`x`](#prop-x) : `int`
17+
- `->`[`y`](#prop-y) : `int`
18+
- *See also in the parent class* [NativeInputEvent](classes/nativehook/NativeInputEvent.md).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# NativeMouseWheelEvent
2+
3+
- **class** `NativeMouseWheelEvent` (`nativehook\NativeMouseWheelEvent`) **extends** [`NativeMouseEvent`](classes/nativehook/NativeMouseEvent.md)
4+
- **source** `nativehook/NativeMouseWheelEvent.php`
5+
6+
---
7+
8+
#### Properties
9+
10+
- `->`[`scrollAmount`](#prop-scrollamount) : `int`
11+
- `->`[`scrollType`](#prop-scrolltype) : `int`
12+
- `->`[`wheelRotation`](#prop-wheelrotation) : `int`
13+
- *See also in the parent class* [NativeMouseEvent](classes/nativehook/NativeMouseEvent.md).

package.php.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: nativehook
2+
version: 1.0.4
3+
4+
plugins:
5+
- Hub
6+
- Doc
7+
- Gradle
8+
9+
deps:
10+
jphp-runtime: '*'
11+
12+
devDeps:
13+
jphp-core: '*'
14+
15+
sources:
16+
- src
17+
18+
hub:
19+
20+
21+
config:
22+
ignore:
23+
- /sandbox/**
24+
- /.idea/**
25+
- /*.iml
26+
- /.git/**
27+
- /examples/**
28+
- /package.hub.yml
29+
30+
31+
gradle:
32+
deps:
33+
- com.1stleg:jnativehook:2.0.2

sdk/nativehook/NativeHook.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
namespace nativehook;
3+
4+
5+
class NativeHook{
6+
public function __construct(){}
7+
/**
8+
* @param string $event
9+
* @param callable $handler
10+
* Установить обработчик для события
11+
*/
12+
public function on(string $event, callable $handler){}
13+
/**
14+
* @param string $event
15+
* Удалить обработчик для события
16+
*/
17+
public function off(string $event){}
18+
/**
19+
* Начать слушать события
20+
*/
21+
public function start(){}
22+
/**
23+
* Прекратить слушать события
24+
*/
25+
public function stop(){}
26+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
namespace nativehook;
3+
4+
5+
class NativeInputEvent{
6+
/**
7+
* @var int
8+
*/
9+
public $id;
10+
/**
11+
* @var int
12+
*/
13+
public $when;
14+
}

sdk/nativehook/NativeKeyEvent.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
namespace nativehook;
3+
4+
5+
class NativeKeyEvent extends NativeInputEvent{
6+
/**
7+
* Имя клавиши
8+
* @var string
9+
*/
10+
public $key;
11+
/**
12+
* Код клавиши
13+
* @var int
14+
*/
15+
public $code;
16+
}

0 commit comments

Comments
 (0)