From 62b7de7eeba3098d736261c83891cc645f14db9b Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Wed, 9 Jan 2008 17:20:17 -0800 Subject: [PATCH] [Window] Get set up for integration with TildaTerminal --- Makefile | 4 ++-- tilda-window.c | 7 +++++-- tilda-window.h | 6 +++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6dcb779..7eadae5 100644 --- 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) diff --git a/tilda-window.c b/tilda-window.c index 2cae5a7..6b2c674 100644 --- a/tilda-window.c +++ b/tilda-window.c @@ -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: */ - diff --git a/tilda-window.h b/tilda-window.h index 41918b9..8663779 100644 --- a/tilda-window.h +++ b/tilda-window.h @@ -17,7 +17,8 @@ tilda_window_dispose() tilda_window_finalize() */ -#include +#include +#include #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; }; -- 2.25.1