2019-10-16 15:11:16 +02:00
|
|
|
# vKVM Library
|
|
|
|
|
2019-10-28 19:41:41 +01:00
|
|
|
This library allows for easy interaction with the graphical user interface of the vKVM project.
|
2019-10-23 17:12:04 +02:00
|
|
|
|
2019-10-28 19:41:41 +01:00
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
- set pixel color
|
|
|
|
- respond to keyboard/mouse events
|
|
|
|
- get/set text to be drawn
|
2019-10-23 17:12:04 +02:00
|
|
|
|
|
|
|
## Installation
|
2019-10-16 15:11:16 +02:00
|
|
|
|
|
|
|
Use the installation script provided in the Scripts repository
|
|
|
|
to install the full package.
|
|
|
|
|
|
|
|
Installing a single component is currently not supported.
|
|
|
|
|
2019-10-28 19:41:41 +01:00
|
|
|
## Include
|
2019-10-16 15:11:16 +02:00
|
|
|
|
|
|
|
Include this library with
|
|
|
|
|
2019-10-28 19:41:41 +01:00
|
|
|
```
|
|
|
|
set(LIB_PATH "${CMAKE_SOURCE_DIR}/../relative_path_to_library_folder")
|
2019-10-16 15:11:16 +02:00
|
|
|
|
|
|
|
include_directories(${LIB_PATH}/include)
|
|
|
|
add_executable(your_client ${SOURCES} ${HEADERS})
|
|
|
|
|
|
|
|
target_link_libraries(your_client ${LIB_PATH}/lib/liblibrary.a)
|
|
|
|
```
|
2019-10-28 19:41:41 +01:00
|
|
|
in your CMakeList.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
#include <vkvm.h>
|
|
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
if(argc != 1) return -1;
|
|
|
|
int pid = std::stoi(argv[0]);
|
|
|
|
initialize(pid);
|
|
|
|
|
|
|
|
setPixel(10, 10, Color::black);
|
|
|
|
setPixel(10, 20, Color::red);
|
|
|
|
}
|
2019-10-16 15:11:16 +02:00
|
|
|
|
2019-10-28 19:41:41 +01:00
|
|
|
```
|