Window message procedures in Linux vs Windows

Posted by mizipzor on Stack Overflow See other posts from Stack Overflow or by mizipzor
Published on 2009-02-08T15:49:37Z Indexed on 2010/03/18 3:31 UTC
Read the original article Hit count: 340

In Windows when you create a window, you must define a (c++)

LRESULT CALLBACK message_proc(HWND Handle, UINT Message, WPARAM WParam, LPARAM LParam);

to handle all the messages sent from the OS to the window, like keypresses and such.

Im looking to do some reading on how the same system works in Linux. Maybe it is because I fall a bit short on the terminology but I fail to find anything on this through google (although Im sure there must be plenty!).

  • Is it still just one single C function that handles all the communication?
  • Does the function definition differ on different WMs (Gnome, KDE) or is it handled on a lower level in the OS?

Edit: Ive looked into tools like QT and WxWidgets, but those frameworks seems to be geared more towards developing GUI extensive applications. Im rather looking for a way to create a basic window (restrict resize, borders/decorations) for my OGL graphics and retrieve input on more than one platform. And according to my initial research, this kind of function is the only way to retrieve that input.

What would be the best route? Reading up, learning and then use QT or WxWidgets? Or learning how the systems work and implement those few basic features I want myself?

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows