ginga 1.0
The Ginga iTV middleware
Loading...
Searching...
No Matches
PlayerLua.h
1/* Copyright (C) 2006-2018 PUC-Rio/Laboratorio TeleMidia
2
3This file is part of Ginga (Ginga-NCL).
4
5Ginga is free software: you can redistribute it and/or modify it
6under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10Ginga is distributed in the hope that it will be useful, but WITHOUT
11ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Ginga. If not, see <https://www.gnu.org/licenses/>. */
17
18#ifndef PLAYER_LUA_H
19#define PLAYER_LUA_H
20
21#include "Player.h"
22
23#include <ncluaw.h>
24
25namespace ginga {
26
27class PlayerLua : public Player
28{
29public:
31 ~PlayerLua ();
32 void start () override;
33 void stop () override;
34 void pause () override;
35 void resume () override;
36 void redraw (cairo_t *) override;
37 void sendKeyEvent (const string &, bool) override;
38 void sendPresentationEvent (const string &, const string &) override;
39
40protected:
41 virtual bool doSetProperty (Property, const string &,
42 const string &) override;
43
44private:
45 ncluaw_t *_nw; // the NCLua state
46 Rect _init_rect; // initial output rectangle
47 string _pwd; // script's working dir
48 string _saved_pwd; // saved working dir
49
50 void pwdSave (const string &);
51 void pwdSave ();
52 void pwdRestore ();
53};
54
55}
56
57#endif // PLAYER_LUA_H
Interface between libginga and the external world.
Definition Formatter.h:39
Definition Media.h:27
Definition PlayerLua.h:28
Definition Player.h:29