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;
18  bool quit;
19  bool updated;
20  int width;
21  int height;
22 };
23 
24 typedef enum {
32 } key;
33 typedef enum { b_left, b_right, b_middle, b_up, b_down } button;
34 
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