[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/movie_interface.h server...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/movie_interface.h server... |
Date: |
Mon, 23 Oct 2006 15:59:38 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/10/23 15:59:37
Modified files:
. : ChangeLog
server : movie_interface.h movie_root.h
gui : gui.cpp
Log message:
* server/: movie_interface.h, movie_root.h: added
isMouseOverActiveEntity interface and implementation.
* gui/gui.cpp (notify_mouse_moved): call isMouseOverActiveEntity
to switch cursor type.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1362&r2=1.1363
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_interface.h?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.39&r2=1.40
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1362
retrieving revision 1.1363
diff -u -b -r1.1362 -r1.1363
--- ChangeLog 23 Oct 2006 13:34:12 -0000 1.1362
+++ ChangeLog 23 Oct 2006 15:59:37 -0000 1.1363
@@ -1,5 +1,9 @@
2006-10-23 Sandro Santilli <address@hidden>
+ * server/: movie_interface.h, movie_root.h: added
+ isMouseOverActiveEntity interface and implementation.
+ * gui/gui.cpp (notify_mouse_moved): call isMouseOverActiveEntity
+ to switch cursor type.
* libbase/smart_ptr.h (weak_ptr): made equality operator an inspector,
added inequality operator.
Index: server/movie_interface.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_interface.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- server/movie_interface.h 19 Oct 2006 09:17:06 -0000 1.14
+++ server/movie_interface.h 23 Oct 2006 15:59:37 -0000 1.15
@@ -35,7 +35,7 @@
//
//
-/* $Id: movie_interface.h,v 1.14 2006/10/19 09:17:06 strk Exp $ */
+/* $Id: movie_interface.h,v 1.15 2006/10/23 15:59:37 strk Exp $ */
/// \page events_handling Handling of user events
@@ -78,7 +78,7 @@
/// are:
///
/// - bool movie_interface::notify_mouse_moved(int x, int y);
-/// - bool movie_interfacenotify_mouse_clicked(bool mouse_pressed, int mask);
+/// - bool movie_interface::notify_mouse_clicked(bool mouse_pressed, int mask);
///
/// Note that the notify_key_event() method is a global function, which should
/// likely be moved somewhere else, and that has not been fixed yet to support
@@ -306,6 +306,11 @@
/// is set.
virtual void get_invalidated_bounds(rect* bounds, bool force) = 0;
+ /// Return true if the mouse pointer is over an active entity
+ //
+ /// @@ shouldn't these be globals instead ? (togheter with
notify_mouse_moved and notify_mouse_clicked)
+ virtual bool isMouseOverActiveEntity() const { return false; }
+
protected:
/// Bounds of character instance before invalidating it
Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/movie_root.h 20 Oct 2006 14:30:15 -0000 1.18
+++ server/movie_root.h 23 Oct 2006 15:59:37 -0000 1.19
@@ -35,7 +35,7 @@
//
//
-/* $Id: movie_root.h,v 1.18 2006/10/20 14:30:15 strk Exp $ */
+/* $Id: movie_root.h,v 1.19 2006/10/23 15:59:37 strk Exp $ */
#ifndef GNASH_MOVIE_ROOT_H
#define GNASH_MOVIE_ROOT_H
@@ -301,6 +301,16 @@
}
+ // reimplemented from movie_interface, see dox there
+ bool isMouseOverActiveEntity() const
+ {
+ GNASH_REPORT_FUNCTION;
+ bool ret = m_mouse_button_state.m_active_entity != NULL;
+ if ( ! ret ) {
+ log_msg("Active entity is null!");
+ }
+ return ret;
+ }
private:
/// This function should return TRUE iff any action triggered
Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- gui/gui.cpp 22 Oct 2006 22:53:28 -0000 1.39
+++ gui/gui.cpp 23 Oct 2006 15:59:37 -0000 1.40
@@ -208,6 +208,13 @@
// event required screen refresh
display(m);
}
+
+ if ( m->isMouseOverActiveEntity() ) {
+ setCursor(CURSOR_HAND);
+ } else {
+ setCursor(CURSOR_NORMAL);
+ }
+
}
void
@@ -221,7 +228,6 @@
// event required screen refresh
display(m);
}
-
}
bool
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/movie_interface.h server...,
Sandro Santilli <=