File: z4.html

package info (click to toggle)
ebook-dev-ggad 199908-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,264 kB
  • ctags: 1,163
  • sloc: sh: 44; makefile: 35
file content (477 lines) | stat: -rw-r--r-- 19,579 bytes parent folder | download | duplicates (2)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>
      The Gnome Development Framework
    </title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.45">
    <link rel="HOME" title="GTK+ / Gnome Application Development"
    href="ggad.html">
    <link rel="UP" title="Introduction" href="z2.html">
    <link rel="PREVIOUS" title="Introduction" href="z2.html">
    <link rel="NEXT" title="Structure of the Book" href="z22.html">
  </head>
  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink= 
  "#840084" alink="#0000FF">
    <div class="NAVHEADER">
      <table width="100%" border="0" bgcolor="#ffffff" cellpadding= 
      "1" cellspacing="0">
        <tr>
          <th colspan="4" align="center">
            <font color="#000000" size="2">GTK+ / Gnome Application
            Development</font>
          </th>
        </tr>
        <tr>
          <td width="25%" bgcolor="#ffffff" align="left">
            <a href="z2.html"><font color="#0000ff" size="2"><b>
            &lt;&lt;&lt; Previous</b></font></a>
          </td>
          <td width="25%" colspan="2" bgcolor="#ffffff" align= 
          "center">
            <font color="#0000ff" size="2"><b><a href="ggad.html">
            <font color="#0000ff" size="2"><b>
            Home</b></font></a></b></font>
          </td>
          <td width="25%" bgcolor="#ffffff" align="right">
            <a href="z22.html"><font color="#0000ff" size="2"><b>
            Next &gt;&gt;&gt;</b></font></a>
          </td>
        </tr>
      </table>
    </div>
    <div class="SECT1">
      <h1 class="SECT1">
        <a name="Z4">The Gnome Development Framework</a>
      </h1>
      <p>
        Gnome's application development framework centers around a
        suite of libraries, all written in portable ANSI C and
        intended to be used on UNIX-like systems. Libraries which
        involve graphics realy on the X Window System. Wrappers are
        available which export the Gnome API to nearly any language
        you can think of, including Ada, Scheme, Python, Perl, Tom,
        Eiffel, Dylan, and Objective C. There are at least three
        different C++ wrappers as well.
      </p>
      <p>
        This book will cover the C interface to the libraries;
        however, it should be useful for users of any language
        binding, since the mapping from C to your preferred
        language is typically straightforward. The book covers
        version 1.0 of the Gnome libraries (including the
        compatible bug fix releases, such as 1.0.9---all 1.0.x
        versions are compatible).
      </p>
      <div class="SECT2">
        <h2 class="SECT2">
          <a name="Z5">Non-Gnome Libraries</a>
        </h2>
        <p>
          Taking full advantage of the free software tradition,
          Gnome didn't start from scratch. It uses several
          libraries which are maintained separately from the Gnome
          project. These are a part of the Gnome application
          development framework, and you can count on their
          presence in a Gnome environment.
        </p>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z6">glib</a>
          </h3>
          <p>
            glib is the base of the Gnome infrastructure. It's a C
            utility library, providing routines to create and
            manipulate common data structures. It also addresses
            portability issues; for example, many systems lack the
            <tt class="FUNCTION">snprintf()</tt> function, but glib
            contains an implementation called <tt class="FUNCTION">
            g_snprintf()</tt> which is both guaranteed to exist on
            all platforms and slightly safer than <tt class= 
            "FUNCTION">snprintf()</tt> (it always <span class= 
            "STRUCTNAME">NULL</span>-terminates the target buffer).
          </p>
          <p>
            Gnome 1.0 uses glib version 1.2 and works with any glib
            in the 1.2 series (1.2.1, 1.2.2, etc.). All glib
            versions beginning with 1.2 are compatible bug-fix
            releases.
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z7">GTK+</a>
          </h3>
          <p>
            GTK+, or the Gimp Tool Kit, is the GUI toolkit used in
            Gnome applications. GTK+ was originally written for the
            Gimp (GNU Image Manipulation Program --- <a href= 
            "http://www.gimp.org" target="_top">
            http://www.gimp.org</a>), but has become a
            general-purpose library. GTK+ depends on glib.
          </p>
          <p>
            The GTK+ package includes GDK, the Gimp Drawing Kit,
            which is a simplification and abstraction of the
            low-level X Window System libraries. Since GTK+ uses
            GDK rather than calling X directly, a port of GDK
            permits GTK+ to run on windowing systems other than X
            with relatively few modifications. GTK+ and the Gimp
            have already been ported to the Win32 platform in this
            way.
          </p>
          <p>
            GTK+ provides several features for Gnome applications:
          </p>
          <ul>
            <li>
              <p>
                A dynamic type system.
              </p>
            </li>
            <li>
              <p>
                An object system written in C, complete with
                inheritance, type checking, and a signal/callback
                infrastructure. The type and object systems are not
                GUI-specific.
              </p>
            </li>
            <li>
              <p>
                A <tt class="CLASSNAME">GtkWidget</tt> object
                written using the object system, which defines the
                interface GTK+'s graphical components implement.
              </p>
            </li>
            <li>
              <p>
                A large collection of useful <tt class="CLASSNAME">
                GtkWidget</tt> subclasses (<i class=
                "FIRSTTERM">widgets</i>); this collection forms the
                bulk of GTK+'s code.
              </p>
            </li>
          </ul>
          <p>
            Gnome adds a number of additional widgets to the basic
            GTK+ collection.
          </p>
          <p>
            Gnome 1.0 is based on GTK+ version 1.2. All GTK+
            versions beginning with 1.2 are compatible bug-fix
            releases; 1.2.1, for example.
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z8">ORBit</a>
          </h3>
          <p>
            ORBit is a CORBA 2.2 ORB written in C. It was designed
            to be small and fast compared to other ORBs, and
            supports the C language mapping. ORBit is implemented
            as a suite of libraries.
          </p>
          <p>
            <i class="FIRSTTERM">CORBA</i>, or Common Object
            Request Broker Architecture, is a specification for
            Object Request Brokers, or <i class="FIRSTTERM">
            ORB</i>s. An ORB is much like a dynamic linker, but it
            works with objects, rather than subroutines. At
            runtime, a program can request the services of a
            particular object; the ORB locates the object and
            creates a connection between it and the program. For
            example, an email program might request an
            ``addressbook'' object, and use it to look up a
            person's name. Unlike dynamic linking, CORBA works fine
            across a network, and even allows different programming
            languages and operating systems to interact with one
            another. If you're familiar with DCOM on the Windows
            operating system, CORBA is analagous.
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z9">Imlib</a>
          </h3>
          <p>
            Imlib ("Image Library") provides routines for loading,
            saving, displaying, and scaling images in a variety of
            popular formats (including GIF, JPEG, PNG, and TIFF).
            It comes in two versions; an Xlib-only version, and a
            GDK-based version. Gnome uses the GDK version.
          </p>
        </div>
      </div>
      <div class="SECT2">
        <h2 class="SECT2">
          <a name="Z10">Gnome Libraries</a>
        </h2>
        <p>
          The libraries in this section are a part of the <tt
          class="APPLICATION">gnome-libs</tt> package and were
          developed specifically for the Gnome Project.
        </p>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z11"><tt class="APPLICATION">libgnome</tt></a>
          </h3>
          <p>
            <tt class="APPLICATION">libgnome</tt> is a collection
            of non-GUI-related routines for use by Gnome
            applications. It includes code to parse configuration
            files, for example. It also includes interfaces to some
            external facilities, such as internationalization (via
            the GNU <tt class="APPLICATION">gettext</tt> package),
            argument parsing (via the <tt class="APPLICATION">
            popt</tt> package), and sound (via the Enlightenment
            Sound Daemon, <tt class="APPLICATION">esound</tt>). The
            <tt class="APPLICATION">gnome-libs</tt> package takes
            care of interacting with these external libraries, so
            the programmer does not need to concern herself with
            their implementation or availability.
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z12"><tt class="APPLICATION">
            libgnomeui</tt></a>
          </h3>
          <p>
            <tt class="APPLICATION">libgnomeui</tt> collects
            GUI-related Gnome code. It consists primarily of
            widgets designed to enhance and extend GTK+. Gnome
            widgets generally impose user interface policy, which
            permits a more convenient API (since there is less for
            the programmer to specify). It also results in
            applications with more consistent interfaces, of
            course.
          </p>
          <p>
            Highlights of <tt class="APPLICATION">libgnomeui</tt>
            include:
          </p>
          <ul>
            <li>
              <p>
                The <tt class="CLASSNAME">GnomeApp</tt> widget,
                which makes it easy to create a nice main window
                for your application. It uses another widget called
                <tt class="CLASSNAME">GnomeDock</tt> which enables
                users to rearrange and "undock" toolbars.
              </p>
            </li>
            <li>
              <p>
                The <tt class="CLASSNAME">GnomeCanvas</tt> widget
                which makes it easy to write intricate,
                flicker-free custom displays.
              </p>
            </li>
            <li>
              <p>
                The Gnome stock pixmaps (icons for open, close,
                save, and other operations).
              </p>
            </li>
            <li>
              <p>
                Convenient routines for creating and using dialogs.
              </p>
            </li>
            <li>
              <p>
                The <tt class="CLASSNAME">GnomePixmap</tt> widget
                which is more versatile than <tt class="CLASSNAME">
                GtkPixmap</tt>.
              </p>
            </li>
          </ul>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z13"><tt class="APPLICATION">
            libgnorba</tt></a>
          </h3>
          <p>
            <tt class="APPLICATION">libgnorba</tt> provides
            CORBA-related facilities, including a security
            mechanism and object activation. (Object activation is
            the process of obtaining a reference to an object that
            implements a given interface; it can involve executing
            a server program, loading a shared library module, or
            asking an existing program for a new object instance.)
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z14"><tt class="APPLICATION">libzvt</tt></a>
          </h3>
          <p>
            This small library contains a terminal widget (<tt
            class="CLASSNAME">ZvtTerm</tt>) you can use in your
            Gnome programs.
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z15"><tt class="APPLICATION">
            libart_lgpl</tt></a>
          </h3>
          <p>
            This library contains graphics rendering routines by
            Raph Levien. The routines included here are released
            under the GNU Library General Public License and used
            in the <tt class="CLASSNAME">GnomeCanvas</tt> widget;
            Raph Levien also sells an enhanced proprietary version.
            <tt class="APPLICATION">libart_lgpl</tt> provides
            antialiasing, microtile refresh regions, and other
            magic. In essence it is a vector graphics rasterization
            library, functionally analogous to the PostScript
            language.
          </p>
        </div>
      </div>
      <div class="SECT2">
        <h2 class="SECT2">
          <a name="Z16">Other Libraries</a>
        </h2>
        <p>
          These libraries are commonly used in Gnome applications,
          but are not a part of <tt class="APPLICATION">
          gnome-libs</tt> proper.
        </p>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z17"><tt class="APPLICATION">
            gnome-print</tt></a>
          </h3>
          <p>
            <tt class="APPLICATION">gnome-print</tt> is still
            somewhat experimental, but very promising. It uses <tt
            class="APPLICATION">libart_lgpl</tt> and works nicely
            with <tt class="CLASSNAME">GnomeCanvas</tt>. It
            provides virtual output devices (called "print
            contexts"), so a single codebase can output to a print
            preview widget, to PostScript, and eventually to other
            printer formats. <tt class="APPLICATION">
            gnome-print</tt> also includes printing-related GUI
            elements, like a print setup dialog, and a virtual font
            interface (to deal with the problem that X fonts are
            not printable).
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z18"><tt class="APPLICATION">
            gnome-xml</tt></a>
          </h3>
          <p>
            <tt class="APPLICATION">gnome-xml</tt> is a
            non-validating XML engine written by Daniel Veillard of
            the World Wide Web Consortium. It can parse XML into a
            tree structure, and output a tree structure as XML.
            It's useful for any application that needs to load and
            save structured data; many Gnome applications use it as
            a file format. This library does not depend on any of
            the others, not even glib --- so it is tied to Gnome in
            name only. However, you can expect most Gnome users to
            have it installed, so it should not inconvenience your
            users if your application uses this library.
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z19">Guile</a>
          </h3>
          <p>
            Guile is an implementation of the Scheme programming
            language in a library, so that any application can have
            an embedded Scheme interpreter. It is the official
            extension language of the GNU Project, and is used by
            several Gnome applications. Adding an extension
            language to your application might sound complex, but
            Guile makes it almost trivial. (Several Gnome
            applications support Perl and Python as well; it is
            usually easy to support several languages once you
            implement the first. But Guile has a special place in
            the Gnome developer's hearts.)
          </p>
        </div>
        <div class="SECT3">
          <h3 class="SECT3">
            <a name="Z20">Bonobo</a>
          </h3>
          <p>
            At press time, the Gnome hackers were putting the
            finishing touches on Bonobo. Bonobo is a compound
            document architecture in the tradition of Microsoft's
            OLE; it allows you to embed charts in spreadsheets, for
            example. It will be used pervasively throughout Gnome;
            any application will be able to display MIME-typed data
            such as plain text, HTML, or images by asking the Gnome
            libraries for an appropriate Bonobo component. Look for
            Bonobo technology in the next major Gnome release.
          </p>
        </div>
      </div>
      <div class="SECT2">
        <h2 class="SECT2">
          <a name="Z21">A Word About Header Files</a>
        </h2>
        <p>
          Throughout the book, the exact header file which declares
          each function is given alongside the function prototype.
          This is to facilitate your exploration of the source
          code. However, you probably don't want to manually
          include the hundreds of headers found in GTK+ and Gnome.
          You can include all GTK+ headers <i class="EMPHASIS">en
          masse</i> by including the <tt class="FILENAME">
          gtk/gtk.h</tt> header file. <tt class="FILENAME">
          gtk/gtk.h</tt> also includes <tt class="FILENAME">
          gdk/gdk.h</tt> for you. You can include all Gnome headers
          by including <tt class="FILENAME">gnome.h</tt>; <tt
          class="FILENAME">gnome.h</tt> includes <tt class=
          "FILENAME">gtk/gtk.h</tt> for you. Most Gnome application
          files simply include <tt class="FILENAME">gnome.h</tt>.
        </p>
      </div>
    </div>
    <div class="NAVFOOTER">
      <br>
      <br>
      <table width="100%" border="0" bgcolor="#ffffff" cellpadding= 
      "1" cellspacing="0">
        <tr>
          <td width="25%" bgcolor="#ffffff" align="left">
            <a href="z2.html"><font color="#0000ff" size="2"><b>
            &lt;&lt;&lt; Previous</b></font></a>
          </td>
          <td width="25%" colspan="2" bgcolor="#ffffff" align= 
          "center">
            <font color="#0000ff" size="2"><b><a href="ggad.html">
            <font color="#0000ff" size="2"><b>
            Home</b></font></a></b></font>
          </td>
          <td width="25%" bgcolor="#ffffff" align="right">
            <a href="z22.html"><font color="#0000ff" size="2"><b>
            Next &gt;&gt;&gt;</b></font></a>
          </td>
        </tr>
        <tr>
          <td colspan="2" align="left">
            <font color="#000000" size="2"><b>
            Introduction</b></font>
          </td>
          <td colspan="2" align="right">
            <font color="#000000" size="2"><b>Structure of the
            Book</b></font>
          </td>
        </tr>
      </table>
    </div>
  </body>
</html>