mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
504693ce66
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
|
@ -312,6 +312,7 @@ if(WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/ca-bundle.crt" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/cat.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/curl.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/diff.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/tee.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
||||
@ -333,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()
|
||||
|
||||
|
7
third-party/CMakeLists.txt
vendored
7
third-party/CMakeLists.txt
vendored
@ -121,8 +121,8 @@ set(GPERF_URL http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz)
|
||||
set(GPERF_SHA256 767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e)
|
||||
|
||||
# 7za.exe cat.exe curl.exe ca-bundle.crt diff.exe tee.exe tidy.exe xxd.exe
|
||||
set(WINTOOLS_URL https://github.com/neovim/deps/raw/5d23093c66d63a8777244ed84de727c26d3f7b79/opt/win32tools.zip)
|
||||
set(WINTOOLS_SHA256 40c7d1fbed47d8b1cf3b3cada6bfe0e0df06d99beb48775b4db27972d3ceafc1)
|
||||
set(WINTOOLS_URL https://github.com/neovim/deps/raw/2f9acbecf06365c10baa3c0087f34a54c9c6f949/opt/win32tools.zip)
|
||||
set(WINTOOLS_SHA256 8bfce7e3a365721a027ce842f2ec1cf878f1726233c215c05964aac07300798c)
|
||||
|
||||
set(WINGUI_URL https://github.com/equalsraf/neovim-qt/releases/download/v0.2.4/neovim-qt.zip)
|
||||
set(WINGUI_SHA256 95bbc852b69b12d0ef962a8410522010b453ba70f36ea379c548558d16abc2e6)
|
||||
@ -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