New upstream version 3.24.28
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
<link rel="up" href="MiscObjects.html" title="Miscellaneous">
|
||||
<link rel="prev" href="GtkDrawingArea.html" title="GtkDrawingArea">
|
||||
<link rel="next" href="GtkEventBox.html" title="GtkEventBox">
|
||||
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
|
||||
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -53,7 +53,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a> *
|
||||
<span class="returnvalue">GdkGLContext</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="GtkGLArea.html#gtk-gl-area-get-context" title="gtk_gl_area_get_context ()">gtk_gl_area_get_context</a> <span class="c_punctuation">()</span>
|
||||
@ -214,7 +214,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="property_type">
|
||||
<a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> *</td>
|
||||
<span class="type">GdkGLContext</span> *</td>
|
||||
<td class="property_name"><a class="link" href="GtkGLArea.html#GtkGLArea--context" title="The “context” property">context</a></td>
|
||||
<td class="property_flags">Read</td>
|
||||
</tr>
|
||||
@ -252,7 +252,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="signal_type">
|
||||
<a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a>*</td>
|
||||
<span class="returnvalue">GdkGLContext</span>*</td>
|
||||
<td class="signal_name"><a class="link" href="GtkGLArea.html#GtkGLArea-create-context" title="The “create-context” signal">create-context</a></td>
|
||||
<td class="signal_flags">Run Last</td>
|
||||
</tr>
|
||||
@ -310,7 +310,7 @@ GtkGLArea implements
|
||||
<div class="refsect1">
|
||||
<a name="GtkGLArea.description"></a><h2>Description</h2>
|
||||
<p><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> is a widget that allows drawing with OpenGL.</p>
|
||||
<p><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> sets up its own <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> for the window it creates, and
|
||||
<p><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> sets up its own <span class="type">GdkGLContext</span> for the window it creates, and
|
||||
creates a custom GL framebuffer that the widget will do GL rendering onto.
|
||||
It also ensures that this framebuffer is the default GL rendering target
|
||||
when rendering.</p>
|
||||
@ -318,7 +318,7 @@ when rendering.</p>
|
||||
or subclass <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> and override the <em class="parameter"><code>GtkGLAreaClass.render()</code></em>
|
||||
virtual
|
||||
function.</p>
|
||||
<p>The <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget ensures that the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> is associated with
|
||||
<p>The <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget ensures that the <span class="type">GdkGLContext</span> is associated with
|
||||
the widget's drawing area, and it is kept updated when the size and
|
||||
position of the drawing area changes.</p>
|
||||
<div class="refsect3">
|
||||
@ -372,7 +372,7 @@ for you to draw its content:</p>
|
||||
19
|
||||
20</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="k">static</span> <span class="n">gboolean</span>
|
||||
<span class="nf">render</span> <span class="p">(</span><span class="n">GtkGLArea</span> <span class="o">*</span><span class="n">area</span><span class="p">,</span> <span class="n">GdkGLContext</span> <span class="o">*</span><span class="n">context</span><span class="p">)</span>
|
||||
<span class="n">render</span> <span class="p">(</span><span class="n">GtkGLArea</span> <span class="o">*</span><span class="n">area</span><span class="p">,</span> <span class="n">GdkGLContext</span> <span class="o">*</span><span class="n">context</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="c1">// inside this function it's safe to use GL; the given</span>
|
||||
<span class="c1">// #GdkGLContext has been made current to the drawable</span>
|
||||
@ -400,7 +400,7 @@ for you to draw its content:</p>
|
||||
<p>If you need to initialize OpenGL state, e.g. buffer objects or
|
||||
shaders, you should use the <a class="link" href="GtkWidget.html#GtkWidget-realize" title="The “realize” signal"><span class="type">“realize”</span></a> signal; you
|
||||
can use the <a class="link" href="GtkWidget.html#GtkWidget-unrealize" title="The “unrealize” signal"><span class="type">“unrealize”</span></a> signal to clean up. Since the
|
||||
<a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> creation and initialization may fail, you will
|
||||
<span class="type">GdkGLContext</span> creation and initialization may fail, you will
|
||||
need to check for errors, using <a class="link" href="GtkGLArea.html#gtk-gl-area-get-error" title="gtk_gl_area_get_error ()"><code class="function">gtk_gl_area_get_error()</code></a>. An example
|
||||
of how to safely initialize the GL state is:</p>
|
||||
<div class="informalexample">
|
||||
@ -441,7 +441,7 @@ of how to safely initialize the GL state is:</p>
|
||||
32
|
||||
33</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="k">static</span> <span class="kt">void</span>
|
||||
<span class="nf">on_realize</span> <span class="p">(</span><span class="n">GtkGLarea</span> <span class="o">*</span><span class="n">area</span><span class="p">)</span>
|
||||
<span class="n">on_realize</span> <span class="p">(</span><span class="n">GtkGLarea</span> <span class="o">*</span><span class="n">area</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="c1">// We need to make the context current if we want to</span>
|
||||
<span class="c1">// call GL API</span>
|
||||
@ -479,7 +479,7 @@ of how to safely initialize the GL state is:</p>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<p>If you need to change the options for creating the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>
|
||||
<p>If you need to change the options for creating the <span class="type">GdkGLContext</span>
|
||||
you should use the <a class="link" href="GtkGLArea.html#GtkGLArea-create-context" title="The “create-context” signal"><span class="type">“create-context”</span></a> signal.</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -499,9 +499,9 @@ gtk_gl_area_new (<em class="parameter"><code><span class="type">void</span></cod
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="gtk-gl-area-get-context"></a><h3>gtk_gl_area_get_context ()</h3>
|
||||
<pre class="programlisting"><a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a> *
|
||||
<pre class="programlisting"><span class="returnvalue">GdkGLContext</span> *
|
||||
gtk_gl_area_get_context (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
|
||||
<p>Retrieves the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by <em class="parameter"><code>area</code></em>
|
||||
<p>Retrieves the <span class="type">GdkGLContext</span> used by <em class="parameter"><code>area</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-gl-area-get-context.parameters"></a><h4>Parameters</h4>
|
||||
@ -520,8 +520,8 @@ gtk_gl_area_get_context (<em class="parameter"><code><a class="link" href="GtkGL
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-gl-area-get-context.returns"></a><h4>Returns</h4>
|
||||
<p>the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
<p>the <span class="type">GdkGLContext</span>. </p>
|
||||
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||||
</div>
|
||||
@ -530,7 +530,7 @@ gtk_gl_area_get_context (<em class="parameter"><code><a class="link" href="GtkGL
|
||||
<a name="gtk-gl-area-make-current"></a><h3>gtk_gl_area_make_current ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
gtk_gl_area_make_current (<em class="parameter"><code><a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area</code></em>);</pre>
|
||||
<p>Ensures that the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by <em class="parameter"><code>area</code></em>
|
||||
<p>Ensures that the <span class="type">GdkGLContext</span> used by <em class="parameter"><code>area</code></em>
|
||||
is associated with
|
||||
the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a>.</p>
|
||||
<p>This function is automatically called before emitting the
|
||||
@ -669,7 +669,7 @@ gtk_gl_area_get_error (<em class="parameter"><code><a class="link" href="GtkGLAr
|
||||
<div class="refsect3">
|
||||
<a name="gtk-gl-area-get-error.returns"></a><h4>Returns</h4>
|
||||
<p>the <span class="type">GError</span> or <code class="literal">NULL</code>. </p>
|
||||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||||
</div>
|
||||
@ -1015,7 +1015,7 @@ gtk_gl_area_set_use_es (<em class="parameter"><code><a class="link" href="GtkGLA
|
||||
<em class="parameter"><code><span class="type">gboolean</span> use_es</code></em>);</pre>
|
||||
<p>Sets whether the <em class="parameter"><code>area</code></em>
|
||||
should create an OpenGL or an OpenGL ES context.</p>
|
||||
<p>You should check the capabilities of the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> before drawing
|
||||
<p>You should check the capabilities of the <span class="type">GdkGLContext</span> before drawing
|
||||
with either API.</p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-gl-area-set-use-es.parameters"></a><h4>Parameters</h4>
|
||||
@ -1142,9 +1142,9 @@ to redraw.</p>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="GtkGLArea--context"></a><h3>The <code class="literal">“context”</code> property</h3>
|
||||
<pre class="programlisting"> “context” <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> *</pre>
|
||||
<p>The <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget.</p>
|
||||
<p>The <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget is responsible for creating the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>
|
||||
<pre class="programlisting"> “context” <span class="type">GdkGLContext</span> *</pre>
|
||||
<p>The <span class="type">GdkGLContext</span> used by the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget.</p>
|
||||
<p>The <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget is responsible for creating the <span class="type">GdkGLContext</span>
|
||||
instance. If you need to render with other kinds of buffers (stencil,
|
||||
depth, etc), use render buffers.</p>
|
||||
<p>Owner: GtkGLArea</p>
|
||||
@ -1191,9 +1191,9 @@ target framebuffer.</p>
|
||||
<div class="refsect2">
|
||||
<a name="GtkGLArea--use-es"></a><h3>The <code class="literal">“use-es”</code> property</h3>
|
||||
<pre class="programlisting"> “use-es” <span class="type">gboolean</span></pre>
|
||||
<p>If set to <code class="literal">TRUE</code> the widget will try to create a <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> using
|
||||
<p>If set to <code class="literal">TRUE</code> the widget will try to create a <span class="type">GdkGLContext</span> using
|
||||
OpenGL ES instead of OpenGL.</p>
|
||||
<p>See also: <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#gdk-gl-context-set-use-es"><code class="function">gdk_gl_context_set_use_es()</code></a></p>
|
||||
<p>See also: <code class="function">gdk_gl_context_set_use_es()</code></p>
|
||||
<p>Owner: GtkGLArea</p>
|
||||
<p>Flags: Read / Write</p>
|
||||
<p>Default value: FALSE</p>
|
||||
@ -1204,7 +1204,7 @@ OpenGL ES instead of OpenGL.</p>
|
||||
<a name="GtkGLArea.signal-details"></a><h2>Signal Details</h2>
|
||||
<div class="refsect2">
|
||||
<a name="GtkGLArea-create-context"></a><h3>The <code class="literal">“create-context”</code> signal</h3>
|
||||
<pre class="programlisting"><a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="returnvalue">GdkGLContext</span></a>*
|
||||
<pre class="programlisting"><span class="returnvalue">GdkGLContext</span>*
|
||||
user_function (<a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area,
|
||||
<span class="type">gpointer</span> user_data)</pre>
|
||||
<p>The ::create-context signal is emitted when the widget is being
|
||||
@ -1244,9 +1244,9 @@ of how the construction failed.</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="GtkGLArea-create-context.returns"></a><h4>Returns</h4>
|
||||
<p>a newly created <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a>;
|
||||
<p>a newly created <span class="type">GdkGLContext</span>;
|
||||
the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> widget will take ownership of the returned value. </p>
|
||||
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
|
||||
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
|
||||
</div>
|
||||
<p>Flags: Run Last</p>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||||
@ -1256,7 +1256,7 @@ the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">G
|
||||
<a name="GtkGLArea-render"></a><h3>The <code class="literal">“render”</code> signal</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
user_function (<a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> *area,
|
||||
<a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> *context,
|
||||
<span class="type">GdkGLContext</span> *context,
|
||||
<span class="type">gpointer</span> user_data)</pre>
|
||||
<p>The ::render signal is emitted every time the contents
|
||||
of the <a class="link" href="GtkGLArea.html" title="GtkGLArea"><span class="type">GtkGLArea</span></a> should be redrawn.</p>
|
||||
@ -1280,7 +1280,7 @@ and the buffers are painted to the window once the emission terminates.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>context</p></td>
|
||||
<td class="parameter_description"><p>the <a href="https://developer.gnome.org/gdk4/GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContext</span></a> used by <em class="parameter"><code>area</code></em>
|
||||
<td class="parameter_description"><p>the <span class="type">GdkGLContext</span> used by <em class="parameter"><code>area</code></em>
|
||||
</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
@ -1353,6 +1353,6 @@ is emitted.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.33.0</div>
|
||||
<hr>Generated by GTK-Doc V1.33.1</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user