2007-05-31 Matthew Allum <mallum@openedhand.com>

* clutter/clutter-behaviour-ellipse.c:
        Remove uneeded knot signal

        * clutter/clutter-behaviour-path.c:
        Fix so knot signal is emitted only when a knot is reached.

        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        Add a scale effect.

        * configure.ac:
        * doc/manual/Makefile.am:
        * doc/manual/clutter-manual.xml.in:
        * doc/manual/manual.xsl:
        * doc/manual/style.css:
        Add various bits for application developers manual.
This commit is contained in:
Matthew Allum 2007-05-30 23:16:58 +00:00
parent 5b0e0dbcbe
commit 8310a87bfc
12 changed files with 355 additions and 37 deletions

View File

@ -1,3 +1,22 @@
2007-05-31 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
Remove uneeded knot signal
* clutter/clutter-behaviour-path.c:
Fix so knot signal is emitted only when a knot is reached.
* clutter/clutter-effect.c:
* clutter/clutter-effect.h:
Add a scale effect.
* configure.ac:
* doc/manual/Makefile.am:
* doc/manual/clutter-manual.xml.in:
* doc/manual/manual.xsl:
* doc/manual/style.css:
Add various bits for application developers manual.
2007-05-30 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-alpha.h:

View File

@ -31,9 +31,6 @@
* #ClutterBehaviourEllipse interpolates actors along a path defined by
* en ellipse.
*
* Each time the behaviour reaches a point on the path, the "knot-reached"
* signal is emitted.
*
* Since: 0.4
*/
@ -61,15 +58,6 @@ G_DEFINE_TYPE (ClutterBehaviourEllipse,
CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, \
ClutterBehaviourEllipsePrivate))
enum
{
KNOT_REACHED,
LAST_SIGNAL
};
static guint ellipse_signals[LAST_SIGNAL] = { 0, };
enum
{
PROP_0,
@ -181,8 +169,6 @@ clutter_behaviour_ellipse_alpha_notify (ClutterBehaviour * behave,
clutter_behaviour_actors_foreach (behave,
actor_apply_knot_foreach,
&knot);
g_signal_emit (behave, ellipse_signals[KNOT_REACHED], 0, &knot);
}
static void
@ -362,25 +348,6 @@ clutter_behaviour_ellipse_class_init (ClutterBehaviourEllipseClass *klass)
CLUTTER_TYPE_KNOT,
CLUTTER_PARAM_READWRITE));
/**
* ClutterBehaviourEllipse::knot-reached:
* @ellipse: the object which received the signal
* @knot: the #ClutterKnot reached
*
* This signal is emitted at the end of each frame.
*
* Since: 0.4
*/
ellipse_signals[KNOT_REACHED] =
g_signal_new ("knot-reached",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterBehaviourEllipseClass, knot_reached),
NULL, NULL,
clutter_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
CLUTTER_TYPE_KNOT);
g_type_class_add_private (klass, sizeof (ClutterBehaviourEllipsePrivate));
}

View File

@ -61,7 +61,8 @@ G_DEFINE_TYPE (ClutterBehaviourPath,
struct _ClutterBehaviourPathPrivate
{
GSList *knots;
GSList *knots;
ClutterKnot *last_knot_passed;
};
#define CLUTTER_BEHAVIOUR_PATH_GET_PRIVATE(obj) \
@ -185,6 +186,7 @@ path_alpha_to_position (ClutterBehaviourPath *behave,
actor_apply_knot_foreach,
priv->knots->data);
priv->last_knot_passed = (ClutterKnot*)priv->knots->data;
g_signal_emit (behave, path_signals[KNOT_REACHED], 0,
priv->knots->data);
return;
@ -199,6 +201,7 @@ path_alpha_to_position (ClutterBehaviourPath *behave,
actor_apply_knot_foreach,
last_knot);
priv->last_knot_passed = (ClutterKnot*)priv->knots->data;
g_signal_emit (behave, path_signals[KNOT_REACHED], 0, last_knot);
return;
@ -227,7 +230,12 @@ path_alpha_to_position (ClutterBehaviourPath *behave,
actor_apply_knot_foreach,
&new);
g_signal_emit (behave, path_signals[KNOT_REACHED], 0, &new);
if (knot != priv->last_knot_passed)
{
/* We just passed a new Knot */
priv->last_knot_passed = knot;
g_signal_emit (behave, path_signals[KNOT_REACHED], 0, knot);
}
return;
}

View File

