Exemple #1
0
func (t Terminal) SetColors(foreground string, background string, palette []string) {
	fColor := createColor(foreground)
	bColor := createColor(background)
	pColors := new([16]C.GdkColor)
	for i := 0; i < len(pColors); i++ {
		C.gdk_color_parse((*C.gchar)(C.CString(palette[i])), &pColors[i])
	}
	C.vte_terminal_set_colors(C.toVTerminal(t.Widget), &fColor, &bColor, (*C.GdkColor)(unsafe.Pointer(pColors)), 16)
}
Exemple #2
0
func (t Terminal) Fork(args []string) {
	argv := C.make_strings(C.int(len(args) + 1))
	defer C.free(unsafe.Pointer(argv))
	for i, arg := range args {
		ptr := C.CString(arg)
		defer C.free(unsafe.Pointer(ptr))
		C.set_string(argv, C.int(i), ptr)
	}
	C.set_string(argv, C.int(len(args)), nil)
	C.vte_terminal_fork_command_full(C.toVTerminal(t.Widget), C.VTE_PTY_DEFAULT,
		nil, argv, nil, C.G_SPAWN_SEARCH_PATH, nil, nil, nil, nil)
}
Exemple #3
0
func (t Terminal) SetColorCursor(pattern string) {
	color := createColor(pattern)
	C.vte_terminal_set_color_cursor(C.toVTerminal(t.Widget), &color)
}
Exemple #4
0
func (t Terminal) GetFont() *C.PangoFontDescription {
	return C.vte_terminal_get_font(C.toVTerminal(t.Widget))
}
Exemple #5
0
func (t Terminal) SetFont(fd *C.PangoFontDescription) {
	C.vte_terminal_set_font(C.toVTerminal(t.Widget), fd)
}
Exemple #6
0
func (t Terminal) SetFontFromString(font string) {
	C.vte_terminal_set_font_from_string(C.toVTerminal(t.Widget), C.CString(font))
}
Exemple #7
0
func (t Terminal) GetIconTitle() string {
	return C.GoString(C.vte_terminal_get_icon_title(C.toVTerminal(t.Widget)))
}
Exemple #8
0
func (t Terminal) SetColorBackground(pattern string) {
	color := createColor(pattern)
	C.vte_terminal_set_color_background(C.toVTerminal(t.Widget), &color)
}