~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to rts/System/Input/MouseInput.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
 
2
 
 
3
#ifndef MOUSE_INPUT_H
 
4
#define MOUSE_INPUT_H
 
5
 
 
6
#include <SDL_events.h>
 
7
#include <boost/signals/connection.hpp>
 
8
 
 
9
#include "Vec2.h"
 
10
 
 
11
struct int2;
 
12
 
 
13
class IMouseInput
 
14
{
 
15
public:
 
16
        static IMouseInput* Get();
 
17
 
 
18
        IMouseInput ();
 
19
        virtual ~IMouseInput();
 
20
 
 
21
        virtual int2 GetPos ()
 
22
        {
 
23
                return mousepos;
 
24
        };
 
25
        void SetPos (int2 pos);
 
26
 
 
27
        bool HandleSDLMouseEvent (const SDL_Event& event);
 
28
 
 
29
        virtual void SetWMMouseCursor (void* wmcursor) {}
 
30
        
 
31
protected:
 
32
        int2 mousepos;
 
33
        boost::signals::connection inputCon;
 
34
};
 
35
 
 
36
 
 
37
extern IMouseInput *mouseInput;
 
38
 
 
39
#endif 
 
40