3 * Copyright (C) 2016-2020 William Morrow
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 #ifndef _REMOTECONTROL_H_
22 #define _REMOTECONTROL_H_
27 #include "mwindowgui.inc"
35 class RemoteGUI : public BC_Popup
38 RemoteControl *remote_control;
40 void set_active(RemoteHandler *handler);
42 void fill_color(int color);
43 void tile_windows(int config);
44 int button_press_event();
46 int process_key(int key);
48 RemoteGUI(BC_WindowBase *wdw, RemoteControl *remote_control);
52 class RemoteWindow : public BC_Window
55 RemoteControl *remote_control;
57 RemoteWindow(RemoteControl *remote_control);
67 void activate() { gui->set_active(this); }
68 virtual int remote_key(int key);
69 virtual int process_key(int key);
71 virtual int is_keytv() { return 0; }
72 virtual int is_wintv() { return 0; }
73 virtual int is_x10tv() { return 0; }
75 RemoteHandler(RemoteGUI *gui, int color);
76 virtual ~RemoteHandler();
79 class RemoteControl : Thread {
81 MWindowGUI *mwindow_gui;
82 RemoteWindow *remote_window;
84 RemoteHandler *handler;
88 void set_color(int color);
89 void fill_color(int color);
90 int remote_key(int key);
92 int activate(RemoteHandler *handler=0);
94 bool is_active() { return handler != 0; }
96 RemoteControl(MWindowGUI *gui);