[gegl/soc-2012-editor] Experimenting with Gtk and Cairo, setting up class boilerplate code, etc
- From: Isaac Wagner <isaacbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2012-editor] Experimenting with Gtk and Cairo, setting up class boilerplate code, etc
- Date: Tue, 5 Jun 2012 17:24:51 +0000 (UTC)
commit 294d348135c2a96bb16d824b195e681134312cef
Author: Isaac Wagner <isaacbw src gnome org>
Date: Mon Jun 4 23:31:53 2012 -0400
Experimenting with Gtk and Cairo, setting up class boilerplate code, etc
bin/editor/.gitignore | 1 +
bin/editor/build | 1 +
bin/editor/gegl-editor.c | 23 +++++++++++++++++++++++
bin/editor/gegl-node-widget.c | 5 +++++
bin/editor/gegl-node-widget.h | 30 ++++++++++++++++++++++++++++++
5 files changed, 60 insertions(+), 0 deletions(-)
---
diff --git a/bin/editor/.gitignore b/bin/editor/.gitignore
new file mode 100644
index 0000000..85042ac
--- /dev/null
+++ b/bin/editor/.gitignore
@@ -0,0 +1 @@
+editor
diff --git a/bin/editor/build b/bin/editor/build
new file mode 100755
index 0000000..1ed29dd
--- /dev/null
+++ b/bin/editor/build
@@ -0,0 +1 @@
+gcc gegl-editor.c -o editor `pkg-config --cflags --libs gtk+-3.0`
\ No newline at end of file
diff --git a/bin/editor/gegl-editor.c b/bin/editor/gegl-editor.c
new file mode 100644
index 0000000..19d4d09
--- /dev/null
+++ b/bin/editor/gegl-editor.c
@@ -0,0 +1,23 @@
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <cairio.h>
+
+
+gint
+main (gint argc,
+ gchar **argv)
+{
+ GtkWidget *window;
+
+ gtk_init(&argc, &argv);
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ g_signal_connect (window, "destroy", G_CALLBACK( gtk_main_quit), NULL);
+
+ gtk_widget_show(window);
+
+ gtk_main();
+
+ return 0;
+}
diff --git a/bin/editor/gegl-node-widget.c b/bin/editor/gegl-node-widget.c
new file mode 100644
index 0000000..b3b9dfd
--- /dev/null
+++ b/bin/editor/gegl-node-widget.c
@@ -0,0 +1,5 @@
+#include "gegl-node-widget.h"
+
+G_DEFINE_TYPE (NodeWidget, nodewidget, GtkWidget);
+
+void nodewidget_class_init(NodeWidgetClass *klass);
diff --git a/bin/editor/gegl-node-widget.h b/bin/editor/gegl-node-widget.h
new file mode 100644
index 0000000..746fcbf
--- /dev/null
+++ b/bin/editor/gegl-node-widget.h
@@ -0,0 +1,30 @@
+/* gegl-node-widget.h */
+
+#ifndef __NODEWIDGET_H__
+#define __NODEWIDGET_H__
+
+#include <gtk/gtk.h>
+
+#define NODEWIDGET(obj) GTK_CHECK_CAST (obj, nodewidget_get_type(), NodeWidget)
+#define NODEWIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, nodewidget_get_type(), NodeWidgetClass)
+#define IS_NODEWIDGET(obj) GTK_CHECK_TYPE(obj, nodewidget_get_type())
+
+typedef struct _NodeWidget NodeWidget;
+typedef struct _NodeWidgetClass NodeWidgetClass;
+
+struct _NodeWidget
+{
+ GtkWidget widget;
+
+
+};
+
+struct _NodeWidgetClass
+{
+ GtkWidgetClass parent_class;
+};
+
+GtkType nodewidget_get_type(void);
+NodeWidget* nodewdiget_new();
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]