File: button.h

package info (click to toggle)
ale-clone 1.15pre16.3-1
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 2,432 kB
  • ctags: 3,217
  • sloc: ansic: 37,483; sh: 1,105; makefile: 343
file content (90 lines) | stat: -rw-r--r-- 2,287 bytes parent folder | download
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
88
89
90
/*
**	A clone of a famous game.
*/
/**@name button.h	-	The unit button file. */
/*
**	(c) Copyright 1999 by Lutz Sammer
**
**	$Id: button.h,v 1.4 1999/07/08 21:09:27 root Exp $
*/

#ifndef __BUTTON_H__
#define __BUTTON_H__

//@{

typedef void ButtonConfig;
#define InitUnitButtons()
#define UnitButtonCclRegister()

#if 0
// Unused

/*----------------------------------------------------------------------------
--	Includes
----------------------------------------------------------------------------*/

#include "icons.h"

/*----------------------------------------------------------------------------
--	Definitons
----------------------------------------------------------------------------*/

/**
**	Defines an unit button.
*/
typedef struct _unit_button_ {
    void*	OType;			/// Object type (future extensions)

    char*	Ident;			/// identifier

    IconConfig	Icon;			/// icon to display
    int		ReqFn;			/// requirements function to appear
    int		ReqArg;			/// requirements argument
    int		ActFn;			/// action to perfrom on button press
    int		ActArg;			/// action function argument
    int		Key;			/// keyboard hotkey
    char*	Text;			/// tip text in status line
//  char*	BalloonTip;		/// Balloon help
} UnitButton;

/**
**	Button definition
*/
typedef struct _button_config_ {
    char*	Name;			/// config icon name
    UnitButton*	Button;			/// identifier to use to run time
} ButtonConfig;

#if 0
/**
**	Defines an unit button panel.
*/
typedef struct _unit_panel_ {
    void*	OType;			/// Object type (future extensions)

    char*	Ident;			/// identifier
} UnitPanel;
#endif

/*----------------------------------------------------------------------------
--	Variables
----------------------------------------------------------------------------*/

extern char	  UnitButtonType;	/// unit button type
extern UnitButton UnitButtons[];	/// all unit buttons

/*----------------------------------------------------------------------------
--	Functions
----------------------------------------------------------------------------*/

extern void UnitButtonCclRegister(void);	/// register ccl features

extern UnitButton* ButtonByIdent(const char*);	/// get button by ident
extern void InitUnitButtons(void);		/// setup unit buttons

#endif

//@}

#endif	// !__BUTTON_H__