mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
win/package: runtime files
runtime/plugin/gui_shim.vim is from Neovim-Qt. This is a temporary measure, we will add real UI events which obviate gui_shim.vim. Closes #6145
This commit is contained in:
parent
500454227f
commit
5c421080f8
73
runtime/plugin/gui_shim.vim
Normal file
73
runtime/plugin/gui_shim.vim
Normal file
@ -0,0 +1,73 @@
|
||||
" A Neovim plugin that implements GUI helper commands
|
||||
if !has('win32') || !has('nvim') || exists('g:GuiLoaded')
|
||||
finish
|
||||
endif
|
||||
let g:GuiLoaded = 1
|
||||
|
||||
" A replacement for foreground()
|
||||
function! GuiForeground() abort
|
||||
call rpcnotify(0, 'Gui', 'Foreground')
|
||||
endfunction
|
||||
|
||||
" Set maximized state for GUI window (1 is enabled, 0 disabled)
|
||||
function! GuiWindowMaximized(enabled) abort
|
||||
call rpcnotify(0, 'Gui', 'WindowMaximized', a:enabled)
|
||||
endfunction
|
||||
|
||||
" Set fullscreen state for GUI window (1 is enabled, 0 disabled)
|
||||
function! GuiWindowFullScreen(enabled) abort
|
||||
call rpcnotify(0, 'Gui', 'WindowFullScreen', a:enabled)
|
||||
endfunction
|
||||
|
||||
" Set GUI font
|
||||
function! GuiFont(fname, ...) abort
|
||||
let force = get(a:000, 0, 0)
|
||||
call rpcnotify(0, 'Gui', 'Font', a:fname, force)
|
||||
endfunction
|
||||
|
||||
" Set additional linespace
|
||||
function! GuiLinespace(height) abort
|
||||
call rpcnotify(0, 'Gui', 'Linespace', a:height)
|
||||
endfunction
|
||||
|
||||
" Configure mouse hide behaviour (1 is enabled, 0 disabled)
|
||||
function! GuiMousehide(enabled) abort
|
||||
call rpcnotify(0, 'Gui', 'Mousehide', a:enabled)
|
||||
endfunction
|
||||
|
||||
" The GuiFont command. For compatibility there is also Guifont
|
||||
function s:GuiFontCommand(fname, bang) abort
|
||||
if a:fname ==# ''
|
||||
if exists('g:GuiFont')
|
||||
echo g:GuiFont
|
||||
else
|
||||
echo 'No GuiFont is set'
|
||||
endif
|
||||
else
|
||||
call GuiFont(a:fname, a:bang ==# '!')
|
||||
endif
|
||||
endfunction
|
||||
command! -nargs=? -bang Guifont call s:GuiFontCommand("<args>", "<bang>")
|
||||
command! -nargs=? -bang GuiFont call s:GuiFontCommand("<args>", "<bang>")
|
||||
|
||||
function s:GuiLinespaceCommand(height) abort
|
||||
if a:height ==# ''
|
||||
if exists('g:GuiLinespace')
|
||||
echo g:GuiLinespace
|
||||
else
|
||||
echo 'No GuiLinespace is set'
|
||||
endif
|
||||
else
|
||||
call GuiLinespace(a:height)
|
||||
endif
|
||||
endfunction
|
||||
command! -nargs=? GuiLinespace call s:GuiLinespaceCommand("<args>")
|
||||
|
||||
" GuiDrop('file1', 'file2', ...) is similar to :drop file1 file2 ...
|
||||
" but it calls fnameescape() over all arguments
|
||||
function GuiDrop(...)
|
||||
let l:fnames = deepcopy(a:000)
|
||||
let l:args = map(l:fnames, 'fnameescape(v:val)')
|
||||
exec 'drop '.join(l:args, ' ')
|
||||
doautocmd BufEnter
|
||||
endfunction
|
@ -334,7 +334,6 @@ if(WIN32)
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/platforms/qwindows.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms/
|
||||
)
|
||||
|
||||
add_dependencies(nvim_runtime_deps external_blobs)
|
||||
endif()
|
||||
|
||||
|
3
third-party/CMakeLists.txt
vendored
3
third-party/CMakeLists.txt
vendored
@ -187,8 +187,7 @@ if(WIN32)
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy win32yank.exe ${DEPS_INSTALL_DIR}/bin)
|
||||
|
||||
GetBinaryDep(TARGET wingui
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory bin ${DEPS_INSTALL_DIR}/bin
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory share/nvim-qt/runtime ${DEPS_INSTALL_DIR}/share/nvim/runtime)
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory bin ${DEPS_INSTALL_DIR}/bin)
|
||||
|
||||
include(TargetArch)
|
||||
if("${TARGET_ARCH}" STREQUAL "X86_64")
|
||||
|
Loading…
Reference in New Issue
Block a user