1 | /* |
---|
2 | * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation |
---|
3 | * All rights reserved. |
---|
4 | * |
---|
5 | * This file is part of the Gnome Library. |
---|
6 | * |
---|
7 | * The Gnome Library is free software; you can redistribute it and/or |
---|
8 | * modify it under the terms of the GNU Library General Public License as |
---|
9 | * published by the Free Software Foundation; either version 2 of the |
---|
10 | * License, or (at your option) any later version. |
---|
11 | * |
---|
12 | * The Gnome Library is distributed in the hope that it will be useful, |
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | * Library General Public License for more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU Library General Public |
---|
18 | * License along with the Gnome Library; see the file COPYING.LIB. If not, |
---|
19 | * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
20 | * Boston, MA 02111-1307, USA. |
---|
21 | */ |
---|
22 | /* |
---|
23 | @NOTATION@ |
---|
24 | */ |
---|
25 | |
---|
26 | #ifndef __GNOME_SCORE_H__ |
---|
27 | #define __GNOME_SCORE_H__ 1 |
---|
28 | |
---|
29 | #include <time.h> |
---|
30 | #include <glib.h> |
---|
31 | |
---|
32 | G_BEGIN_DECLS |
---|
33 | /* |
---|
34 | * gnome_score_init() |
---|
35 | * creates a child process with which we communicate through a pair of pipes, |
---|
36 | * then drops privileges. |
---|
37 | * this should be called as the first statement in main(). |
---|
38 | * returns 0 on success, drops privs and returns -1 on failure |
---|
39 | */ |
---|
40 | |
---|
41 | gint |
---|
42 | gnome_score_init (const gchar * gamename); |
---|
43 | |
---|
44 | /* Returns the position in the top-ten starting from 1, or 0 if it isn't in the table */ |
---|
45 | gint |
---|
46 | gnome_score_log(gfloat score, |
---|
47 | const gchar *level, /* Pass in NULL unless you want to keep |
---|
48 | per-level scores for the game */ |
---|
49 | /* Pass in TRUE if higher scores are "better" |
---|
50 | in the game */ |
---|
51 | gboolean higher_to_lower_score_order); |
---|
52 | |
---|
53 | /* Returns number of items in the arrays */ |
---|
54 | gint |
---|
55 | gnome_score_get_notable(const gchar *gamename, /* Will be auto-determined if NULL */ |
---|
56 | const gchar *level, |
---|
57 | gchar ***names, |
---|
58 | gfloat **scores, |
---|
59 | time_t **scoretimes); |
---|
60 | G_END_DECLS |
---|
61 | |
---|
62 | #endif /* __GNOME_SCORE_H__ */ |
---|