~ubuntu-branches/debian/jessie/scummvm/jessie

« back to all changes in this revision

Viewing changes to backends/events/sdl/sdl-events.h

  • Committer: Package Import Robot
  • Author(s): Moritz Muehlenhoff
  • Date: 2011-11-05 10:29:43 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20111105102943-zfm3dhlvy5b01u7v
Tags: upstream-1.4.0
ImportĀ upstreamĀ versionĀ 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $URL$
22
 
 * $Id$
23
 
 *
24
21
 */
25
22
 
26
 
#if !defined(BACKEND_EVENTS_SDL_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
 
23
#ifndef BACKEND_EVENTS_SDL_H
27
24
#define BACKEND_EVENTS_SDL_H
28
25
 
29
 
#include "backends/events/default/default-events.h"
30
 
 
31
26
#include "backends/platform/sdl/sdl-sys.h"
 
27
#include "backends/graphics/sdl/sdl-graphics.h"
 
28
 
 
29
#include "common/events.h"
32
30
 
33
31
 
34
32
/**
35
33
 * The SDL event source.
36
34
 */
37
35
class SdlEventSource : public Common::EventSource {
38
 
public: 
 
36
public:
39
37
        SdlEventSource();
40
38
        virtual ~SdlEventSource();
41
39
 
 
40
        void setGraphicsManager(SdlGraphicsManager *gMan) { _graphicsManager = gMan; }
 
41
 
42
42
        /**
43
43
         * Gets and processes SDL events.
44
44
         */
72
72
 
73
73
        /** Scroll lock state - since SDL doesn't track it */
74
74
        bool _scrollLock;
75
 
        
 
75
 
76
76
        /** Joystick */
77
77
        SDL_Joystick *_joystick;
78
78
 
80
80
        int _lastScreenID;
81
81
 
82
82
        /**
 
83
         * The associated graphics manager.
 
84
         */
 
85
        SdlGraphicsManager *_graphicsManager;
 
86
 
 
87
        /**
83
88
         * Pre process an event before it is dispatched.
84
89
         */
85
90
        virtual void preprocessEvents(SDL_Event *event) {}
111
116
        //@}
112
117
 
113
118
        /**
114
 
         * Assigns the mouse coords to the mouse event
 
119
         * Assigns the mouse coords to the mouse event. Furthermore notify the 
 
120
         * graphics manager about the position change.
115
121
         */
116
 
        virtual void fillMouseEvent(Common::Event &event, int x, int y);
 
122
        virtual void processMouseEvent(Common::Event &event, int x, int y);
117
123
 
118
124
        /**
119
125
         * Remaps key events. This allows platforms to configure
130
136
         * Configures the key modifiers flags status
131
137
         */
132
138
        virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
 
139
 
 
140
        /**
 
141
         * Translates SDL key codes to OSystem key codes
 
142
         */
 
143
        Common::KeyCode SDLToOSystemKeycode(const SDLKey key);
133
144
};
134
145
 
135
146
#endif