Skip to content

Commit

Permalink
* Porting Woohaa to clutter-0.8
Browse files Browse the repository at this point in the history
* Add --enable-helix support to use clutter-helix instead of clutter-gst
  • Loading branch information
rustylynch committed Oct 30, 2008
1 parent f39550b commit 6ff283b
Show file tree
Hide file tree
Showing 19 changed files with 1,156 additions and 1,052 deletions.
6 changes: 2 additions & 4 deletions woohaa/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ bin_PROGRAMS=woohaa wh-video-thumbnailer

PKGDATADIR = $(datadir)/woohaa

AM_CFLAGS = $(DEPS_CFLAGS) $(GCC_FLAGS) -D_GNU_SOURCE -DPKGDATADIR=\"$(PKGDATADIR)\"
AM_CFLAGS = $(DEPS_CFLAGS) $(CLUTTER_HELIX_CFLAGS) $(GCC_FLAGS) -D_GNU_SOURCE -DPKGDATADIR=\"$(PKGDATADIR)\"

woohaa_LDADD = $(DEPS_LIBS)
woohaa_LDADD = $(DEPS_LIBS) $(CLUTTER_HELIX_LIBS)
woohaa_SOURCES = woohaa.c \
clutter-simple-layout.c \
clutter-simple-layout.h \
wh-busy.c \
wh-busy.h \
wh-slider-menu.c \
Expand Down
5 changes: 3 additions & 2 deletions woohaa/README
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Keys:
p - pause
Enter - toggle on screen display
Esc - exit back to list
e - bonus useless feature.
r - rotate the screen 180 degrees

Remember its a prototype.

-- Matthew Allum
-- Matthew Allum

121 changes: 0 additions & 121 deletions woohaa/clutter-simple-layout.c

This file was deleted.

48 changes: 0 additions & 48 deletions woohaa/clutter-simple-layout.h

This file was deleted.

20 changes: 19 additions & 1 deletion woohaa/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,32 @@ AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS

PKG_CHECK_MODULES(DEPS, clutter-0.6 gnome-vfs-2.0 clutter-gst-0.6 sqlite3 gdk-2.0 gconf-2.0)
PKG_CHECK_MODULES(DEPS, clutter-0.8 gnome-vfs-2.0 clutter-gst-0.8 sqlite3 gdk-2.0 gdk-pixbuf-2.0 gconf-2.0)
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)

AC_ARG_ENABLE([helix],
AS_HELP_STRING([--enable-helix],[enable helix]),
[enable_helix=$enableval],
[enable_helix=no])

if test "x$GCC" = "xyes"; then
GCC_FLAGS="-g -Wall"
fi

if test "x$enable_helix" = "xyes"; then
PKG_CHECK_MODULES(CLUTTER_HELIX, [clutter-helix-0.8],
[has_helix=yes],
[has_helix=no])
if test "x$has_helix" = "xno"; then
AC_MSG_ERROR([Clutter-Helix libraries are not available.])
fi

GCC_FLAGS+=" -DUSE_HELIX"
AC_SUBST(CLUTTER_HELIX_CFLAGS)
AC_SUBST(CLUTTER_HELIX_LDFAGS)
fi

AC_SUBST(GCC_FLAGS)

AC_OUTPUT([
Expand Down
30 changes: 16 additions & 14 deletions woohaa/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@ ClutterActor*
util_actor_from_file (const gchar *path, int width, int height)
{
ClutterActor *actor;
GdkPixbuf *pixbuf;

pixbuf = gdk_pixbuf_new_from_file_at_size (path, width, height, NULL);
actor = clutter_texture_new_from_file (path, NULL);
if (actor)
clutter_actor_set_size (actor, width, height);

if (pixbuf)
{
actor = clutter_texture_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
return actor;
}

return NULL;
return actor;
}

ClutterActor*
Expand All @@ -44,12 +38,20 @@ util_texture_from_root_window (void)

if (pixbuf)
{
texture = clutter_texture_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
return texture;

texture = clutter_texture_new ();
clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (texture),
gdk_pixbuf_get_pixels (pixbuf),
gdk_pixbuf_get_has_alpha (pixbuf),
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
gdk_pixbuf_get_rowstride (pixbuf),
gdk_pixbuf_get_n_channels (pixbuf),
0,
NULL);
}

return NULL;
return texture;
}

guint32
Expand Down
Loading

0 comments on commit 6ff283b

Please sign in to comment.