<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>glibmm: Glib::SignalIO Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"> <ul> <li><a class="el" href="namespaceGlib.html">Glib</a> </li> <li><a class="el" href="classGlib_1_1SignalIO.html">SignalIO</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <h1>Glib::SignalIO Class Reference<br/> <small> [<a class="el" href="group__MainLoop.html">The Main Event Loop</a>]</small> </h1> </div> </div> <div class="contents"> <!-- doxytag: class="Glib::SignalIO" --> <p><code>#include <glibmm/main.h></code></p> <p><a href="classGlib_1_1SignalIO-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1connection.html">sigc::connection</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1SignalIO.html#ac205b21234d26094e75e0931c968c5d2">connect</a> (const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< bool, <a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> >& slot, int fd, <a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> condition, int priority=PRIORITY_DEFAULT)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Connects an I/O handler. <a href="#ac205b21234d26094e75e0931c968c5d2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1connection.html">sigc::connection</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1SignalIO.html#a779227bae6390b055243d1f3083a5388">connect</a> (const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< bool, <a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> >& slot, const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGlib_1_1IOChannel.html">IOChannel</a> >& channel, <a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> condition, int priority=PRIORITY_DEFAULT)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Connects an I/O channel. <a href="#a779227bae6390b055243d1f3083a5388"></a><br/></td></tr> </table> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ac205b21234d26094e75e0931c968c5d2"></a><!-- doxytag: member="Glib::SignalIO::connect" ref="ac205b21234d26094e75e0931c968c5d2" args="(const sigc::slot< bool, IOCondition > &slot, int fd, IOCondition condition, int priority=PRIORITY_DEFAULT)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1connection.html">sigc::connection</a> Glib::SignalIO::connect </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< bool, <a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> >& </td> <td class="paramname"> <em>slot</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>fd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> </td> <td class="paramname"> <em>condition</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>priority</em> = <code>PRIORITY_DEFAULT</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Connects an I/O handler. </p> <div class="fragment"><pre class="fragment"> <a class="code" href="group__MainLoop.html#gaf391654b755a32169d18be4835677376" title="Convenience I/O signal.">Glib::signal_io</a>().connect(<a class="codeRef" href="../../../libsigc++-2.0/reference/html/group__ptr__fun.html#gada8b678665c14dc85eb32d25b7299465">sigc::ptr_fun</a>(&io_handler), fd, <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918af244f3e8c1c9525762f3630befd76336">Glib::IO_IN</a> | <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918ab5dcc0e24c236c027b041d362dcff35b">Glib::IO_HUP</a>); </pre></div><p> is equivalent to: </p> <div class="fragment"><pre class="fragment"> <span class="keyword">const</span> <a class="code" href="classGlib_1_1RefPtr.html" title="RefPtr&lt;&gt; is a reference-counting shared smartpointer.">Glib::RefPtr<Glib::IOSource></a> io_source = <a class="code" href="classGlib_1_1Source.html#aeaffb039abf99982d7a89403bca71569">Glib::IOSource::create</a>(fd, <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918af244f3e8c1c9525762f3630befd76336">Glib::IO_IN</a> | <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918ab5dcc0e24c236c027b041d362dcff35b">Glib::IO_HUP</a>); io_source->connect(<a class="codeRef" href="../../../libsigc++-2.0/reference/html/group__ptr__fun.html#gada8b678665c14dc85eb32d25b7299465">sigc::ptr_fun</a>(&io_handler)); io_source->attach(<a class="code" href="classGlib_1_1MainContext.html#a1502cbed045a9fb27d18c6975e1d255d" title="Returns the default main context.">Glib::MainContext::get_default</a>()); </pre></div> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">slot</td><td>A slot to call when polling <em>fd</em> results in an event that matches <em>condition</em>. The event will be passed as a parameter to <em>slot</em>. If <em>io_handler</em> returns <code>false</code> the signal is disconnected. </td></tr> <tr><td class="paramname">fd</td><td>The file descriptor (or a <code>HANDLE</code> on Win32 systems) to watch. </td></tr> <tr><td class="paramname">condition</td><td>The conditions to watch for. </td></tr> <tr><td class="paramname">priority</td><td>The priority of the new event source. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A connection handle, which can be used to disconnect the handler. </dd></dl> </div> </div> <a class="anchor" id="a779227bae6390b055243d1f3083a5388"></a><!-- doxytag: member="Glib::SignalIO::connect" ref="a779227bae6390b055243d1f3083a5388" args="(const sigc::slot< bool, IOCondition > &slot, const Glib::RefPtr< IOChannel > &channel, IOCondition condition, int priority=PRIORITY_DEFAULT)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1connection.html">sigc::connection</a> Glib::SignalIO::connect </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< bool, <a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> >& </td> <td class="paramname"> <em>slot</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGlib_1_1IOChannel.html">IOChannel</a> >& </td> <td class="paramname"> <em>channel</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__MainLoop.html#gabd96381793b70d4ae32c725926990918">IOCondition</a> </td> <td class="paramname"> <em>condition</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>priority</em> = <code>PRIORITY_DEFAULT</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Connects an I/O channel. </p> <div class="fragment"><pre class="fragment"> <a class="code" href="group__MainLoop.html#gaf391654b755a32169d18be4835677376" title="Convenience I/O signal.">Glib::signal_io</a>().connect(<a class="codeRef" href="../../../libsigc++-2.0/reference/html/group__ptr__fun.html#gada8b678665c14dc85eb32d25b7299465">sigc::ptr_fun</a>(&io_handler), channel, <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918af244f3e8c1c9525762f3630befd76336">Glib::IO_IN</a> | <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918ab5dcc0e24c236c027b041d362dcff35b">Glib::IO_HUP</a>); </pre></div><p> is equivalent to: </p> <div class="fragment"><pre class="fragment"> <span class="keyword">const</span> <a class="code" href="classGlib_1_1RefPtr.html" title="RefPtr&lt;&gt; is a reference-counting shared smartpointer.">Glib::RefPtr<Glib::IOSource></a> io_source = <a class="code" href="classGlib_1_1Source.html#aeaffb039abf99982d7a89403bca71569">Glib::IOSource::create</a>(channel, <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918af244f3e8c1c9525762f3630befd76336">Glib::IO_IN</a> | <a class="code" href="group__MainLoop.html#ggabd96381793b70d4ae32c725926990918ab5dcc0e24c236c027b041d362dcff35b">Glib::IO_HUP</a>); io_source->connect(<a class="codeRef" href="../../../libsigc++-2.0/reference/html/group__ptr__fun.html#gada8b678665c14dc85eb32d25b7299465">sigc::ptr_fun</a>(&io_handler)); io_source->attach(<a class="code" href="classGlib_1_1MainContext.html#a1502cbed045a9fb27d18c6975e1d255d" title="Returns the default main context.">Glib::MainContext::get_default</a>()); </pre></div> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">slot</td><td>A slot to call when polling <em>channel</em> results in an event that matches <em>condition</em>. The event will be passed as a parameter to <em>slot</em>. If <em>io_handler</em> returns <code>false</code> the signal is disconnected. </td></tr> <tr><td class="paramname">channel</td><td>The <a class="el" href="classGlib_1_1IOChannel.html" title="IOChannel aims to provide portable I/O support for files, pipes and sockets, and to integrate them wi...">IOChannel</a> object to watch. </td></tr> <tr><td class="paramname">condition</td><td>The conditions to watch for. </td></tr> <tr><td class="paramname">priority</td><td>The priority of the new event source. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A connection handle, which can be used to disconnect the handler. </dd></dl> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Apr 5 2011 16:07:14 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address> </body> </html>