alternative to assert
[gtkD.git] / gtkD / srcgl / glgtk / GLtInit.d
blobdbe8f2379f45d1bf78bba511534b8afa04d761b3
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gtkglext-gtkglinit.html
26 * outPack = glgtk
27 * outFile = GLtInit
28 * strct =
29 * realStrct=
30 * ctorStrct=
31 * clss = GLtInit
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_gl_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * structWrap:
45 * module aliases:
46 * local aliases:
49 module glgtk.GLtInit;
51 version(noAssert)
53 version(Tango)
55 import tango.io.Stdout; // use the tango loging?
59 private import gtkglc.glgtktypes;
61 private import gtkglc.glgtk;
68 /**
69 * Description
71 public class GLtInit
74 /**
77 /**
78 * Call this function before using any other GtkGLExt functions in your
79 * applications. It will initialize everything needed to operate the library
80 * and parses some standard command line options. argc and
81 * argv are adjusted accordingly so your own code will
82 * never see those standard arguments.
83 * Note
84 * This function will terminate your program if it was unable to initialize
85 * the library for some reason. If you want your program to fall back to a
86 * textual interface you want to call gtk_gl_init_check() instead.
87 * argc:
88 * Address of the argc parameter of your
89 * main() function. Changed if any arguments
90 * were handled.
91 * argv:
92 * Address of the argv parameter of
93 * main(). Any parameters understood by
94 * gtk_gl_init() are stripped before return.
96 public static void init(int* argc, char*** argv)
98 // void gtk_gl_init (int *argc, char ***argv);
99 gtk_gl_init(argc, argv);
103 * This function does the same work as gtk_gl_init() with only
104 * a single change: It does not terminate the program if the library can't be
105 * initialized. Instead it returns FALSE on failure.
106 * This way the application can fall back to some other means of communication
107 * with the user - for example a curses or command line interface.
108 * argc:
109 * Address of the argc parameter of your
110 * main() function. Changed if any arguments
111 * were handled.
112 * argv:
113 * Address of the argv parameter of
114 * main(). Any parameters understood by
115 * gtk_gl_init() are stripped before return.
116 * Returns:
117 * TRUE if the GUI has been successfully initialized,
118 * FALSE otherwise.
120 public static int initCheck(int* argc, char*** argv)
122 // gboolean gtk_gl_init_check (int *argc, char ***argv);
123 return gtk_gl_init_check(argc, argv);
127 * Parses command line arguments, and initializes global
128 * attributes of GtkGLExt.
129 * Any arguments used by GtkGLExt are removed from the array and
130 * argc and argv are updated accordingly.
131 * You shouldn't call this function explicitely if you are using
132 * gtk_gl_init(), or gtk_gl_init_check().
133 * argc:
134 * the number of command line arguments.
135 * argv:
136 * the array of command line arguments.
137 * Returns:
138 * TRUE if initialization succeeded, otherwise FALSE.
139 * <<PartIII.GtkGLExt API Reference
140 * OpenGL-Capable Widget>>
142 public static int parseArgs(int* argc, char*** argv)
144 // gboolean gtk_gl_parse_args (int *argc, char ***argv);
145 return gtk_gl_parse_args(argc, argv);