Skip to content

Commit

Permalink
read menu from input.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Dec 12, 2023
1 parent d30474e commit 83ee34b
Show file tree
Hide file tree
Showing 21 changed files with 2,952 additions and 91 deletions.
7 changes: 7 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
BasedOnStyle: Google
Language: Cpp
ColumnLimit: 80
IndentWidth: 4
TabWidth: 4
UseTab: Never
SortIncludes: false
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ include(FindPkgConfig)
pkg_search_module(MPV REQUIRED mpv>=0.37.0)

set(CMAKE_SHARED_LIBRARY_PREFIX "")
add_library(menu SHARED src/menu.c)
target_include_directories(menu PRIVATE ${MPV_INCLUDE_DIRS})
add_library(menu SHARED
src/common/common.c
src/misc/bstr.c
src/ta/ta.c
src/ta/ta_talloc.c
src/ta/ta_utils.c
src/menu.c
src/plugin.c
)

target_include_directories(menu PRIVATE src ${MPV_INCLUDE_DIRS})
target_link_libraries(menu PRIVATE shlwapi)
target_compile_definitions(menu PRIVATE MPV_CPLUGIN_DYNAMIC_SYM)
339 changes: 339 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# mpv-plugin

Prototype of contextmenu plugin for Windows based on [C PLUGINS](https://mpv.io/manual/master/#c-plugins) API.
mpv plugin for Windows based on the [C PLUGINS](https://mpv.io/manual/master/#c-plugins) API.

## Features

### Context Menu

![screenshot](screenshot/menu.jpg)

Customizable native context menu for mpv window.

The syntax is similar to [mpv.net](https://github.com/mpvnet-player/mpv.net):

**input.conf**
```
Ctrl+a show-text hello #menu: Foo > Bar
```

## Credits

This project contains code copied from [mpv](https://github.com/mpv-player/mpv).
Binary file added screenshot/menu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 83ee34b

Please sign in to comment.