<s>
GDK	B-Language
(	O
GIMP	B-Language
Drawing	I-Language
Kit	I-Language
)	O
is	O
a	O
library	B-Library
that	O
acts	O
as	O
a	O
wrapper	O
around	O
the	O
low-level	O
functions	O
provided	O
by	O
the	O
underlying	O
windowing	O
and	O
graphics	O
systems	O
.	O
</s>
<s>
GDK	B-Language
lies	O
between	O
the	O
display	O
server	O
and	O
the	O
GTK	B-Application
library	B-Library
,	O
handling	O
basic	O
rendering	O
such	O
as	O
drawing	O
primitives	O
,	O
raster	B-Algorithm
graphics	I-Algorithm
(	O
bitmaps	O
)	O
,	O
cursors	B-Application
,	O
fonts	O
,	O
as	O
well	O
as	O
window	O
events	O
and	O
drag-and-drop	O
functionality	O
.	O
</s>
<s>
Like	O
GTK	B-Language
Scene	I-Language
Graph	I-Language
Kit	I-Language
(	O
GSK	O
)	O
,	O
GDK	B-Language
is	O
part	O
of	O
GTK	B-Application
and	O
licensed	O
under	O
the	O
GNU	B-Application
Lesser	I-Application
General	I-Application
Public	I-Application
License	I-Application
(	O
LGPL	B-Application
)	O
.	O
</s>
<s>
GTK	B-Application
is	O
implemented	O
on	O
top	O
of	O
an	O
abstraction	O
layer	O
called	O
GDK	B-Language
,	O
freeing	O
GTK	B-Application
from	O
low-level	O
concerns	O
like	O
input	O
gathering	O
,	O
Drag	O
and	O
drop	O
and	O
pixel	O
format	O
conversion	O
.	O
</s>
<s>
GDK	B-Language
is	O
an	O
intermediate	O
layer	O
which	O
separates	O
GTK	B-Application
from	O
the	O
details	O
of	O
the	O
windowing	B-Application
system	I-Application
.	O
</s>
<s>
GDK	B-Language
is	O
an	O
important	O
part	O
of	O
GTK	B-Application
's	O
portability	O
.	O
</s>
<s>
Since	O
low-level	O
cross-platform	O
functionality	O
is	O
already	O
provided	O
by	O
GLib	B-Language
,	O
all	O
that	O
is	O
needed	O
to	O
make	O
GTK	B-Application
run	O
on	O
other	O
platforms	O
is	O
to	O
port	O
GDK	B-Language
to	O
the	O
underlying	O
operating	B-General_Concept
system	I-General_Concept
's	O
graphics	O
layer	O
.	O
</s>
<s>
Hence	O
,	O
the	O
GDK	B-Language
ports	O
to	O
the	O
Windows	B-Library
API	I-Library
and	O
Quartz	B-Operating_System
are	O
what	O
enable	O
GTK	B-Application
applications	O
to	O
run	O
on	O
Windows	B-Application
and	O
macOS	B-Application
,	O
respectively	O
.	O
</s>
<s>
Starting	O
with	O
GTK+	O
2.8	O
,	O
GDK	B-Language
supports	O
Cairo	B-Language
which	O
should	O
be	O
used	O
with	O
GTK+	B-Application
3	I-Application
instead	O
of	O
GDK	B-Language
's	O
drawing	O
functions	O
.	O
</s>
<s>
GDK	B-Language
is	O
an	O
intermediate	O
layer	O
which	O
isolates	O
GTK	B-Application
from	O
the	O
details	O
of	O
the	O
windowing	B-Application
system	I-Application
.	O
</s>
<s>
GDK	B-Language
is	O
a	O
thin	O
wrapper	O
around	O
Xlib	B-Language
.	O
</s>
<s>
The	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
comes	O
with	O
a	O
low-level	O
library	B-Library
called	O
Xlib	B-Language
.	O
</s>
<s>
Almost	O
every	O
function	O
in	O
GDK	B-Language
is	O
a	O
very	O
thin	O
wrapper	O
around	O
a	O
corresponding	O
Xlib	B-Language
function	O
;	O
but	O
some	O
of	O
the	O
complexity	O
(	O
and	O
functionality	O
)	O
of	O
Xlib	B-Language
is	O
hidden	O
,	O
to	O
simplify	O
programming	O
and	O
to	O
make	O
GDK	B-Language
easier	O
to	O
port	O
to	O
other	O
windowing	B-Application
systems	I-Application
,	O
such	O
as	O
Wayland	B-Language
or	O
Microsoft	B-Application
Windows	I-Application
.	O
</s>
<s>
The	O
concealed	O
Xlib	B-Language
functionality	O
will	O
rarely	O
be	O
of	O
interest	O
to	O
application	O
programmers	O
;	O
for	O
example	O
,	O
many	O
features	O
used	O
solely	O
by	O
window	B-Application
managers	I-Application
are	O
not	O
exposed	O
in	O
GDK	B-Language
.	O
</s>
<s>
GDK	B-Language
lets	O
you	O
do	O
low	O
level	O
stuff	O
,	O
like	O
e.g.	O
</s>
<s>
"	O
blit	B-Algorithm
this	O
pixmap	O
to	O
the	O
screen	O
"	O
.	O
</s>
<s>
GDK	B-Language
provides	O
a	O
layer	O
that	O
is	O
much	O
more	O
portable	O
than	O
say	O
the	O
X	B-Device
protocol	I-Device
,	O
without	O
sacrificing	O
any	O
of	O
the	O
low-level	O
accessibility	O
that	O
systems	O
such	O
as	O
X	B-Operating_System
provide	O
.	O
</s>
<s>
The	O
true	O
power	O
of	O
this	O
abstraction	O
is	O
that	O
if	O
you	O
choose	O
to	O
use	O
it	O
rather	O
than	O
say	O
,	O
X	B-Operating_System
,	O
your	O
software	O
will	O
automatically	O
render	O
on	O
the	O
Linux	B-Application
Framebuffer	O
and	O
Windows	B-Application
.	O
</s>
<s>
Having	O
OpenGL	B-Application
(	O
or	O
OpenGL	B-Application
ES	I-Application
)	O
support	O
in	O
GDK	B-Language
,	O
facilitates	O
a	O
slightly	O
better	O
control	O
of	O
the	O
graphics	B-General_Concept
pipeline	I-General_Concept
;	O
OpenGL	B-Application
is	O
well	O
suited	O
for	O
compositing	O
textured	O
data	O
but	O
totally	O
unsuited	O
for	O
drawing	O
.	O
</s>
<s>
While	O
GTK	B-Application
applications	O
remain	O
mainloop	O
driven	O
(	O
cf	O
.	O
</s>
<s>
Glib	B-Language
event	O
loop	O
)	O
,	O
meaning	O
the	O
application	O
is	O
idle	O
inside	O
this	O
main	O
loop	O
most	O
of	O
the	O
time	O
and	O
just	O
waits	O
for	O
something	O
to	O
happen	O
and	O
then	O
calls	O
the	O
appropriate	O
subroutine	O
when	O
it	O
does	O
,	O
GdkFrameClock	O
adds	O
an	O
additional	O
mechanism	O
,	O
that	O
gives	O
a	O
"	O
pulse	O
"	O
to	O
the	O
application	O
.	O
</s>
<s>
In	O
its	O
history	O
GDK	B-Language
contained	O
and	O
linked	O
with	O
a	O
couple	O
of	O
different	O
Canvases	O
.	O
</s>
<s>
Developers	O
were	O
also	O
considering	O
new	O
directions	O
for	O
the	O
library	B-Library
,	O
including	O
removing	O
deprecated	O
API	B-Application
components	O
and	O
adding	O
an	O
integrated	O
scene	O
graph	O
(	O
canvas	O
)	O
system	O
,	O
similar	O
to	O
the	O
Clutter	B-Language
graphics	O
library	B-Library
,	O
effectively	O
integrating	O
GTK	B-Application
with	O
OpenGL	B-Application
and	O
Vulkan	B-Application
.	O
</s>
<s>
GTK+	B-Language
Scene	I-Language
Graph	I-Language
Kit	I-Language
(	O
GSK	O
)	O
was	O
released	O
as	O
part	O
of	O
GTK+	O
3.90	O
in	O
March	O
2017	O
.	O
</s>
<s>
It	O
is	O
the	O
scene	O
graph	O
and	O
rendering	O
API	B-Application
for	O
GTK	B-Application
.	O
</s>
<s>
GSK	O
has	O
not	O
been	O
further	O
integrated	O
with	O
GDK	B-Language
(	O
which	O
is	O
also	O
part	O
of	O
GTK	B-Application
)	O
but	O
is	O
kept	O
in	O
its	O
own	O
directory	O
.	O
</s>
<s>
GDK	B-Language
contains	O
back-ends	O
to	O
a	O
couple	O
of	O
windowing	B-Application
systems	I-Application
,	O
namely	O
to	O
the	O
X11	B-Operating_System
and	O
Wayland	B-Language
protocols	O
,	O
to	O
Quartz	B-Operating_System
and	O
GDI	B-Operating_System
,	O
</s>
<s>
and	O
even	O
to	O
the	O
Hypertext	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
HTTP	B-Protocol
)	O
engine	O
Broadway	O
.	O
</s>
<s>
With	O
the	O
release	O
of	O
GNOME	O
3.16	O
in	O
March	O
2015	O
,	O
GDK	B-Language
obtained	O
an	O
experimental	O
back-end	O
for	O
the	O
Mir	O
display	O
server	O
protocol	O
.	O
</s>
<s>
The	O
Mir	O
display	O
server	O
protocol	O
is	O
a	O
product	O
by	O
Canonical	O
for	O
their	O
Ubuntu	B-Operating_System
distribution	I-Operating_System
of	O
Linux	B-Application
,	O
which	O
they	O
intend	O
to	O
compete	O
with	O
the	O
Wayland	B-Language
display	O
server	O
protocol	O
;	O
so	O
far	O
,	O
it	O
is	O
implemented	O
only	O
in	O
Ubuntu	B-Operating_System
.	O
</s>
<s>
To	O
start	O
an	O
application	O
and	O
force	O
this	O
instance	O
of	O
it	O
to	O
use	O
a	O
certain	O
windowing	B-Application
system	I-Application
,	O
you	O
specify	O
the	O
variable	O
GDK_BACKEND	O
:	O
</s>
<s>
gdk-pixbuf	O
is	O
a	O
toolkit	O
for	O
image	O
loading	O
and	O
pixel	O
buffer	O
manipulation	O
.	O
</s>
<s>
The	O
library	B-Library
provides	O
image	O
loading	O
and	O
saving	O
facilities	O
,	O
fast	O
scaling	O
and	O
compositing	O
of	O
pixbufs	O
,	O
simple	O
animation	O
loading	O
(	O
i.e.	O
</s>
<s>
animated	O
GIFs	O
)	O
,	O
and	O
rendering	O
the	O
libart	B-Language
image	O
buffer	O
to	O
a	O
GdkDrawable	O
instance	O
.	O
</s>
<s>
gdk-pixbuf	O
has	O
a	O
fairly	O
large	O
API	B-Application
.	O
</s>
<s>
The	O
fundamental	O
structure	O
in	O
the	O
gdk-pixbuf	O
library	B-Library
is	O
GdkPixbuf	O
,	O
a	O
private	O
,	O
opaque	O
data	O
structure	O
that	O
mirrors	O
many	O
of	O
the	O
same	O
concepts	O
that	O
ArtPixBuf	O
supports	O
.	O
</s>
<s>
This	O
similarity	O
dates	O
back	O
to	O
the	O
earlier	O
days	O
when	O
gdk-pixbuf	O
was	O
a	O
wrapper	O
around	O
libart	B-Language
.	O
</s>
<s>
Since	O
that	O
time	O
,	O
the	O
libart	B-Language
dependency	O
has	O
been	O
stripped	O
out	O
,	O
and	O
gdk-pixbuf	O
was	O
merged	O
into	O
the	O
GTK+	O
2.0	O
code	O
base	O
.	O
</s>
<s>
As	O
such	O
,	O
gdk-pixbuf	O
'	O
s	O
days	O
as	O
a	O
standalone	O
library	B-Library
are	O
limited	O
to	O
the	O
GNOME	B-Language
1	I-Language
release	O
.	O
</s>
<s>
With	O
the	O
release	O
of	O
GTK+	B-Application
2.22	O
on	O
2010-09-23	O
,	O
gdk-pixbuf	O
has	O
been	O
turned	O
back	O
into	O
a	O
standalone	O
library	B-Library
,	O
after	O
being	O
shipped	O
as	O
part	O
of	O
GTK+	B-Application
since	O
gtk+	B-Application
2.0	O
.	O
</s>
<s>
This	O
was	O
done	O
in	O
preparation	O
for	O
the	O
transition	O
to	O
GTK+	B-Application
3	I-Application
.	O
</s>
<s>
The	O
latest	O
release	O
of	O
gdk-pixbuf	O
is	O
from	O
2017-Oct-02	O
.	O
</s>
<s>
GDK	B-Language
was	O
originally	O
developed	O
on	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
for	O
the	B-Application
GIMP	I-Application
raster	B-Application
graphics	I-Application
editor	I-Application
.	O
</s>
