Skip to content

Commit 0c72635

Browse files
committed
* intial import of clutter integration library
0 parents  commit 0c72635

28 files changed

+2624
-0
lines changed

AUTHORS

Whitespace-only changes.

COPYING

+504
Large diffs are not rendered by default.

ChangeLog

Whitespace-only changes.

Makefile.am

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
SUBDIRS = clutter-helix examples
2+
3+
DIST_SUBDIRS = clutter-helix
4+
5+
clutter-helix-@[email protected]: clutter-helix.pc
6+
@cp -f clutter-helix.pc clutter-helix-@[email protected]
7+
8+
pkgconfig_DATA = clutter-helix-@[email protected]
9+
pkgconfigdir = $(libdir)/pkgconfig
10+
11+
EXTRA_DIST = clutter-helix.pc.in
12+
13+
CLEANFILES = clutter-helix-@[email protected]
14+
15+
DISTCLEANFILES = clutter-helix.pc
16+
17+
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
18+
19+
# Extra clean files so that maintainer-clean removes *everything*
20+
MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub \
21+
configure depcomp install-sh ltmain.sh \
22+
Makefile.in missing config.h.in

NEWS

Whitespace-only changes.

README

Whitespace-only changes.

autogen.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#! /bin/sh
2+
gtkdocize || exit 1
3+
autoreconf -v --install || exit 1
4+
./configure --enable-maintainer-mode "$@"

clutter-helix.pc.in

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prefix=@prefix@
2+
exec_prefix=${prefix}
3+
libdir=${exec_prefix}/lib
4+
includedir=${prefix}/include
5+
6+
Name: clutter-helix
7+
Description: Clutter Helix integration
8+
Version: @VERSION@
9+
Libs: -L${libdir} -lclutter-helix-@CLUTTER_HELIX_MAJORMINOR@
10+
Cflags: -I${includedir}/clutter-@CLUTTER_HELIX_MAJORMINOR@/clutter-helix
11+
Requires: clutter-@CLUTTER_HELIX_MAJORMINOR@

clutter-helix/Makefile.am

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
source_h = \
2+
$(srcdir)/clutter-helix.h \
3+
$(srcdir)/clutter-helix-util.h \
4+
$(srcdir)/clutter-helix-video-texture.h
5+
6+
source_c = clutter-helix-util.c clutter-helix-video-texture.c
7+
8+
libclutter_helix_@CLUTTER_HELIX_MAJORMINOR@_la_SOURCES = $(MARSHALFILES) \
9+
$(source_c) \
10+
$(source_h)
11+
12+
INCLUDES = \
13+
-I$(top_srcdir) \
14+
-DG_LOG_DOMAIN=\"Clutter-Helix\" \
15+
@GCC_FLAGS@ \
16+
@CLUTTER_CFLAGS@ \
17+
$(SURFACE_CFLAGS)
18+
19+
lib_LTLIBRARIES = libclutter-helix-@[email protected]
20+
21+
libclutter_helix_@CLUTTER_HELIX_MAJORMINOR@_la_LIBADD = @CLUTTER_LIBS@ $(SURFACE_LIBS)
22+
libclutter_helix_@CLUTTER_HELIX_MAJORMINOR@_la_LDFLAGS = @CLUTTER_HELIX_LT_LDFLAGS@
23+
24+
clutterhelixheadersdir = $(includedir)/clutter-@CLUTTER_HELIX_MAJORMINOR@/clutter-helix
25+
clutterhelixheaders_HEADERS = $(source_h) clutter-helix.h

