~ubuntu-branches/ubuntu/trusty/gcompris/trusty

« back to all changes in this revision

Viewing changes to src/gcompris/gcompris.h

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-04-21 16:16:27 UTC
  • Revision ID: james.westby@ubuntu.com-20020421161627-s07yahahm817qxs6
Tags: upstream-1.0.3
ImportĀ upstreamĀ versionĀ 1.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* gcompris - gcompris.h
 
2
 *
 
3
 * Time-stamp: <2002/04/14 00:17:00 bruno>
 
4
 *
 
5
 * Copyright (C) 2000 Bruno Coudoin
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This program 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
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
20
 */
 
21
 
 
22
#ifndef _MAIN_H_
 
23
#define _MAIN_H_
 
24
 
 
25
#ifdef HAVE_CONFIG_H
 
26
#  include <config.h>
 
27
#endif
 
28
 
 
29
#include <gnome.h>
 
30
 
 
31
#include <glib.h>
 
32
 
 
33
#include <config.h>
 
34
#include <gmodule.h>
 
35
 
 
36
#include "plugin.h"
 
37
#include "gcompris-board.h"
 
38
#include "board.h"
 
39
#include "properties.h"
 
40
#include "gameutil.h"
 
41
#include "pluginenum.h"
 
42
#include "bonus.h"
 
43
#include "timer.h"
 
44
#include "score.h"
 
45
 
 
46
#define BOARDWIDTH  800
 
47
#define BOARDHEIGHT 520
 
48
#define BARHEIGHT   80
 
49
 
 
50
 
 
51
/*****************************************************************************/
 
52
/* Method usefull for boards provided by gcompris */
 
53
 
 
54
void             gcompris_end_board(void);
 
55
 
 
56
/* Control Bar methods */
 
57
void             gcompris_bar_start (GnomeCanvas *theCanvas);
 
58
 
 
59
GnomeCanvasItem *gcompris_set_background(GnomeCanvasGroup *parent, gchar *file);
 
60
void             gcompris_bar_set_level (GcomprisBoard *gcomprisBoard);
 
61
 
 
62
/* Status bar control */
 
63
typedef enum
 
64
{
 
65
  GCOMPRIS_BAR_LEVEL    = 1 << 0,
 
66
  GCOMPRIS_BAR_OK       = 1 << 1,
 
67
  GCOMPRIS_BAR_REPEAT   = 1 << 2,
 
68
  GCOMPRIS_BAR_CONFIG   = 1 << 3,
 
69
  GCOMPRIS_BAR_ABOUT    = 1 << 4,
 
70
} GComprisBarFlags;
 
71
 
 
72
void             gcompris_bar_set (const GComprisBarFlags flags);
 
73
void             gcompris_bar_hide (gboolean hide);
 
74
 
 
75
/* Help window */
 
76
gboolean         gcompris_board_has_help (GcomprisBoard *gcomprisBoard);
 
77
void             gcompris_help_start (GcomprisBoard *gcomprisBoard);
 
78
void             gcompris_help_stop (void);
 
79
 
 
80
/* General */
 
81
GnomeCanvas     *gcompris_get_canvas(void);
 
82
GtkWidget       *gcompris_get_window(void);
 
83
 
 
84
gchar           *gcompris_get_locale(void);
 
85
void             gcompris_set_locale(gchar *locale);
 
86
 
 
87
void             gcompris_set_cursor(guint gdk_cursor_type);
 
88
 
 
89
/*=========================================================*/
 
90
/* Some global definition to keep a constant look and feel */
 
91
/* Boards coders are invited to use them                   */
 
92
#define COLOR_TITLE             0x0F0FC000
 
93
#define COLOR_TEXT_BUTTON       0x0F0FC000
 
94
#define COLOR_CONTENT           0x0D0DFA00
 
95
#define COLOR_SUBTITLE          0xB0040000
 
96
 
 
97
#define FONT_TITLE              _("-bitstream-charter-black-r-normal-*-*-320-*-*-p-*-iso8859-1")
 
98
#define FONT_TITLE_FALLBACK     _("-adobe-times-medium-r-normal--*-240-*-*-*-*-*-*")
 
99
#define FONT_SUBTITLE           _("-bitstream-charter-medium-r-normal-*-*-180-*-*-p-*-iso8859-1")
 
100
#define FONT_SUBTITLE_FALLBACK  _("-adobe-times-medium-r-normal--*-180-*-*-*-*-*-*")
 
101
#define FONT_CONTENT            _("-bitstream-charter-medium-r-normal-*-*-140-*-*-p-*-iso8859-1")
 
102
#define FONT_CONTENT_FALLBACK   _("-adobe-times-medium-r-normal--*-140-*-*-*-*-*-*")
 
103
 
 
104
#define FONT_BOARD_TINY         _("-adobe-times-medium-r-normal--*-120-*-*-*-*-*-*")
 
105
#define FONT_BOARD_SMALL        _("-adobe-times-medium-r-normal--*-140-*-*-*-*-*-*")
 
106
#define FONT_BOARD_MEDIUM       _("-adobe-times-medium-r-normal--*-180-*-*-*-*-*-*")
 
107
#define FONT_BOARD_BIG          _("-adobe-times-medium-r-normal--*-240-*-*-*-*-*-*")
 
108
#define FONT_BOARD_BIG_BOLD     _("-adobe-times-bold-r-normal--*-240-*-*-*-*-*-*")
 
109
#define FONT_BOARD_FIXED        _("-misc-fixed-medium-r-normal-*-*-200-*-*-c-*-*-*")
 
110
 
 
111
/*=========================================================*/
 
112
// These are gcompris defined cursors
 
113
// cursor defines must be over the last gnome cursor defined in gdkcursors.h
 
114
#define GCOMPRIS_FIRST_CUSTOM_CURSOR    1000
 
115
#define GCOMPRIS_BIG_RED_ARROW_CURSOR   1001
 
116
#define GCOMPRIS_BIRD_CURSOR            1002
 
117
#define GCOMPRIS_LINE_CURSOR            1003
 
118
#define GCOMPRIS_FILLRECT_CURSOR        1004
 
119
#define GCOMPRIS_RECT_CURSOR            1005
 
120
#define GCOMPRIS_FILLCIRCLE_CURSOR      1006
 
121
#define GCOMPRIS_CIRCLE_CURSOR          1007
 
122
#define GCOMPRIS_DEL_CURSOR             1008
 
123
#define GCOMPRIS_FILL_CURSOR            1009
 
124
#define GCOMPRIS_SELECT_CURSOR          1010
 
125
 
 
126
#define GCOMPRIS_DEFAULT_CURSOR         GCOMPRIS_BIG_RED_ARROW_CURSOR
 
127
 
 
128
#endif
 
129
 
 
130
/* Local Variables: */
 
131
/* mode:c */
 
132
/* eval:(load-library "time-stamp") */
 
133
/* eval:(make-local-variable 'write-file-hooks) */
 
134
/* eval:(add-hook 'write-file-hooks 'time-stamp) */
 
135
/* eval:(setq time-stamp-format '(time-stamp-yyyy/mm/dd time-stamp-hh:mm:ss user-login-name)) */
 
136
/* End: */