~ubuntu-branches/debian/sid/bijiben/sid

« back to all changes in this revision

Viewing changes to libgd/README

  • Committer: Package Import Robot
  • Author(s): Vincent Cheng
  • Date: 2013-03-26 21:19:36 UTC
  • Revision ID: package-import@ubuntu.com-20130326211936-tu8mpy82juohw8m2
Tags: upstream-3.8.0
ImportĀ upstreamĀ versionĀ 3.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=====
 
2
libgd
 
3
=====
 
4
 
 
5
Introduction
 
6
============
 
7
 
 
8
libgd is a library used by various GNOME 3 styled applications.
 
9
However, it is not a typical library, since it doesn't guarantee
 
10
API/ABI stability, nor does it has official releases tarballs. Only
 
11
the files actually used by your project will be shipped with its
 
12
tarball. Only the necessary dependencies will be checked during
 
13
configure time and used at runtime.
 
14
 
 
15
Each application can configure libgd depending on its needs and will
 
16
be able to either link dynamically (privately) or statically link with
 
17
a specific development version.
 
18
 
 
19
GObject Introspection based bindings generation such as Javascript or
 
20
Vala are also supported.
 
21
 
 
22
More Background
 
23
---------------
 
24
 
 
25
libgd originates from the GNOME Documents project (written by Cosimo
 
26
Cecchi), which was one of the first application to follow the novel
 
27
GNOME 3 application design.
 
28
 
 
29
Since other applications have similar needs, it makes sense to try to
 
30
reuse and improve the exisiting work. However, the design being not
 
31
frozen, and the code being not yet mattured enough and proven, it is
 
32
not possible for the developpers to guarantee API and propose the
 
33
addition to the respective projects (Gtk+, or GLib for example) right
 
34
now. Sharing the code allows to experiment, discuss and test together
 
35
before proposing it upstream.
 
36
 
 
37
Traditionnally, this problem is solved by copying often outdated
 
38
snippets of code around (due to no API/ABI guaratee), often not
 
39
centralized (libegg).
 
40
 
 
41
In the past, there used to be some common aging GNOME application
 
42
libraries above Gtk+ which have been slowly deprecated in favour of
 
43
Gtk+ (gnomeui and friends).
 
44
 
 
45
All approaches have pros and cons. A configurable git submodule
 
46
has the following advantages:
 
47
 
 
48
- no direct code copying necessary because API/ABI breakage (history
 
49
  is preserved etc..)
 
50
- code is shared and maintained in a common project
 
51
- you can stick to a particular upstream version, or branch off your
 
52
  own version easily if needed (hopefully you find your way back upstream)
 
53
- update the submodule version when your project is ready
 
54
- the libgd options should help you to configure a library to suit
 
55
  your needs, taking care of some of autofoo stuff for you
 
56
 
 
57
Usage
 
58
=====
 
59
 
 
60
In order to use libgd, an application using autotools needs to:
 
61
 
 
62
1. from the top-level project directory, add the submodule:
 
63
    - git submodule add git://git.gnome.org/libgd
 
64
 
 
65
2. in autogen.sh, it is recommended to add before autoreconf call:
 
66
    - git submodule update --init --recursive
 
67
 
 
68
3. in top-level Makefile.am:
 
69
    - add -I libgd to ACLOCAL_AMFLAGS
 
70
    - add libgd to SUBDIRS, before the project src directory
 
71
 
 
72
4. in project configure.ac:
 
73
    - add LIBGD_INIT([list-of-options]) after your project
 
74
      dependencies checks
 
75
    - add libgd/Makefile to AC_CONFIG_FILES
 
76
 
 
77
5. from your program Makefile.am, you may now for example:
 
78
    - link with $(top_builddir)/libgd/libgd.la, and include
 
79
      <libgd/gd.h> (adjust your AM_CPPFLAGS as necessary)
 
80
 
 
81
You may be interested to look at the commit switching GNOME Boxes from
 
82
private libgd usage to the libgd submodule:
 
83
 
 
84
http://git.gnome.org/browse/gnome-boxes/commit/?id=395652458d8b311a25ecb27cc42287602a122b1f
 
85
 
 
86
Note for example that the submodule url is "../libgd", which is a
 
87
better alternative for projects hosted on git.gnome.org. It will allow
 
88
the submodule update to reuse the address and the credentials given to
 
89
the toplevel project.
 
90
 
 
91
LIBGD_INIT options
 
92
==================
 
93
 
 
94
- gtk-hacks
 
95
 
 
96
- main-icon-view
 
97
 
 
98
- main-toolbar
 
99
 
 
100
- margin-container
 
101
 
 
102
- notification
 
103
 
 
104
- revealer
 
105
 
 
106
- stack
 
107
 
 
108
- static
 
109
 
 
110
- tagged-entry
 
111
 
 
112
- vapi
 
113
 
 
114
- gir
 
115
 
 
116
How to modify or add an API?
 
117
============================
 
118
 
 
119
 
 
120
TODO
 
121
====
 
122
 
 
123
- add translation support
 
124
- add some form of build test
 
125
- document: options, modification process
 
126
- eventually add documentation generation
 
127
- some licensing check
 
128
- more modularity (not all in libgd.m4/Makefile.am)
 
129
- CSS styling and data: shared only with gnome-themes-standard?