clutter-helix/clutter-helix-util.c

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Clutter-Helix.
3+
*
4+
* Helix integration library for Clutter.
5+
*
6+
* Authored By Paul Bu <[email protected]>
7+
*
8+
* Derived from Clutter-Gst, Authored By
9+
* Matthew Allum <[email protected]>
10+
* Jorn Baayen <[email protected]>
11+
*
12+
* Copyright 2006 OpenedHand
13+
* Copyright 2008 Intel Corp.
14+
*
15+
* Contributors:
16+
* Rusty Lynch <[email protected]>
17+
*
18+
* This library is free software; you can redistribute it and/or
19+
* modify it under the terms of the GNU Lesser General Public
20+
* License as published by the Free Software Foundation; either
21+
* version 2 of the License.
22+
*
23+
* This library is distributed in the hope that it will be useful,
24+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26+
* Lesser General Public License for more details.
27+
*
28+
* You should have received a copy of the GNU Lesser General Public
29+
* License along with this library; if not, write to the
30+
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
31+
* Boston, MA 02111-1307, USA.
32+
*/
33+
34+
#include "clutter-helix-util.h"
35+
36+
/**
37+
* SECTION:clutter-helix-util
38+
* @short_description: Utility functions for ClutterHelix.
39+
*
40+
* Various Utility functions for ClutterHelix.
41+
*/
42+
43+
/**
44+
* clutter_helix_init:
45+
* @argc: pointer to the argument list count
46+
* @argv: pointer to the argument list vector
47+
*
48+
* Utility function to call helix_init(), then clutter_init().
49+
*
50+
* Return value: A #ClutterInitError.
51+
*/
52+
ClutterInitError
53+
clutter_helix_init (int *argc, char ***argv)
54+
{
55+
static gboolean clutter_is_initialized = FALSE;
56+
ClutterInitError retval;
57+
58+
if (!g_thread_supported ())
59+
g_thread_init (NULL);
60+
61+
if (!clutter_is_initialized)
62+
{
63+
retval = clutter_init (argc, argv);
64+
65+
clutter_is_initialized = TRUE;
66+
}
67+
else
68+
retval = CLUTTER_INIT_SUCCESS;
69+
70+
return retval;
71+
}

