Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 07-20-2018, 02:24 PM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default WDL/SWELL: SetWindowLong: Which messages do MacOS/Linux windows receive?

On Windows, SetWindowLongPtr with the GWLP_WNDPROC argument can set a new window procedure to receive (and block or pass through) window messages. These messages range from mouse events such as WM_MOUSEWHEEL and WM_LBUTTONDOWN to keyboard events WM_KEYDOWN and many others

WDL/SWELL offers the SetWindowLong function, with the note:
Code:
** GWL_WNDPROC is supported by SWELL created windows/dialogs/controls, using 
** (int)getSwellWindowProc and setSwellWindowProc:(int).
If SetWindowLong with GWL_WNDPROC is used on MacOS/Linux, which message types can the new window procedure expect to receive? Do they use the same codes as on Windows, and the same wParams and lParams?

I hope that the WDL/SWELL version will at the very least receive mouse and mousewheel events.
juliansader is offline   Reply With Quote
Old 07-20-2018, 03:55 PM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,737
Default

Quote:
Originally Posted by juliansader View Post
On Windows, SetWindowLongPtr with the GWLP_WNDPROC argument can set a new window procedure to receive (and block or pass through) window messages. These messages range from mouse events such as WM_MOUSEWHEEL and WM_LBUTTONDOWN to keyboard events WM_KEYDOWN and many others

WDL/SWELL offers the SetWindowLong function, with the note:
Code:
** GWL_WNDPROC is supported by SWELL created windows/dialogs/controls, using 
** (int)getSwellWindowProc and setSwellWindowProc:(int).
If SetWindowLong with GWL_WNDPROC is used on MacOS/Linux, which message types can the new window procedure expect to receive? Do they use the same codes as on Windows, and the same wParams and lParams?

I hope that the WDL/SWELL version will at the very least receive mouse and mousewheel events.
It's important to note that this is only for SWELL-created windows, not necessarily controls (that comment is a bit misleading, perhaps). So if the window was created with CreateDialog() etc. The messages the window procedure will receive will be similar to the original window procedure/dialog procedure of the window (WM_LBUTTONDOWN etc sure). The same codes as Windows are used, though it is a subset (and there are some slight differences in some of them).
Justin is offline   Reply With Quote
Old 07-21-2018, 07:51 AM   #3
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by Justin View Post
It's important to note that this is only for SWELL-created windows, not necessarily controls (that comment is a bit misleading, perhaps). So if the window was created with CreateDialog() etc.
On MacOS/Linux, are REAPER's own windows, script GUIs and child windows such as "trackview" and "midiview" created via SWELL?


Quote:
Originally Posted by Justin View Post
The messages the window procedure will receive will be similar to the original window procedure/dialog procedure of the window (WM_LBUTTONDOWN etc sure). The same codes as Windows are used, though it is a subset (and there are some slight differences in some of them).
Are the WM_ types that are listed in "swell-types.h" the ones that have been implemented?

Last edited by juliansader; 07-21-2018 at 05:22 PM.
juliansader is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.