Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2421

qtjambi-doc-4.3.3-3mdv2008.1.i586.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">
<!-- /home/gvatteka/dev/qt-4.3/doc/src/emb-porting.qdoc -->
<head>
  <title>Porting Qtopia Core to a New Architecture</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1 align="center">Porting Qtopia Core to a New Architecture<br /><small></small></h1>
<p>When porting Qtopia Core</tt> to a new architecture there are several issues to be aware of: You must provide suitable hardware drivers, and you must ensure to implement platform dependent atomic operations to enable multithreading on the new architecture.</p>
<a name="hardware-drivers"></a>
<h2>Hardware Drivers</h2>
<p>When running a Qtopia Core</tt> application, it either runs as a server or connects to an existing server. All system generated events, including keyboard and mouse events, are passed to the server application which then propagates the event to the appropiate client. When rendering, the default behavior is for each client to render its widgets into memory while the server is responsible for putting the contents of the memory onto the screen.</p>
<p>The various hardware drivers are loaded by the server application when it starts running, using Qt's <a href="plugins-howto.html">plugin system</tt></a>.</p>
<p>Derive from the QWSMouseHandler, QWSKeyboardHandler and QScreen classes to create a custom mouse, keyboard and screen driver respectively. To load the drivers into the server application at runtime, you must also create corresponding plugins. See the following documentation for more details:</p>
<ul>
<li><a href="qtopiacore-pointer.html">Pointer Handling</tt></a></li>
<li><a href="qtopiacore-charinput.html">Character Input</tt></a></li>
<li><a href="qtopiacore-displaymanagement.html">Display Management</tt></a></li>
</ul>
<a name="atomic-operations"></a>
<h2>Atomic Operations</h2>
<p>Using Qt/Embedded, Linux was always supported as long as you had a compiler for the architecture. Starting with Qt 4.0 and Qtopia Core</tt>, Qt uses an optimization called implicit sharing</tt> for many of its value classes; implicitly shared classes can safely be copied across threads. This technology is implemented using atomic operations.i&#x2e;e&#x2e;, Qtopia Core</tt> requires that platform-specific atomic operations are implemented to support Linux.</p>
<p>When porting Qtopia Core</tt> to a new architecture, it is important to ensure that the platform-specific atomic operations are implemented in a corresponding header file, and that this file is located in Qt's <tt>src/corelib/arch</tt> directory.</p>
<p>See the <a href="atomic-operations.html">atomic operations</tt></a> documentation for more details.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2007 <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 Jambi </div></td>
</tr></table></div></address></body>
</html>