clutter-helix/clutter-helix-util.h

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Clutter-Helix.
3+
*
4+
* Helix integration library for Clutter.
5+
*
6+
* Authored By Paul Bu <[email protected]>
7+
*
8+
* Derived from Clutter-Gst, Authored By
9+
* Matthew Allum <[email protected]>
10+
* Jorn Baayen <[email protected]>
11+
*
12+
* Copyright 2006 OpenedHand
13+
* Copyright 2008 Intel Corp.
14+
*
15+
* Contributors:
16+
* Rusty Lynch <[email protected]>
17+
*
18+
* This library is free software; you can redistribute it and/or
19+
* modify it under the terms of the GNU Lesser General Public
20+
* License as published by the Free Software Foundation; either
21+
* version 2 of the License.
22+
*
23+
* This library is distributed in the hope that it will be useful,
24+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26+
* Lesser General Public License for more details.
27+
*
28+
* You should have received a copy of the GNU Lesser General Public
29+
* License along with this library; if not, write to the
30+
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
31+
* Boston, MA 02111-1307, USA.
32+
*/
33+
34+
#ifndef _HAVE_CLUTTER_HELIX_UTIL_H
35+
#define _HAVE_CLUTTER_HELIX_UTIL_H
36+
37+
#include <clutter/clutter-main.h>
38+
39+
G_BEGIN_DECLS
40+
41+
ClutterInitError clutter_helix_init (int *argc, char ***argv);
42+
43+
G_END_DECLS
44+
45+
#endif
+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/*
2+
* Clutter-Helix.
3+
*
4+
* Helix integration library for Clutter.
5+
*
6+
* Authored By Rusty Lynch <[email protected]>
7+
*
8+
* Derived from Clutter-Gst, Authored By
9+
* Matthew Allum <[email protected]>
10+
* Jorn Baayen <[email protected]>
11+
*
12+
* Copyright 2006 OpenedHand
13+
* Copyright 2008 Intel Corp.
14+
*
15+
* This library is free software; you can redistribute it and/or
16+
* modify it under the terms of the GNU Lesser General Public
17+
* License as published by the Free Software Foundation; either
18+
* version 2 of the License.
19+
*
20+
* This library is distributed in the hope that it will be useful,
21+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23+
* Lesser General Public License for more details.
24+
*
25+
* You should have received a copy of the GNU Lesser General Public
26+
* License along with this library; if not, write to the
27+
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
28+
* Boston, MA 02111-1307, USA.
29+
*/
30+
31+
/**
32+
* SECTION:clutter-helix-version
33+
* @short_description: Versioning Macros
34+
*
35+
* Version checking macros.
36+
*/
37+
38+
#ifndef __CLUTTER_HELIX_VERSION_H__
39+
#define __CLUTTER_HELIX_VERSION_H__
40+
41+
/**
42+
* CLUTTER_HELIX_MAJOR_VERSION:
43+
*
44+
* ClutterHelix major version (e.g. "1", if %CLUTTER_HELIX_VERSION is "1.2.3")
45+
*/
46+
#define CLUTTER_HELIX_MAJOR_VERSION (@CLUTTER_HELIX_MAJOR_VERSION@)
47+
48+
/**
49+
* CLUTTER_HELIX_MINOR_VERSION:
50+
*
51+
* ClutterHelix minor version (e.g. "2", if %CLUTTER_HELIX_VERSION is "1.2.3")
52+
*/
53+
#define CLUTTER_HELIX_MINOR_VERSION (@CLUTTER_HELIX_MINOR_VERSION@)
54+
55+
/**
56+
* CLUTTER_HELIX_MICRO_VERSION:
57+
*
58+
* ClutterHelix micro version (e.g. "3", if %CLUTTER_HELIX_VERSION is "1.2.3")
59+
*/
60+
#define CLUTTER_HELIX_MICRO_VERSION (@CLUTTER_HELIX_MICRO_VERSION@)
61+
62+
/**
63+
* CLUTTER_HELIX_VERSION:
64+
*
65+
* ClutterHelix full version (e.g. "1.2.3")
66+
*/
67+
#define CLUTTER_HELIX_VERSION (@CLUTTER_HELIX_VERSION@)
68+
69+
/**
70+
* CLUTTER_HELIX_VERSION_S:
71+
*
72+
* ClutterHelix full version, encoded as a string.
73+
*/
74+
#define CLUTTER_HELIX_VERSION_S "@CLUTTER_HELIX_VERSION@"
75+
76+
/**
77+
* CLUTTER_HELIX_VERSION_HEX:
78+
*
79+
* ClutterHelix full version, encoded as an hexadecimal value.
80+
*/
81+
#define CLUTTER_HELIX_VERSION_HEX ((CLUTTER_HELIX_MAJOR_VERSION << 24) | \
82+
(CLUTTER_HELIX_MINOR_VERSION << 16) | \
83+
(CLUTTER_HELIX_MICRO_VERSION << 8))
84+
85+
/**
86+
* CLUTTER_HELIX_CHECK_VERSION:
87+
* @major: major version, like 1 in 1.2.3
88+
* @minor: minor version, like 2 in 1.2.3
89+
* @micro: micro version, like 3 in 1.2.3
90+
*
91+
* Evaluates to %TRUE if the version of ClutterHelix is greater than
92+
* the @major, @minor and @micro values.
93+
*/
94+
#define CLUTTER_HELIX_CHECK_VERSION(major,minor,micro) \
95+
(CLUTTER_HELIX_MAJOR_VERSION > (major) || \
96+
(CLUTTER_HELIX_MAJOR_VERSION == (major) && CLUTTER_HELIX_MINOR_VERSION > (minor)) || \
97+
(CLUTTER_HELIX_MAJOR_VERSION == (major) && CLUTTER_HELIX_MINOR_VERSION == (minor) && CLUTTER_HELIX_MICRO_VERSION >= (micro)))
98+
99+
#endif /* __CLUTTER_HELIX_VERSION_H__ */

0 commit comments

Comments
 (0)