0% found this document useful (0 votes)
7 views3 pages

Sunghoahn 2006

Uploaded by

Hussein El-Shamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Sunghoahn 2006

Uploaded by

Hussein El-Shamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Implementation of Lightweight Graphic Library

Builder for Embedded System


SungHo Ahn*, DongMyung Sul*, SeungHan Choi*, KyungHee Lee*
*Embedded S/W Research Division, ETRI, Daejeon, Republic of Korea
ahnsh ?etri.re.kr

Abstract - In this paper, we just glance at the Qt and GTK, Qt is the graphic library that is developed by Trolltech. Qt is
which are representatives of graphic library for embedded linux composed of widget sets based on K Desktop Environment
system. And we also show what is the GTK+ in developing the (KDE) project. Any application used Qt is executed on any
software for the embedded system and its features and processor, if it is just re-compiled on that. That means Qt
components. We describe the implementation of the lightweight support the multi platform GUI. And it also support the not
GTK builder, which generates the proper graphic library to any
special embedded linux system and also analyzes any GTK
application's graphic library.
ol hD bu t3grpicnan interntonalizationa etc.
Qt has the concept of signal slot for communication between
each objects.
Keywords -Lightweight, Qt, GTK+, Embedded System By the way, Qt/Embedded is the customized graphic library,
which is proper to the embedded system. Qt/Embedded also
support the multiplatform GUI as like Qt. In other words, if it
provided the C++ compiler and used the embedded linux, then
1. Introduction it could be loaded on various platform such as X86, MIPS,
ARM, StrongARM, Motorola 68k and PowerPC.
Embedded software is very dependent to hardware of Continuously, it is developed for supporting QNX and/or
products because each product needs each feature different WinCE.
between them in view of its specification. Furthermore, even
though software proper to the special CPU is developed it
can't be supported to the other embedded system. So we need I
the embedded software developing technology, which should
be independent to the various hardware features and be fast in
developing the suitable embedded software.
Considering the point of view of developer, lastly used
software is the graphic library. So traditionally, there are
existed graphic libraries that are already fitted to the special
embedded system, or from the first time, developed to be
proper to the special system. In other words, today according
to the embedded system, the graphic library is variously
developed.
In general desktop linux system, so much used graphic
libraries are QT and GTK+, what can be also used in Figure 1. Structure of Qt/Xii and Qt/Embedded
embedded linux system because the embedded linux system is
core of general desktop linux system. QT developed by Figure 1 show the comparison of structure of Qt/X1 1 and
Trolltech is not free, i.e. we have to pay the license fee for Qt/Embedded. Qt/Embedded has more compacted its own
using QT, the other hand GTK+ is free, i.e. there is no license window system than Qt/X1 1 has one. Also Qt/Embedded can
fee about GTK+, which is supported by Open Source Group. execute the application just to access directly to the frame
This paper, according to the above, describes the generating buffer of kernel.
technology of proper graphic library for the embedded system,
and simultaneously should be independent to the embedded
system. Specially, in this paper, we deal with the GTK+ 2.0 2.2 GTK+
graphic library also in view of lightening graphic library.
GTK± was originated from some widgets set, that is a
2. GraphicLibrary
2. Graph1c
L1brary toolkit for
~Program x window based GNU Image Manipulation
(GIMP). GTK± is a multiplatform graphic library to
support the linux system, windows, BeOS, etc. and to support
2.1 Qt a range of languages, C/C++ but Perl, Python. And GTK+ is
free software and part of the GNU Project. However, the

ISBN 89-5519-129-4 - 166 - Feb. 20-22, 2006 ICA0T2006


licensing terms for GTK+, the GNU Legacy General Public used with such tools as screen readers, magnifiers, and
License (LGPL), allow it to be used by all developers, alternative input devices.
including those developing proprietary software, without any
license fees or royalties. 2.2.6 Pango
GTK+ 2.0 is providing richer widget sets than GTK 1.2 and Pango is a library for layout and rendering of text, with an
improving the existing widget set as like integration of emphasis on internationalization. It forms the core of text and
gdk-pixbuf. Also Pango is a library for layout and rendering of font handling for GTK+2.0.
text, with an emphasis on internationalization. It forms the
core of text and font handling for GTK+ 2.0.
2.3 Scope
GTK+ 2.0
GTK L T

Glib ATK PMango

Figure 2. GTK+ 2.0 Structure

Figure 2 shows the structure of GTK± 2.0. GTK+ is


L:J
composed of the various graphic libraries which are Glib,

