[libbluray-devel] commit: Added bd_mouse_select() (hpi1 )
git at videolan.org
git at videolan.org
Fri Dec 10 19:22:45 CET 2010
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Dec 10 17:10:26 2010 +0200| [d9493a53ff3bd0c13dfd75c3d3aaf24bedb999ff] | committer: hpi1
Added bd_mouse_select()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=d9493a53ff3bd0c13dfd75c3d3aaf24bedb999ff
---
src/libbluray/bluray.c | 9 +++++++++
src/libbluray/bluray.h | 12 ++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index cbf804e..590a118 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1943,6 +1943,15 @@ int bd_get_event(BLURAY *bd, BD_EVENT *event)
* user interaction
*/
+void bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
+{
+ if (pts >= 0) {
+ bd_psr_write(bd->regs, PSR_TIME, (uint32_t)(((uint64_t)pts) >> 1));
+ }
+
+ _run_gc(bd, GC_CTRL_MOUSE_MOVE, (x << 16) | y);
+}
+
void bd_user_input(BLURAY *bd, int64_t pts, uint32_t key)
{
if (pts >= 0) {
diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h
index 22adb64..ac4ef50 100644
--- a/src/libbluray/bluray.h
+++ b/src/libbluray/bluray.h
@@ -585,4 +585,16 @@ void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func);
*/
void bd_user_input(BLURAY *bd, int64_t pts, uint32_t key);
+/**
+ *
+ * Select menu button at location (x,y).
+ *
+ * @param bd BLURAY object
+ * @param pts current playback position (1/90000s) or -1
+ * @param x mouse pointer x-position
+ * @param y mouse pointer y-position
+ * @return none
+ */
+void bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y);
+
#endif /* BLURAY_H_ */
More information about the libbluray-devel
mailing list