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  * An enumerated type which can be used to indicate whether the terminal allows
192  * the text contents to be blinked.
193  *
194  * Since: 0.52
195  */
196 public enum VteTextBlinkMode
197 {
198 	/**
199 	 * Do not blink the text.
200 	 */
201 	NEVER = 0,
202 	/**
203 	 * Allow blinking text only if the terminal is focused.
204 	 */
205 	FOCUSED = 1,
206 	/**
207 	 * Allow blinking text only if the terminal is unfocused.
208 	 */
209 	UNFOCUSED = 2,
210 	/**
211 	 * Allow blinking text. This is the default.
212 	 */
213 	ALWAYS = 3,
214 }
215 alias VteTextBlinkMode TextBlinkMode;
216 
217 /**
218  * A flag type to determine how terminal contents should be written
219  * to an output stream.
220  */
221 public enum VteWriteFlags
222 {
223 	/**
224 	 * Write contents as UTF-8 text.  This is the default.
225 	 */
226 	DEFAULT = 0,
227 }
228 alias VteWriteFlags WriteFlags;
229 
230 struct VteCharAttributes
231 {
232 	long row;
233 	long column;
234 	PangoColor fore;
235 	PangoColor back;
236 	import std.bitmanip: bitfields;
237 	mixin(bitfields!(
238 		uint, "underline", 1,
239 		uint, "strikethrough", 1,
240 		uint, "", 30
241 	));
242 }
243 
244 struct VtePty;
245 
246 struct VtePtyClass;
247 
248 struct VteRegex;
249 
250 struct VteTerminal
251 {
252 	GtkWidget widget;
253 	void**[1] UnusedPadding;
254 }
255 
256 /**
257  * All of these fields should be considered read-only, except for derived classes.
258  */
259 struct VteTerminalClass
260 {
261 	GtkWidgetClass parentClass;
262 	/** */
263 	extern(C) void function(VteTerminal* terminal) eof;
264 	/** */
265 	extern(C) void function(VteTerminal* terminal, int status) childExited;
266 	/** */
267 	extern(C) void function(VteTerminal* terminal) encodingChanged;
268 	/** */
269 	extern(C) void function(VteTerminal* terminal, uint charWidth, uint charHeight) charSizeChanged;
270 	/** */
271 	extern(C) void function(VteTerminal* terminal) windowTitleChanged;
272 	/** */
273 	extern(C) void function(VteTerminal* terminal) iconTitleChanged;
274 	/** */
275 	extern(C) void function(VteTerminal* terminal) selectionChanged;
276 	/** */
277 	extern(C) void function(VteTerminal* terminal) contentsChanged;
278 	/** */
279 	extern(C) void function(VteTerminal* terminal) cursorMoved;
280 	/** */
281 	extern(C) void function(VteTerminal* terminal, const(char)* text, uint size) commit;
282 	/** */
283 	extern(C) void function(VteTerminal* terminal) deiconifyWindow;
284 	/** */
285 	extern(C) void function(VteTerminal* terminal) iconifyWindow;
286 	/** */
287 	extern(C) void function(VteTerminal* terminal) raiseWindow;
288 	/** */
289 	extern(C) void function(VteTerminal* terminal) lowerWindow;
290 	/** */
291 	extern(C) void function(VteTerminal* terminal) refreshWindow;
292 	/** */
293 	extern(C) void function(VteTerminal* terminal) restoreWindow;
294 	/** */
295 	extern(C) void function(VteTerminal* terminal) maximizeWindow;
296 	/** */
297 	extern(C) void function(VteTerminal* terminal, uint width, uint height) resizeWindow;
298 	/** */
299 	extern(C) void function(VteTerminal* terminal, uint x, uint y) moveWindow;
300 	/** */
301 	extern(C) void function(VteTerminal* terminal) increaseFontSize;
302 	/** */
303 	extern(C) void function(VteTerminal* terminal) decreaseFontSize;
304 	/** */
305 	extern(C) void function(VteTerminal* terminal) textModified;
306 	/** */
307 	extern(C) void function(VteTerminal* terminal) textInserted;
308 	/** */
309 	extern(C) void function(VteTerminal* terminal) textDeleted;
310 	/** */
311 	extern(C) void function(VteTerminal* terminal, int delta) textScrolled;
312 	/** */
313 	extern(C) void function(VteTerminal* terminal) copyClipboard;
314 	/** */
315 	extern(C) void function(VteTerminal* terminal) pasteClipboard;
316 	/** */
317 	extern(C) void function(VteTerminal* terminal) bell;
318 	void*[16] padding;
319 	VteTerminalClassPrivate* priv;
320 }
321 
322 struct VteTerminalClassPrivate;
323 
324 /**
325  * Specifies the type of a selection function used to check whether
326  * a cell has to be selected or not.
327  *
328  * Params:
329  *     terminal = terminal in which the cell is.
330  *     column = column in which the cell is.
331  *     row = row in which the cell is.
332  *     data = user data.
333  *
334  * Returns: %TRUE if cell has to be selected; %FALSE if otherwise.
335  */
336 public alias extern(C) int function(VteTerminal* terminal, glong column, glong row, void* data) VteSelectionFunc;
337 
338 /**
339  * Callback for vte_terminal_spawn_async().
340  *
341  * On success, @pid contains the PID of the spawned process, and @error
342  * is %NULL.
343  * On failure, @pid is -1 and @error contains the error information.
344  *
345  * Params:
346  *     terminal = the #VteTerminal
347  *     pid = a #GPid
348  *     error = a #GError, or %NULL
349  *     userData = user data that was passed to vte_terminal_spawn_async
350  *
351  * Since: 0.48
352  */
353 public alias extern(C) void function(VteTerminal* terminal, GPid pid, GError* error, void* userData) VteTerminalSpawnAsyncCallback;
354 
355 /**
356  * The major version number of the VTE library
357  * (e.g. in version 3.1.4 this is 3).
358  */
359 enum MAJOR_VERSION = 0;
360 alias VTE_MAJOR_VERSION = MAJOR_VERSION;
361 
362 /**
363  * The micro version number of the VTE library
364  * (e.g. in version 3.1.4 this is 4).
365  */
366 enum MICRO_VERSION = 1;
367 alias VTE_MICRO_VERSION = MICRO_VERSION;
368 
369 /**
370  * The minor version number of the VTE library
371  * (e.g. in version 3.1.4 this is 1).
372  */
373 enum MINOR_VERSION = 52;
374 alias VTE_MINOR_VERSION = MINOR_VERSION;
375 
376 enum REGEX_FLAGS_DEFAULT = 1075314688;
377 alias VTE_REGEX_FLAGS_DEFAULT = REGEX_FLAGS_DEFAULT;
378 
379 enum SPAWN_NO_PARENT_ENVV = 33554432;
380 alias VTE_SPAWN_NO_PARENT_ENVV = SPAWN_NO_PARENT_ENVV;