supportdmultipleawindowing systems.DThisdlibrary.also

GdK-
2.2.1 isa t abstractimala library whaiallows
GTk±Pxu GstK
cato
ixel
GTK±~ ~ ~ ~ ~ ~ ~~~~~~~~~~~
widets cotan~Fgr
itselfch
thadiseGUlibar

use this library in combination with Gtklmage to display are dealing with. In other words, to reduce the GTK± widget
images. set, we can get the lightweight GTK library. And that is proper
to the applications of embedded system. Because mostly GTK
2.2.4 Glib widget set has lower dependency than other library as like Glib
Glib is the low-level core library, which forms the basis of ATK, Pango. So in this paper, we just focus on the GTK+
GTK+ and GNU Network Object Model Environ,ent widget.
(GNOME). It provides data structure handling for C, Furthermore, it is easily extended to the higher version of
portability wrappers, and interfaces for such runtime GTK±, above the 2.0, even though there is no compliant
functionality as an event loop, threads, dynamic loading, and between GTK± 2.0 and 1.2.
an object system.
2.2.5 ATK
ATK library provides a set of interfaces for accessibility. By 3. Lightweight GTK Builder
supporting the ATK interfaces, an application or toolkit can be
3.1 Structure

ISBN 89-5519-129-4 - 167f- Feb. 20-22, 2006 ICA0T2006


df GTKO

*>^1 rs<f pt~ ~ ~ ight\we GTK9


LihtwldhtKLgteg G1 Aiat
LirrMMnb/aaye
~~~~~~~~~~~~GTK+

Widget Set (GTK+)

Figure 4. Structure of Lightweight GTK Builder

Figure 4 is structure of lightweight GTK builder and GTK+


structure. That is composed of the GTK+ information database
and lightweight GTK generating part. So we can easily get the
lightweight GTK library, which is proper to the embedded
system. This GTK builder has three main modules that are
analyzer, composer and generator. Analyzer has the function
has the

of analyzing GTK application. Composer ha the function of


composing the GTK widgets according to the GTK
functio

information from database. Finally, generator has the function


of compiling and linking the composed widgets set and
eventually generates the customized lightweight GTK library.
3. 1.1 Analysis Module

Analyzer gets the applications of GTK and /or GTK library


as input value. So in this module, we can know the GTK
widget set of applications and their dependency. Of course, the
analyzing process is done automatically, if we just chose the
applications on the lightweight GTK builder. Also manually
we choose the widget components. Finally, that information is
saved as info-file.
3.1.2 Compose Module
In this module,according to theanalyzedinfo-file,
GTK widget set will be gathered from original GTK widget set
So we can see the information of each widget as like widget
size, definition, and total size. They are all shown on
1
W

Widget
***and Nube
Total
*
Size
SI
bet Order)

Figure 5 shows the screen shot of lightweight GTK builder.


As like upper-side figure, we can analyze the GTK application
with lightweight GTK builder. That is, this builder open and
read any GTK application and extract the informations of
GTK library and save the file. And we will see the list of
widget set through the build configuration window. In this
time, we can manually also select and/or discard the widget set.
In this lower figure, left-side window describe the each size of
GTK widgets and these are also sorted alphabet order and also
show the total size and number of widgets. Centered window
show the hierarchy of widget set visually as like tree-structure.
Right-side window describe the technical information of
selected widget and its definition and usage. Bottom window
show the processing of linking and compiling of widget set. Of
Widget
Descito

(Tree Structure)

Lightweight
Generation Proocedure

Figure 5. Screen Shot of Lite GTK Builder

lightweight GTK builder window. couse, we can easily update the GTK info-file according to the
3.1.3 Generation Module GTK version-up.

Finally, this module generates the lightweight GTK library. 4. Conclusion


In this time, this module refers the info-file of selected widget In
sets and compile/link information. And also its history is saved. I this paper we describe the generating system of
We can see the procedure of GTK widget linking through the lightweight graphic library for embedded linux system. With
GTK builder's bottom window. this product, developer can easily not only implement the
customized graphic library but also analyze the some
application of GTK. Furthermore, we will deal with the GTK+
3.2 Screen shot itselfbut also external library of GTK+ for lightweight graphic
library.

REFERENCES

[1] GTK±, The GIMP Toolkit, http://www.gtk.org


[2] QT, http://www.trolltech.com
[3] GNU, http://www.gnu.org

ISBN 89-5519-129-4 - 168 - Feb. 20-22, 2006 ICA0T2006

You might also like