~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to server/mouse_button_state.h

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2008-10-13 14:29:49 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20081013142949-f6qdvnu4mn05ltdc
Tags: 0.8.4~~bzr9980-0ubuntu1
* new upstream release 0.8.4 (LP: #240325)
* ship new lib usr/lib/gnash/libmozsdk.so.* in mozilla-plugin-gnash
  - update debian/mozilla-plugin-gnash.install
* ship new lib usr/lib/gnash/libgnashnet.so.* in gnash-common
  - update debian/gnash-common.install
* add basic debian/build_head script to build latest CVS head packages.
  - add debian/build_head
* new sound architecture requires build depend on libsdl1.2-dev
  - update debian/control
* head build script now has been completely migrated to bzr (upstream +
  ubuntu)
  - update debian/build_head
* disable kde gui until klash/qt4 has been fixed; keep kde packages as empty
  packages for now.
  - update debian/rules
  - debian/klash.install
  - debian/klash.links
  - debian/klash.manpages
  - debian/konqueror-plugin-gnash.install
* drop libkonq5-dev build dependency accordingly
  - update debian/control
* don't install headers manually anymore. gnash doesnt provide a -dev
  package after all
  - update debian/rules
* update libs installed in gnash-common; libgnashserver-*.so is not available
  anymore (removed); in turn we add the new libgnashcore-*.so
  - update debian/gnash-common.install
* use -Os for optimization and properly pass CXXFLAGS=$(CFLAGS) to configure
  - update debian/rules
* touch firefox .autoreg in postinst of mozilla plugin
  - update debian/mozilla-plugin-gnash.postinst
* link gnash in ubufox plugins directory for the plugin alternative switcher
  - add debian/mozilla-plugin-gnash.links
* suggest ubufox accordingly
  - update debian/control
* add new required build-depends on libgif-dev
  - update debian/control
* add Xb-Npp-Description and Xb-Npp-File as new plugin database meta data
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Thatcher Ulrich <tu@tulrich.com> 2003
2
 
 
3
 
// This source code has been donated to the Public Domain.  Do
4
 
// whatever you want with it.
5
 
 
6
 
 
7
 
#ifndef GNASH_MOUSE_BUTTON_STATE_H
8
 
#define GNASH_MOUSE_BUTTON_STATE_H
9
 
 
10
 
 
11
 
#include "character_def.h"
12
 
//#include "sound.h"
13
 
#include "smart_ptr.h" // for composition and inlines
14
 
#include "character.h" // for use in intrusive_ptr
15
 
 
16
 
// Forward declarations
17
 
namespace gnash {
18
 
        class sprite_instance;
19
 
}
20
 
 
21
 
namespace gnash {
22
 
 
23
 
/// Helper to generate mouse events, given mouse state & history.
24
 
class mouse_button_state
25
 
{
26
 
 
27
 
public:
28
 
 
29
 
        /// Possible button states
30
 
        enum state {
31
 
 
32
 
                /// Button is depressed
33
 
                UP=0,
34
 
 
35
 
                /// Button is pressed
36
 
                DOWN=1
37
 
        };
38
 
 
39
 
        /// entity that currently owns the mouse pointer
40
 
        boost::intrusive_ptr<character> m_active_entity;
41
 
 
42
 
        /// what's underneath the mouse right now
43
 
        boost::intrusive_ptr<character> m_topmost_entity;
44
 
 
45
 
        /// previous state of mouse button
46
 
        bool    m_mouse_button_state_last;      
47
 
 
48
 
        /// current state of mouse button
49
 
        bool    m_mouse_button_state_current;   
50
 
 
51
 
        /// whether mouse was inside the active_entity last frame
52
 
        bool    m_mouse_inside_entity_last;
53
 
 
54
 
        mouse_button_state()
55
 
                :
56
 
                m_mouse_button_state_last(UP),
57
 
                m_mouse_button_state_current(UP),
58
 
                m_mouse_inside_entity_last(false)
59
 
        {
60
 
        }
61
 
 
62
 
#ifdef GNASH_USE_GC
63
 
        /// Mark reachable objects (active and topmost entities)
64
 
        void markReachableResources() const
65
 
        {
66
 
                if ( m_active_entity.get() ) m_active_entity->setReachable();
67
 
                if ( m_topmost_entity.get() ) m_topmost_entity->setReachable();
68
 
        }
69
 
#endif // GNASH_USE_GC
70
 
};
71
 
 
72
 
}       // end namespace gnash
73
 
 
74
 
 
75
 
#endif // GNASH_MOUSE_BUTTON_STATE_H
76
 
 
77
 
 
78
 
// Local Variables:
79
 
// mode: C++
80
 
// c-basic-offset: 8 
81
 
// tab-width: 8
82
 
// indent-tabs-mode: t
83
 
// End: