<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- /builddir/build/BUILD/libqxt-libqxt-v0.6.2/doc/src/qxtnativeeventfilter.qdoc --> <head> <title>QxtNativeEventFilter Class Reference</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://libqxt.org"><img src="images/qxt-logo.png" width="50" height="40" align="left" border="0" /></a></td> <td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a> · <a href="classes.html"><font color="#004faf">Classes</font></a> · <a href="namespaces.html"><font color="#004faf">Namespaces</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td> <td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QxtNativeEventFilter Class Reference<br /><span class="small-subtitle">[<a href="qxtgui.html">QxtGui</a> module]</span> </h1> <p>The QxtNativeEventFilter class provides a native event filter to access platform specific events. <a href="#details">More...</a></p> <pre> #include <QxtNativeEventFilter></pre><ul> <li><a href="qxtnativeeventfilter-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h3>Public Functions</h3> <ul> <li><div class="fn"></div>virtual <b><a href="qxtnativeeventfilter.html#dtor.QxtNativeEventFilter">~QxtNativeEventFilter</a></b> ()</li> <li><div class="fn"></div>virtual bool <b><a href="qxtnativeeventfilter.html#macEventFilter">macEventFilter</a></b> ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> )</li> <li><div class="fn"></div>virtual bool <b><a href="qxtnativeeventfilter.html#winEventFilter">winEventFilter</a></b> ( MSG * <i>msg</i>, long * <i>result</i> )</li> <li><div class="fn"></div>virtual bool <b><a href="qxtnativeeventfilter.html#x11EventFilter">x11EventFilter</a></b> ( XEvent * <i>event</i> )</li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The QxtNativeEventFilter class provides a native event filter to access platform specific events.</p> <p>QxtNativeEventFilter provides access to platform specific native events without the need of subclassing <a href="http://doc.qtsoftware.com/4.5/qapplication.html">QApplication</a>.</p> <p><b>Note:</b> QxtNativeEventFilter requires <a href="qxtapplication.html">QxtApplication</a>.</p> <p>Example usage:</p> <pre> qxtApp->installNativeEventFilter(myObject); class MyObject : public QxtNativeEventFilter { public: ... bool x11EventFilter(XEvent* event) { if (event->type == ...) { ... } return false; } bool winEventFilter(MSG* msg, long* result) { if (msg->message == ...) { ... } return false; } bool macEventFilter(EventHandlerCallRef caller, EventRef event) { if (GetEventClass(event) == ...) { ... } return false; } };</pre> <p>See also <a href="qxtapplication.html#installNativeEventFilter">QxtApplication::installNativeEventFilter</a>().</p> <hr /> <h2>Member Function Documentation</h2> <h3 class="fn"><a name="dtor.QxtNativeEventFilter"></a>QxtNativeEventFilter::~QxtNativeEventFilter () <tt> [virtual]</tt></h3> <p>Destructs the native event filter. The native event filter is automatically removed from the application.</p> <p>See also <a href="qxtapplication.html#removeNativeEventFilter">QxtApplication::removeNativeEventFilter</a>().</p> <h3 class="fn"><a name="macEventFilter"></a>bool QxtNativeEventFilter::macEventFilter ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> ) <tt> [virtual]</tt></h3> <p>Filters Mac events if this object has been installed as a native event filter. The events are passed in the <i>event</i> parameter with the <i>caller</i> parameter.</p> <p>In your reimplementation of this function, if you want to filter the event out, i.e. stop it being handled further, return <tt>true</tt>; otherwise return <tt>false</tt>.</p> <p>See also <a href="qxtapplication.html#installNativeEventFilter">QxtApplication::installNativeEventFilter</a>().</p> <h3 class="fn"><a name="winEventFilter"></a>bool QxtNativeEventFilter::winEventFilter ( MSG * <i>msg</i>, long * <i>result</i> ) <tt> [virtual]</tt></h3> <p>Filters Windows events if this object has been installed as a native event filter. The window messages are passed in the <i>msg</i> parameter and the return value of the window procedure can be set to the <i>result</i> parameter.</p> <p>In your reimplementation of this function, if you want to filter the event out, i.e. stop it being handled further, return <tt>true</tt>; otherwise return <tt>false</tt>.</p> <p>See also <a href="qxtapplication.html#installNativeEventFilter">QxtApplication::installNativeEventFilter</a>().</p> <h3 class="fn"><a name="x11EventFilter"></a>bool QxtNativeEventFilter::x11EventFilter ( XEvent * <i>event</i> ) <tt> [virtual]</tt></h3> <p>Filters X11 events if this object has been installed as a native event filter. The events are passed in the <i>event</i> parameter.</p> <p>In your reimplementation of this function, if you want to filter the event out, i.e. stop it being handled further, return <tt>true</tt>; otherwise return <tt>false</tt>.</p> <p>See also <a href="qxtapplication.html#installNativeEventFilter">QxtApplication::installNativeEventFilter</a>().</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td align="left">Copyright © 2007-2011 <a href="mailto:foundation@libqxt.org">Qxt Foundation</a></td> <td align="right"><div align="right"> <a href="http://libqxt.org">Qxt</a> 0.6.2</div></td> </tr></table></div></address></body> </html>