Re: libvte color troubles.



GdkColor Color = { 0, 22323, 0xff * 255, 0xff * 255 };
That doesn't look right. Shouldn't colors be in 0..255?

On Mon, Sep 21, 2015, 8:12 AM Subsentient <thinkingrodent gmail com> wrote:

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;
    }





_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]