Change code from windows to linux

0

How can I modify this code to linux? I need an alternative to #include<windows.h> to make this code:

GetCursorPos(&cursor);
x = cursor.x;
y = cursor.y;

Sleep(2000)
SetCursorPos(x, y);

mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
    
asked by 21.07.2018 в 12:16
source

1 answer

-1

Since it looks like you're using a specific framework, probably .Net?

You have to check that that framework can compile for linux platforms.

QT for example is cross-platform, .Net is not, none of the graphic libraries are compatible only for the different versions of windows

    
answered by 21.07.2018 в 19:32