File: tech-gdk.page

package info (click to toggle)
gnome-devel-docs 40.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 79,188 kB
  • sloc: javascript: 2,514; xml: 2,407; ansic: 2,229; python: 1,854; makefile: 805; sh: 499; cpp: 131
file content (77 lines) | stat: -rw-r--r-- 3,879 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
<?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="es">

  <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>Abstracción de bajo nivel para el sistema de ventanas</desc>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Daniel Mustieles</mal:name>
      <mal:email>daniel.mustieles@gmail.com</mal:email>
      <mal:years>2011-2019</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Jorge González</mal:name>
      <mal:email>jorgegonz@svn.gnome.org</mal:email>
      <mal:years>2007-2010</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Mario Carrión</mal:name>
      <mal:email>mario@monouml.org</mal:email>
      <mal:years>2006</mal:years>
    </mal:credit>
  </info>

<title>GDK</title>

  <p>GDK is the low-level library used by <link xref="tech-gtk">GTK</link> to
  interact with the windowing system for graphics and input devices. Although
  you will rarely use GDK directly in application code, it contains all the
  necessary functionality to create low-level windows in the screen and to
  interact with the user with various input devices. GDK acts as an abstraction
  over various windowing systems, so that GTK can be portable to all of them:
  the X Window System (X11), Microsoft Windows, Mac OS X Quartz.</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>GDK_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 también proporciona rutinas de bajo nivel para acceder a los datos de arrastrar y soltar y del portapapeles del sistema. Cuando implemente controles personalizados, quizá deba acceder a estas características para implementar un comportamiento adecuado de la interacción con el usuario.</p>

<p>GDK provides other functionality which is needed to implement
a complete graphical toolkit like GTK.  Since GDK acts as a platform
abstraction, allowing GTK to run under multiple environments, it
provides an API for all of the system functionality needed by GTK.
This includes information about multi-head displays, resolution and
color depth, colormaps, and cursors.</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/">Manual de referencia de GTK+</link></p></item>
</list>
</page>