From 2858292b31807061130dc2a366281ab99cea8700 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Wed, 9 Jan 2008 17:13:43 -0800 Subject: [PATCH] [Terminal] Get ready for integration with TildaWindow --- Makefile | 7 +++++-- tilda-terminal.c | 3 +++ tilda-terminal.h | 12 +++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7ca9fce..6dcb779 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ CFLAGS=-ggdb -O1 -pipe GOBJ_CFLAGS=`pkg-config --cflags gobject-2.0` GOBJ_LIBS=`pkg-config --libs gobject-2.0` +ALL_CFLAGS=`pkg-config --cflags gtk+-2.0 vte` +ALL_LIBS=`pkg-config --libs gtk+-2.0 vte` + .PHONY: all memcheck-tt memcheck-tw memcheck clean all: tilda-window tilda-terminal @@ -14,10 +17,10 @@ tilda-window.o: tilda-window.c tilda-window.h $(GCC) $(CFLAGS) -c -o $@ $< $(GOBJ_CFLAGS) tilda-terminal: tilda-terminal.o - $(GCC) $(CFLAGS) $^ -o $@ $(GOBJ_LIBS) + $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS) tilda-terminal.o: tilda-terminal.c tilda-terminal.h - $(GCC) $(CFLAGS) -c -o $@ $< $(GOBJ_CFLAGS) + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) memcheck-tw: tilda-window valgrind --tool=memcheck ./tilda-window diff --git a/tilda-terminal.c b/tilda-terminal.c index 26a18b3..b074d78 100644 --- a/tilda-terminal.c +++ b/tilda-terminal.c @@ -37,6 +37,8 @@ tilda_terminal_instance_init (GTypeInstance *instance, * NOTE: any constructor-time values will be set later. */ self->dispose_has_run = FALSE; self->number = 0; + + self->vte_term = vte_terminal_new (); } static void @@ -381,6 +383,7 @@ int main (int argc, char *argv[]) /* Initialize the GObject type system */ g_type_init (); + gtk_init (&argc, &argv); tt = g_object_new (TILDA_TYPE_TERMINAL, "number", 10, NULL); g_object_get (G_OBJECT (tt), "number", &test_number, NULL); diff --git a/tilda-terminal.h b/tilda-terminal.h index 6661f26..8cc8741 100644 --- a/tilda-terminal.h +++ b/tilda-terminal.h @@ -1,7 +1,10 @@ #ifndef TILDA_TERMINAL_H #define TILDA_TERMINAL_H -#include +#include +#include +#include + #define TILDA_TYPE_TERMINAL (tilda_terminal_get_type()) #define TILDA_TERMINAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TILDA_TYPE_TERMINAL)) @@ -20,7 +23,7 @@ struct _TildaTerminal { /* Instance Members */ // FIXME: ADD THESE BACK // TildaWindow *tw; - // VteTerminal *vte_term; + GtkWidget *vte_term; gint number; gchar *background_image; @@ -46,9 +49,8 @@ struct _TildaTerminal { // TODO: gint colorscheme; the code can work around the need for // TODO: this value. Just check if the back and fore colors match // TODO: any pre-defined colorschemes exactly in the GUI. - // FIXME: ADD THESE BACK - //GdkColor background_color; - //GdkColor foreground_color; + GdkColor background_color; + GdkColor foreground_color; // TODO: all other colors supported by VTE gboolean scroll_background; -- 2.25.1