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 vtec.vtetypes;
26 
27 public import gtkc.gtktypes;
28 
29 /**
30  * An enumerated type which can be used to indicate the cursor blink mode
31  * for the terminal.
32  */
33 public enum VteCursorBlinkMode
34 {
35 	/**
36 	 * Follow GTK+ settings for cursor blinking.
37 	 */
38 	SYSTEM = 0,
39 	/**
40 	 * Cursor blinks.
41 	 */
42 	ON = 1,
43 	/**
44 	 * Cursor does not blink.
45 	 */
46 	OFF = 2,
47 }
48 alias VteCursorBlinkMode CursorBlinkMode;
49 
50 /**
51  * An enumerated type which can be used to indicate what should the terminal
52  * draw at the cursor position.
53  */
54 public enum VteCursorShape
55 {
56 	/**
57 	 * Draw a block cursor.  This is the default.
58 	 */
59 	BLOCK = 0,
60 	/**
61 	 * Draw a vertical bar on the left side of character.
62 	 * This is similar to the default cursor for other GTK+ widgets.
63 	 */
64 	IBEAM = 1,
65 	/**
66 	 * Draw a horizontal bar below the character.
67 	 */
68 	UNDERLINE = 2,
69 }
70 alias VteCursorShape CursorShape;
71 
72 /**
73  * An enumerated type which can be used to indicate which string the terminal
74  * should send to an application when the user presses the Delete or Backspace
75  * keys.
76  */
77 public enum VteEraseBinding
78 {
79 	/**
80 	 * For backspace, attempt to determine the right value from the terminal's IO settings.  For delete, use the control sequence.
81 	 */
82 	AUTO = 0,
83 	/**
84 	 * Send an ASCII backspace character (0x08).
85 	 */
86 	ASCII_BACKSPACE = 1,
87 	/**
88 	 * Send an ASCII delete character (0x7F).
89 	 */
90 	ASCII_DELETE = 2,
91 	/**
92 	 * Send the "@@7" control sequence.
93 	 */
94 	DELETE_SEQUENCE = 3,
95 	/**
96 	 * Send terminal's "erase" setting.
97 	 */
98 	TTY = 4,
99 }
100 alias VteEraseBinding EraseBinding;
101 
102 public enum VtePtyError
103 {
104 	/**
105 	 * Obsolete. Deprecated: 0.42
106 	 */
107 	PTY_HELPER_FAILED = 0,
108 	/**
109 	 * failure when using PTY98 to allocate the PTY
110 	 */
111 	PTY98_FAILED = 1,
112 }
113 alias VtePtyError PtyError;
114 
115 public enum VtePtyFlags
116 {
117 	/**
118 	 * Unused. Deprecated: 0.38
119 	 */
120 	NO_LASTLOG = 1,
121 	/**
122 	 * Unused. Deprecated: 0.38
123 	 */
124 	NO_UTMP = 2,
125 	/**
126 	 * Unused. Deprecated: 0.38
127 	 */
128 	NO_WTMP = 4,
129 	/**
130 	 * Unused. Deprecated: 0.38
131 	 */
132 	NO_HELPER = 8,
133 	/**
134 	 * Unused. Deprecated: 0.38
135 	 */
136 	NO_FALLBACK = 16,
137 	/**
138 	 * the default flags
139 	 */
140 	DEFAULT = 0,
141 }
142 alias VtePtyFlags PtyFlags;
143 
144 /**
145  * An enum type for regex errors. In addition to the values listed above,
146  * any PCRE2 error values may occur.
147  *
148  * Since: 0.46
149  */
150 public enum VteRegexError
151 {
152 	/**
153 	 * The PCRE2 library was built without
154 	 * Unicode support which is required for VTE
155 	 */
156 	INCOMPATIBLE = 2147483646,
157 	/**
158 	 * Regexes are not supported because VTE was
159 	 * built without PCRE2 support
160 	 */
161 	NOT_SUPPORTED = 2147483647,
162 }
163 alias VteRegexError RegexError;
164 
165 /**
166  * A flag type to determine how terminal contents should be written
167  * to an output stream.
168  */
169 public enum VteWriteFlags
170 {
171 	/**
172 	 * Write contents as UTF-8 text.  This is the default.
173 	 */
174 	DEFAULT = 0,
175 }
176 alias VteWriteFlags WriteFlags;
177 
178 struct VteCharAttributes
179 {
180 	long row;
181 	long column;
182 	PangoColor fore;
183 	PangoColor back;
184 	import std.bitmanip: bitfields;
185 	mixin(bitfields!(
186 		uint, "underline", 1,
187 		uint, "strikethrough", 1,
188 		uint, "", 30
189 	));
190 }
191 
192 struct VtePty;
193 
194 struct VtePtyClass;
195 
196 struct VteRegex;
197 
198 struct VteTerminal
199 {
200 	GtkWidget widget;
201 	void**[1] UnusedPadding;
202 }
203 
204 /**
205  * All of these fields should be considered read-only, except for derived classes.
206  */
207 struct VteTerminalClass
208 {
209 	GtkWidgetClass parentClass;
210 	/** */
211 	extern(C) void function(VteTerminal* terminal) eof;
212 	/** */
213 	extern(C) void function(VteTerminal* terminal, int status) childExited;
214 	/** */
215 	extern(C) void function(VteTerminal* terminal) encodingChanged;
216 	/** */
217 	extern(C) void function(VteTerminal* terminal, uint charWidth, uint charHeight) charSizeChanged;
218 	/** */
219 	extern(C) void function(VteTerminal* terminal) windowTitleChanged;
220 	/** */
221 	extern(C) void function(VteTerminal* terminal) iconTitleChanged;
222 	/** */
223 	extern(C) void function(VteTerminal* terminal) selectionChanged;
224 	/** */
225 	extern(C) void function(VteTerminal* terminal) contentsChanged;
226 	/** */
227 	extern(C) void function(VteTerminal* terminal) cursorMoved;
228 	/** */
229 	extern(C) void function(VteTerminal* terminal, const(char)* text, uint size) commit;
230 	/** */
231 	extern(C) void function(VteTerminal* terminal) deiconifyWindow;
232 	/** */
233 	extern(C) void function(VteTerminal* terminal) iconifyWindow;
234 	/** */
235 	extern(C) void function(VteTerminal* terminal) raiseWindow;
236 	/** */
237 	extern(C) void function(VteTerminal* terminal) lowerWindow;
238 	/** */
239 	extern(C) void function(VteTerminal* terminal) refreshWindow;
240 	/** */
241 	extern(C) void function(VteTerminal* terminal) restoreWindow;
242 	/** */
243 	extern(C) void function(VteTerminal* terminal) maximizeWindow;
244 	/** */
245 	extern(C) void function(VteTerminal* terminal, uint width, uint height) resizeWindow;
246 	/** */
247 	extern(C) void function(VteTerminal* terminal, uint x, uint y) moveWindow;
248 	/** */
249 	extern(C) void function(VteTerminal* terminal) increaseFontSize;
250 	/** */
251 	extern(C) void function(VteTerminal* terminal) decreaseFontSize;
252 	/** */
253 	extern(C) void function(VteTerminal* terminal) textModified;
254 	/** */
255 	extern(C) void function(VteTerminal* terminal) textInserted;
256 	/** */
257 	extern(C) void function(VteTerminal* terminal) textDeleted;
258 	/** */
259 	extern(C) void function(VteTerminal* terminal, int delta) textScrolled;
260 	/** */
261 	extern(C) void function(VteTerminal* terminal) copyClipboard;
262 	/** */
263 	extern(C) void function(VteTerminal* terminal) pasteClipboard;
264 	/** */
265 	extern(C) void function(VteTerminal* terminal) bell;
266 	void*[16] padding;
267 	VteTerminalClassPrivate* priv;
268 }
269 
270 struct VteTerminalClassPrivate;
271 
272 /**
273  * Specifies the type of a selection function used to check whether
274  * a cell has to be selected or not.
275  *
276  * Params:
277  *     terminal = terminal in which the cell is.
278  *     column = column in which the cell is.
279  *     row = row in which the cell is.
280  *     data = user data.
281  *
282  * Returns: %TRUE if cell has to be selected; %FALSE if otherwise.
283  */
284 public alias extern(C) int function(VteTerminal* terminal, glong column, glong row, void* data) VteSelectionFunc;
285 
286 /**
287  * Callback for vte_terminal_spawn_async().
288  *
289  * On success, @pid contains the PID of the spawned process, and @error
290  * is %NULL.
291  * On failure, @pid is -1 and @error contains the error information.
292  *
293  * Params:
294  *     terminal = the #VteTerminal
295  *     pid = a #GPid
296  *     error = a #GError, or %NULL
297  *     userData = user data that was passed to vte_terminal_spawn_async
298  *
299  * Since: 0.48
300  */
301 public alias extern(C) void function(VteTerminal* terminal, GPid pid, GError* error, void* userData) VteTerminalSpawnAsyncCallback;