event-driven api

Forum thread started by admin on Mon, 2004-08-02 19:21

Hi all,

Can someone explain to me how the BeOS/Haiku event-driven GUI works, as in - how does it listen for mouse input?

Thanks! :)

Edit: Reworded...

Specifically, I am hoping to find prototype code for the API that listens for mouse events.

Comments

event-driven api

BMessages are used to communicate between the various classes BViews and BWindows of your app (and with the system components) ...

so as an example for a BButton, when you create a BButton you assign it a unique BMessage.

The function MessageReceived is then used to check (using a switch statement) what to do.

Mouse info comes from the InputServer or the AppServer.