--- /dev/null
+$Id$
+
+Tilman Sauerbeck (tilman at code-monkey de)
--- /dev/null
+## $Id$
+
+SUBDIRS = m4 src
--- /dev/null
+#! /bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+# Stolen from the GNU Midnight Commander. Customized for giFTcurs. Stolen from
+# giFTcurs. Customized for giFT. Stolen from giFT.
+# Customized for $this_project.
+
+# Make it possible to specify path in the environment
+: ${AUTOCONF=autoconf}
+: ${AUTOHEADER=autoheader}
+: ${AUTOMAKE=automake}
+: ${ACLOCAL=aclocal}
+: ${LIBTOOLIZE=libtoolize}
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+(
+cd $srcdir
+
+# The autoconf cache (version after 2.52) is not reliable yet.
+rm -rf autom4te.cache
+
+rm -f aclocal.m4
+ACLOCAL_INCLUDES="-I m4"
+
+# Some old version of GNU build tools fail to set error codes.
+# Check that they generate some of the files they should.
+
+echo "Running $ACLOCAL..."
+$ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS || exit 1
+test -f aclocal.m4 || \
+ { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
+
+echo "Running $AUTOHEADER..."
+$AUTOHEADER || exit 1
+test -f config.h.in || \
+ { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; }
+
+echo "Running $AUTOCONF..."
+$AUTOCONF || exit 1
+test -f configure || \
+ { echo "autoconf failed to generate configure" 2>&1; exit 1; }
+
+# hack hack hack...i hate autotools.
+echo "Running $LIBTOOLIZE --automake..."
+$LIBTOOLIZE --automake || exit 1
+test -f ltmain.sh || \
+ { echo "libtoolize failed to generate ltmain.sh" 2>&1; exit 1; }
+
+# Workaround for Automake 1.5 to ensure that depcomp is distributed.
+echo "Running $AUTOMAKE..."
+$AUTOMAKE -c -a src/Makefile || exit 1
+$AUTOMAKE -c -a || exit 1
+test -f Makefile.in || \
+ { echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
+
+) || exit 1
+
+echo
+echo "Type './configure' to configure ruby-edje."
+echo
--- /dev/null
+dnl $Id$
+
+AC_INIT(ruby-edje, 0.0.1)
+AC_CONFIG_SRCDIR([src/rb_edje_main.c])
+
+AM_INIT_AUTOMAKE([dist-bzip2])
+AM_CONFIG_HEADER(config.h)
+
+AC_PROG_CC
+AC_PROG_CC_STDC
+AC_PROG_INSTALL
+
+AM_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+AC_HEADER_STDC
+AC_HEADER_STDBOOL
+
+AC_RUBY_EXT
+
+AC_PATH_GENERIC(evas, , ,
+ AC_MSG_ERROR(Cannot find evas: Is evas-config in path?))
+
+AC_PATH_GENERIC(edje, , ,
+ AC_MSG_ERROR(Cannot find edje: Is edje-config in path?))
+
+AC_CONFIG_FILES([
+Makefile
+m4/Makefile
+src/Makefile
+])
+
+AC_OUTPUT
--- /dev/null
+## $Id$
+
+EXTRA_DIST = ac_path_generic.m4 ac_ruby_ext.m4
--- /dev/null
+## $Id$
+
+AM_CFLAGS = $(EVAS_CFLAGS) $(EDJE_CFLAGS)
+INCLUDES = -I$(RUBYDIR) -I$(RUBYSITEDIR)
+
+ext_LTLIBRARIES = edje.la
+extdir = $(RUBYSITEDIR)
+
+edje_la_SOURCES = rb_edje_main.c rb_edje_main.h \
+ rb_edje.c rb_edje.h
+
+edje_la_LIBADD = -lruby $(EVAS_LIBS) $(EDJE_LIBS)
+edje_la_LDFLAGS = -module -avoid-version
--- /dev/null
+/*
+ * $Id$
+ *
+ * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <ruby.h>
+
+#include <Edje.h>
+#include <rb_evas.h>
+#include <rb_evas_object.h>
+
+#include "rb_edje_main.h"
+
+#define GET_OBJ(obj, type, o, desc) \
+ type **(o) = NULL; \
+\
+ Data_Get_Struct ((obj), type *, (o)); \
+\
+ if (!*(o)) { \
+ rb_raise (rb_eException, desc " destroyed already"); \
+ return Qnil; \
+ }
+
+VALUE cEdje;
+
+static VALUE c_new (VALUE klass, VALUE evas)
+{
+ VALUE self, argv[1];
+ Evas_Object **edje;
+
+ GET_OBJ (evas, Evas, e, "Evas");
+
+ self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark,
+ c_evas_object_free, edje);
+ *edje = edje_object_add (*e);
+
+ argv[0] = evas;
+ rb_obj_call_init (self, 1, argv);
+
+ return self;
+}
+
+static VALUE c_load (VALUE self, VALUE eet, VALUE group)
+{
+ GET_OBJ (self, Evas_Object, e, "EvasObject");
+
+ Check_Type (eet, T_STRING);
+ Check_Type (group, T_STRING);
+
+ if (!edje_object_file_set (*e, STR2CSTR (eet), STR2CSTR (group)))
+ rb_raise (rb_eException, "Cannot load eet");
+
+ return Qnil;
+}
+
+void Init_Edje (void)
+{
+ cEdje = rb_define_class_under (mEdje, "Edje", cEvasObject);
+
+ rb_define_singleton_method (cEdje, "new", c_new, 1);
+ rb_define_method (cEdje, "load", c_load, 2);
+}
+
--- /dev/null
+/*
+ * $Id$
+ *
+ * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __RB_EDJE_H
+#define __RB_EDJE_H
+
+void Init_Edje (void);
+
+#endif
--- /dev/null
+/*
+ * $Id$
+ *
+ * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <ruby.h>
+
+#include <Edje.h>
+
+#include "rb_edje_main.h"
+#include "rb_edje.h"
+
+static VALUE m_init (VALUE self)
+{
+ return INT2FIX (edje_init ());
+}
+
+static VALUE m_shutdown (VALUE self)
+{
+ rb_gc_start ();
+
+ return INT2FIX (edje_shutdown ());
+}
+
+void Init_edje (void)
+{
+ rb_require ("evas");
+
+ mEdje = rb_define_module ("Edje");
+
+ rb_define_module_function (mEdje, "init", m_init, 0);
+ rb_define_module_function (mEdje, "shutdown", m_shutdown, 0);
+
+ Init_Edje ();
+}
+
--- /dev/null
+/*
+ * $Id$
+ *
+ * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __RB_EDJE_MAIN_H
+#define __RB_EDJE_MAIN_H
+
+VALUE mEdje;
+
+#endif