-
Notifications
You must be signed in to change notification settings - Fork 1
/
controller.hpp
47 lines (34 loc) · 898 Bytes
/
controller.hpp
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
#ifndef CONTROLLER_HPP
#define CONTROLLER_HPP
#include <gtkmm-2.4/gtkmm.h>
#include <pthread.h>
#include "decoderop.hpp"
#include "controllerop.hpp"
class ControllerState {
public:
Glib::Dispatcher *move_slider;
Gtk::HScale *scale;
};
class Controller {
private:
Gtk::Main *main;
Gtk::Window *window;
pthread_mutex_t mutex;
pthread_t thread_handle;
bool on_changed_value( Gtk::ScrollType scroll, double new_value );
void shutdown( void ) { main->quit(); }
void move( void );
Glib::Dispatcher *quit_signal;
ControllerState state;
Queue<DecoderOperation> opq;
Queue<ControllerOperation> inputq;
int num_frames;
public:
Controller( uint s_num_frames );
~Controller();
void loop( void );
Queue<DecoderOperation> *get_queue() { return &opq; }
Queue<ControllerOperation> *get_input_queue() { return &inputq; }
void tick_move_slider( void );
};
#endif