source: golgotha/src/i4/app/app.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 2.2 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9//{{{ Application Class
10//
11//$Id: app.hh,v 1.22 1998/06/02 23:50:20 jc Exp $
12#ifndef I4_APP_HH
13#define I4_APP_HH
14
15
16class i4_window_manager_class;
17class i4_parent_window_class;
18class i4_graphical_style_class;
19
20#include "video/display.hh"
21#include "device/device.hh"
22#include "palette/pal.hh"
23#include "file/file.hh"
24
25class i4_application_class : public i4_event_handler_class
26{
27protected:
28  i4_bool finished;
29  i4_display_class *display;
30  i4_window_manager_class *wm; 
31
32  i4_application_class() {}
33
34  i4_display_class::mode *find_mode(w16 &width, w16 &height, int driver_id);
35
36  virtual void handle_no_displays(); 
37  virtual void receive_event(i4_event *ev);
38
39  virtual void get_input();
40  virtual void calc_model();
41  virtual void refresh();
42
43  virtual void init();
44
45  virtual void uninit();
46
47  void memory_init();
48
49  void resource_init(char *resource_file,
50                     void *resource_buffer);
51
52  void display_init();
53  void display_uninit();
54
55  // normal the app use the registry to decide which display
56  // to use. if no registry item available it uses the first display
57  virtual i4_bool get_display_name(char *name, int max_len);
58
59public:
60  virtual void quit() { finished=i4_T; }
61
62  // when you are not doing time critical return i4_T so i4 will give time to other processes
63  virtual i4_bool idle() { return i4_T; } 
64
65
66  virtual ~i4_application_class();
67  virtual void run();
68  i4_parent_window_class *get_root_window();
69  i4_graphical_style_class *get_style();
70  i4_window_manager_class *get_window_manager() { return wm; }
71  i4_display_class *get_display() { return display; }
72};
73
74extern i4_application_class *i4_current_app;
75
76#endif
Note: See TracBrowser for help on using the repository browser.