Automation like window on Linux

manishumrania

New Member
Joined
Aug 18, 2021
Messages
2
Reaction score
0
Credits
20
Hi ,
I am looking for compatible functionality of Win32 user32.dll of windows on a linux box

I am new to linux environment, can someone guild me to explore all possible options on linux.

Thanks & Regards,
Manish U
 


I don't think you'll have to worry about that with Linux, because Linux doesn't break.
happy0034.gif
 
Please , let's talk on right context. looking for APIs like user32.dll
getwindowhandle
getwindowtitle
bringwindowtofront
setwindowforeground
windowfrompoint
getAncestor
getclassbyhandle
getwindowrect
minimizewindow
maximizewindow
windowinfo
showwindow
restorewindow
closewindow
resizewindow
activatewindow etc
 
This looks like a question for one of our programmers. So, I'll ping @JasKinasis and maybe they'll give you insight as to the Linux equivalent of those functions. Those look like things that'd be possibly handled by x11, but let's make sure someone else chimes in.
 
You're not going to get those exact functions unless you program for Windows using WINE. Otherwise, you should just pick a different toolkit for your GUI programming like Qt.
 
I haven’t really messed with low level win32 API’s things like that in windows for an extremely long time.

Many years ago, at a previous job - I took some in-house tools that were originally C++ based windows-only MFC applications and ported them to wxWidgets (still in C++), to allow them to be built and ran on multiple OSes.

That was relatively trivial!

If you’re trying to port an old windows application to work on Linux, rather than trying to find things that are directly equivalent to the old win32 API’s - you may want to consider using a cross-platform application framework like QT, or wxWidgets to re-implement the GUI for the application. That way you can avoid the need for low level, platform-specific window management code. Let the framework automatically take care of all of that stuff for you!

That will avoid the need for too much platform specific code in your codebase. Then you can build and run your application in windows, Linux and any other supported platforms from the one codebase.
 
Of course, I suppose you could always write some sort of abstraction layer so you could keep the Win32 calls but have them redirect to Qt or WxWidgets. That is not recommended, however.
 

Members online


Latest posts

Top