Skip to content

Commit 7e9416e

Browse files
committed
re-implemented hook_get_screen_info as public api call.
1 parent 3145b00 commit 7e9416e

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

include/uiohook.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ extern "C" {
407407
// Withdraw the event hook.
408408
UIOHOOK_API int hook_stop();
409409

410+
// Retrieves an array of screen data for each available monitor.
411+
UIOHOOK_API screen_data* hook_get_screen_info(uint8_t *count);
412+
410413
// Retrieves the keyboard auto repeat rate.
411414
UIOHOOK_API long int hook_get_auto_repeat_rate();
412415

src/darwin/system_properties.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "logger.h"
3838
#include "input_helper.h"
3939

40-
/* TODO Implement properly for multihead setup.
40+
// FIXME Implement properly for multihead setup.
4141
UIOHOOK_API screen_data* hook_get_screen_info(uint8_t *count) {
4242
// FIXME This needs to be implemented correctly for Multi-Head!
4343
*count = 0;
@@ -63,7 +63,6 @@ UIOHOOK_API screen_data* hook_get_screen_info(uint8_t *count) {
6363

6464
return screens;
6565
}
66-
*/
6766

6867
/*
6968
* Apple's documentation is not very good. I was finally able to find this

src/windows/system_properties.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// Global Variables.
3131
HINSTANCE hInst = NULL;
3232

33-
/* TODO Implement properly for muli-head setup.
33+
// FIXME Implement properly for muli-head setup.
3434
UIOHOOK_API screen_data* hook_get_screen_info(uint8_t *count) {
3535
// FIXME This needs to be implemented correctly for Multi-Head!
3636
*count = 0;
@@ -56,7 +56,6 @@ UIOHOOK_API screen_data* hook_get_screen_info(uint8_t *count) {
5656

5757
return screens;
5858
}
59-
*/
6059

6160
UIOHOOK_API long int hook_get_auto_repeat_rate() {
6261
long int value = -1;

src/x11/input_hook.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ static inline uint64_t get_event_timestamp(XRecordInterceptData *recorded_data)
157157
return recorded_data->server_time + offset_time;
158158
}
159159

160-
// Retrieves an array of screen data for each available monitor.
161-
// TODO Complete the hook_get_screen_info functions for all platforms.
162-
extern screen_data* hook_get_screen_info(uint8_t *count);
163160

164161
void hook_event_proc(XPointer closeure, XRecordInterceptData *recorded_data) {
165162
// Calculate Unix epoch from native time source.

src/x11/system_properties.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ static void *settings_thread_proc(void *arg) {
127127
}
128128
#endif
129129

130-
/* UIOHOOK_API */
131-
screen_data* hook_get_screen_info(uint8_t *count) {
130+
UIOHOOK_API screen_data* hook_get_screen_info(uint8_t *count) {
132131
*count = 0;
133132
screen_data *screens = NULL;
134133

0 commit comments

Comments
 (0)