• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..12-Oct-2021-

libgd/H12-Oct-2021-11,2797,960

Makefile.amH A D12-Oct-20215 KiB223182

READMEH A D12-Oct-20213.8 KiB12489

libgd.doapH A D12-Oct-20211.1 KiB3428

libgd.m4H A D12-Oct-20215.1 KiB141119

meson.buildH A D12-Oct-2021457 1914

meson_readme.mdH A D12-Oct-20212.2 KiB8973

test-tagged-entry.cH A D12-Oct-20213.2 KiB11288

README

1=====
2libgd
3=====
4
5Introduction
6============
7
8libgd is a library used by various GNOME 3 styled applications.
9However, it is not a typical library, since it doesn't guarantee
10API/ABI stability, nor does it has official releases tarballs. Only
11the files actually used by your project will be shipped with its
12tarball. Only the necessary dependencies will be checked during
13configure time and used at runtime.
14
15Each application can configure libgd depending on its needs and will
16be able to either link dynamically (privately) or statically link with
17a specific development version.
18
19GObject Introspection based bindings generation such as Javascript or
20Vala are also supported.
21
22More Background
23---------------
24
25libgd originates from the GNOME Documents project (written by Cosimo
26Cecchi), which was one of the first application to follow the novel
27GNOME 3 application design.
28
29Since other applications have similar needs, it makes sense to try to
30reuse and improve the existing work. However, the design being not
31frozen, and the code being not yet matured enough and proven, it is
32not possible for the developers to guarantee API and propose the
33addition to the respective projects (Gtk+, or GLib for example) right
34now. Sharing the code allows to experiment, discuss and test together
35before proposing it upstream.
36
37Traditionally, this problem is solved by copying often outdated
38snippets of code around (due to no API/ABI guarantee), often not
39centralized (libegg).
40
41In the past, there used to be some common aging GNOME application
42libraries above Gtk+ which have been slowly deprecated in favour of
43Gtk+ (gnomeui and friends).
44
45All approaches have pros and cons. A configurable git submodule
46has 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
57Usage
58=====
59
60In order to use libgd, an application using autotools needs to:
61
621. from the top-level project directory, add the submodule:
63    - git submodule add git://git.gnome.org/libgd
64
652. in autogen.sh, it is recommended to add before autoreconf call:
66    - git submodule update --init --recursive
67
683. in top-level Makefile.am:
69    - add -I libgd to ACLOCAL_AMFLAGS
70    - add libgd to SUBDIRS, before the project src directory
71
724. 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
775. 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
81You may be interested to look at the commit switching GNOME Boxes from
82private libgd usage to the libgd submodule:
83
84http://git.gnome.org/browse/gnome-boxes/commit/?id=395652458d8b311a25ecb27cc42287602a122b1f
85
86Note for example that the submodule url is "../libgd", which is a
87better alternative for projects hosted on git.gnome.org. It will allow
88the submodule update to reuse the address and the credentials given to
89the toplevel project.
90
91LIBGD_INIT options
92==================
93
94- gtk-hacks
95
96- main-icon-view
97
98- margin-container
99
100- notification
101
102- static
103
104- tagged-entry
105
106- vapi
107
108- gir
109
110How to modify or add an API?
111============================
112
113
114TODO
115====
116
117- add translation support
118- add some form of build test
119- document: options, modification process
120- eventually add documentation generation
121- some licensing check
122- more modularity (not all in libgd.m4/Makefile.am)
123- CSS styling and data: shared only with gnome-themes-standard?
124