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) }
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) }
func (t Terminal) SetColorCursor(pattern string) { color := createColor(pattern) C.vte_terminal_set_color_cursor(C.toVTerminal(t.Widget), &color) }
func (t Terminal) GetFont() *C.PangoFontDescription { return C.vte_terminal_get_font(C.toVTerminal(t.Widget)) }
func (t Terminal) SetFont(fd *C.PangoFontDescription) { C.vte_terminal_set_font(C.toVTerminal(t.Widget), fd) }
func (t Terminal) SetFontFromString(font string) { C.vte_terminal_set_font_from_string(C.toVTerminal(t.Widget), C.CString(font)) }
func (t Terminal) GetIconTitle() string { return C.GoString(C.vte_terminal_get_icon_title(C.toVTerminal(t.Widget))) }
func (t Terminal) SetColorBackground(pattern string) { color := createColor(pattern) C.vte_terminal_set_color_background(C.toVTerminal(t.Widget), &color) }