<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="GdkSurface">
<refmeta>
<refentrytitle role="top_of_page" id="GdkSurface.top_of_page">Surfaces</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Surfaces</refname>
<refpurpose>Onscreen display areas in the target window system</refpurpose>
</refnamediv>

<refsect1 id="GdkSurface.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-new-toplevel">gdk_surface_new_toplevel</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-new-popup">gdk_surface_new_popup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-destroy">gdk_surface_destroy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-is-destroyed">gdk_surface_is_destroyed</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-get-display">gdk_surface_get_display</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-hide">gdk_surface_hide</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-get-mapped">gdk_surface_get_mapped</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-translate-coordinates">gdk_surface_translate_coordinates</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-beep">gdk_surface_beep</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-get-scale-factor">gdk_surface_get_scale_factor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-set-opaque-region">gdk_surface_set_opaque_region</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkGLContext"><returnvalue>GdkGLContext</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-create-gl-context">gdk_surface_create_gl_context</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkVulkanContext"><returnvalue>GdkVulkanContext</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-create-vulkan-context">gdk_surface_create_vulkan_context</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkCairoContext"><returnvalue>GdkCairoContext</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-create-cairo-context">gdk_surface_create_cairo_context</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-queue-render">gdk_surface_queue_render</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkFrameClock"><returnvalue>GdkFrameClock</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-get-frame-clock">gdk_surface_get_frame_clock</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-set-cursor">gdk_surface_set_cursor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkCursor"><returnvalue>GdkCursor</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-get-cursor">gdk_surface_get_cursor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-set-input-region">gdk_surface_set_input_region</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-get-width">gdk_surface_get_width</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-get-height">gdk_surface_get_height</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-set-shadow-width">gdk_surface_set_shadow_width</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-get-device-position">gdk_surface_get_device_position</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkCursor"><returnvalue>GdkCursor</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-surface-get-device-cursor">gdk_surface_get_device_cursor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-surface-set-device-cursor">gdk_surface_set_device_cursor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkSurface.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GdkCursor"><type>GdkCursor</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkSurface--cursor">cursor</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkSurface--display">display</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkFrameClock"><type>GdkFrameClock</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkSurface--frame-clock">frame-clock</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="int"><type>int</type></link></entry><entry role="property_name"><link linkend="GdkSurface--height">height</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GdkSurface--mapped">mapped</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="int"><type>int</type></link></entry><entry role="property_name"><link linkend="GdkSurface--width">width</link></entry><entry role="property_flags">Read</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkSurface.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkSurface-enter-monitor">enter-monitor</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkSurface-event">event</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkSurface-leave-monitor">leave-monitor</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkSurface-render">render</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkSurface-size-changed">size-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkSurface.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkSurface-struct">GdkSurface</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkGravity">GdkGravity</link></entry></row>


<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkModifierType">GdkModifierType</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GDK-MODIFIER-MASK:CAPS">GDK_MODIFIER_MASK</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkSurface.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GdkSurface
</screen>
</refsect1>
<refsect1 id="GdkSurface.derived-interfaces" role="derived_interfaces">
<title role="derived_interfaces.title">Known Derived Interfaces</title>
<para>
GdkSurface is required by
 <link linkend="GdkDragSurface">GdkDragSurface</link>,  <link linkend="GdkPopup">GdkPopup</link> and  <link linkend="GdkToplevel">GdkToplevel</link>.</para>

</refsect1>

<refsect1 id="GdkSurface.includes"><title>Includes</title><synopsis>#include &lt;gdk/gdk.h&gt;
</synopsis></refsect1>

<refsect1 id="GdkSurface.description" role="desc">
<title role="desc.title">Description</title>
<para>A <link linkend="GdkSurface"><type>GdkSurface</type></link> is a (usually) rectangular region on the screen.
It’s a low-level object, used to implement high-level objects such as
<link linkend="GtkWindow"><type>GtkWindow</type></link> on the GTK level.</para>

</refsect1>
<refsect1 id="GdkSurface.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-surface-new-toplevel" role="function">
<title>gdk_surface_new_toplevel&#160;()</title>
<indexterm zone="gdk-surface-new-toplevel"><primary>gdk_surface_new_toplevel</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_surface_new_toplevel (<parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>);</programlisting>
<para>Creates a new toplevel surface.</para>

<para><emphasis role="annotation">[<acronym>constructor</acronym>]</emphasis></para><refsect3 id="gdk-surface-new-toplevel.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para>the display to create the surface on</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-new-toplevel.returns" role="returns">
<title>Returns</title>
<para>the new <link linkend="GdkSurface"><type>GdkSurface</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-new-popup" role="function">
<title>gdk_surface_new_popup&#160;()</title>
<indexterm zone="gdk-surface-new-popup"><primary>gdk_surface_new_popup</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_surface_new_popup (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *parent</parameter>,
                       <parameter><link linkend="gboolean"><type>gboolean</type></link> autohide</parameter>);</programlisting>
