<HTML
><HEAD
><TITLE
>gnome-score</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK
REL="HOME"
TITLE="Gnome Library Reference Manual"
HREF="book1.html"><LINK
REL="UP"
TITLE="Gnome Library"
HREF="libgnome.html"><LINK
REL="PREVIOUS"
TITLE="gnome-remote"
HREF="gnome-gnome-remote.html"><LINK
REL="NEXT"
TITLE="gnome-sound"
HREF="gnome-gnome-sound.html"></HEAD
><BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TH
COLSPAN="4"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="5"
>Gnome Library Reference Manual</FONT
></TH
></TR
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnome-gnome-remote.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libgnome.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnome-gnome-sound.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="GNOME-GNOME-SCORE"
>gnome-score</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN3977"
></A
><H2
>Name</H2
>gnome-score&nbsp;--&nbsp;Tracking score for games</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN3980"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;#include &lt;gnome.h&gt;


<GTKDOCLINK
HREF="GINT"
>gint</GTKDOCLINK
>        <A
HREF="gnome-gnome-score.html#GNOME-SCORE-INIT"
>gnome_score_init</A
>                (const <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *gamename);
<GTKDOCLINK
HREF="GINT"
>gint</GTKDOCLINK
>        <A
HREF="gnome-gnome-score.html#GNOME-SCORE-LOG"
>gnome_score_log</A
>                 (<GTKDOCLINK
HREF="GFLOAT"
>gfloat</GTKDOCLINK
> score,
                                             <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *level,
                                             <GTKDOCLINK
HREF="GBOOLEAN"
>gboolean</GTKDOCLINK
> higher_to_lower_score_order);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN3991"
></A
><H2
>Description</H2
><P
>The routines in this module provide a simple way for games to
keep track of the user's score in a game.</P
><P
>The programmer needs to call <A
HREF="gnome-gnome-score.html#GNOME-SCORE-INIT"
>gnome_score_init</A
>() with the name of
the game prior to accessing any of the other gnome_score functions.
<A
HREF="gnome-gnome-score.html#GNOME-SCORE-LOG"
>gnome_score_log</A
>() should then be called every time the user ends a
round.  To get a list of the most notable scores, you call the
<GTKDOCLINK
HREF="GNOME-SCORE-GET-NOTABLE"
>gnome_score_get_notable</GTKDOCLINK
>() routine.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN3998"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN4000"
></A
><H3
><A
NAME="GNOME-SCORE-INIT"
></A
>gnome_score_init ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="GINT"
>gint</GTKDOCLINK
>        gnome_score_init                (const <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *gamename);</PRE
></TD
></TR
></TABLE
><P
>GNOME Games should call this routine as the first statement
in <GTKDOCLINK
HREF="MAIN"
>main</GTKDOCLINK
>() if they have been installed setgid to the <GTKDOCLINK
HREF="GAMES"
>games</GTKDOCLINK
>() group.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>gamename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Identifies the game name.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> 0 on success, returns -1 on failure.

group privileges are dropped regardless of the status returned.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4023"
></A
><H3
><A
NAME="GNOME-SCORE-LOG"
></A
>gnome_score_log ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="GINT"
>gint</GTKDOCLINK
>        gnome_score_log                 (<GTKDOCLINK
HREF="GFLOAT"
>gfloat</GTKDOCLINK
> score,
                                             <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *level,
                                             <GTKDOCLINK
HREF="GBOOLEAN"
>gboolean</GTKDOCLINK
> higher_to_lower_score_order);</PRE
></TD
></TR
></TABLE
><P
>Logs a score entry for the user.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>score</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the score achieved by the user in this game</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>level</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> level on which the score was obtained</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>higher_to_lower_score_order</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> biggers is better or not</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>0 on failure or the status from the gnome-score helper
program.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><BR
CLEAR="all"><BR><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnome-gnome-remote.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libgnome.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnome-gnome-sound.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="left"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>gnome-remote</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>gnome-sound</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>