Allow to query client-side cursor support
Add a function nvnc_client_supports_cursor() to enable the API user to make an informed decision whether nvnc_set_cursor() can be expected to make the client draw the cursor, or whether it has to be rendered into the framebuffer.pull/69/head
parent
d18cc4fc57
commit
affd7f3f6d
|
@ -128,6 +128,7 @@ void nvnc_set_userdata(void* self, void* userdata, nvnc_cleanup_fn);
|
||||||
void* nvnc_get_userdata(const void* self);
|
void* nvnc_get_userdata(const void* self);
|
||||||
|
|
||||||
struct nvnc* nvnc_client_get_server(const struct nvnc_client* client);
|
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);
|
void nvnc_set_name(struct nvnc* self, const char* name);
|
||||||
|
|
||||||
|
|
10
src/server.c
10
src/server.c
|
@ -1569,6 +1569,16 @@ struct nvnc* nvnc_client_get_server(const struct nvnc_client* client)
|
||||||
return client->server;
|
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
|
EXPORT
|
||||||
void nvnc_set_name(struct nvnc* self, const char* name)
|
void nvnc_set_name(struct nvnc* self, const char* name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue