libvte color troubles.
- From: Subsentient <thinkingrodent gmail com>
- To: gtk-app-devel-list gnome org
- Subject: libvte color troubles.
- Date: Mon, 21 Sep 2015 05:12:31 -0700
Writing a new terminal application with GTK and libvte, and setting
colors is not working.
I'd like to know what I'm doing wrong.
vte_terminal_set_color_background() is ignored. Nothing changes, no
warnings appear in stdout or stderr, just, nothing.
Here's some stub code that illustrates my problem.
P.S. It's curiously hard to find a decent guide on libvte. And yes, I
know vte_terminal_fork_command() is deprecated.
#include <gtk/gtk.h>
#include <vte-0.0/vte/vte.h>
int main(int argc, char **argv)
{
gtk_init(&argc, &argv);
GtkWidget *Win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget *Term = vte_terminal_new();
GdkColor Color = { 0, 22323, 0xff * 255, 0xff * 255 };
vte_terminal_set_color_background((VteTerminal*)Term, &Color);
vte_terminal_set_size((VteTerminal*)Term, 50, 30);
const char *ShellArgv[] = { "/usr/bin/bash", NULL };
gtk_container_add((GtkContainer*)Win, Term);
vte_terminal_fork_command((VteTerminal*)Term,
(char*)*ShellArgv, (char**)ShellArgv, NULL, NULL, TRUE, TRUE, TRUE );
gtk_widget_show_all(Win);
gtk_main();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]