[cheese/libcheese-adelaney] * Breaking coupling for split into libcheese/cheese-ui



commit ca8323d05b8c19f115951fef53f60e296a3a57c4
Author: Aidan Delaney <a j delaney brighton ac uk>
Date:   Tue Oct 20 21:49:02 2009 +0100

    * Breaking coupling for split into libcheese/cheese-ui

 INSTALL                                  |  110 ++++++++++++++++++++++++------
 configure.ac                             |    1 +
 libcheese/Makefile.am                    |   35 ++++++++++
 {src => libcheese}/cheese-dbus-infos.xml |    0
 {src => libcheese}/cheese-dbus.c         |   10 ++-
 {src => libcheese}/cheese-dbus.h         |    2 +-
 {src => libcheese}/cheese-gconf.c        |    0
 {src => libcheese}/cheese-gconf.h        |    0
 {src => libcheese}/cheese-webcam.c       |    0
 {src => libcheese}/cheese-webcam.h       |    0
 {src => libcheese}/eog-thumbnail.c       |    0
 {src => libcheese}/eog-thumbnail.h       |    0
 {src => libcheese}/gst-audio-play.c      |    0
 {src => libcheese}/gst-audio-play.h      |    0
 src/Makefile.am                          |   20 ------
 15 files changed, 132 insertions(+), 46 deletions(-)
---
diff --git a/INSTALL b/INSTALL
index 5458714..2550dab 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,15 +2,15 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-Briefly, the shell commands `./configure; make; make install' should
+   Briefly, the shell commands `./configure; make; make install' should
 configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.
@@ -67,12 +67,15 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
@@ -85,7 +88,7 @@ is an example:
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
 own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
@@ -97,10 +100,24 @@ architecture at a time in the source code directory.  After you have
 installed the package for one architecture, use `make distclean' before
 reconfiguring for another architecture.
 
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -123,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -135,14 +152,46 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -150,7 +199,8 @@ type, such as `sun4', or a canonical name which has the form:
 
 where SYSTEM can have one of these forms:
 
-     OS KERNEL-OS
+     OS
+     KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
@@ -168,9 +218,9 @@ eventually be run) with `--host=TYPE'.
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -179,7 +229,7 @@ A warning: not all `configure' scripts look for a site script.
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -198,11 +248,19 @@ an Autoconf bug.  Until the bug is fixed you can use this workaround:
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -229,6 +287,16 @@ an Autoconf bug.  Until the bug is fixed you can use this workaround:
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
diff --git a/configure.ac b/configure.ac
index c91af8f..b68f882 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,7 @@ data/icons/scalable/actions/Makefile
 data/pixmaps/Makefile
 data/sounds/Makefile
 help/Makefile
+libcheese/Makefile
 src/Makefile
 po/Makefile.in
 ])
diff --git a/libcheese/Makefile.am b/libcheese/Makefile.am
new file mode 100644
index 0000000..59ba82b
--- /dev/null
+++ b/libcheese/Makefile.am
@@ -0,0 +1,35 @@
+lib_LTLIBRARIES = libcheese.la
+libcheese_la_SOURCES = cheese-dbus.c \
+	cheese-gconf.c \
+	cheese-webcam.c \
+	eog-thumbnail.c \
+	gst-audio-play.c
+libcheese_la_CFLAGS = -DDATADIR=\"$(datadir)\"	\
+	-DPREFIX=\""$(prefix)"\" 			\
+	-DSYSCONFDIR=\""$(sysconfdir)"\" 		\
+	-DLIBDIR=\""$(libdir)"\" 			\
+	-DPACKAGE_DATADIR=\""$(datadir)/cheese"\"	\
+	-DPACKAGE_LOCALEDIR=\""$(datadir)/locale"\"	\
+	-DAPPNAME_DATA_DIR=\"$(pkgdatadir)\"		\
+	-DGNOME_DESKTOP_USE_UNSTABLE_API=1		\
+	$(CHEESE_CFLAGS)
+include_HEADERS = cheese-dbus.h \
+	cheese-dbus-infos.h \
+	cheese-gconf.h \
+	cheese-webcam.h \
+	eog-thumbnail.h \
+	gst-audio-play.h 
+
+
+#dbus
+BUILT_SOURCES = cheese-dbus-infos.h
+# We don't want to install this header
+noinst_HEADERS = $(BUILT_SOURCES) eog-thumbnail.h gst-audio-play.h
+
+# Correctly clean the generated headers, but keep the xml description
+CLEANFILES = $(BUILT_SOURCES)
+EXTRA_DIST = cheese-dbus-infos.xml
+
+#Rule to generate the binding headers
+cheese-dbus-infos.h:  
+	dbus-binding-tool --prefix=cheese_dbus --mode=glib-server cheese-dbus-infos.xml > $@
\ No newline at end of file
diff --git a/src/cheese-dbus-infos.xml b/libcheese/cheese-dbus-infos.xml
similarity index 100%
rename from src/cheese-dbus-infos.xml
rename to libcheese/cheese-dbus-infos.xml
diff --git a/src/cheese-dbus.c b/libcheese/cheese-dbus.c
similarity index 93%
rename from src/cheese-dbus.c
rename to libcheese/cheese-dbus.c
index 2c5ec62..7c3ed68 100644
--- a/src/cheese-dbus.c
+++ b/libcheese/cheese-dbus.c
@@ -32,24 +32,26 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include "cheese-dbus.h"
-#include "cheese-window.h"
 #include "cheese-dbus-infos.h"
 
 gpointer window_pointer;
