eventhandlers relationship to interrupthandlers

In which context could one state that interrupthandlers in a low-level language has its counterpart of event-handlers in a high-level language?

I need to know more about whats going on in the processor when a, for example, a button is clicked or the fingers touch the screen of a smartphone.

Upvotes: 0

Views: 23

Answers (1)

Joe Malin
Joe Malin

Reputation: 8641

I don't think there needs to be a one-to-one correspondence, and in fact there usually isn't one. An event handler gets notified of some event in the system. It could be from any number of sources, including software. I doubt that the CPU is involved when the orientation sensor detects that the phone's been rotated (though I don't know for sure).

When a user clicks a button image, the screen hardware sends coordinates to the system software. The SW in turn figures out the View that was clicked. If the View was clickable, it sends an onClick "event" to the app. Some part of the Android system is listening to the screen hardware or gets triggered by it, but I don't it's the CPU.

Upvotes: 1

Related Questions