~ubuntu-branches/ubuntu/gutsy/gtkglext/gutsy

« back to all changes in this revision

Viewing changes to docs/reference/gtkglext/html/gtkglext-gtkglinit.html

  • Committer: Bazaar Package Importer
  • Author(s): Marcelo E. Magallon
  • Date: 2004-04-03 17:43:17 UTC
  • Revision ID: james.westby@ubuntu.com-20040403174317-d5gb2d2gftaligp8
Tags: upstream-1.0.6
Import upstream version 1.0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Initialization</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
 
2
        .synopsis, .classsynopsis {
 
3
            background: #eeeeee;
 
4
            border: solid 1px #aaaaaa;
 
5
            padding: 0.5em;
 
6
        }
 
7
        .programlisting {
 
8
            background: #eeeeff;
 
9
            border: solid 1px #aaaaff;
 
10
            padding: 0.5em;
 
11
        }
 
12
        .variablelist {
 
13
            padding: 4px;
 
14
            margin-left: 3em;
 
15
        }
 
16
        .navigation {
 
17
            background: #ffeeee;
 
18
            border: solid 1px #ffaaaa;
 
19
            margin-top: 0.5em;
 
20
            margin-bottom: 0.5em;
 
21
        }
 
22
        .navigation a {
 
23
            color: #770000;
 
24
        }
 
25
        .navigation a:visited {
 
26
            color: #550000;
 
27
        }
 
28
        .navigation .title {
 
29
            font-size: 200%;
 
30
        }
 
31
      </style><link rel="home" href="index.html" title="GtkGLExt Reference Manual"><link rel="up" href="GtkGLExt-API.html" title="Part�III.�GtkGLExt API Reference"><link rel="previous" href="GtkGLExt-API.html" title="Part�III.�GtkGLExt API Reference"><link rel="next" href="gtkglext-gtkglwidget.html" title="OpenGL-Capable Widget"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="GtkGLExt-API.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="GtkGLExt-API.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GtkGLExt Reference Manual</th><td><a accesskey="n" href="gtkglext-gtkglwidget.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="gtkglext-gtkglinit"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">Initialization</span></h2><p>Initialization &#8212; Library initialization functions</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
 
32
 
 
33
#include &lt;gtk/gtkgl.h&gt;
 
34
 
 
35
 
 
36
void        <a href="gtkglext-gtkglinit.html#gtk-gl-init">gtk_gl_init</a>                     (int *argc,
 
37
                                             char ***argv);
 
38
gboolean    <a href="gtkglext-gtkglinit.html#gtk-gl-init-check">gtk_gl_init_check</a>               (int *argc,
 
39
                                             char ***argv);
 
40
gboolean    <a href="gtkglext-gtkglinit.html#gtk-gl-parse-args">gtk_gl_parse_args</a>               (int *argc,
 
41
                                             char ***argv);
 
42
</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
 
43
 
 
44
</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="gtk-gl-init"></a>gtk_gl_init ()</h3><pre class="programlisting">void        gtk_gl_init                     (int *argc,
 
45
                                             char ***argv);</pre><p>
 
46
Call this function before using any other GtkGLExt functions in your 
 
47
applications.  It will initialize everything needed to operate the library
 
48
and parses some standard command line options. <i class="parameter"><tt>argc</tt></i> and 
 
49
<i class="parameter"><tt>argv</tt></i> are adjusted accordingly so your own code will 
 
50
never see those standard arguments.
 
51
</p><p>
 
52
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
 
53
This function will terminate your program if it was unable to initialize 
 
54
the library for some reason. If you want your program to fall back to a 
 
55
textual interface you want to call <a href="gtkglext-gtkglinit.html#gtk-gl-init-check">gtk_gl_init_check</a>() instead.
 
56
</p></div><p>
 
57
 
 
58
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>argc</tt></i>�:</span></td><td> Address of the <i class="parameter"><tt>argc</tt></i> parameter of your 
 
59
       <tt class="function">main()</tt> function. Changed if any arguments
 
60
       were handled.
 
61
</td></tr><tr><td><span class="term"><i class="parameter"><tt>argv</tt></i>�:</span></td><td> Address of the <i class="parameter"><tt>argv</tt></i> parameter of 
 
62
       <tt class="function">main()</tt>. Any parameters understood by
 
63
       <a href="gtkglext-gtkglinit.html#gtk-gl-init">gtk_gl_init</a>() are stripped before return.
 
64
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gtk-gl-init-check"></a>gtk_gl_init_check ()</h3><pre class="programlisting">gboolean    gtk_gl_init_check               (int *argc,
 
65
                                             char ***argv);</pre><p>
 
66
This function does the same work as <a href="gtkglext-gtkglinit.html#gtk-gl-init">gtk_gl_init</a>() with only 
 
67
a single change: It does not terminate the program if the library can't be 
 
68
initialized. Instead it returns <tt class="literal">FALSE</tt> on failure.
 
69
</p><p>
 
70
This way the application can fall back to some other means of communication 
 
71
with the user - for example a curses or command line interface.</p><p>
 
72
 
 
73
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>argc</tt></i>�:</span></td><td> Address of the <i class="parameter"><tt>argc</tt></i> parameter of your 
 
74
       <tt class="function">main()</tt> function. Changed if any arguments
 
75
       were handled.
 
76
</td></tr><tr><td><span class="term"><i class="parameter"><tt>argv</tt></i>�:</span></td><td> Address of the <i class="parameter"><tt>argv</tt></i> parameter of 
 
77
       <tt class="function">main()</tt>. Any parameters understood by
 
78
       <a href="gtkglext-gtkglinit.html#gtk-gl-init">gtk_gl_init</a>() are stripped before return.
 
79
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt class="literal">TRUE</tt> if the GUI has been successfully initialized, 
 
80
              <tt class="literal">FALSE</tt> otherwise.
 
81
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gtk-gl-parse-args"></a>gtk_gl_parse_args ()</h3><pre class="programlisting">gboolean    gtk_gl_parse_args               (int *argc,
 
82
                                             char ***argv);</pre><p>
 
83
Parses command line arguments, and initializes global
 
84
attributes of GtkGLExt.
 
85
</p><p>
 
86
Any arguments used by GtkGLExt are removed from the array and
 
87
<i class="parameter"><tt>argc</tt></i> and <i class="parameter"><tt>argv</tt></i> are updated accordingly.
 
88
</p><p>
 
89
You shouldn't call this function explicitely if you are using
 
90
<a href="gtkglext-gtkglinit.html#gtk-gl-init">gtk_gl_init</a>(), or <a href="gtkglext-gtkglinit.html#gtk-gl-init-check">gtk_gl_init_check</a>().</p><p>
 
91
 
 
92
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>argc</tt></i>�:</span></td><td> the number of command line arguments.
 
93
</td></tr><tr><td><span class="term"><i class="parameter"><tt>argv</tt></i>�:</span></td><td> the array of command line arguments.
 
94
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt class="literal">TRUE</tt> if initialization succeeded, otherwise <tt class="literal">FALSE</tt>.
 
95
</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="GtkGLExt-API.html"><b>&lt;&lt;�Part�III.�GtkGLExt API Reference</b></a></td><td align="right"><a accesskey="n" href="gtkglext-gtkglwidget.html"><b>OpenGL-Capable Widget�&gt;&gt;</b></a></td></tr></table></body></html>