~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/chap-drawing-model.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-06-11 12:19:30 UTC
  • mfrom: (1.11.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 175.
  • Revision ID: james.westby@ubuntu.com-20100611121930-n4pklvkoqdsg12vm
Tags: 2.21.2-1
* New upstream development release:
  + debian/rules,
    debian/libgtk2.0-0.symbols:
    - Update for new API symbols.
  + debian/patches/070_mandatory-relibtoolize.patch:
    - Regenerated for the new version.
  + debian/control.in:
    - Update GLib (build-) dependency to >= 2.25.8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
<div class="refsect2" title="Window and no-window widgets">
88
88
<a name="window-no-window-widgets"></a><h3>Window and no-window widgets</h3>
89
89
<p>
90
 
        A <a href="/usr/share/gtk-doc/html/gdk/gdk-Windows.html#GdkWindow"><code class="classname">GdkWindow</code></a>
 
90
        A <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Windows.html#GdkWindow"><code class="classname">GdkWindow</code></a>
91
91
        represents a window from the underlying windowing system on which GTK+
92
92
        is running.  For example, on X11 it corresponds to a
93
93
        <span class="type">Window</span>; on Win32, it corresponds to a <span class="type">HANDLE</span>.
94
94
        The windowing system generates events for these windows.  The GDK
95
95
        interface to the windowing system translates such native events into
96
 
        <a href="/usr/share/gtk-doc/html/gdk/gdk-Event-Structures.html#GdkEvent"><span class="structname">GdkEvent</span></a>
 
96
        <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEvent"><span class="structname">GdkEvent</span></a>
97
97
        structures and sends them on to the GTK layer.  In turn, the GTK layer
98
98
        finds the widget that corresponds to a particular
99
99
        <code class="classname">GdkWindow</code> and emits the corresponding event
265
265
<div class="refsect2" title="Notes on drawing no-window widgets">
266
266
<a name="notes-on-drawing-no-window-widgets"></a><h3>Notes on drawing no-window widgets</h3>
267
267
<p>
268
 
        Remember that the coordinates in a <a href="/usr/share/gtk-doc/html/gdk/gdk-Event-Structures.html#GdkEventExpose">GdkEventExpose</a> are relative to
 
268
        Remember that the coordinates in a <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventExpose">GdkEventExpose</a> are relative to
269
269
        the <code class="classname">GdkWindow</code> that received the event,
270
270
        <span class="emphasis"><em>not</em></span> to the widget whose expose-event
271
271
        handler is being called.  If your widget owns the window, then
293
293
        drawing gets clipped by any child windows that it may
294
294
        intersect.  Sometimes you need to draw over your child windows
295
295
        as well; for example, when drawing a drag-handle to resize
296
 
        something.  In this case, turn on the <a href="/usr/share/gtk-doc/html/gdk/gdk-Graphics-Contexts.html#GDK-INCLUDE-INFERIORS:CAPS">GDK_INCLUDE_INFERIORS</a>
297
 
        subwindow mode for the <a href="/usr/share/gtk-doc/html/gdk/gdk-Graphics-Contexts.html">GdkGC</a> which you use for
 
296
        something.  In this case, turn on the <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Graphics-Contexts.html#GDK-INCLUDE-INFERIORS:CAPS">GDK_INCLUDE_INFERIORS</a>
 
297
        subwindow mode for the <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Graphics-Contexts.html">GdkGC</a> which you use for
298
298
        drawing.
299
299
      </p>
300
300
</div>
372
372
8
373
373
9</pre></td>
374
374
        <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
375
 
<span class="function">my_widget_init</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyWidget </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">)</span>
 
375
<span class="function">my_widget_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">MyWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">)</span>
376
376
<span class="cbracket">{</span>
377
377
<span class="normal">  </span><span class="symbol">...</span>
378
378
 
379
 
<span class="normal">  </span><span class="function"><a href="GtkWidget.html#gtk-widget-set-double-buffered">gtk_widget_set_double_buffered</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
 
379
<span class="normal">  </span><span class="function"><a href="GtkWidget.html#gtk-widget-set-double-buffered">gtk_widget_set_double_buffered</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
380
380
 
381
381
<span class="normal">  </span><span class="symbol">...</span>
382
382
<span class="cbracket">}</span></pre></td>