+GCallback window_to_front_callback;
 
 G_DEFINE_TYPE (CheeseDbus, cheese_dbus, G_TYPE_OBJECT);
 
 void
-cheese_dbus_set_window (gpointer data)
+cheese_dbus_set_window (gpointer data, GCallback function)
 {
-  if (data != NULL)
+  if ((data != NULL) && (function != NULL)) {
     window_pointer = data;
+    window_to_front_callback = function;
+  }
 }
 
 gboolean
 cheese_dbus_notify ()
 {
-  cheese_window_bring_to_front (window_pointer);
+  G_CALLBACK(window_to_front_callback) (); // should be - (window_pointer);
   return TRUE;
 }
 
diff --git a/src/cheese-dbus.h b/libcheese/cheese-dbus.h
similarity index 97%
rename from src/cheese-dbus.h
rename to libcheese/cheese-dbus.h
index 9114a31..2a0c8cd 100644
--- a/src/cheese-dbus.h
+++ b/libcheese/cheese-dbus.h
@@ -49,7 +49,7 @@ typedef struct _CheeseDbus
 GType       cheese_dbus_get_type (void);
 CheeseDbus *cheese_dbus_new (void);
 
-void     cheese_dbus_set_window (gpointer);
+void     cheese_dbus_set_window (gpointer, GCallback);
 gboolean cheese_dbus_notify (void);
 
 G_END_DECLS
diff --git a/src/cheese-gconf.c b/libcheese/cheese-gconf.c
similarity index 100%
rename from src/cheese-gconf.c
rename to libcheese/cheese-gconf.c
diff --git a/src/cheese-gconf.h b/libcheese/cheese-gconf.h
similarity index 100%
rename from src/cheese-gconf.h
rename to libcheese/cheese-gconf.h
diff --git a/src/cheese-webcam.c b/libcheese/cheese-webcam.c
similarity index 100%
rename from src/cheese-webcam.c
rename to libcheese/cheese-webcam.c
diff --git a/src/cheese-webcam.h b/libcheese/cheese-webcam.h
similarity index 100%
rename from src/cheese-webcam.h
rename to libcheese/cheese-webcam.h
diff --git a/src/eog-thumbnail.c b/libcheese/eog-thumbnail.c
similarity index 100%
rename from src/eog-thumbnail.c
rename to libcheese/eog-thumbnail.c
diff --git a/src/eog-thumbnail.h b/libcheese/eog-thumbnail.h
similarity index 100%
rename from src/eog-thumbnail.h
rename to libcheese/eog-thumbnail.h
diff --git a/src/gst-audio-play.c b/libcheese/gst-audio-play.c
similarity index 100%
rename from src/gst-audio-play.c
rename to libcheese/gst-audio-play.c
diff --git a/src/gst-audio-play.h b/libcheese/gst-audio-play.h
similarity index 100%
rename from src/gst-audio-play.h
rename to libcheese/gst-audio-play.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 21cb8a9..1591517 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,22 +22,14 @@ cheese_SOURCES = \
 	cheese-effect-chooser.h \
 	cheese-fileutil.c \
 	cheese-fileutil.h \
-	cheese-gconf.c \
-	cheese-gconf.h \
 	cheese-thumb-view.c \
 	cheese-thumb-view.h \
-	cheese-webcam.c \
-	cheese-webcam.h \
 	cheese-window.c \
 	cheese-window.h \
-	eog-thumbnail.c \
-	eog-thumbnail.h \
 	eog-thumb-nav.c \
 	eog-thumb-nav.h \
 	ephy-spinner.c \
 	ephy-spinner.h \
-	gst-audio-play.c \
-	gst-audio-play.h \
 	cheese-no-camera.c \
 	cheese-no-camera.h \
 	cheese-prefs-widget.h \
@@ -60,16 +52,4 @@ cheese_SOURCES = \
 cheese_LDADD = \
 	$(CHEESE_LIBS)
 
-#dbus
-BUILT_SOURCES = cheese-dbus-infos.h
-# We don't want to install this header
-noinst_HEADERS = $(BUILT_SOURCES)
-
-# Correctly clean the generated headers, but keep the xml description
-CLEANFILES = $(BUILT_SOURCES)
-EXTRA_DIST = cheese-dbus-infos.xml
-
-#Rule to generate the binding headers
-cheese-dbus-infos.h:  cheese-dbus-infos.xml
-	dbus-binding-tool --prefix=cheese_dbus --mode=glib-server $<> $@
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]