[Terminal] Get ready for integration with TildaWindow
authorIra W. Snyder <devel@irasnyder.com>
Thu, 10 Jan 2008 01:13:43 +0000 (17:13 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Thu, 10 Jan 2008 01:13:43 +0000 (17:13 -0800)
Makefile
tilda-terminal.c
tilda-terminal.h

index 7ca9fce..6dcb779 100644 (file)
--- 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
index 26a18b3..b074d78 100644 (file)
@@ -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);
index 6661f26..8cc8741 100644 (file)
@@ -1,7 +1,10 @@
 #ifndef TILDA_TERMINAL_H
 #define TILDA_TERMINAL_H
 
-#include <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <vte/vte.h>
+
 
 #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;