<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: iutil/eventq.h Source File (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>iutil/eventq.h</h1><a href="eventq_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2001 by Eric Sunshine <sunshine@sunshineco.com></span> <a name="l00003"></a>00003 <span class="comment"> Copyright (C) 2000 by Andrew Zabolotny <bit@eltech.ru></span> <a name="l00004"></a>00004 <span class="comment"></span> <a name="l00005"></a>00005 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00006"></a>00006 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00007"></a>00007 <span class="comment"> License as published by the Free Software Foundation; either</span> <a name="l00008"></a>00008 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00011"></a>00011 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00012"></a>00012 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00013"></a>00013 <span class="comment"> Library General Public License for more details.</span> <a name="l00014"></a>00014 <span class="comment"></span> <a name="l00015"></a>00015 <span class="comment"> You should have received a copy of the GNU Library General Public</span> <a name="l00016"></a>00016 <span class="comment"> License along with this library; if not, write to the Free</span> <a name="l00017"></a>00017 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00018"></a>00018 <span class="comment">*/</span> <a name="l00019"></a>00019 <a name="l00020"></a>00020 <span class="preprocessor">#ifndef __CS_IUTIL_EVENTQ_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IUTIL_EVENTQ_H__</span> <a name="l00022"></a>00022 <span class="preprocessor"></span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="scf_8h.html" title="Crystal Space Shared Class Facility (SCF).">csutil/scf.h</a>"</span> <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="iutil_2eventnames_8h.html" title="General event name resolver interface.">iutil/eventnames.h</a>"</span> <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="iutil_2eventhandlers_8h.html" title="General event handler naming, name management, indexing, and instantiation interface...">iutil/eventhandlers.h</a>"</span> <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="keyword">struct </span><a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>; <a name="l00035"></a>00035 <span class="keyword">struct </span><a class="code" href="structiEventCord.html" title="The iEventCord is an interface provided by an event queue to any event handlers wanting...">iEventCord</a>; <a name="l00036"></a>00036 <span class="keyword">struct </span><a class="code" href="structiEventOutlet.html" title="The iEventOutlet is the interface to an object that is provided by an event queue...">iEventOutlet</a>; <a name="l00037"></a>00037 <span class="keyword">struct </span><a class="code" href="structiEventPlug.html" title="Event plug interface, also referred as &quot;event source&quot;.">iEventPlug</a>; <a name="l00038"></a>00038 <span class="keyword">struct </span><a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a>; <a name="l00039"></a>00039 <a name="l00040"></a>00040 <a name="l00056"></a><a class="code" href="structiEventQueue.html">00056</a> <span class="keyword">struct </span><a class="code" href="structiEventQueue.html" title="This interface represents a general event queue.">iEventQueue</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00057"></a>00057 { <a name="l00058"></a>00058 SCF_INTERFACE(<a class="code" href="structiEventQueue.html" title="This interface represents a general event queue.">iEventQueue</a>, 2,0,0); <a name="l00066"></a>00066 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#f577ff11e5a6c4b0891f13ddf451666a" title="Process the event queue.">Process</a> () = 0; <a name="l00067"></a>00067 <a name="l00074"></a>00074 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#975d0dccbb093805f1f0cbb6e4555b72" title="Dispatch a single event from the queue.">Dispatch</a> (<a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>&) = 0; <a name="l00075"></a>00075 <a name="l00081"></a>00081 <span class="keyword">virtual</span> <a class="code" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a> <a class="code" href="structiEventQueue.html#60116ec12210ce66f7aa65f9c5677321" title="Register a listener with the event scheduling subsystem.">RegisterListener</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *) = 0; <a name="l00088"></a>00088 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiEventQueue.html#d3e206126333538024bdd9587a7bd221" title="Subscribe an event listener to a given event subtree.">Subscribe</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> &ename) = 0; <a name="l00093"></a>00093 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiEventQueue.html#d3e206126333538024bdd9587a7bd221" title="Subscribe an event listener to a given event subtree.">Subscribe</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> ename[]) = 0; <a name="l00100"></a>00100 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#b876060e241bd117ebdad426ba0135c5" title="Unsubscribe an event listener from a particular event subtree.">Unsubscribe</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a>*, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a>[]) = 0; <a name="l00108"></a>00108 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#b876060e241bd117ebdad426ba0135c5" title="Unsubscribe an event listener from a particular event subtree.">Unsubscribe</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a>*, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> &) = 0; <a name="l00112"></a>00112 <span class="keyword">virtual</span> <a class="code" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a> <a class="code" href="structiEventQueue.html#60116ec12210ce66f7aa65f9c5677321" title="Register a listener with the event scheduling subsystem.">RegisterListener</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> &ename) = 0; <a name="l00116"></a>00116 <span class="keyword">virtual</span> <a class="code" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a> <a class="code" href="structiEventQueue.html#60116ec12210ce66f7aa65f9c5677321" title="Register a listener with the event scheduling subsystem.">RegisterListener</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> ename[]) = 0; <a name="l00122"></a>00122 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#8f519aa16cb1cb16a1d31dc5e4c6274a" title="Unregister a listener and drop all of its subscriptions.">RemoveListener</a> (<a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *) = 0; <a name="l00123"></a>00123 <a name="l00133"></a>00133 <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iEventOutlet></a> <a class="code" href="structiEventQueue.html#3d38841db6bf69ffd2324b7afb60a094" title="Register an event plug and return a new outlet.">CreateEventOutlet</a> (<a class="code" href="structiEventPlug.html" title="Event plug interface, also referred as &quot;event source&quot;.">iEventPlug</a>*) = 0; <a name="l00134"></a>00134 <a name="l00146"></a>00146 <span class="keyword">virtual</span> <a class="code" href="structiEventOutlet.html" title="The iEventOutlet is the interface to an object that is provided by an event queue...">iEventOutlet</a>* <a class="code" href="structiEventQueue.html#cfe5bac1771691f750834ef83687cc55" title="Get a public event outlet for posting just an event.">GetEventOutlet</a> () = 0; <a name="l00147"></a>00147 <a name="l00156"></a>00156 <span class="keyword">virtual</span> <a class="code" href="structiEventCord.html" title="The iEventCord is an interface provided by an event queue to any event handlers wanting...">iEventCord</a>* <a class="code" href="structiEventQueue.html#bf2d807805fd7946a1a8b116a8d6a522" title="Get the event cord for a given category and subcategory.">GetEventCord</a> (<span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> &name) = 0; <a name="l00157"></a>00157 <a name="l00162"></a>00162 <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iEvent></a> <a class="code" href="structiEventQueue.html#4205ef82fb3cdce7aa69ddaecf87c06d" title="Create an event, from the pool if there are any free events available.">CreateEvent</a> (<span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> &name) = 0; <a name="l00163"></a>00163 <a name="l00168"></a>00168 <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iEvent></a> <a class="code" href="structiEventQueue.html#9bb1643bd96d5a213d45cffd95c4e1c8" title="Create an event with the broadcast flag set.">CreateBroadcastEvent</a> (<span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> &name) = 0; <a name="l00169"></a>00169 <a name="l00179"></a>00179 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#ad3e8be23e919c3bccd2ea90f16bcd52" title="Place an event into queue.">Post</a> (<a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>*) = 0; <a name="l00180"></a>00180 <a name="l00187"></a>00187 <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iEvent></a> <a class="code" href="structiEventQueue.html#9aee3158b02f8a83b9ded3e05bf9c638" title="Get next event from queue; returns a null reference if no events are present.">Get</a> () = 0; <a name="l00188"></a>00188 <a name="l00190"></a>00190 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#128a32708ca9b2dcf62f2451c12e7f25" title="Clear event queue.">Clear</a> () = 0; <a name="l00191"></a>00191 <a name="l00193"></a>00193 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiEventQueue.html#58bda21afddedb84a55ec2066c8b2563" title="Query if queue is empty.">IsEmpty</a> () = 0; <a name="l00194"></a>00194 <a name="l00205"></a>00205 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiEventQueue.html#88aa9fc1d79547e551f28701a601b2c6" title="Unregister all listeners.">RemoveAllListeners</a> () = 0; <a name="l00206"></a>00206 <a name="l00207"></a>00207 }; <a name="l00208"></a>00208 <a name="l00211"></a>00211 <span class="preprocessor">#endif // __CS_IUTIL_EVENTQ_H__</span> </pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>