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