-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.h
55 lines (44 loc) · 1.78 KB
/
demo.h
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
/**********************************************************************
* demo.h - declares the demo object
*
* Copyright 1993, David Nedde
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is granted
* provided that the above copyright notice appears in all copies.
* It is provided "as is" without express or implied warranty.
**********************************************************************/
#ifndef __DEMO_H__
#define __DEMO_H__
#include <stdio.h>
#include <X11/Intrinsic.h>
#include "menu.h"
#include "scrollbar.h"
#include "file_sel.h"
#include "items.h"
#include "room.h"
typedef struct {
Bool interactive; /* Demo 'exit' will not exit program if
interactive is True */
scrollbar_type gravity; /* Gravity scrollbar */
scrollbar_type elasticity; /* Elasticity acrollbar */
menu_type menu;
file_sel_type file_sel; /* To query user for demo file */
items_type items;
room_type room;
FILE * file_ptr; /* The file pointer for the current demo file */
char * file_name; /* The name of the current demo file */
unsigned iterations; /* Number of iterations we are currently pausing */
} demo_struct_type, *demo_type;
/* Public methods */
demo_type demo__create(/* w, menu, gravity, elasticity, file_sel, items,
room*/);
void demo__destroy(/* demo*/);
void demo__run_mcb(/* w, demo, call_data, extra*/);
void demo__stop_mcb(/* w, demo, call_data, extra*/);
void demo__stop(/* demo*/);
Bool demo__running(/*demo*/);
void demo__process(/*demo*/);
/* Inline functions */
#define demo__set_interactive( demo, inter) ((demo)->interactive = (inter))
#endif