create the loco library for composting. it links against libGL. openbox.c calls...
authorDana Jansens <danakj@orodu.net>
Fri, 1 Feb 2008 04:08:30 +0000 (23:08 -0500)
committerDana Jansens <danakj@orodu.net>
Mon, 4 Feb 2008 14:33:29 +0000 (09:33 -0500)
Makefile.am
configure.ac
loco/loco-4.0.pc.in [new file with mode: 0644]
loco/loco.c [new file with mode: 0644]
loco/loco.h [new file with mode: 0644]
openbox/openbox.c

index a27eba2..f8c1a17 100644 (file)
@@ -26,7 +26,8 @@ check_PROGRAMS = \
 
 lib_LTLIBRARIES = \
        render/libobrender.la \
-       obt/libobt.la
+       obt/libobt.la \
+       loco/liboco.la
 
 bin_PROGRAMS = \
        openbox/openbox \
@@ -140,6 +141,31 @@ obt_libobt_la_SOURCES = \
        obt/xevent.h \
        obt/xevent.c
 
+## loco ##
+
+loco_liboco_la_CPPFLAGS = \
+       $(GL_CFLAGS) \
+       $(XSHAPE_CFLAGS) \
+       $(XRENDER_CFLAGS) \
+       $(XDAMAGE_CFLAGS) \
+       $(XCOMPOSITE_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       -DG_LOG_DOMAIN=\"Loco\" \
+       -DLOCALEDIR=\"$(localedir)\" \
+       -DDATADIR=\"$(datadir)\" \
+       -DCONFIGDIR=\"$(configdir)\"
+loco_liboco_la_LDFLAGS = \
+       -version-info $(LOCO_CURRENT):$(LOCO_REVISION):$(LOCO_AGE)
+loco_liboco_la_LIBADD = \
+       $(GL_LIBS) \
+       $(XSHAPE_LIBS) \
+       $(XRENDER_LIBS) \
+       $(XDAMAGE_LIBS) \
+       $(XCOMPOSITE_LIBS) \
+       $(GLIB_LIBS)
+loco_liboco_la_SOURCES = \
+       loco/loco.c
+
 ## openbox ##
 
 openbox_openbox_CPPFLAGS = \
@@ -165,7 +191,8 @@ openbox_openbox_LDADD = \
        $(EFENCE_LIBS) \
        $(LIBINTL) \
        render/libobrender.la \
-       obt/libobt.la
+       obt/libobt.la \
+       loco/liboco.la
 openbox_openbox_LDFLAGS = -export-dynamic
 openbox_openbox_SOURCES = \
        gettext.h \
@@ -408,7 +435,8 @@ obtpubinclude_HEADERS = \
 
 nodist_pkgconfig_DATA = \
        render/obrender-4.0.pc \
-       obt/obt-4.0.pc
+       obt/obt-4.0.pc \
+       loco/loco-4.0.pc
 
 ## data ##
 
index b26065f..5d08040 100644 (file)
@@ -27,6 +27,13 @@ OBT_INTERFACE_AGE=0
 OBT_BINARY_AGE=0
 OBT_VERSION=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
 
+LOCO_MAJOR_VERSION=4
+LOCO_MINOR_VERSION=0
+LOCO_MICRO_VERSION=0
+LOCO_INTERFACE_AGE=0
+LOCO_BINARY_AGE=0
+LOCO_VERSION=$OB_MAJOR_VERSION.$OB_MINOR_VERSION
+
 AC_SUBST(RR_MAJOR_VERSION)
 AC_SUBST(RR_MINOR_VERSION)
 AC_SUBST(RR_MICRO_VERSION)
@@ -39,6 +46,12 @@ AC_SUBST(OBT_MICRO_VERSION)
 AC_SUBST(OBT_INTERFACE_AGE)
 AC_SUBST(OBT_BINARY_AGE)
 AC_SUBST(OBT_VERSION)
+AC_SUBST(LOCO_MAJOR_VERSION)
+AC_SUBST(LOCO_MINOR_VERSION)
+AC_SUBST(LOCO_MICRO_VERSION)
+AC_SUBST(LOCO_INTERFACE_AGE)
+AC_SUBST(LOCO_BINARY_AGE)
+AC_SUBST(LOCO_VERSION)
 
 dnl Libtool versioning
 RR_RELEASE=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
@@ -53,6 +66,12 @@ OBT_REVISION=$OBT_INTERFACE_AGE
 OBT_AGE=`expr $OBT_BINARY_AGE - $OBT_INTERFACE_AGE`
 OBT_CURRENT_MINUS_AGE=`expr $OBT_CURRENT - $OBT_AGE`
 
+LOCO_RELEASE=$LOCO_MAJOR_VERSION.$LOCO_MINOR_VERSION
+LOCO_CURRENT=`expr $LOCO_MICRO_VERSION - $LOCO_INTERFACE_AGE`
+LOCO_REVISION=$LOCO_INTERFACE_AGE
+LOCO_AGE=`expr $LOCO_BINARY_AGE - $LOCO_INTERFACE_AGE`
+LOCO_CURRENT_MINUS_AGE=`expr $LOCO_CURRENT - $LOCO_AGE`
+
 AC_SUBST(RR_RELEASE)
 AC_SUBST(RR_CURRENT)
 AC_SUBST(RR_REVISION)
@@ -63,6 +82,11 @@ AC_SUBST(OBT_CURRENT)
 AC_SUBST(OBT_REVISION)
 AC_SUBST(OBT_AGE)
 AC_SUBST(OBT_CURRENT_MINUS_AGE)
+AC_SUBST(LOCO_RELEASE)
+AC_SUBST(LOCO_CURRENT)
+AC_SUBST(LOCO_REVISION)
+AC_SUBST(LOCO_AGE)
+AC_SUBST(LOCO_CURRENT_MINUS_AGE)
 
 AC_PREFIX_DEFAULT([/usr/local])
 test "$prefix" = "NONE" && prefix=$ac_default_prefix
@@ -205,6 +229,21 @@ else
   xcomposite_found=no
 fi
 
+AC_MSG_CHECKING(for GL_CFLAGS)
+AC_ARG_WITH(gl-cflags, [  --with-gl-cflags=CFLAGS ],
+                       [GL_CFLAGS="$withval"],
+                       [GL_CFLAGS=""])
+
+AC_MSG_RESULT($GL_CFLAGS)
+AC_MSG_CHECKING(for GL_LIBS)
+AC_ARG_WITH(gl-libs, [  --with-gl-libs=LIBS ],
+                     [GL_LIBS="$withval"],
+                     [GL_LIBS="-lGL"])
+AC_MSG_RESULT($GL_LIBS)
+
+AC_SUBST(GL_CFLAGS)
+AC_SUBST(GL_LIBS)
+
 dnl Check for session management
 X11_SM
 
@@ -225,6 +264,7 @@ AC_CONFIG_FILES([
   po/Makefile.in
   render/obrender-4.0.pc
   obt/obt-4.0.pc
+  loco/loco-4.0.pc
   render/version.h
   obt/version.h
 ])
diff --git a/loco/loco-4.0.pc.in b/loco/loco-4.0.pc.in
new file mode 100644 (file)
index 0000000..b3dedf5
--- /dev/null
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+glcflags=@GL_CFLAGS@
+gllibs=@GL_LIBS@
+
+Name: lOco
+Description: Openbox Composite Library
+Version: @VERSION@
+Requires: glib-2.0
+Libs: -L${libdir} ${gllibs}
+Cflags: -I${includedir}/openbox/@OB_VERSION@ ${glcflags}
diff --git a/loco/loco.c b/loco/loco.c
new file mode 100644 (file)
index 0000000..baed45f
--- /dev/null
@@ -0,0 +1,29 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   loco.c for the Openbox window manager
+   Copyright (c) 2008        Derek Foreman
+   Copyright (c) 2008        Dana Jansens
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program 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 General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
+#include "obt/mainloop.h"
+#include <glib.h>
+
+void loco_set_mainloop(ObtMainLoop *loop)
+{
+}
+
+void loco_shutdown(void)
+{
+}
diff --git a/loco/loco.h b/loco/loco.h
new file mode 100644 (file)
index 0000000..5136f26
--- /dev/null
@@ -0,0 +1,29 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   loco.c for the Openbox window manager
+   Copyright (c) 2008        Derek Foreman
+   Copyright (c) 2008        Dana Jansens
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program 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 General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
+#ifndef loco__loco_h
+#define loco__loco_h
+
+struct _ObtMainLoop;
+
+void loco_set_mainloop(struct _ObtMainLoop *loop);
+void loco_shutdown(void);
+
+
+#endif
index 80f8159..3b53c24 100644 (file)
@@ -48,6 +48,7 @@
 #include "obt/prop.h"
 #include "obt/keyboard.h"
 #include "obt/parse.h"
+#include "loco/loco.h"
 
 #ifdef HAVE_FCNTL_H
 #  include <fcntl.h>
@@ -199,6 +200,8 @@ gint main(gint argc, gchar **argv)
                                                XC_top_left_corner);
 
     if (screen_annex()) { /* it will be ours! */
+        loco_set_mainloop(ob_main_loop);
+
         do {
             if (reconfigure) obt_keyboard_reload();
 
@@ -363,6 +366,8 @@ gint main(gint argc, gchar **argv)
             config_shutdown();
             actions_shutdown(reconfigure);
         } while (reconfigure);
+
+        loco_shutdown();
     }
 
     XSync(obt_display, FALSE);