File: qt-embedded-porting-operatingsystem.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (103 lines) | stat: -rw-r--r-- 6,415 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- emb-porting.qdoc -->
  <title>Qt 4.8: Porting Qt for Embedded Linux to Another Operating System</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li>Porting Qt for Embedded Linux to Another Operating System</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#shared-memory-and-semaphores">Shared Memory and Semaphores</a></li>
<li class="level1"><a href="#inter-application-communication">Inter-Application Communication</a></li>
<li class="level1"><a href="#screen-management">Screen Management</a></li>
<li class="level1"><a href="#sound-management">Sound Management</a></li>
<li class="level1"><a href="#event-dispatching">Event Dispatching</a></li>
</ul>
</div>
<h1 class="title">Porting Qt for Embedded Linux to Another Operating System</h1>
<span class="subtitle"></span>
<!-- $$$qt-embedded-porting-operatingsystem.html-description -->
<div class="descr"> <a name="details"></a>
<p><a href="qt-embedded-linux.html">Qt for Embedded Linux</a> is reasonably platform-independent, making use of the standard C library and some POSIX functions, but only a Linux implementation is publically available. If you are looking for a non-Linux commercial implementation, it is worth contacting <a href="mailto:qt-info@nokia.com">qt-info@nokia.com</a> to see if we can help.</p>
<p>There are several issues to be aware of if you plan to do your own port to another operating system. In particular you must resolve <a href="qt-embedded-linux.html">Qt for Embedded Linux</a>'s shared memory and semaphores (used to share window regions), and you must provide something similar to Unix-domain sockets for inter-application communication. You must also provide a screen driver, and if you want to implement sound you must provide your own sound server. Finally you must modify the event dispatcher used by <a href="qt-embedded-linux.html">Qt for Embedded Linux</a>.</p>
<p>Contents:</p>
<a name="shared-memory-and-semaphores"></a>
<h2>Shared Memory and Semaphores</h2>
<p><a href="qt-embedded-linux.html">Qt for Embedded Linux</a> uses System V IPC (shared memory and semaphores) to share window regions between client and server. When porting, something similar must be provided; otherwise it will not be possible to run multiple applications.</p>
<p>System V semaphores are also used for synchronizing access to the framebuffer.</p>
<ul>
<li>Modify <tt>qsharedmemory_p.cpp</tt></li>
<li>Modify <tt>qlock_qws.cpp</tt></li>
<li>Modify <tt>qwslock.cpp</tt></li>
</ul>
<a name="inter-application-communication"></a>
<h2>Inter-Application Communication</h2>
<p>To communicate between applications, <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> uses the Unix-domain sockets. When porting, something similar must be provided; otherwise it will not be possible to run multiple applications.</p>
<p>It should be possible to use message queues or similar mechanisms to achieve this. With the exception of QCOP messages, individual messages should be no more than a few bytes in length (QCOP messages are generated by the client applications and not Qt for Embedded Linux).</p>
<ul>
<li>Modify <tt>qwssocket_qws.cpp</tt></li>
</ul>
<a name="screen-management"></a>
<h2>Screen Management</h2>
<p>When rendering, the default behavior in <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> 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 using the screen driver.</p>
<p>When porting, a new screen driver must be implemented, providing a byte pointer to a memory-mapped framebuffer and information about width, height and bit depth (the latter information can most likely be hard-coded).</p>
<ul>
<li>Reimplement <tt>qscreen_qws.cpp</tt></li>
</ul>
<a name="sound-management"></a>
<h2>Sound Management</h2>
<p>To implement sound, <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> uses a Linux style device (<tt>/dev/dsp</tt>). If you want to use the <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> sound server on another platform you must reimplement it.</p>
<ul>
<li>Reimplement <tt>qsoundqss_qws.cpp</tt></li>
</ul>
<a name="event-dispatching"></a>
<h2>Event Dispatching</h2>
<p><a href="qt-embedded-linux.html">Qt for Embedded Linux</a> uses an event dispatcher to pass events to and from the <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> server application. Reimplement the <tt>select()</tt> function to enable <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> to dispatch events on your platform.</p>
<ul>
<li>Modify <tt>qeventdispatcher_qws.cpp</tt></li>
</ul>
</div>
<!-- @@@qt-embedded-porting-operatingsystem.html -->
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>