mightymandel
v16
GPU-based Mandelbrot set explorer
interact.h
Go to the documentation of this file.
1
// mightymandel -- GPU-based Mandelbrot Set explorer
2
// Copyright (C) 2012,2013,2014 Claude Heiland-Allen
3
// License GPL3+ http://www.gnu.org/licenses/gpl.html
4
5
#ifndef INTERACT_H
6
#define INTERACT_H 1
7
8
#include <stdbool.h>
9
#include <mpfr.h>
10
11
struct
interact
{
12
mpfr_t
centerx
;
13
mpfr_t
centery
;
14
mpfr_t
radius
;
15
double
weight
;
16
bool
show_glitches
;
17
bool
save_screenshot
;
18
bool
quit
;
19
bool
updated
;
20
int
width
;
21
int
height
;
22
};
23
24
typedef
enum
{
25
k_quit
,
26
k_show_glitches
,
27
k_zoom_in
,
28
k_zoom_out
,
29
k_save_screenshot
,
30
k_weight_0
,
k_weight_1
,
k_weight_2
,
k_weight_3
,
k_weight_4
,
k_weight_5
,
k_weight_6
,
k_weight_7
,
k_weight_8
,
k_weight_9
,
31
k_left
,
k_right
,
k_up
,
k_down
32
}
key
;
33
typedef
enum
{
b_left
,
b_right
,
b_middle
,
b_up
,
b_down
}
button
;
34
35
struct
interact
interact
;
36
37
void
interact_begin
(
int
w,
int
h,
const
mpfr_t cx,
const
mpfr_t cy,
const
mpfr_t r,
double
weight
,
bool
show_glitches
);
38
void
interact_end
(
void
);
39
void
interact_reset
(
void
);
40
void
interact_mouse
(
button
button
,
double
x,
double
y,
bool
shift,
bool
ctrl);
41
void
interact_keyboard
(
key
key
,
bool
shift,
bool
ctrl);
42
43
#endif
src
interact.h
Generated on Mon Jan 19 2015 16:18:12 for mightymandel by
1.8.1.2