~ubuntu-branches/ubuntu/dapper/vice/dapper

« back to all changes in this revision

Viewing changes to src/arch/win32/ui.h

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2004-08-26 13:35:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040826133551-gcje8j31q5cqgdq2
Tags: 1.14-3
Apply patch from Spiro Trikaliotis <vice@trikaliotis.net> to fix a
problem that some users were experiencing with a floating point
exception on startup related to the fullscreen option being enabled
during compile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 * Written by
5
5
 *  Ettore Perazzoli <ettore@comm2000.it>
 
6
 *  Andreas Boose <viceteam@t-online.de>
6
7
 *
7
8
 * This file is part of VICE, the Versatile Commodore Emulator.
8
9
 * See README for copyright notice.
28
29
#define _UI_WIN32_H
29
30
 
30
31
#include "uiapi.h"
31
 
#include "video.h"
32
 
#include "videoarch.h"
 
32
 
33
33
#include <stdio.h>
34
34
 
 
35
#undef BYTE
 
36
#undef WORD
 
37
#undef DWORD
 
38
#include <ddraw.h>
 
39
 
35
40
#define APPLICATION_CLASS "VICE"
36
41
#define APPLICATION_CLASS_MAIN "VICE:Main"
37
42
#define APPLICATION_FULLSCREEN_CLASS "VICE:Fullscreen"
44
49
    UI_BUTTON_MON, UI_BUTTON_DEBUG, UI_BUTTON_CONTENTS, UI_BUTTON_AUTOSTART
45
50
} ui_button_t;
46
51
 
47
 
typedef struct {
 
52
struct ui_menu_toggle_s {
48
53
    /* Name of resource.  */
49
54
    const char *name;
50
55
    /* ID of the corresponding menu item.  */
51
56
    UINT item_id;
52
 
} ui_menu_toggle;
 
57
};
 
58
typedef struct ui_menu_toggle_s ui_menu_toggle_t;
53
59
 
54
 
typedef struct {
 
60
struct ui_res_possible_values_s {
55
61
    int value;
56
62
    UINT item_id; /* The last item_id has to be zero.  */
57
 
} ui_res_possible_values;
 
63
};
 
64
typedef struct ui_res_possible_values_s ui_res_possible_values_t;
58
65
 
59
 
typedef struct {
 
66
struct ui_res_value_list_s {
60
67
    const char *name;
61
 
    ui_res_possible_values *vals;
62
 
} ui_res_value_list;
 
68
    const ui_res_possible_values_t *vals;
 
69
    UINT default_item_id;
 
70
};
 
71
typedef struct ui_res_value_list_s ui_res_value_list_t;
63
72
 
64
73
extern int  ui_active;
65
74
extern HWND ui_active_window;
66
75
 
67
76
/* ------------------------------------------------------------------------- */
68
77
 
 
78
extern int ui_vblank_sync_enabled();
 
79
 
69
80
extern void ui_exit(void);
70
81
extern void ui_display_speed(float percent, float framerate, int warp_flag);
71
82
extern void ui_display_paused(int flag);
77
88
extern ui_button_t ui_ask_confirmation(const char *title, const char *text);
78
89
 
79
90
typedef void (*ui_machine_specific_t) (WPARAM wparam, HWND hwnd);
 
91
 
80
92
extern void ui_register_machine_specific(ui_machine_specific_t func);
81
 
void ui_register_menu_toggles(ui_menu_toggle *toggles);
82
 
void ui_register_res_values(ui_res_value_list *valuelist);
 
93
extern void ui_register_menu_toggles(const ui_menu_toggle_t *toggles);
 
94
extern void ui_register_res_values(const ui_res_value_list_t *valuelist);
83
95
 
84
96
/* ------------------------------------------------------------------------ */
85
97
 
88
100
extern HWND ui_get_main_hwnd(void);
89
101
extern HWND ui_open_canvas_window(const char *title, unsigned int width,
90
102
                                  unsigned int height,
91
 
                                  void_t exposure_handler,
92
103
                                  int fullscreen);
93
104
extern void ui_resize_canvas_window(HWND w, unsigned int width,
94
105
                                    unsigned int height);