Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ac91357d6caede925de099a02fced14e > files > 4985

qt4-doc-4.2.1-1.el5_7.1.x86_64.rpm

<?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">
<!-- /tmp/qt-4.2.1-harald-1161357942206/qt-x11-opensource-src-4.2.1/doc/src/emb-porting.qdoc -->
<head>
  <title>Qt 4.2: Issues to be Aware of When Porting Qtopia Core</title>
  <link href="classic.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://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">Issues to be Aware of When Porting Qtopia Core<br /><small></small></h1>
<p>Qtopia Core is reasonably platform-independent, although the only publically available version is a Linux implementation. If you are looking for a non-Linux commercial implementation, it is worth contacting <a href="mailto:sales@trolltech.com">sales@trolltech.com</a> to see if we can help.</p>
<p>If you plan to do your own port to another operating system, the following dependencies will need to be addressed (files that you'll need to modify are listed at the end of each section):</p>
<ul>
<li><b>System V IPC</b> (shared memory and semaphores) is used to share window regions between client and server. You will need to provide something similar unless you want a single-application setup (i.e. running only one program, which is the server). System V semaphores are also used for synchronizing access to the framebuffer.<p>Modify <tt>qwindowsystem_qws.cpp</tt>, <tt>qwsregionmanager_qws.cpp</tt>, <tt>qapplication_qws.cpp</tt>, and <tt>qlock_qws.cpp</tt>.</p>
</li>
<li><b>Unix-domain sockets</b> are used to communicate things like keyboard events, requests to raise windows and QCOP messages between applications. Again, you will need to provide something similar unless you want a single-application setup. It should be possible to implement something like this using message queues or similar mechanisms; with the exception of QCOP messages (which are generated by client applications and not Qtopia Core) individual messages should be no more than a few bytes in length.<p>Modify <tt>qwssocket_qws.cpp</tt>.</p>
</li>
<li><b>The Linux framebuffer device</b> is used to map in the drawing area. You will need to replace it (by creating a new class of <a href="qscreen.html">QScreen</a>) with something else giving a byte pointer to a memory-mapped framebuffer, plus information about width, height and bit depth (which most likely you can simply hard-code). If your framebuffer is not memory-mapped or is in an unsupported format or depth you will need to modify QGfxRaster as well.<p>Modify <tt>qgfxlinuxfb_qws.cpp</tt>.</p>
</li>
<li><b>Sound</b> uses a Linux <tt>/dev/dsp</tt> style device. If you want to use the Qtopia Core sound server you'll need to reimplement it.<p>Modify <tt>qsoundqss_qws.cpp</tt>.</p>
</li>
<li><b>select()</b> is used to for events to/from the Qtopia Core server application.<p>Modify <tt>qeventdispatcher_qws.cpp</tt>.</p>
</li>
</ul>
<p>Qtopia Core makes use of the standard C library and some POSIX functions. Mostly the latter are concentrated in platform dependent code anyway (e.g. <tt>mmap()</tt> to map in the Linux framebuffer).</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2006 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.2.1</div></td>
</tr></table></div></address></body>
</html>