File: menu.h

package info (click to toggle)
xbl 1.0i-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 620 kB
  • ctags: 714
  • sloc: ansic: 7,395; makefile: 285; sh: 2
file content (87 lines) | stat: -rw-r--r-- 2,283 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
    XBlockOut a 3D Tetris

    Copyright (C) 1992,1993,1994  Thierry EXCOFFIER

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 1, or (at your option)
    any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

    Contact: Thierry.EXCOFFIER@ligia.univ-lyon1.fr
*/

#include "ansi.h"
#include <X11/Xlib.h>
#include "movingbutton.h"
#include "keyid.h"

#define TEXT 0
#define INTEGER 1
#define FUNCTION 2

#define ZOO_NBX_PIECES 7	/* Number of piece in zoo width */
#define ZOO_NBY_PIECES 6	/* Number of piece in zoo height */
#define ZOO_WIDTH	512

struct menu
	{
	Display *display ;
	Window window ;		/* The menu window */
	Window zoo ;		/* The zoo window */
	int showscore ;		/* Boolean */
	int showzoo ;		/* Boolean */
	unsigned int xzoo,yzoo ;/* Zoo window size */
	Font font,font2 ;	/* Normal and big font */
	XFontStruct *xfont,*xfont2 ;
	int char_height ;	/* Maximum char height for normal char */
	GC white,black,text,text1,text2 ;
	GC flat,upleft,downright ;
	int layersize ;
	Pixmap helpkey ;	/* The bitmap with the help cube */
	int widthhelpkey,heighthelpkey ;
	int tx[KEY_ROT_Z_NEG+1] ;
	int ty[KEY_ROT_Z_NEG+1] ;
	struct bl *bl ;
	struct row_column *all ;
	struct moving_button
		*score,
		*hiscore,
		*cube,
		*bloc,
		*destroylevel,
		*level,
		*nextpiece,

		*land,
		*typepiece,
		*width,*height,*depth,
		*startlevel,
		*training,
		*volume,
		*viewzoo,*viewscore,
		*frame,

		*smooth,
		*draw,
		*key,
		*help,
		*quit,
		*state,
		*counting,
		*copyright ;
	 } ;

extern void initmenu(R1(struct bl *bl)) ;
extern void createhelp(R2(struct moving_button *b,char *key)) ;
extern void displaymenu(R5(struct menu *b,int x,int y,int dx,int dy)) ;
extern void menuevent(R2(struct bl *bl,XEvent *event)) ;