<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" id="tech-gdk" xml:lang="gl">

  <info>
    <link type="guide" xref="tech" group="gdk"/>
    <revision pkgversion="3.0" date="2011-04-05" status="candidate"/>

    <credit type="author copyright">
      <name>Shaun McCance</name>
      <email its:translate="no">shaunm@gnome.org</email>
      <years>2011–2012</years>
    </credit>

    <include xmlns="http://www.w3.org/2001/XInclude" href="cc-by-sa-3-0.xml"/>

    <desc>Low-level abstraction for the windowing system</desc>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Fran Diéguez</mal:name>
      <mal:email>frandieguez@gnome.org</mal:email>
      <mal:years>2009-2020.</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Leandro Regueiro</mal:name>
      <mal:email>leandro.regueiro@gmail.com</mal:email>
      <mal:years>2011.</mal:years>
    </mal:credit>
  </info>

<title>GDK</title>

  <p>GTK é a biblioteca de baixo nivel que usa GTK+ para interactuar co sistema para os dispositivos gráficos e de entrada. Aínda que rara vez usará GTK directamente no código da aplicación, contén toda a funcionalidade necesaria para debuxar obxectos e texto na pantalla e interactuar co usuario con varios dispositivos de entrada.</p>

<p>GDK enables you to access events from keyboards, mice, and other
input devices.  Implementations of widgets in GTK+ use this functionality, and
translate the events into higher-level signals that can in turn be used from
application code.  For example, a <code>GtkButton</code> widget will track
<code>GDK_BUTTON_PRESS</code> and <code>GTK_BUTTON_RELEASE</code> events,
which come from the mouse, and translate them as appropriate into a
<code>GtkButton::clicked</code> signal when the user presses and releases
the button in the right location.</p>

<p>GDK also provides low-level routines to access drag and drop
and clipboard data from the system.  When implementing custom controls,
you may need to access these features to implement proper user interaction
behavior.</p>

<p>GDK fornece outra funcionalidade necesaria para implementar un tookit gráfico completo como GTK+. Xa que GDK actúa como unha plataforma de abstracción, permitindo que GTK+ se execute en múltiples contornos, fornece unha API para todas as funcionalidades do sistema que precisa GTK+. Isto inclúe información sobre configuracións multimonitor, resolución e profundidade da cor, mapas de cores e cursores.</p>

  <p>You should use GDK whenever you need low-level access to the underlying
  windowing system, including low-level access to events, windows, and the
  clipboard. Using GDK for these tasks ensures that your code is portable and
  integrates with the rest of your GTK+ code. The simple drawing routines in
  GDK should generally not be used; these are a left-over from when GDK simply
  wrapped the windowing system's drawing primitives. Instead, you should use
  the extensive functionality provided by <link xref="tech-cairo">Cairo</link>
  to draw high-quality 2D graphics.</p>

<list style="compact">
  <item><p><link href="https://developer.gnome.org/gdk3/stable/">GDK Reference Manual</link></p></item>
</list>
</page>