<para>Create a new popup surface.</para>
<para>The surface will be attached to <parameter>parent</parameter>
 and can be positioned
relative to it using <link linkend="gdk-popup-present"><function>gdk_popup_present()</function></link>.</para>

<para><emphasis role="annotation">[<acronym>constructor</acronym>]</emphasis></para><refsect3 id="gdk-surface-new-popup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>the parent surface to attach the surface to</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>autohide</para></entry>
<entry role="parameter_description"><para>whether to hide the surface on outside clicks</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-new-popup.returns" role="returns">
<title>Returns</title>
<para>a new <link linkend="GdkSurface"><type>GdkSurface</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-destroy" role="function">
<title>gdk_surface_destroy&#160;()</title>
<indexterm zone="gdk-surface-destroy"><primary>gdk_surface_destroy</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_destroy (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Destroys the window system resources associated with <parameter>surface</parameter>
 and decrements <parameter>surface</parameter>
's
reference count. The window system resources for all children of <parameter>surface</parameter>
 are also
destroyed, but the children’s reference counts are not decremented.</para>
<para>Note that a surface will not be destroyed automatically when its reference count
reaches zero. You must call this function yourself before that happens.</para>
<refsect3 id="gdk-surface-destroy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-is-destroyed" role="function">
<title>gdk_surface_is_destroyed&#160;()</title>
<indexterm zone="gdk-surface-is-destroyed"><primary>gdk_surface_is_destroyed</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_surface_is_destroyed (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Check to see if a surface is destroyed..</para>
<refsect3 id="gdk-surface-is-destroyed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-is-destroyed.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the surface is destroyed</para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-display" role="function">
<title>gdk_surface_get_display&#160;()</title>
<indexterm zone="gdk-surface-get-display"><primary>gdk_surface_get_display</primary></indexterm>
<programlisting language="C"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
gdk_surface_get_display (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Gets the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> associated with a <link linkend="GdkSurface"><type>GdkSurface</type></link>.</para>
<refsect3 id="gdk-surface-get-display.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-display.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> associated with <parameter>surface</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-hide" role="function">
<title>gdk_surface_hide&#160;()</title>
<indexterm zone="gdk-surface-hide"><primary>gdk_surface_hide</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_hide (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>For toplevel surfaces, withdraws them, so they will no longer be
known to the window manager; for all surfaces, unmaps them, so
they won’t be displayed. Normally done automatically as
part of <link linkend="gtk-widget-hide"><function>gtk_widget_hide()</function></link>.</para>
<refsect3 id="gdk-surface-hide.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-mapped" role="function">
<title>gdk_surface_get_mapped&#160;()</title>
<indexterm zone="gdk-surface-get-mapped"><primary>gdk_surface_get_mapped</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_surface_get_mapped (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Checks whether the surface has been mapped (with <link linkend="gdk-toplevel-present"><function>gdk_toplevel_present()</function></link>
or <link linkend="gdk-popup-present"><function>gdk_popup_present()</function></link>).</para>
<refsect3 id="gdk-surface-get-mapped.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-mapped.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the surface is mapped</para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-translate-coordinates" role="function">
<title>gdk_surface_translate_coordinates&#160;()</title>
<indexterm zone="gdk-surface-translate-coordinates"><primary>gdk_surface_translate_coordinates</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_surface_translate_coordinates (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *from</parameter>,
                                   <parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *to</parameter>,
                                   <parameter><link linkend="double"><type>double</type></link> *x</parameter>,
                                   <parameter><link linkend="double"><type>double</type></link> *y</parameter>);</programlisting>
<para>Translates the given coordinates from being
relative to the <parameter>from</parameter>
 surface to being relative
to the <parameter>to</parameter>
 surface.</para>
<para>Note that this only works if <parameter>to</parameter>
 and <parameter>from</parameter>
 are
popups or transient-for to the same toplevel
(directly or indirectly).</para>
<refsect3 id="gdk-surface-translate-coordinates.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>from</para></entry>
<entry role="parameter_description"><para>the origin surface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>to</para></entry>
<entry role="parameter_description"><para>the target surface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>coordinates to translate</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>coordinates to translate</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-translate-coordinates.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the coordinates were successfully
translated</para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-beep" role="function">
<title>gdk_surface_beep&#160;()</title>
<indexterm zone="gdk-surface-beep"><primary>gdk_surface_beep</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_beep (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Emits a short beep associated to <parameter>surface</parameter>
 in the appropriate
display, if supported. Otherwise, emits a short beep on
the display just as <link linkend="gdk-display-beep"><function>gdk_display_beep()</function></link>.</para>
<refsect3 id="gdk-surface-beep.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a toplevel <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-scale-factor" role="function">
<title>gdk_surface_get_scale_factor&#160;()</title>
<indexterm zone="gdk-surface-get-scale-factor"><primary>gdk_surface_get_scale_factor</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gdk_surface_get_scale_factor (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Returns the internal scale factor that maps from surface coordinates
to the actual device pixels. On traditional systems this is 1, but
on very high density outputs this can be a higher value (often 2).</para>
<para>A higher value means that drawing is automatically scaled up to
a higher resolution, so any code doing drawing will automatically look
nicer. However, if you are supplying pixel-based data the scale
value can be used to determine whether to use a pixel resource
with higher resolution data.</para>
<para>The scale of a surface may change during runtime, if this happens
a configure event will be sent to the toplevel surface.</para>
<refsect3 id="gdk-surface-get-scale-factor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>surface to get scale factor for</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-scale-factor.returns" role="returns">
<title>Returns</title>
<para> the scale factor</para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-set-opaque-region" role="function">
<title>gdk_surface_set_opaque_region&#160;()</title>
<indexterm zone="gdk-surface-set-opaque-region"><primary>gdk_surface_set_opaque_region</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_set_opaque_region (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                               <parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>);</programlisting>
<para>For optimisation purposes, compositing window managers may
like to not draw obscured regions of surfaces, or turn off blending
during for these regions. With RGB windows with no transparency,
this is just the shape of the window, but with ARGB32 windows, the
compositor does not know what regions of the window are transparent
or not.</para>
<para>This function only works for toplevel surfaces.</para>
<para>GTK will update this property automatically if
the <parameter>surface</parameter>
 background is opaque, as we know where the opaque regions
are. If your surface background is not opaque, please update this
property in your <link linkend="GtkWidgetClass.css-changed"><function>GtkWidgetClass.css_changed()</function></link> handler.</para>
<refsect3 id="gdk-surface-set-opaque-region.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a top-level or non-native <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>a region, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-create-gl-context" role="function">
<title>gdk_surface_create_gl_context&#160;()</title>
<indexterm zone="gdk-surface-create-gl-context"><primary>gdk_surface_create_gl_context</primary></indexterm>
<programlisting language="C"><link linkend="GdkGLContext"><returnvalue>GdkGLContext</returnvalue></link>&#160;*
gdk_surface_create_gl_context (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                               <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Creates a new <link linkend="GdkGLContext"><type>GdkGLContext</type></link> matching the
framebuffer format to the visual of the <link linkend="GdkSurface"><type>GdkSurface</type></link>. The context
is disconnected from any particular surface or surface.</para>
<para>If the creation of the <link linkend="GdkGLContext"><type>GdkGLContext</type></link> failed, <parameter>error</parameter>
 will be set.</para>
<para>Before using the returned <link linkend="GdkGLContext"><type>GdkGLContext</type></link>, you will need to
call <link linkend="gdk-gl-context-make-current"><function>gdk_gl_context_make_current()</function></link> or <link linkend="gdk-gl-context-realize"><function>gdk_gl_context_realize()</function></link>.</para>
<refsect3 id="gdk-surface-create-gl-context.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>return location for an error</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-create-gl-context.returns" role="returns">
<title>Returns</title>
<para>the newly created <link linkend="GdkGLContext"><type>GdkGLContext</type></link>, or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> on error. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-create-vulkan-context" role="function">
<title>gdk_surface_create_vulkan_context&#160;()</title>
<indexterm zone="gdk-surface-create-vulkan-context"><primary>gdk_surface_create_vulkan_context</primary></indexterm>
<programlisting language="C"><link linkend="GdkVulkanContext"><returnvalue>GdkVulkanContext</returnvalue></link>&#160;*
gdk_surface_create_vulkan_context (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                                   <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Creates a new <link linkend="GdkVulkanContext"><type>GdkVulkanContext</type></link> for rendering on <parameter>surface</parameter>
.</para>
<para>If the creation of the <link linkend="GdkVulkanContext"><type>GdkVulkanContext</type></link> failed, <parameter>error</parameter>
 will be set.</para>
<refsect3 id="gdk-surface-create-vulkan-context.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>return location for an error</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-create-vulkan-context.returns" role="returns">
<title>Returns</title>
<para>the newly created <link linkend="GdkVulkanContext"><type>GdkVulkanContext</type></link>, or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> on error. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-create-cairo-context" role="function">
<title>gdk_surface_create_cairo_context&#160;()</title>
<indexterm zone="gdk-surface-create-cairo-context"><primary>gdk_surface_create_cairo_context</primary></indexterm>
<programlisting language="C"><link linkend="GdkCairoContext"><returnvalue>GdkCairoContext</returnvalue></link>&#160;*
gdk_surface_create_cairo_context (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Creates a new <link linkend="GdkCairoContext"><type>GdkCairoContext</type></link> for rendering on <parameter>surface</parameter>
.</para>
<refsect3 id="gdk-surface-create-cairo-context.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-create-cairo-context.returns" role="returns">
<title>Returns</title>
<para>the newly created <link linkend="GdkCairoContext"><type>GdkCairoContext</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-queue-render" role="function">
<title>gdk_surface_queue_render&#160;()</title>
<indexterm zone="gdk-surface-queue-render"><primary>gdk_surface_queue_render</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_queue_render (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Forces a <link linkend="GdkSurface-render"><type>“render”</type></link> signal emission for <parameter>surface</parameter>

to be scheduled.</para>
<para>This function is useful for implementations that track invalid
regions on their own.</para>
<refsect3 id="gdk-surface-queue-render.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-frame-clock" role="function">
<title>gdk_surface_get_frame_clock&#160;()</title>
<indexterm zone="gdk-surface-get-frame-clock"><primary>gdk_surface_get_frame_clock</primary></indexterm>
<programlisting language="C"><link linkend="GdkFrameClock"><returnvalue>GdkFrameClock</returnvalue></link>&#160;*
gdk_surface_get_frame_clock (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Gets the frame clock for the surface. The frame clock for a surface
never changes unless the surface is reparented to a new toplevel
surface.</para>
<refsect3 id="gdk-surface-get-frame-clock.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>surface to get frame clock for</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-frame-clock.returns" role="returns">
<title>Returns</title>
<para>the frame clock. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-set-cursor" role="function">
<title>gdk_surface_set_cursor&#160;()</title>
<indexterm zone="gdk-surface-set-cursor"><primary>gdk_surface_set_cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_set_cursor (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                        <parameter><link linkend="GdkCursor"><type>GdkCursor</type></link> *cursor</parameter>);</programlisting>
<para>Sets the default mouse pointer for a <link linkend="GdkSurface"><type>GdkSurface</type></link>.</para>
<para>Note that <parameter>cursor</parameter>
 must be for the same display as <parameter>surface</parameter>
.</para>
<para>Use <link linkend="gdk-cursor-new-from-name"><function>gdk_cursor_new_from_name()</function></link> or <link linkend="gdk-cursor-new-from-texture"><function>gdk_cursor_new_from_texture()</function></link> to
create the cursor. To make the cursor invisible, use <link linkend="GDK-BLANK-CURSOR:CAPS"><literal>GDK_BLANK_CURSOR</literal></link>.
Passing <link linkend="NULL:CAPS"><literal>NULL</literal></link> for the <parameter>cursor</parameter>
 argument to <link linkend="gdk-surface-set-cursor"><function>gdk_surface_set_cursor()</function></link> means
that <parameter>surface</parameter>
 will use the cursor of its parent surface. Most surfaces
should use this default.</para>
<refsect3 id="gdk-surface-set-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cursor</para></entry>
<entry role="parameter_description"><para>a cursor. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-cursor" role="function">
<title>gdk_surface_get_cursor&#160;()</title>
<indexterm zone="gdk-surface-get-cursor"><primary>gdk_surface_get_cursor</primary></indexterm>
<programlisting language="C"><link linkend="GdkCursor"><returnvalue>GdkCursor</returnvalue></link>&#160;*
gdk_surface_get_cursor (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Retrieves a <link linkend="GdkCursor"><type>GdkCursor</type></link> pointer for the cursor currently set on the
specified <link linkend="GdkSurface"><type>GdkSurface</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.  If the return value is <link linkend="NULL:CAPS"><literal>NULL</literal></link> then
there is no custom cursor set on the specified surface, and it is
using the cursor for its parent surface.</para>
<refsect3 id="gdk-surface-get-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-cursor.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GdkCursor"><type>GdkCursor</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. The
returned object is owned by the <link linkend="GdkSurface"><type>GdkSurface</type></link> and should not be
unreferenced directly. Use <link linkend="gdk-surface-set-cursor"><function>gdk_surface_set_cursor()</function></link> to unset the
cursor of the surface. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-set-input-region" role="function">
<title>gdk_surface_set_input_region&#160;()</title>
<indexterm zone="gdk-surface-set-input-region"><primary>gdk_surface_set_input_region</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_set_input_region (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                              <parameter><link linkend="cairo-region-t"><type>cairo_region_t</type></link> *region</parameter>);</programlisting>
<para>Apply the region to the surface for the purpose of event
handling. Mouse events which happen while the pointer position
corresponds to an unset bit in the mask will be passed on the
surface below <parameter>surface</parameter>
.</para>
<para>An input region is typically used with RGBA surfaces.
The alpha channel of the surface defines which pixels are
invisible and allows for nicely antialiased borders,
and the input region controls where the surface is
“clickable”.</para>
<para>Use <link linkend="gdk-display-supports-input-shapes"><function>gdk_display_supports_input_shapes()</function></link> to find out if
a particular backend supports input regions.</para>
<refsect3 id="gdk-surface-set-input-region.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>region of surface to be reactive</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-width" role="function">
<title>gdk_surface_get_width&#160;()</title>
<indexterm zone="gdk-surface-get-width"><primary>gdk_surface_get_width</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gdk_surface_get_width (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Returns the width of the given <parameter>surface</parameter>
.</para>
<para>Surface size is reported in ”application pixels”, not
”device pixels” (see <link linkend="gdk-surface-get-scale-factor"><function>gdk_surface_get_scale_factor()</function></link>).</para>
<refsect3 id="gdk-surface-get-width.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-width.returns" role="returns">
<title>Returns</title>
<para> The width of <parameter>surface</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-height" role="function">
<title>gdk_surface_get_height&#160;()</title>
<indexterm zone="gdk-surface-get-height"><primary>gdk_surface_get_height</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gdk_surface_get_height (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Returns the height of the given <parameter>surface</parameter>
.</para>
<para>Surface size is reported in ”application pixels”, not
”device pixels” (see <link linkend="gdk-surface-get-scale-factor"><function>gdk_surface_get_scale_factor()</function></link>).</para>
<refsect3 id="gdk-surface-get-height.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-height.returns" role="returns">
<title>Returns</title>
<para> The height of <parameter>surface</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-set-shadow-width" role="function">
<title>gdk_surface_set_shadow_width&#160;()</title>
<indexterm zone="gdk-surface-set-shadow-width"><primary>gdk_surface_set_shadow_width</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_set_shadow_width (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                              <parameter><link linkend="int"><type>int</type></link> left</parameter>,
                              <parameter><link linkend="int"><type>int</type></link> right</parameter>,
                              <parameter><link linkend="int"><type>int</type></link> top</parameter>,
                              <parameter><link linkend="int"><type>int</type></link> bottom</parameter>);</programlisting>
<para>Newer GTK windows using client-side decorations use extra geometry
around their frames for effects like shadows and invisible borders.
Window managers that want to maximize windows or snap to edges need
to know where the extents of the actual frame lie, so that users
don’t feel like windows are snapping against random invisible edges.</para>
<para>Note that this property is automatically updated by GTK, so this
function should only be used by applications which do not use GTK
to create toplevel surfaces.</para>
<refsect3 id="gdk-surface-set-shadow-width.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>left</para></entry>
<entry role="parameter_description"><para>The left extent</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>right</para></entry>
<entry role="parameter_description"><para>The right extent</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>top</para></entry>
<entry role="parameter_description"><para>The top extent</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bottom</para></entry>
<entry role="parameter_description"><para>The bottom extent</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-device-position" role="function">
<title>gdk_surface_get_device_position&#160;()</title>
<indexterm zone="gdk-surface-get-device-position"><primary>gdk_surface_get_device_position</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_surface_get_device_position (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                                 <parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                                 <parameter><link linkend="double"><type>double</type></link> *x</parameter>,
                                 <parameter><link linkend="double"><type>double</type></link> *y</parameter>,
                                 <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> *mask</parameter>);</programlisting>
<para>Obtains the current device position in doubles and modifier state.
The position is given in coordinates relative to the upper left
corner of <parameter>surface</parameter>
.</para>
<para>Return: <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the device is over the surface</para>
<refsect3 id="gdk-surface-get-device-position.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>device</para></entry>
<entry role="parameter_description"><para>pointer <link linkend="GdkDevice"><type>GdkDevice</type></link> to query to.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>return location for the X coordinate of <parameter>device</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>return location for the Y coordinate of <parameter>device</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>mask</para></entry>
<entry role="parameter_description"><para>return location for the modifier mask, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-surface-get-device-cursor" role="function">
<title>gdk_surface_get_device_cursor&#160;()</title>
<indexterm zone="gdk-surface-get-device-cursor"><primary>gdk_surface_get_device_cursor</primary></indexterm>
<programlisting language="C"><link linkend="GdkCursor"><returnvalue>GdkCursor</returnvalue></link>&#160;*
gdk_surface_get_device_cursor (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                               <parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Retrieves a <link linkend="GdkCursor"><type>GdkCursor</type></link> pointer for the <parameter>device</parameter>
 currently set on the
specified <link linkend="GdkSurface"><type>GdkSurface</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.  If the return value is <link linkend="NULL:CAPS"><literal>NULL</literal></link> then
there is no custom cursor set on the specified surface, and it is
using the cursor for its parent surface.</para>
<refsect3 id="gdk-surface-get-device-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>device</para></entry>
<entry role="parameter_description"><para>a logical, pointer <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-surface-get-device-cursor.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GdkCursor"><type>GdkCursor</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. The
returned object is owned by the <link linkend="GdkSurface"><type>GdkSurface</type></link> and should not be
unreferenced directly. Use <link linkend="gdk-surface-set-cursor"><function>gdk_surface_set_cursor()</function></link> to unset the
cursor of the surface. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-surface-set-device-cursor" role="function">
<title>gdk_surface_set_device_cursor&#160;()</title>
<indexterm zone="gdk-surface-set-device-cursor"><primary>gdk_surface_set_device_cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_surface_set_device_cursor (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                               <parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                               <parameter><link linkend="GdkCursor"><type>GdkCursor</type></link> *cursor</parameter>);</programlisting>
<para>Sets a specific <link linkend="GdkCursor"><type>GdkCursor</type></link> for a given device when it gets inside <parameter>surface</parameter>
.
Use <link linkend="gdk-cursor-new-from-name"><function>gdk_cursor_new_from_name()</function></link> or <link linkend="gdk-cursor-new-from-texture"><function>gdk_cursor_new_from_texture()</function></link> to create
the cursor. To make the cursor invisible, use <link linkend="GDK-BLANK-CURSOR:CAPS"><literal>GDK_BLANK_CURSOR</literal></link>. Passing
<link linkend="NULL:CAPS"><literal>NULL</literal></link> for the <parameter>cursor</parameter>
 argument to <link linkend="gdk-surface-set-cursor"><function>gdk_surface_set_cursor()</function></link> means that
<parameter>surface</parameter>
 will use the cursor of its parent surface. Most surfaces should
use this default.</para>
<refsect3 id="gdk-surface-set-device-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>device</para></entry>
<entry role="parameter_description"><para>a logical, pointer <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cursor</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkCursor"><type>GdkCursor</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GdkSurface.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkSurface-struct" role="struct">
<title>GdkSurface</title>
<indexterm zone="GdkSurface-struct"><primary>GdkSurface</primary></indexterm>
<programlisting language="C">typedef struct _GdkSurface GdkSurface;</programlisting>
<para>The GdkSurface struct contains only private fields and
should not be accessed directly.</para>
</refsect2>
<refsect2 id="GdkGravity" role="enum">
<title>enum GdkGravity</title>
<indexterm zone="GdkGravity"><primary>GdkGravity</primary></indexterm>
<para>Defines the reference point of a surface and is used in <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link>.</para>
<refsect3 id="GdkGravity.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-NORTH-WEST:CAPS">GDK_GRAVITY_NORTH_WEST</para></entry>
<entry role="enum_member_description"><para>the reference point is at the top left corner.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-NORTH:CAPS">GDK_GRAVITY_NORTH</para></entry>
<entry role="enum_member_description"><para>the reference point is in the middle of the top edge.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-NORTH-EAST:CAPS">GDK_GRAVITY_NORTH_EAST</para></entry>
<entry role="enum_member_description"><para>the reference point is at the top right corner.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-WEST:CAPS">GDK_GRAVITY_WEST</para></entry>
<entry role="enum_member_description"><para>the reference point is at the middle of the left edge.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-CENTER:CAPS">GDK_GRAVITY_CENTER</para></entry>
<entry role="enum_member_description"><para>the reference point is at the center of the surface.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-EAST:CAPS">GDK_GRAVITY_EAST</para></entry>
<entry role="enum_member_description"><para>the reference point is at the middle of the right edge.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-SOUTH-WEST:CAPS">GDK_GRAVITY_SOUTH_WEST</para></entry>
<entry role="enum_member_description"><para>the reference point is at the lower left corner.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-SOUTH:CAPS">GDK_GRAVITY_SOUTH</para></entry>
<entry role="enum_member_description"><para>the reference point is at the middle of the lower edge.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-SOUTH-EAST:CAPS">GDK_GRAVITY_SOUTH_EAST</para></entry>
<entry role="enum_member_description"><para>the reference point is at the lower right corner.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-GRAVITY-STATIC:CAPS">GDK_GRAVITY_STATIC</para></entry>
<entry role="enum_member_description"><para>the reference point is at the top left corner of the
surface itself, ignoring window manager decorations.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkModifierType" role="enum">
<title>enum GdkModifierType</title>
<indexterm zone="GdkModifierType"><primary>GdkModifierType</primary></indexterm>
<para>A set of bit-flags to indicate the state of modifier keys and mouse buttons
in various event types. Typical modifier keys are Shift, Control, Meta,
Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.</para>
<para>Note that GDK may add internal values to events which include values outside
of this enumeration. Your code should preserve and ignore them.  You can use
<link linkend="GDK-MODIFIER-MASK:CAPS"><literal>GDK_MODIFIER_MASK</literal></link> to remove all private values.</para>
<refsect3 id="GdkModifierType.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SHIFT-MASK:CAPS">GDK_SHIFT_MASK</para></entry>
<entry role="enum_member_description"><para>the Shift key.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-LOCK-MASK:CAPS">GDK_LOCK_MASK</para></entry>
<entry role="enum_member_description"><para>a Lock key (depending on the modifier mapping of the
X server this may either be CapsLock or ShiftLock).</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-CONTROL-MASK:CAPS">GDK_CONTROL_MASK</para></entry>
<entry role="enum_member_description"><para>the Control key.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ALT-MASK:CAPS">GDK_ALT_MASK</para></entry>
<entry role="enum_member_description"><para>the fourth modifier key (it depends on the modifier
mapping of the X server which key is interpreted as this modifier, but
normally it is the Alt key).</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-BUTTON1-MASK:CAPS">GDK_BUTTON1_MASK</para></entry>
<entry role="enum_member_description"><para>the first mouse button.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-BUTTON2-MASK:CAPS">GDK_BUTTON2_MASK</para></entry>
<entry role="enum_member_description"><para>the second mouse button.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-BUTTON3-MASK:CAPS">GDK_BUTTON3_MASK</para></entry>
<entry role="enum_member_description"><para>the third mouse button.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-BUTTON4-MASK:CAPS">GDK_BUTTON4_MASK</para></entry>
<entry role="enum_member_description"><para>the fourth mouse button.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-BUTTON5-MASK:CAPS">GDK_BUTTON5_MASK</para></entry>
<entry role="enum_member_description"><para>the fifth mouse button.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SUPER-MASK:CAPS">GDK_SUPER_MASK</para></entry>
<entry role="enum_member_description"><para>the Super modifier</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-HYPER-MASK:CAPS">GDK_HYPER_MASK</para></entry>
<entry role="enum_member_description"><para>the Hyper modifier</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-META-MASK:CAPS">GDK_META_MASK</para></entry>
<entry role="enum_member_description"><para>the Meta modifier</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GDK-MODIFIER-MASK:CAPS" role="macro">
<title>GDK_MODIFIER_MASK</title>
<indexterm zone="GDK-MODIFIER-MASK:CAPS"><primary>GDK_MODIFIER_MASK</primary></indexterm>
<programlisting language="C">#define             GDK_MODIFIER_MASK</programlisting>
<para>A mask covering all entries in <link linkend="GdkModifierType"><type>GdkModifierType</type></link>.</para>
</refsect2>

</refsect1>
<refsect1 id="GdkSurface.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GdkSurface--cursor" role="property"><title>The <literal>“cursor”</literal> property</title>
<indexterm zone="GdkSurface--cursor"><primary>GdkSurface:cursor</primary></indexterm>
<programlisting>  “cursor”                   <link linkend="GdkCursor"><type>GdkCursor</type></link>&#160;*</programlisting>
<para>The mouse pointer for a <link linkend="GdkSurface"><type>GdkSurface</type></link>. See <link linkend="gdk-surface-set-cursor"><function>gdk_surface_set_cursor()</function></link> and
<link linkend="gdk-surface-get-cursor"><function>gdk_surface_get_cursor()</function></link> for details.</para>
<para>Owner: GdkSurface</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GdkSurface--display" role="property"><title>The <literal>“display”</literal> property</title>
<indexterm zone="GdkSurface--display"><primary>GdkSurface:display</primary></indexterm>
<programlisting>  “display”                  <link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkDisplay"><type>GdkDisplay</type></link> connection of the surface. See <link linkend="gdk-surface-get-display"><function>gdk_surface_get_display()</function></link>
for details.</para>
<para>Owner: GdkSurface</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkSurface--frame-clock" role="property"><title>The <literal>“frame-clock”</literal> property</title>
<indexterm zone="GdkSurface--frame-clock"><primary>GdkSurface:frame-clock</primary></indexterm>
<programlisting>  “frame-clock”              <link linkend="GdkFrameClock"><type>GdkFrameClock</type></link>&#160;*</programlisting>
<para>Frame Clock.</para><para>Owner: GdkSurface</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkSurface--height" role="property"><title>The <literal>“height”</literal> property</title>
<indexterm zone="GdkSurface--height"><primary>GdkSurface:height</primary></indexterm>
<programlisting>  “height”                   <link linkend="int"><type>int</type></link></programlisting>
<para>Height.</para><para>Owner: GdkSurface</para>
<para>Flags: Read</para>
<para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GdkSurface--mapped" role="property"><title>The <literal>“mapped”</literal> property</title>
<indexterm zone="GdkSurface--mapped"><primary>GdkSurface:mapped</primary></indexterm>
<programlisting>  “mapped”                   <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Mapped.</para><para>Owner: GdkSurface</para>
<para>Flags: Read</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GdkSurface--width" role="property"><title>The <literal>“width”</literal> property</title>
<indexterm zone="GdkSurface--width"><primary>GdkSurface:width</primary></indexterm>
<programlisting>  “width”                    <link linkend="int"><type>int</type></link></programlisting>
<para>Width.</para><para>Owner: GdkSurface</para>
<para>Flags: Read</para>
<para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>

</refsect1>
<refsect1 id="GdkSurface.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GdkSurface-enter-monitor" role="signal"><title>The <literal>“enter-monitor”</literal> signal</title>
<indexterm zone="GdkSurface-enter-monitor"><primary>GdkSurface::enter-monitor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkSurface"><type>GdkSurface</type></link> *surface,
               <link linkend="GdkMonitor"><type>GdkMonitor</type></link> *monitor,
               <link linkend="gpointer"><type>gpointer</type></link>    user_data)</programlisting>
<para>Emitted when <parameter>surface</parameter>
 starts being present on the monitor.</para>
<refsect3 id="GdkSurface-enter-monitor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>monitor</para></entry>
<entry role="parameter_description"><para>the monitor</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GdkSurface-event" role="signal"><title>The <literal>“event”</literal> signal</title>
<indexterm zone="GdkSurface-event"><primary>GdkSurface::event</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
user_function (<link linkend="GdkSurface"><type>GdkSurface</type></link> *surface,
               <link linkend="gpointer"><type>gpointer</type></link>    event,
               <link linkend="gpointer"><type>gpointer</type></link>    user_data)</programlisting>
<para>Emitted when GDK receives an input event for <parameter>surface</parameter>
.</para>
<refsect3 id="GdkSurface-event.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>event</para></entry>
<entry role="parameter_description"><para>an input event. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> Gdk.Event]</emphasis></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GdkSurface-event.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to indicate that the event has been handled</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GdkSurface-leave-monitor" role="signal"><title>The <literal>“leave-monitor”</literal> signal</title>
<indexterm zone="GdkSurface-leave-monitor"><primary>GdkSurface::leave-monitor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkSurface"><type>GdkSurface</type></link> *surface,
               <link linkend="GdkMonitor"><type>GdkMonitor</type></link> *monitor,
               <link linkend="gpointer"><type>gpointer</type></link>    user_data)</programlisting>
<para>Emitted when <parameter>surface</parameter>
 stops being present on the monitor.</para>
<refsect3 id="GdkSurface-leave-monitor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>monitor</para></entry>
<entry role="parameter_description"><para>the monitor</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GdkSurface-render" role="signal"><title>The <literal>“render”</literal> signal</title>
<indexterm zone="GdkSurface-render"><primary>GdkSurface::render</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
user_function (<link linkend="GdkSurface"><type>GdkSurface</type></link>  *surface,
               <link linkend="CairoRegion"><type>CairoRegion</type></link> *region,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>Emitted when part of the surface needs to be redrawn.</para>
<refsect3 id="GdkSurface-render.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>region</para></entry>
<entry role="parameter_description"><para>the region that needs to be redrawn</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GdkSurface-render.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to indicate that the signal has been handled</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GdkSurface-size-changed" role="signal"><title>The <literal>“size-changed”</literal> signal</title>
<indexterm zone="GdkSurface-size-changed"><primary>GdkSurface::size-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkSurface"><type>GdkSurface</type></link> *surface,
               <link linkend="int"><type>int</type></link>         width,
               <link linkend="int"><type>int</type></link>         height,
               <link linkend="gpointer"><type>gpointer</type></link>    user_data)</programlisting>
<para>Emitted when the size of <parameter>surface</parameter>
 is changed.</para>
<para>Surface size is reported in ”application pixels”, not
”device pixels” (see <link linkend="gdk-surface-get-scale-factor"><function>gdk_surface_get_scale_factor()</function></link>).</para>
<refsect3 id="GdkSurface-size-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkSurface"><type>GdkSurface</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>width</para></entry>
<entry role="parameter_description"><para>the new width</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>height</para></entry>
<entry role="parameter_description"><para>the new height</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2>
</refsect1>

</refentry>