@ -346,3 +346,41 @@ clutter_effect_move (ClutterEffectTemplate *template,
return c->timeline;
}
/**
* clutter_effect_scale:
*
* FIXME
*
* Return value: a #ClutterTimeline.
*
* Since: 0.4
*/
ClutterTimeline*
clutter_effect_scale (ClutterEffectTemplate *template,
ClutterActor *actor,
gdouble scale_begin,
gdouble scale_end,
ClutterGravity gravity,
ClutterEffectCompleteFunc completed_func,
gpointer completed_userdata)
{
ClutterEffectClosure *c;
c = clutter_effect_closure_new (template,
actor,
G_CALLBACK (on_effect_complete));
c->completed_func = completed_func;
c->completed_data = completed_userdata;
c->behave = clutter_behaviour_scale_new (c->alpha,
scale_begin,
scale_end,
gravity);
clutter_behaviour_apply (c->behave, actor);
clutter_timeline_start (c->timeline);
return c->timeline;
}

View File

@ -88,6 +88,14 @@ clutter_effect_move (ClutterEffectTemplate *template,
ClutterEffectCompleteFunc completed_func,
gpointer completed_data);
ClutterTimeline*
clutter_effect_scale (ClutterEffectTemplate *template,
ClutterActor *actor,
gdouble scale_begin,
gdouble scale_end,
ClutterGravity gravity,
ClutterEffectCompleteFunc completed_func,
gpointer completed_userdata);
G_END_DECLS

View File

@ -255,6 +255,15 @@ dnl = GTK Doc check ========================================================
GTK_DOC_CHECK([1.4])
dnl = Manual ===============================================================
AC_ARG_ENABLE(manual,
AC_HELP_STRING([--enable-manual=@<:@no/yes@:>@],
[Build application developers manual. Requires jw and xmlto binaries.]),
enable_manual=$enableval, enable_manual=no)
AM_CONDITIONAL(ENABLE_MANUAL, test x$enable_manual != xno)
dnl ========================================================================
AC_SUBST(GCC_FLAGS)
@ -281,6 +290,8 @@ AC_CONFIG_FILES([
doc/Makefile
doc/reference/Makefile
doc/reference/version.xml
doc/manual/clutter-manual.xml
doc/manual/Makefile
clutter.pc
])
@ -297,6 +308,7 @@ echo ""
echo " Flavour: ${clutterbackend}"
echo " Target library: ${clutterbackendlib}"
echo " Debug level: ${enable_debug}"
echo " Documentation: ${enable_gtk_doc}"
echo " API Documentation: ${enable_gtk_doc}"
echo " Manual Documentation: ${enable_manual}"
echo " FPU: ${with_fpu}"
echo ""

View File

@ -1 +1 @@
SUBDIRS=reference
SUBDIRS=reference manual

63
doc/manual/Makefile.am Normal file
View File

@ -0,0 +1,63 @@
DOCDIR = $(DESTDIR)/$(datadir)/doc/@PACKAGE@-@CLUTTER_MAJORMINOR@
HTML_FILES = html/*.html
IMAGE_FILES = images/*.png
EXTRA_DIST = clutter-manual.xml.in manual.xsl style.css $(srcdir)/$(IMAGE_FILES)
CLEANFILES = pdf-build.stamp txt-build.stamp htmldoc-build.stamp clutter-manual.xml
pdf-build.stamp: clutter-manual.xml
SP_ENCODING=XML SP_CHARSET_FIXED=YES jw -b pdf $(srcdir)/clutter-manual.xml
mv $(srcdir)/clutter-manual.pdf clutter-manual-@CLUTTER_MAJORMINOR@.pdf
touch pdf-build.stamp
txt-build.stamp: clutter-manual.xml
xmlto txt $(srcdir)/clutter-manual.xml
mv $(srcdir)/clutter-manual.txt clutter-manual-@CLUTTER_MAJORMINOR@.txt
touch pdf-build.stamp
htmldoc-build.stamp: clutter-manual.xml
$(mkinstalldirs) html
xmlto -m manual.xsl -o html/ xhtml $(srcdir)/clutter-manual.xml
cp $(srcdir)/style.css html/
touch htmldoc-build.stamp
doc: txt-build.stamp htmldoc-build.stamp pdf-build.stamp
if ENABLE_MANUAL
all-local: doc
else
all-local:
endif
clean-local:
rm -rf html/*.html
rm -f html/style.css
rm -f clutter-manual-*.txt
rm -f *.pdf
uninstall-local:
rm -rf $(DOCDIR);
install-data-local:
installfiles=`echo $(srcdir)/html/*`; \
if test "$$installfiles" = '$(srcdir)/html/*'; then \
echo '-- Nothing to install' ; \
else \
$(mkinstalldirs) $(DOCDIR)/html/images ; \
for file in `ls $(srcdir)/$(HTML_FILES)`; do \
if [ -f $$file ]; then \
basefile=`echo $$file | sed -e 's,^.*/,,'`; \
$(INSTALL_DATA) $$file $(DOCDIR)/html/$$basefile; \
fi \
done; \
for file in `ls $(srcdir)/$(IMAGE_FILES)`; do \
if [ -f $$file ]; then \
basefile=`echo $$file | sed -e 's,^.*/,,'`; \
$(INSTALL_DATA) $$file $(DOCDIR)/html/images/$$basefile; \
fi \
done; \
$(INSTALL_DATA) $(srcdir)/style.css $(DOCDIR)/html/style.css; \
$(INSTALL_DATA) $(srcdir)/clutter-manual-@CLUTTER_MAJORMINOR@.txt $(DOCDIR)/clutter-manual-@CLUTTER_MAJORMINOR@.txt; \
$(INSTALL_DATA) $(srcdir)/clutter-manual-@CLUTTER_MAJORMINOR@.pdf $(DOCDIR)/clutter-manual-@CLUTTER_MAJORMINOR@.pdf; \
fi
.PHONY : doc

