diff --git a/include/neatvnc.h b/include/neatvnc.h index c4d413c..30b8cd8 100644 --- a/include/neatvnc.h +++ b/include/neatvnc.h @@ -128,6 +128,7 @@ void nvnc_set_userdata(void* self, void* userdata, nvnc_cleanup_fn); void* nvnc_get_userdata(const void* self); struct nvnc* nvnc_client_get_server(const struct nvnc_client* client); +bool nvnc_client_supports_cursor(const struct nvnc_client* client); void nvnc_set_name(struct nvnc* self, const char* name); diff --git a/src/server.c b/src/server.c index 1185ef3..94fc41b 100644 --- a/src/server.c +++ b/src/server.c @@ -1569,6 +1569,16 @@ struct nvnc* nvnc_client_get_server(const struct nvnc_client* client) return client->server; } +EXPORT +bool nvnc_client_supports_cursor(const struct nvnc_client* client) +{ + for (size_t i = 0; i < client->n_encodings; ++i) { + if (client->encodings[i] == RFB_ENCODING_CURSOR) + return true; + } + return false; +} + EXPORT void nvnc_set_name(struct nvnc* self, const char* name) {