\hypertarget{vte_8c}{
\section{vte.c File Reference}
\label{vte_8c}\index{vte.c@{vte.c}}
}
{\tt \#include \char`\"{}gnoclVTE.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
static int \hyperlink{vte_8c_5a09ecd13795caa609a615d957b31b2b}{vteFunc} (ClientData data, Tcl\_\-Interp $\ast$interp, int objc, Tcl\_\-Obj $\ast$const objv\mbox{[}$\,$\mbox{]})
\item 
static int \hyperlink{vte_8c_c35e6cf0e4e6b8ea78898f3ff8c0ea84}{configure} (Tcl\_\-Interp $\ast$interp, GtkWidget $\ast$term, GnoclOption options\mbox{[}$\,$\mbox{]})
\begin{CompactList}\small\item\em Configure the vte widget based upon parameters passed to the calling function. \item\end{CompactList}\item 
int \hyperlink{vte_8c_6bbed7a74ce4caa4235d65698f551a6b}{gnoclVTECmd} (ClientData data, Tcl\_\-Interp $\ast$interp, int objc, Tcl\_\-Obj $\ast$const objv\mbox{[}$\,$\mbox{]})
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
static GnoclOption \hyperlink{vte_8c_7eb5d064f64bc8c0760934781439cde7}{vteOptions} \mbox{[}$\,$\mbox{]}
\end{CompactItemize}


\subsection{Function Documentation}
\hypertarget{vte_8c_c35e6cf0e4e6b8ea78898f3ff8c0ea84}{
\index{vte.c@{vte.c}!configure@{configure}}
\index{configure@{configure}!vte.c@{vte.c}}
\subsubsection[configure]{\setlength{\rightskip}{0pt plus 5cm}static int configure (Tcl\_\-Interp $\ast$ {\em interp}, \/  GtkWidget $\ast$ {\em term}, \/  GnoclOption {\em options}\mbox{[}$\,$\mbox{]})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{vte_8c_c35e6cf0e4e6b8ea78898f3ff8c0ea84}


Configure the vte widget based upon parameters passed to the calling function. 

\begin{Desc}
\item[Author:]WJG \end{Desc}
\begin{Desc}
\item[Date:]12-03-2008 \end{Desc}
\begin{Desc}
\item[\hyperlink{bug__bug000003}{Bug}]none \end{Desc}


Definition at line 97 of file vte.c.

Referenced by gnoclVTECmd().

\begin{Code}\begin{verbatim}101 {
102         g_print ( "vte/configure\n" );
103         return TCL_OK;
104 }
\end{verbatim}
\end{Code}


\hypertarget{vte_8c_6bbed7a74ce4caa4235d65698f551a6b}{
\index{vte.c@{vte.c}!gnoclVTECmd@{gnoclVTECmd}}
\index{gnoclVTECmd@{gnoclVTECmd}!vte.c@{vte.c}}
\subsubsection[gnoclVTECmd]{\setlength{\rightskip}{0pt plus 5cm}int gnoclVTECmd (ClientData {\em data}, \/  Tcl\_\-Interp $\ast$ {\em interp}, \/  int {\em objc}, \/  Tcl\_\-Obj $\ast$const  {\em objv}\mbox{[}$\,$\mbox{]})}}
\label{vte_8c_6bbed7a74ce4caa4235d65698f551a6b}


gnoclVTECmd 

Definition at line 110 of file vte.c.

References configure(), vteFunc(), and vteOptions.

\begin{Code}\begin{verbatim}115 {
116 
117         g_print ( "gnoclVTECmd\n" );
118 
119         int               ret;
120         GtkWidget *term;
121 
122         if ( gnoclParseOptions ( interp, objc, objv, vteOptions ) != TCL_OK )
123         {
124                 gnoclClearOptions ( vteOptions );
125                 return TCL_ERROR;
126         }
127 
128 
129         GtkWidget *terminal = vte_terminal_new ();
130 
131         GtkWidget *scrollbar = gtk_vscrollbar_new ( vte_terminal_get_adjustment
132                                                    ( VTE_TERMINAL ( terminal ) ) );
133         GtkWidget *hbox = gtk_hbox_new ( FALSE, 0 );
134 
135         vte_terminal_fork_command ( VTE_TERMINAL ( terminal ), "/bin/bash",
136                                                                 NULL, NULL, g_get_home_dir (), FALSE, FALSE, FALSE );
137         vte_terminal_set_font_from_string ( VTE_TERMINAL ( terminal ), "Monospace 9" );
138         vte_terminal_set_scroll_on_output ( VTE_TERMINAL ( terminal ), FALSE );
139         vte_terminal_set_scroll_on_keystroke ( VTE_TERMINAL ( terminal ), TRUE );
140         vte_terminal_set_mouse_autohide ( VTE_TERMINAL ( terminal ), TRUE );
141 
142         gtk_box_pack_start ( GTK_BOX ( hbox ), terminal, TRUE, TRUE, 0 );
143 
144         gtk_box_pack_start ( GTK_BOX ( hbox ), scrollbar, FALSE, FALSE, 0 );
145 
146         /* set options */
147 
148 
149         gtk_widget_show ( GTK_WIDGET ( terminal ) );
150 
151         ret = gnoclSetOptions ( interp, vteOptions, G_OBJECT ( terminal ), -1 );
152 
153         if ( ret == TCL_OK )
154         {
155                 ret = configure ( interp, terminal, vteOptions );
156         }
157 
158         gnoclClearOptions ( vteOptions );
159 
160         if ( ret != TCL_OK )
161         {
162                 gtk_widget_destroy ( GTK_WIDGET ( terminal ) );
163                 return TCL_ERROR;
164         }
165 
166 
167         char *command = "mc\n";
168 
169         /* -background */
170         GdkColor color;
171         gchar text[] = "red";
172         gdk_color_parse ( &text, &color );
173         vte_terminal_set_color_background ( VTE_TERMINAL ( terminal ), &color );
174 
175         /* -foreground */
176         vte_terminal_set_color_foreground ( VTE_TERMINAL ( terminal ), &color );
177 
178         /* -tint */
179         vte_terminal_set_background_tint_color ( VTE_TERMINAL ( terminal ), &color );
180 
181         /* -bold */
182         vte_terminal_set_color_bold ( VTE_TERMINAL ( terminal ), &color );
183 
184         /* -saturation */
185         vte_terminal_set_background_saturation ( VTE_TERMINAL ( terminal ), 0.5 );
186 
187         /* -transparent */
188         vte_terminal_set_background_transparent ( VTE_TERMINAL ( terminal ), 1 );
189 
190         /* -backgroundImage */
191         vte_terminal_set_background_image_file ( VTE_TERMINAL ( terminal ), "./EU_flag.jpg" );
192 
193         /* -scrollBackground */
194         vte_terminal_set_scroll_background ( VTE_TERMINAL ( terminal ), 1 );
195 
196         /* -cursor
197          * typedef enum {
198             VTE_CURSOR_SHAPE_BLOCK,
199             VTE_CURSOR_SHAPE_IBEAM,
200             VTE_CURSOR_SHAPE_UNDERLINE
201                 } VteTerminalCursorShape;
202          * */
203         /* not available */
204         /*
205          vte_terminal_set_cursor_shape (VTE_TERMINAL (terminal),1);
206         */
207 
208         /* -cursorBlink default = 0*/
209         vte_terminal_set_cursor_blinks ( VTE_TERMINAL ( terminal ), 1 );
210 
211         /* -mouseHide default = 1*/
212         vte_terminal_set_mouse_autohide ( VTE_TERMINAL ( terminal ), 0 );
213 
214         /* -font */
215         // vte_terminal_set_font_from_string (VTE_TERMINAL (terminal), text);
216 
217         /* -hearBell default = 0 */
218         vte_terminal_set_audible_bell ( VTE_TERMINAL ( terminal ), 1 );
219 
220         /* -seeBell default = 0 */
221         vte_terminal_set_visible_bell ( VTE_TERMINAL ( terminal ), 1 );
222 
223         /* -allowBold */
224         vte_terminal_set_allow_bold ( VTE_TERMINAL ( terminal ), 1 );
225 
226         /* id feed ??string?? */
227         vte_terminal_feed_child ( VTE_TERMINAL ( terminal ), command, strlen ( command ) );
228 
229         return gnoclRegisterWidget ( interp, GTK_WIDGET ( hbox ) , vteFunc );
230 
231         //return TCL_OK;
232 
233 }
\end{verbatim}
\end{Code}


\hypertarget{vte_8c_5a09ecd13795caa609a615d957b31b2b}{
\index{vte.c@{vte.c}!vteFunc@{vteFunc}}
\index{vteFunc@{vteFunc}!vte.c@{vte.c}}
\subsubsection[vteFunc]{\setlength{\rightskip}{0pt plus 5cm}static int vteFunc (ClientData {\em data}, \/  Tcl\_\-Interp $\ast$ {\em interp}, \/  int {\em objc}, \/  Tcl\_\-Obj $\ast$const  {\em objv}\mbox{[}$\,$\mbox{]})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{vte_8c_5a09ecd13795caa609a615d957b31b2b}


vteFunc 

Definition at line 82 of file vte.c.

Referenced by gnoclVTECmd().

\begin{Code}\begin{verbatim}87 {
88         return TCL_OK;
89 }
\end{verbatim}
\end{Code}




\subsection{Variable Documentation}
\hypertarget{vte_8c_7eb5d064f64bc8c0760934781439cde7}{
\index{vte.c@{vte.c}!vteOptions@{vteOptions}}
\index{vteOptions@{vteOptions}!vte.c@{vte.c}}
\subsubsection[vteOptions]{\setlength{\rightskip}{0pt plus 5cm}GnoclOption {\bf vteOptions}\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{vte_8c_7eb5d064f64bc8c0760934781439cde7}


Widget options 

Definition at line 35 of file vte.c.

Referenced by gnoclVTECmd().