summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorxylosper <darklin20@gmail.com>2015-04-21 00:50:43 +0900
committerxylosper <darklin20@gmail.com>2015-04-21 00:54:29 +0900
commitc64e4e48d97b9af2b241179ee87765e5d17fff95 (patch)
treec6df7a6ef5f2f8955ae14e0956dbd6fa96d5a41a /player/command.c
parentebe2c2b6d19357f73b9fc82de2a47a2aa321e44a (diff)
downloadmpv-c64e4e48d97b9af2b241179ee87765e5d17fff95.tar.bz2
mpv-c64e4e48d97b9af2b241179ee87765e5d17fff95.tar.xz
command: disc-mouse-on-button property
This property indicates whether mouse cursor is located on button or not for disc naviation.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 6db3b2100b..68ad29f02b 100644
--- a/player/command.c
+++ b/player/command.c
@@ -702,6 +702,14 @@ static int mp_property_disc_menu(void *ctx, struct m_property *prop,
return m_property_flag_ro(action, arg, !!state);
}
+static int mp_property_mouse_on_button(void *ctx, struct m_property *prop,
+ int action, void *arg)
+{
+ MPContext *mpctx = ctx;
+ bool on = mp_nav_mouse_on_button(mpctx);
+ return m_property_flag_ro(action, arg, on);
+}
+
/// Current chapter (RW)
static int mp_property_chapter(void *ctx, struct m_property *prop,
int action, void *arg)
@@ -3262,6 +3270,7 @@ static const struct m_property mp_properties[] = {
{"playback-time", mp_property_playback_time},
{"disc-title", mp_property_disc_title},
{"disc-menu-active", mp_property_disc_menu},
+ {"disc-mouse-on-button", mp_property_mouse_on_button},
{"chapter", mp_property_chapter},
{"edition", mp_property_edition},
{"disc-titles", mp_property_disc_titles},