alternative to assert
[gtkD.git] / gtkD / srcsv / gsv / SourceMarker.d
blob7aacdaaf800c15360c436633a88e11da5dbfb04c
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 = gtksourceview-GtkSourceMarker.html
26 * outPack = gsv
27 * outFile = SourceMarker
28 * strct = GtkSourceMarker
29 * realStrct=
30 * ctorStrct=
31 * clss = SourceMarker
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_source_marker_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * - glib.Str
45 * structWrap:
46 * module aliases:
47 * local aliases:
50 module gsv.SourceMarker;
52 version(noAssert)
54 version(Tango)
56 import tango.io.Stdout; // use the tango loging?
60 private import gsvc.gsvtypes;
62 private import gsvc.gsv;
65 private import glib.Str;
70 /**
71 * Description
73 public class SourceMarker
76 /** the main Gtk struct */
77 protected GtkSourceMarker* gtkSourceMarker;
80 public GtkSourceMarker* getSourceMarkerStruct()
82 return gtkSourceMarker;
86 /** the main Gtk struct as a void* */
87 protected void* getStruct()
89 return cast(void*)gtkSourceMarker;
92 /**
93 * Sets our main struct and passes it to the parent class
95 public this (GtkSourceMarker* gtkSourceMarker)
97 version(noAssert)
99 if ( gtkSourceMarker is null )
101 int zero = 0;
102 version(Tango)
104 Stdout("struct gtkSourceMarker is null on constructor").newline;
106 else
108 printf("struct gtkSourceMarker is null on constructor");
110 zero = zero / zero;
113 else
115 assert(gtkSourceMarker !is null, "struct gtkSourceMarker is null on constructor");
117 this.gtkSourceMarker = gtkSourceMarker;
125 * marker:
126 * type:
128 public void setMarkerType(char[] type)
130 // void gtk_source_marker_set_marker_type (GtkSourceMarker *marker, const gchar *type);
131 gtk_source_marker_set_marker_type(gtkSourceMarker, Str.toStringz(type));
135 * Gets the marker type of this marker.
136 * marker:
137 * a GtkSourceMarker.
138 * Returns:
139 * the marker type.
141 public char[] getMarkerType()
143 // gchar* gtk_source_marker_get_marker_type (GtkSourceMarker *marker);
144 return Str.toString(gtk_source_marker_get_marker_type(gtkSourceMarker) );
148 * Gets the line number of this marker.
149 * marker:
150 * a GtkSourceMarker.
151 * Returns:
152 * the line number.
154 public int getLine()
156 // gint gtk_source_marker_get_line (GtkSourceMarker *marker);
157 return gtk_source_marker_get_line(gtkSourceMarker);
161 * Gets the name of this marker.
162 * marker:
163 * a GtkSourceMarker.
164 * Returns:
165 * the name.
167 public char[] getName()
169 // const gchar* gtk_source_marker_get_name (GtkSourceMarker *marker);
170 return Str.toString(gtk_source_marker_get_name(gtkSourceMarker) );
174 * Gets the buffer associated with this marker.
175 * marker:
176 * a GtkSourceMarker.
177 * Returns:
178 * the GtkSourceBuffer.
180 public GtkSourceBuffer* getBuffer()
182 // GtkSourceBuffer* gtk_source_marker_get_buffer (GtkSourceMarker *marker);
183 return gtk_source_marker_get_buffer(gtkSourceMarker);
187 * Gets the next marker after marker.
188 * marker:
189 * a GtkSourceMarker.
190 * Returns:
191 * a GtkSourceMarker.
193 public GtkSourceMarker* next()
195 // GtkSourceMarker* gtk_source_marker_next (GtkSourceMarker *marker);
196 return gtk_source_marker_next(gtkSourceMarker);
200 * Gets the previous marker before marker.
201 * marker:
202 * a GtkSourceMarker.
203 * Returns:
204 * a GtkSourceMarker.
206 public GtkSourceMarker* prev()
208 // GtkSourceMarker* gtk_source_marker_prev (GtkSourceMarker *marker);
209 return gtk_source_marker_prev(gtkSourceMarker);