Register hotkeys in Linux using library for c++ [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
are there any libraries for Linux wrote with C++, that could register global hotkeys for my application? Thanks.

You'll have to provide more information.
In Gnome, the global functionality varies by window manager. Metacity has configurable global shortcuts, as do Compiz and Sawfish, and they're all configured differently. Xhotkeys can also be used for the same functionality. However, these are all limited to starting applications only.
Within the KDE application framework, KAction can register global shortcuts which perform actions inside your program. These are actually handled by a module in kded (launched on demand), so they work even outside of the KDE desktop environment.
If you don't use the KDE framework, but are still using X11, you can use the xlib API to call XGrabKey on the root window.
For shortcuts that work outside of X, as long as you are running as root (or permissions are changed permissively) on a 2.6 kernel, you can directly open /dev/input/event*, and poll for the desired key events.

I wrote a simple C library a while back to make registering global X11 hotkeys a little less painful. There are some examples with the code. You can get it at:
https://github.com/jwmcode/xhklib/

Related

Is there a cross-platform library for windows manipulation? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there a library which has equivalents for WinAPI FindWindow,EnumWindows, WindowFromPoint, ChildWindowFromPoint, GetWindowRect, GetWindowText, EnumDisplayMonitors etc. supported on each platform: Windows, X11, OS X, ... ?
There are XGetWindowProperty , XFetchName, etc. functions on Linux, NSWindowList, CGSGetWindowProperty(), etc. on Mac. I just want a wrapper library like an abstraction layer for these functions, so I can use the same code on all platforms.
Those functions are windows platform specific only. You can't use them on other operating systems as they use libraries and dll files which run on Windows based systems only. However if you want to make cross platform apps using c/c++, you should consider API's like qt or gtk.
They have functions which will run on most platforms without any changes.

Is there any cross-platform GUI library for C++ (with platform dependent UI and scripting based layout)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Generally I seak for ASL analogs for not only Windows and Mac OS X but once that would work on Linux. Qt GUI is not an option for me. Some simple scripting language that does not require precompilation for GUI to work (like in ASL Adam and Eve even XML would do=)
What I need from such a library - possibility to position some subset of OS default UI controls, somehow make the C++ functions I want avaliable to UI. I need that library to be open source, and have same API for all platforms.
You could try wxWidgets, but to be honest, if Qt doesn't do it for you, I don't know why wxWidgets would be any better. You can do layout for the GUI with text files, and they aren't precompiled into C++ code (though I don't know why that's a plus).

Recommend fast C++ UI library with small memory footprint [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to write an app that reacts for global shortcuts and accepts commands (the way launchy does).
I'm trying to minimize the time between pressing the shortcut and the moment the window appears on the screen and is fully operational.
Can you suggest a good UI library (with some argumentation) that could be helpful?
I looked into QT and wxWidget but I'm afraid the app will get heavy (in memory / processing speed way) - and all I need is a small window that doesn't even need to be pretty.
.. or should I just go with native Windows libraries? (the main target is my Windows 7 machine)
Fast? Small? Windows-only? Sounds like you want WTL.
Caveat: You'll need to use VC++.
Also, I recommend grabbing the source straight out of SVN, as a new release hasn't been packaged in quite some time despite the fact that the project gets updated with some regularity.
I recommend FLTK!! www.fltk.org
Win32++ no mfc required neither ATL.
If you already know the winapi this is definitely for you. If not it helps a lot.
http://sourceforge.net/projects/win32-framework/
http://www.codeproject.com/KB/winsdk/framework.aspx
If you want the smallest memory footprint and are using windows just directly call the winforms routines provided by windows. This eliminates all the code in all these third party libraries. It's smaller and will be faster.

Windows Named Pipe Support in Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm looking at a project which will require inter-process communication between a legacy Windows application using named pipes, and a new service running on a Linux server. The windows application cannot be changed. Does anyone know if there is a Linux library available that supports Windows named pipes? Or even better, can anyone recommend a library they have used for this purpose?
Windows and Linux named pipes are different animals. If an interop solution exists you are going to be one of a very small population of users.
You might be better off writing a proxy on the Windows side to map between Named Pipe and socket, and connecting this to a socket on the Linux end. This provides you a useful networked interface on the Linux side going forward, and removes what might be a world of Named Pipes interop hurt from the picture.
If I was doing this I would try to produce a simple passthrough proxy in C# (managed code) as a proof of concept. Can always convert to native code (Win32/C++) if throughput does not measure up. There is some sample C# code here that might be a useful reference.
Here is background on the nuances of Windows vs Linux named pipes.
I bet Samba/Winbind contains highly relevant code. Not sure how reusable it is, though.

NetUIHWND and DirectUIHWND [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Using Spy++ tool, it seems that some Microsoft apps use NetUIHWND and DirectUIHWND window classes; e.g.: Word 2010's ribbon seems to be a NetUIHWND, instead Windows Live Messenger window seems to be a DirectUIHWND.
These window classes seem to host kind of cool graphics (with shadows, gradients, etc.); is it possible to use these window classes in our own Win32 C++ apps? Is there any documentation about them?
Yes, it has been around for a while already. But it gets especially a lots of usage in Windows7. Unfortunately, they keep this one to themselves, it is undocumented. You can try to reverse-engineer it, use a ListView as a guide to what it might do. But your code will almost certainly break in the next version of Windows. Which I think was the point of not documenting it, they need something they don't have to keep backwards compatible to be able to improve the look-and-feel of the operating system.
NetUIHWND and DirectUIHWND are the Win32 class types for different GUI toolsets.
From Win32 perspective they are a self drawn panel.
So you wouldn't use these classes directly, you would use the other GUI toolsets to build the UI.
Not sure about the Messenger UI, but you can use the ribbon control in your own apps.
On WTL: https://www.codeproject.com/Articles/54116/Relook-your-Old-and-New-Native-Applications-with-a
On MFC: https://learn.microsoft.com/en-us/cpp/mfc/reference/cmfcribbonbar-class
Use the Microsoft Active Accessibility API:
There is no need to reverse engineer this thing, you can enumerate this class structure using the Microsoft Active Accessibility API.