Romain Vimont
59feb2a15c
Group common includes into common.h
...
Include config.h and compat.h in common.h, and include common.h from all
source files.
2021-01-08 19:22:10 +01:00
Romain Vimont
6385b8c162
Move common structs to coords.h
...
The size, point and position structs were defined in common.h. Move them
to coords.h so that common.h could be used for generic code to be
included in all source files.
2021-01-08 19:22:10 +01:00
Romain Vimont
198346d148
Add pinch-to-zoom simulation
...
If Ctrl is hold when the left-click button is pressed, enable
pinch-to-zoom to scale and rotate relative to the center of the screen.
Fixes #24 <https://github.com/Genymobile/scrcpy/issues/24 >
2020-08-10 20:08:24 +02:00
xeropresence
3c1ed5d86c
Handle repeating keycodes
...
Initialize "repeat" count on key events.
PR #1519 <https://github.com/Genymobile/scrcpy/pull/1519 >
Refs #1013 <https://github.com/Genymobile/scrcpy/pull/1013 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
2020-06-19 22:30:17 +02:00
Romain Vimont
488d22d4e2
Increase clipboard size from 4k to 256k
...
Beyond 256k, SDL_GetClipboardText() returns an empty string on my
computer.
Fixes #1117 <https://github.com/Genymobile/scrcpy/issues/1117 >
2020-06-11 23:11:20 +02:00
Romain Vimont
245999aec4
Serialize text size on 4 bytes
...
This will allow to send text having a size greater than 65535 bytes.
2020-06-11 23:11:17 +02:00
Romain Vimont
d91c5dcfd5
Rename MSG_SERIALIZED_MAX_SIZE to MSG_MAX_SIZE
...
For simplicity and consistency with the server part.
2020-06-11 23:08:04 +02:00
Romain Vimont
8f314c74b0
Reorganize message size constants
...
Make the max clipboard text length depend on the max message size.
2020-06-11 22:58:54 +02:00
Romain Vimont
fc1dec0270
Paste on "set clipboard" if possible
...
Ctrl+Shift+v synchronizes the computer clipboard to the Android device
clipboard. This feature had been added to provide a way to copy UTF-8
text from the computer to the device.
To make such a paste more straightforward, if the device runs at least
Android 7, also send a PASTE keycode to paste immediately.
<https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_PASTE >
Fixes #786 <https://github.com/Genymobile/scrcpy/issues/786 >
2020-05-25 20:59:21 +02:00
Romain Vimont
270d0bf639
Rename max length constant for text injection
...
To avoid confusion with the max text size for clipboard, rename the
constant limiting the text injection length.
2020-04-13 19:38:43 +02:00
Romain Vimont
eb0f339271
Add shortcut to rotate screen
...
On Ctrl+r, disable auto-rotation (if enabled), set the screen rotation
and re-enable auto-rotation (if it was enabled).
Closes #11 <https://github.com/Genymobile/scrcpy/issues/11 >
2019-12-04 22:03:25 +01:00
Romain Vimont
6220456def
Merge mouse and touch events
...
Both are handled the very same way on the device.
2019-10-03 20:37:49 +02:00
Romain Vimont
77f876e29c
Add "inject touch" control message
...
Add a control message type in the protocol to forward touch events to
the device.
2019-10-03 20:05:27 +02:00
Romain Vimont
1f8ba1ca79
Include config.h everywhere
...
Ref: <https://github.com/Genymobile/scrcpy/issues/829 >
Suggested-by: Louis Kruger <louisk@gmail.com>
2019-09-29 22:39:53 +02:00
Romain Vimont
12a3bb25d3
Implement device screen off while mirroring
...
Add two shortcuts:
- Ctrl+o to turn the device screen off while mirroring
- Ctrl+Shift+o to turn it back on
On power on (either via the POWER key or BACK while screen is off), both
the device screen and the mirror are turned on.
<https://github.com/Genymobile/scrcpy/issues/175 >
2019-05-31 23:07:23 +02:00
Romain Vimont
28980bbc90
Rename "event" to "message"
...
After the recent refactorings, a "control event" is not necessarily an
"event" (it may be a "command"). Similarly, the unique "device event"
used to send the device clipboard content is more a "reponse" to the
request from the client than an "event".
Rename both to "message", and rename the message types to better
describe their intent.
2019-05-31 16:18:00 +02:00