1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module vte.c.types;
26 
27 public import gdk.c.types;
28 public import gio.c.types;
29 public import glib.c.types;
30 public import gobject.c.types;
31 public import gtk.c.types;
32 public import pango.c.types;
33 
34 
35 /**
36  * An enumerated type which can be used to indicate the cursor blink mode
37  * for the terminal.
38  */
39 public enum VteCursorBlinkMode
40 {
41 	/**
42 	 * Follow GTK+ settings for cursor blinking.
43 	 */
44 	SYSTEM = 0,
45 	/**
46 	 * Cursor blinks.
47 	 */
48 	ON = 1,
49 	/**
50 	 * Cursor does not blink.
51 	 */
52 	OFF = 2,
53 }
54 alias VteCursorBlinkMode CursorBlinkMode;
55 
56 /**
57  * An enumerated type which can be used to indicate what should the terminal
58  * draw at the cursor position.
59  */
60 public enum VteCursorShape
61 {
62 	/**
63 	 * Draw a block cursor.  This is the default.
64 	 */
65 	BLOCK = 0,
66 	/**
67 	 * Draw a vertical bar on the left side of character.
68 	 * This is similar to the default cursor for other GTK+ widgets.
69 	 */
70 	IBEAM = 1,
71 	/**
72 	 * Draw a horizontal bar below the character.
73 	 */
74 	UNDERLINE = 2,
75 }
76 alias VteCursorShape CursorShape;
77 
78 /**
79  * An enumerated type which can be used to indicate which string the terminal
80  * should send to an application when the user presses the Delete or Backspace
81  * keys.
82  */
83 public enum VteEraseBinding
84 {
85 	/**
86 	 * For backspace, attempt to determine the right value from the terminal's IO settings.  For delete, use the control sequence.
87 	 */
88 	AUTO = 0,
89 	/**
90 	 * Send an ASCII backspace character (0x08).
91 	 */
92 	ASCII_BACKSPACE = 1,
93 	/**
94 	 * Send an ASCII delete character (0x7F).
95 	 */
96 	ASCII_DELETE = 2,
97 	/**
98 	 * Send the "@@7" control sequence.
99 	 */
100 	DELETE_SEQUENCE = 3,
101 	/**
102 	 * Send terminal's "erase" setting.
103 	 */
104 	TTY = 4,
105 }
106 alias VteEraseBinding EraseBinding;
107 
108 /**
109  * An enumeratio type that can be used to specify the format the selection
110  * should be copied to the clipboard in.
111  *
112  * Since: 0.50
113  */
114 public enum VteFormat
115 {
116 	/**
117 	 * Export as plain text
118 	 */
119 	TEXT = 1,
120 	/**
121 	 * Export as HTML formatted text
122 	 */
123 	HTML = 2,
124 }
125 alias VteFormat Format;
126 
127 public enum VtePtyError
128 {
129 	/**
130 	 * Obsolete. Deprecated: 0.42
131 	 */
132 	PTY_HELPER_FAILED = 0,
133 	/**
134 	 * failure when using PTY98 to allocate the PTY
135 	 */
136 	PTY98_FAILED = 1,
137 }
138 alias VtePtyError PtyError;
139 
140 public enum VtePtyFlags
141 {
142 	/**
143 	 * Unused. Deprecated: 0.38
144 	 */
145 	NO_LASTLOG = 1,
146 	/**
147 	 * Unused. Deprecated: 0.38
148 	 */
149 	NO_UTMP = 2,
150 	/**
151 	 * Unused. Deprecated: 0.38
152 	 */
153 	NO_WTMP = 4,
154 	/**
155 	 * Unused. Deprecated: 0.38
156 	 */
157 	NO_HELPER = 8,
158 	/**
159 	 * Unused. Deprecated: 0.38
160 	 */
161 	NO_FALLBACK = 16,
162 	/**
163 	 * the default flags
164 	 */
165 	DEFAULT = 0,
166 }
167 alias VtePtyFlags PtyFlags;
168 
169 /**
170  * An enum type for regex errors. In addition to the values listed above,
171  * any PCRE2 error values may occur.
172  *
173  * Since: 0.46
174  */
175 public enum VteRegexError
176 {
177 	/**
178 	 * The PCRE2 library was built without
179 	 * Unicode support which is required for VTE
180 	 */
181 	INCOMPATIBLE = 2147483646,
182 	/**
183 	 * Regexes are not supported because VTE was
184 	 * built without PCRE2 support
185 	 */
186 	NOT_SUPPORTED = 2147483647,
187 }
188 alias VteRegexError RegexError;
189 
190 /**
191  * A flag type to determine how terminal contents should be written
192  * to an output stream.
193  */
194 public enum VteWriteFlags
195 {
196 	/**
197 	 * Write contents as UTF-8 text.  This is the default.
198 	 */
199 	DEFAULT = 0,
200 }
201 alias VteWriteFlags WriteFlags;
202 
203 struct VteCharAttributes
204 {
205 	long row;
206 	long column;
207 	PangoColor fore;
208 	PangoColor back;
209 	import std.bitmanip: bitfields;
210 	mixin(bitfields!(
211 		uint, "underline", 1,
212 		uint, "strikethrough", 1,
213 		uint, "", 30
214 	));
215 }
216 
217 struct VtePty;
218 
219 struct VtePtyClass;
220 
221 struct VteRegex;
222 
223 struct VteTerminal
224 {
225 	GtkWidget widget;
226 	void**[1] UnusedPadding;
227 }
228 
229 /**
230  * All of these fields should be considered read-only, except for derived classes.
231  */
232 struct VteTerminalClass
233 {
234 	GtkWidgetClass parentClass;
235 	/** */
236 	extern(C) void function(VteTerminal* terminal) eof;
237 	/** */
238 	extern(C) void function(VteTerminal* terminal, int status) childExited;
239 	/** */
240 	extern(C) void function(VteTerminal* terminal) encodingChanged;
241 	/** */
242 	extern(C) void function(VteTerminal* terminal, uint charWidth, uint charHeight) charSizeChanged;
243 	/** */
244 	extern(C) void function(VteTerminal* terminal) windowTitleChanged;
245 	/** */
246 	extern(C) void function(VteTerminal* terminal) iconTitleChanged;
247 	/** */
248 	extern(C) void function(VteTerminal* terminal) selectionChanged;
249 	/** */
250 	extern(C) void function(VteTerminal* terminal) contentsChanged;
251 	/** */
252 	extern(C) void function(VteTerminal* terminal) cursorMoved;
253 	/** */
254 	extern(C) void function(VteTerminal* terminal, const(char)* text, uint size) commit;
255 	/** */
256 	extern(C) void function(VteTerminal* terminal) deiconifyWindow;
257 	/** */
258 	extern(C) void function(VteTerminal* terminal) iconifyWindow;
259 	/** */
260 	extern(C) void function(VteTerminal* terminal) raiseWindow;
261 	/** */
262 	extern(C) void function(VteTerminal* terminal) lowerWindow;
263 	/** */
264 	extern(C) void function(VteTerminal* terminal) refreshWindow;
265 	/** */
266 	extern(C) void function(VteTerminal* terminal) restoreWindow;
267 	/** */
268 	extern(C) void function(VteTerminal* terminal) maximizeWindow;
269 	/** */
270 	extern(C) void function(VteTerminal* terminal, uint width, uint height) resizeWindow;
271 	/** */
272 	extern(C) void function(VteTerminal* terminal, uint x, uint y) moveWindow;
273 	/** */
274 	extern(C) void function(VteTerminal* terminal) increaseFontSize;
275 	/** */
276 	extern(C) void function(VteTerminal* terminal) decreaseFontSize;
277 	/** */
278 	extern(C) void function(VteTerminal* terminal) textModified;
279 	/** */
280 	extern(C) void function(VteTerminal* terminal) textInserted;
281 	/** */
282 	extern(C) void function(VteTerminal* terminal) textDeleted;
283 	/** */
284 	extern(C) void function(VteTerminal* terminal, int delta) textScrolled;
285 	/** */
286 	extern(C) void function(VteTerminal* terminal) copyClipboard;
287 	/** */
288 	extern(C) void function(VteTerminal* terminal) pasteClipboard;
289 	/** */
290 	extern(C) void function(VteTerminal* terminal) bell;
291 	void*[16] padding;
292 	VteTerminalClassPrivate* priv;
293 }
294 
295 struct VteTerminalClassPrivate;
296 
297 /**
298  * Specifies the type of a selection function used to check whether
299  * a cell has to be selected or not.
300  *
301  * Params:
302  *     terminal = terminal in which the cell is.
303  *     column = column in which the cell is.
304  *     row = row in which the cell is.
305  *     data = user data.
306  *
307  * Returns: %TRUE if cell has to be selected; %FALSE if otherwise.
308  */
309 public alias extern(C) int function(VteTerminal* terminal, glong column, glong row, void* data) VteSelectionFunc;
310 
311 /**
312  * Callback for vte_terminal_spawn_async().
313  *
314  * On success, @pid contains the PID of the spawned process, and @error
315  * is %NULL.
316  * On failure, @pid is -1 and @error contains the error information.
317  *
318  * Params:
319  *     terminal = the #VteTerminal
320  *     pid = a #GPid
321  *     error = a #GError, or %NULL
322  *     userData = user data that was passed to vte_terminal_spawn_async
323  *
324  * Since: 0.48
325  */
326 public alias extern(C) void function(VteTerminal* terminal, GPid pid, GError* error, void* userData) VteTerminalSpawnAsyncCallback;
327 
328 /**
329  * The major version number of the VTE library
330  * (e.g. in version 3.1.4 this is 3).
331  */
332 enum MAJOR_VERSION = 0;
333 alias VTE_MAJOR_VERSION = MAJOR_VERSION;
334 
335 /**
336  * The micro version number of the VTE library
337  * (e.g. in version 3.1.4 this is 4).
338  */
339 enum MICRO_VERSION = 2;
340 alias VTE_MICRO_VERSION = MICRO_VERSION;
341 
342 /**
343  * The minor version number of the VTE library
344  * (e.g. in version 3.1.4 this is 1).
345  */
346 enum MINOR_VERSION = 50;
347 alias VTE_MINOR_VERSION = MINOR_VERSION;
348 
349 enum REGEX_FLAGS_DEFAULT = 1075314688;
350 alias VTE_REGEX_FLAGS_DEFAULT = REGEX_FLAGS_DEFAULT;
351 
352 enum SPAWN_NO_PARENT_ENVV = 33554432;
353 alias VTE_SPAWN_NO_PARENT_ENVV = SPAWN_NO_PARENT_ENVV;