[Window] Get set up for integration with TildaTerminal
authorIra W. Snyder <devel@irasnyder.com>
Thu, 10 Jan 2008 01:20:17 +0000 (17:20 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Thu, 10 Jan 2008 01:20:17 +0000 (17:20 -0800)
Makefile
tilda-window.c
tilda-window.h

index 6dcb779..7eadae5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,10 +11,10 @@ ALL_LIBS=`pkg-config --libs gtk+-2.0 vte`
 all: tilda-window tilda-terminal
 
 tilda-window: tilda-window.o
-       $(GCC) $(CFLAGS) $^ -o $@ $(GOBJ_LIBS)
+       $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS)
 
 tilda-window.o: tilda-window.c tilda-window.h
-       $(GCC) $(CFLAGS) -c -o $@ $< $(GOBJ_CFLAGS)
+       $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
 
 tilda-terminal: tilda-terminal.o
        $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS)
index 2cae5a7..6b2c674 100644 (file)
@@ -14,7 +14,10 @@ tilda_window_instance_init (GTypeInstance *instance,
        self->dispose_has_run = FALSE;
 
        /* Initialize all properties */
-       self->number = 0;
+       self->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+       self->terms = g_ptr_array_new ();
+
+       self->number = 0xdeadbeef;
 }
 
 static void
@@ -187,6 +190,7 @@ int main (int argc, char *argv[])
 
        /* Initialize the GObject type system */
        g_type_init ();
+       gtk_init (&argc, &argv);
 
        tw = g_object_new (TILDA_TYPE_WINDOW, "number", 10, NULL);
        g_object_get (G_OBJECT (tw), "number", &test_number, NULL);
@@ -204,4 +208,3 @@ int main (int argc, char *argv[])
 }
 
 /* vim: set ts=4 sts=4 sw=4 noet tw=112: */
-
index 41918b9..8663779 100644 (file)
@@ -17,7 +17,8 @@ tilda_window_dispose()
 tilda_window_finalize()
 */
 
-#include <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
 
 #define TILDA_TYPE_WINDOW                              (tilda_window_get_type())
 #define TILDA_WINDOW(obj)                              (G_TYPE_CHECK_INSTANCE_CAST ((obj), TILDA_TYPE_WINDOW, TildaWindow))
@@ -34,6 +35,9 @@ struct _TildaWindow {
        gboolean dispose_has_run;
 
        /* Instance Members */
+       GtkWidget *window;
+       GPtrArray *terms;
+
        gint number;
 };