MGL_wmCaptureEvents

Captures events and redirects them to specific window.

Declaration

void MGLAPI MGL_wmCaptureEvents(
    window_t *wnd,
    ulong mask,
    int id)

Prototype In

mgraph.h

Parameters

wnd

window

mask

mask of events to capture (for event_t.what)

id

arbitrary user-specified ID of the capture entry (used when removing the entry with MGL_wmUncaptureEvents)

 

Description

It is sometimes useful to redirect certain kinds of events to a particular window instead of to the one under mouse pointer (e.g. you may want to send all keyboard events to the window that has focus in a program with Windows feel). This function allows you to redirect all events whose mask matches event_t.what of the event (i.e. event_t.what & mask != 0) to the wnd window.

You may capture events several times, to the same window or to different ones. Capture entries behave like stack: the ones that were added later take precedence over earlier registered ones.

The ID is used to uniquely identify the entry when removing it and you must ensure they are unique among all captures that are active at the same time.

See Also

MGL_wmProcessEvent, MGL_wmPushWindowEventHandler, MGL_wmPopWindowEventHandler, MGL_wmRemoveWindowEventHandler, MGL_wmPushGlobalEventHandler, MGL_wmPopGlobalEventHandler, MGL_wmRemoveGlobalEventHandler, MGL_wmUncaptureEvents

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com