View File

@ -0,0 +1,92 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY appversion "@CLUTTER_MAJORMINOR@">
<!ENTITY appurl "http://clutter-project.org">
<!ENTITY author_mail "mallum@o-hand.com">
]>
<book lang="en">
<bookinfo>
<author>
<firstname>Matthew</firstname>
<surname>Allum</surname>
<address><email>&author_mail;</email></address>
</author>
<copyright>
<year>2007</year>
</copyright>
<legalnotice>
<para>
This document is distributed 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.
A copy of this license can be found in the file COPYING included with the source code of this
program.
</para>
</legalnotice>
<title>
Clutter Application Developer Manual &appversion;
</title>
</bookinfo>
<chapter id="intro">
<title>
Introduction
</title>
<section>
<title>About Clutter</title>
<para>
FIXME
</para>
</section>
<section>
<title>About this document</title>
<para>
This documentation is available in various formats like HTML, text and PDF. The latest version is
always available at <ulink url="&appurl;">&appurl;</ulink>.
</para>
</section>
<section>
<title>Where to get it</title>
<para>
You can obtain Clutter from <ulink url="&appurl;">&appurl;</ulink>
or perhaps from your distributor.
</para>
</section>
<section>
<title>License</title>
<para>
Clutter is distributed under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
A copy of this license can be found in the file COPYING included with the source code of this
program.
</para>
</section>
</chapter>
<chapter id="installation">
<title>
Installation
</title>
<section>
<title>Requirements</title>
<para>
</para>
<para>
</para>
</section>
<section id="binary_packages">
<title>Binary packages</title>
<para>
</para>
</section>
</chapter>
<appendix id="contrib">
<title>Contributing to this document</title>
<para>This document is written in Docbook XML. The source file for it is located in the
subdirectory "doc" of the source directory of Clutter.
</para>
</appendix>
</book>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

14
doc/manual/manual.xsl Normal file
View File

@ -0,0 +1,14 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
<!-- Use stylesheet -->
<xsl:param name="html.stylesheet" select="'style.css'"/>
<xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
</xsl:stylesheet>

97
doc/manual/style.css Normal file
View File

@ -0,0 +1,97 @@
body address
{
line-height: 1.3;
margin: .6em 0;
}
body blockquote
{
margin-top: .75em;
line-height: 1.5;
margin-bottom: .75em;
}
html body
{
margin: 1em 2% 1em 2%;
line-height: 1.2;
background-color: #ffffff;
}
body pre
{
margin: .75em 0;
line-height: 1.3;
color: #4f3f3f;
font-weight: bold;
}
body div
{
margin: 0;
}
dl
{
margin: .4em 0;
line-height: 1.2;
}
.legalnotice
{
font-size: small;
}
h1,h2,h3,h4,h5,h6,
div.example p b,
.question,
div.table p b,
div.procedure p b
{
color: #990000;
}
.option
{
color: #0000ca;
font-weight: bold;
}
.parameter
{
color: #007a00;
font-weight: bold;
}
a
{
color: #000000;
}
a:hover
{
color: #3c3c3c;
border-bottom: 1px solid #dc0000;
}
hr
{
background-color: #9c9c9c;
border-style: none;
height: 1px;
}
li
{
list-style-type: square;
}
.programlisting, .screen
{
background-color: #F8F9FD;
border-color: #907777;
border-width: 1px;
border-style: solid;
padding: 0.5em;
}