From c64e4e48d97b9af2b241179ee87765e5d17fff95 Mon Sep 17 00:00:00 2001 From: xylosper Date: Tue, 21 Apr 2015 00:50:43 +0900 Subject: command: disc-mouse-on-button property This property indicates whether mouse cursor is located on button or not for disc naviation. --- player/command.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'player/command.c') 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}, -- cgit v1.2.3