mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
patch 8.2.0320: no Haiku support
Problem: No Haiku support. Solution: Add support for Haiku. (Emir Sari, closes #5605)
This commit is contained in:
10
Filelist
10
Filelist
@ -599,6 +599,14 @@ SRC_AMI = \
|
||||
src/testdir/amiga.vim \
|
||||
src/xxd/Make_amiga.mak \
|
||||
|
||||
# source files for Haiku (also in the extra archive)
|
||||
SRC_HAIKU = \
|
||||
src/os_haiku.h \
|
||||
src/os_haiku.rdef \
|
||||
src/gui_haiku.cc \
|
||||
src/gui_haiku.h \
|
||||
src/proto/gui_haiku.pro \
|
||||
|
||||
# source files for the Mac (also in the extra archive)
|
||||
SRC_MAC = \
|
||||
src/INSTALLmac.txt \
|
||||
@ -634,13 +642,13 @@ SRC_QNX = \
|
||||
src/proto/gui_photon.pro \
|
||||
src/proto/os_qnx.pro \
|
||||
|
||||
|
||||
# source files for the extra archive (all sources that are not for Unix)
|
||||
SRC_EXTRA = \
|
||||
$(SRC_AMI) \
|
||||
$(SRC_AMI_DOS) \
|
||||
$(SRC_DOS) \
|
||||
$(SRC_DOS_BIN) \
|
||||
$(SRC_HAIKU) \
|
||||
$(SRC_MAC) \
|
||||
$(SRC_QNX) \
|
||||
$(SRC_VMS) \
|
||||
|
@ -64,6 +64,7 @@ DOCS = \
|
||||
os_amiga.txt \
|
||||
os_beos.txt \
|
||||
os_dos.txt \
|
||||
os_haiku.txt \
|
||||
os_mac.txt \
|
||||
os_mint.txt \
|
||||
os_msdos.txt \
|
||||
@ -204,6 +205,7 @@ HTMLS = \
|
||||
os_amiga.html \
|
||||
os_beos.html \
|
||||
os_dos.html \
|
||||
os_haiku.html \
|
||||
os_mac.html \
|
||||
os_mint.html \
|
||||
os_msdos.html \
|
||||
@ -422,6 +424,9 @@ os_beos.txt:
|
||||
os_dos.txt:
|
||||
touch os_dos.txt
|
||||
|
||||
os_haiku.txt:
|
||||
touch os_haiku.txt
|
||||
|
||||
os_mac.txt:
|
||||
touch os_mac.txt
|
||||
|
||||
|
@ -10766,12 +10766,14 @@ gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_gtk Compiled with GTK+ GUI (any version).
|
||||
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
||||
gui_gtk3 Compiled with GTK+ 3 GUI (gui_gtk is also defined).
|
||||
gui_haiku Compiled with Haiku GUI.
|
||||
gui_mac Compiled with Macintosh GUI.
|
||||
gui_motif Compiled with Motif GUI.
|
||||
gui_photon Compiled with Photon GUI.
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
gui_win32 Compiled with MS Windows Win32 GUI.
|
||||
gui_win32s idem, and Win32s system being used (Windows 3.1)
|
||||
haiku Haiku version of Vim.
|
||||
hangul_input Compiled with Hangul input support. |hangul|
|
||||
hpux HP-UX version of Vim.
|
||||
iconv Can use iconv() for conversion.
|
||||
|
@ -99,6 +99,7 @@ Recommended place for your personal GUI initializations:
|
||||
or $VIM/_gvimrc
|
||||
Amiga s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc
|
||||
or $VIM/.gvimrc
|
||||
Haiku $HOME/config/settings/vim/gvimrc
|
||||
|
||||
The personal initialization files are searched in the order specified above
|
||||
and only the first one that is found is read.
|
||||
|
@ -204,6 +204,7 @@ Remarks about specific systems ~
|
||||
|os_os2.txt| OS/2
|
||||
|os_qnx.txt| QNX
|
||||
|os_risc.txt| RISC-OS
|
||||
|os_haiku.txt| Haiku
|
||||
|os_unix.txt| Unix
|
||||
|os_vms.txt| VMS
|
||||
|os_win32.txt| MS-Windows
|
||||
|
@ -3769,7 +3769,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'guitablabel' can be used to change the text in the labels.
|
||||
When 'e' is missing a non-GUI tab pages line may be used.
|
||||
The GUI tabs are only supported on some systems, currently
|
||||
GTK, Motif, Mac OS/X and MS-Windows.
|
||||
GTK, Motif, Mac OS/X, Haiku, and MS-Windows.
|
||||
*'go-f'*
|
||||
'f' Foreground: Don't use fork() to detach the GUI from the shell
|
||||
where it was started. Use this for programs that wait for the
|
||||
@ -6207,6 +6207,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Macintosh: "$VIM:vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM:vimfiles:after"
|
||||
Haiku: "$BE_USER_SETTINGS/vim,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
$BE_USER_SETTINGS/vim/after")
|
||||
VMS: "sys$login:vimfiles,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
@ -7665,6 +7670,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
in the GUI: "builtin_gui"
|
||||
on Amiga: "amiga"
|
||||
on BeOS: "beos-ansi"
|
||||
on Haiku: "xterm"
|
||||
on Mac: "mac-ansi"
|
||||
on MiNT: "vt52"
|
||||
on Unix: "ansi"
|
||||
|
228
runtime/doc/os_haiku.txt
Normal file
228
runtime/doc/os_haiku.txt
Normal file
@ -0,0 +1,228 @@
|
||||
*os_haiku.txt* For Vim version 8.2. Last change: 2020 Feb 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
*Haiku*
|
||||
This file contains the particularities for the Haiku version of Vim. For
|
||||
matters not discussed in this file, Vim behaves very much like the Unix
|
||||
|os_unix.txt| version.
|
||||
|
||||
Haiku is an open-source operating system inspired by BeOS, that specifically
|
||||
targets personal computing.
|
||||
|
||||
1. General |haiku-general|
|
||||
2. Compiling Vim |haiku-compiling|
|
||||
3. The Haiku GUI |haiku-gui|
|
||||
4. The $VIM directory |haiku-vimdir|
|
||||
5. The $BE_USER_SETTINGS
|
||||
directory |haiku-user-settings-dir|
|
||||
6. Drag & Drop |haiku-dragndrop|
|
||||
7. Single Launch vs. Multiple
|
||||
Launch |haiku-launch|
|
||||
8. Fonts |haiku-fonts|
|
||||
9. The meta key modifier |haiku-meta|
|
||||
10. Mouse key mappings |haiku-mouse|
|
||||
11. Color names |haiku-colors|
|
||||
12. Credits |haiku-support-credits|
|
||||
13. Bugs & things To Do |haiku-bugs|
|
||||
|
||||
|
||||
1. General *haiku-general*
|
||||
|
||||
The default syntax highlighting mostly works with different foreground colors
|
||||
to highlight items. This works best if you set your Terminal window to a
|
||||
darkish background and light letters. Some middle-grey background (for
|
||||
instance (r,g,b)=(168,168,168)) with black letters also works nicely.
|
||||
|
||||
|
||||
2. Compiling Vim *haiku-compiling*
|
||||
|
||||
Vim can be compiled using the standard configure/make approach. Running
|
||||
./configure without any arguments or passing --enable-gui=haiku, will compile
|
||||
vim with the Haiku GUI support. Run ./configure --help , to find out other
|
||||
features you can enable/disable.
|
||||
|
||||
Now you should use "make" to compile Vim, then "make install" to install it.
|
||||
For seamless integration into the Haiku the GUI-less vim binary should be
|
||||
additionally installed over the GUI version. Typical build commands are: >
|
||||
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
make clean
|
||||
make install
|
||||
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
--disable-gui
|
||||
make clean
|
||||
make install
|
||||
|
||||
|
||||
3. The Haiku GUI *haiku-gui*
|
||||
|
||||
Normally Vim starts with the GUI if you start it as gvim or vim -g. The vim
|
||||
version with GUI tries to determine if it was started from the Tracker instead
|
||||
of the Terminal, and if so, uses the GUI anyway. However, the current detection
|
||||
scheme is fooled if you use the command "vim - </dev/null".
|
||||
|
||||
Stuff that does not work yet:
|
||||
|
||||
- Mouse up events are not generated when outside the window. This may be a bug in
|
||||
Haiku. You can notice this when selecting text and moving the cursor outside
|
||||
the window, then letting go of the mouse button. Another way is when you
|
||||
drag the scrollbar and do the same thing. Because Vim still thinks you are
|
||||
still playing with the scrollbar it won't change it itself. I provided a
|
||||
workaround which kicks in when the window is activated or deactivated (so it
|
||||
works best with focus- follows-mouse turned on).
|
||||
- The cursor does not flash (very low priority; I'm not sure I even like it
|
||||
when it flashes)
|
||||
|
||||
|
||||
4. The $VIM directory *haiku-vimdir*
|
||||
|
||||
$VIM is the symbolic name for the place where Vims support files are stored.
|
||||
The default value for $VIM is set at compile time and can be determined with >
|
||||
|
||||
:version
|
||||
|
||||
The normal value is /boot/common/data/vim. If you don't like it you can
|
||||
set the VIM environment variable to override this, or set 'helpfile' in your
|
||||
.vimrc: >
|
||||
|
||||
:if version >= 500
|
||||
: set helpfile=~/vim/runtime/doc/help.txt
|
||||
: syntax on
|
||||
:endif
|
||||
|
||||
|
||||
5. The $USER_SETTINGS_DIR directory *haiku-user-settings-dir*
|
||||
|
||||
$USER_SETTINGS_DIR is the symbolic name for the place where Haiku
|
||||
configuration and settings files are stored.
|
||||
|
||||
The normal value is /boot/home/config/settings.
|
||||
|
||||
|
||||
6. Drag & Drop *haiku-dragndrop*
|
||||
|
||||
You can drop files and directories on either the Vim icon (starts a new Vim
|
||||
session, unless you use the File Types application to set Vim to be "Single
|
||||
Launch") or on the Vim window (starts editing the files). Dropping a folder
|
||||
sets Vim's current working directory. |:cd| |:pwd| If you drop files or
|
||||
folders with either SHIFT key pressed, Vim changes directory to the folder
|
||||
that contains the first item dropped. When starting Vim, there is no need to
|
||||
press shift: Vim behaves as if you do.
|
||||
|
||||
Files dropped set the current argument list. |argument-list|
|
||||
|
||||
|
||||
7. Single Launch vs. Multiple Launch *haiku-launch*
|
||||
|
||||
As distributed Vim's Application Flags (as seen in the FileTypes preference)
|
||||
are set to Multiple Launch. If you prefer, you can set them to Single Launch
|
||||
instead. Attempts to start a second copy of Vim will cause the first Vim to
|
||||
open the files instead. This works from the Tracker but also from the command
|
||||
line. In the latter case, non-file (option) arguments are not supported.
|
||||
Another drawback of the Single Launch is silent ignore of "Open With ..."
|
||||
requests by vim instance that running as non-GUI application even GUI support
|
||||
was compiled in. Vim instance running with GUI has no such problems.
|
||||
|
||||
NB: Only the GUI version has a BApplication (and hence Application Flags).
|
||||
This section does not apply to the GUI-less version, should you compile one.
|
||||
|
||||
|
||||
8. Fonts *haiku-fonts*
|
||||
|
||||
Set fonts with >
|
||||
|
||||
:set guifont=DejaVu_Sans_Mono/Book/12
|
||||
|
||||
where the first part is the font family, the second part the style, and the
|
||||
third part the size. You can use underscores instead of spaces in family and
|
||||
style.
|
||||
|
||||
Best results are obtained with monospaced fonts. Vim attempts to use all
|
||||
fonts in B_FIXED_SPACING mode but apparently this does not work for
|
||||
proportional fonts (despite what the BeBook says).
|
||||
|
||||
To verify which encodings are supported by the current font give the >
|
||||
|
||||
:digraphs
|
||||
|
||||
command, which lists a bunch of characters with their ISO Latin 1 encoding.
|
||||
If, for instance, there are "box" characters among them, or the last character
|
||||
isn't a dotted-y, then for this font the encoding does not work.
|
||||
|
||||
If the font you specify is unavailable, you get the system fixed font.
|
||||
|
||||
GUI Font Selection Dialog is available at giving the >
|
||||
|
||||
:set guifont=*
|
||||
|
||||
command.
|
||||
|
||||
|
||||
9. The meta key modifier *haiku-meta*
|
||||
|
||||
The META key modifier is obtained by the left or right OPTION keys. This is
|
||||
because the ALT (aka COMMAND) keys are not passed to applications.
|
||||
|
||||
|
||||
10. Mouse key mappings *haiku-mouse*
|
||||
|
||||
Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If
|
||||
you use the default Mouse preference settings these names indeed correspond to
|
||||
reality. Vim uses this mapping:
|
||||
|
||||
Button 1 -> LeftMouse,
|
||||
Button 2 -> RightMouse,
|
||||
Button 3 -> MiddleMouse.
|
||||
|
||||
If your mouse has fewer than 3 buttons you can provide your own mapping from
|
||||
mouse clicks with modifier(s) to other mouse buttons. See the file
|
||||
$VIM/macros/swapmous.vim for an example. |gui-mouse-mapping|
|
||||
|
||||
|
||||
11. Color names *haiku-colors*
|
||||
|
||||
Vim has a number of color names built-in. Additional names are read from the
|
||||
file $VIMRUNTIME/rgb.txt, if present. This file is basically the color
|
||||
database from X. Names used from this file are cached for efficiency.
|
||||
|
||||
|
||||
12. GUI Toolbar Images *haiku-toolbar-images*
|
||||
|
||||
Alternative set of toolbar images should be the PNG image of any height you
|
||||
like. Image width is calculated to contain at least 32 buttons in one-row
|
||||
cells.
|
||||
The image should be stored under the name $VIRUNTIME/bitmaps/builtin-tools.png
|
||||
More info about the buttons assignment are at |builtin-tools|.
|
||||
|
||||
|
||||
13. Credits *haiku-support-credits*
|
||||
|
||||
Haiku port is based on work done for BeOS version by many people
|
||||
- BeBox GUI support Copyright 1998 by Olaf Seibert;
|
||||
- Ported to R4 by Richard Offer <richard@whitequeen.com> Jul 99;
|
||||
- Those who contributed, not listed above but not forgotten;
|
||||
- Haiku support by Siarzhuk Zharski <imker@gmx.li> Apr-Mai 2009.
|
||||
|
||||
All the changes and patches released under vim-license.
|
||||
|
||||
Thank you, all!
|
||||
|
||||
|
||||
13. Bugs & things To Do *haiku-bugs*
|
||||
|
||||
The port is under development now and far away from the perfect state. Bug
|
||||
reports, patches and wishes are welcome.
|
||||
|
||||
|
||||
-Siarzhuk Zharski <imker@gmx.li>
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
@ -790,6 +790,7 @@ accordingly. Vim proceeds in this order:
|
||||
or $VIM/_vimrc
|
||||
Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc
|
||||
or $VIM/.vimrc
|
||||
Haiku $HOME/config/settings/vim/vimrc
|
||||
|
||||
The files are searched in the order specified above and only the first
|
||||
one that is found is read.
|
||||
@ -835,6 +836,8 @@ accordingly. Vim proceeds in this order:
|
||||
"$HOME/_vimrc" (for Win32) (*)
|
||||
"$HOME/vimfiles/vimrc" (for Win32) (*)
|
||||
"$VIM/_vimrc" (for Win32) (*)
|
||||
"$HOME/config/settings/vim/vimrc" (for Haiku) (*)
|
||||
|
||||
Note: For Unix and Amiga, when ".vimrc" does not exist,
|
||||
"_vimrc" is also tried, in case an MS-DOS compatible file
|
||||
system is used. For MS-Windows ".vimrc" is checked after
|
||||
@ -950,6 +953,8 @@ sessions. Put it in a place so that it will be found by 3b:
|
||||
~/.vimrc (Unix)
|
||||
s:.vimrc (Amiga)
|
||||
$VIM\_vimrc (Win32)
|
||||
~/config/settings/vim/vimrc (Haiku)
|
||||
|
||||
Note that creating a vimrc file will cause the 'compatible' option to be off
|
||||
by default. See |compatible-default|.
|
||||
|
||||
|
@ -4871,6 +4871,7 @@ GetLatestVimScripts-copyright pi_getscript.txt /*GetLatestVimScripts-copyright*
|
||||
GetLatestVimScripts_dat pi_getscript.txt /*GetLatestVimScripts_dat*
|
||||
Gnome gui_x11.txt /*Gnome*
|
||||
H motion.txt /*H*
|
||||
Haiku os_haiku.txt /*Haiku*
|
||||
I insert.txt /*I*
|
||||
ICCF uganda.txt /*ICCF*
|
||||
IM-server mbyte.txt /*IM-server*
|
||||
@ -7053,6 +7054,20 @@ g~ change.txt /*g~*
|
||||
g~g~ change.txt /*g~g~*
|
||||
g~~ change.txt /*g~~*
|
||||
h motion.txt /*h*
|
||||
haiku-bugs os_haiku.txt /*haiku-bugs*
|
||||
haiku-colors os_haiku.txt /*haiku-colors*
|
||||
haiku-compiling os_haiku.txt /*haiku-compiling*
|
||||
haiku-dragndrop os_haiku.txt /*haiku-dragndrop*
|
||||
haiku-fonts os_haiku.txt /*haiku-fonts*
|
||||
haiku-general os_haiku.txt /*haiku-general*
|
||||
haiku-gui os_haiku.txt /*haiku-gui*
|
||||
haiku-launch os_haiku.txt /*haiku-launch*
|
||||
haiku-meta os_haiku.txt /*haiku-meta*
|
||||
haiku-mouse os_haiku.txt /*haiku-mouse*
|
||||
haiku-support-credits os_haiku.txt /*haiku-support-credits*
|
||||
haiku-toolbar-images os_haiku.txt /*haiku-toolbar-images*
|
||||
haiku-user-settings-dir os_haiku.txt /*haiku-user-settings-dir*
|
||||
haiku-vimdir os_haiku.txt /*haiku-vimdir*
|
||||
hangul hangulin.txt /*hangul*
|
||||
hangulin.txt hangulin.txt /*hangulin.txt*
|
||||
has() eval.txt /*has()*
|
||||
@ -8211,6 +8226,7 @@ os_390.txt os_390.txt /*os_390.txt*
|
||||
os_amiga.txt os_amiga.txt /*os_amiga.txt*
|
||||
os_beos.txt os_beos.txt /*os_beos.txt*
|
||||
os_dos.txt os_dos.txt /*os_dos.txt*
|
||||
os_haiku.txt os_haiku.txt /*os_haiku.txt*
|
||||
os_mac.txt os_mac.txt /*os_mac.txt*
|
||||
os_mint.txt os_mint.txt /*os_mint.txt*
|
||||
os_msdos.txt os_msdos.txt /*os_msdos.txt*
|
||||
|
@ -6,10 +6,11 @@
|
||||
" Last change: 2016 Apr 05
|
||||
"
|
||||
" To use it, copy it to
|
||||
" for Unix: ~/.gvimrc
|
||||
" for Amiga: s:.gvimrc
|
||||
" for MS-DOS and Win32: $VIM\_gvimrc
|
||||
" for OpenVMS: sys$login:.gvimrc
|
||||
" for Unix: ~/.gvimrc
|
||||
" for Amiga: s:.gvimrc
|
||||
" for MS-Windows: $VIM\_gvimrc
|
||||
" for Haiku: ~/config/settings/vim/gvimrc
|
||||
" for OpenVMS: sys$login:.gvimrc
|
||||
|
||||
" Make external commands work through a pipe instead of a pseudo-tty
|
||||
"set noguipty
|
||||
|
@ -7,6 +7,7 @@
|
||||
" for Unix: ~/.vimrc
|
||||
" for Amiga: s:.vimrc
|
||||
" for MS-Windows: $VIM\_vimrc
|
||||
" for Haiku: ~/config/settings/vim/vimrc
|
||||
" for OpenVMS: sys$login:.vimrc
|
||||
|
||||
" When started as "evim", evim.vim will already have done these settings, bail
|
||||
|
@ -16,7 +16,7 @@ See INSTALLvms.txt for VMS
|
||||
See INSTALLx.txt for cross-compiling on Unix
|
||||
See ../READMEdir/README_390.txt for z/OS and OS/390 Unix
|
||||
See ../runtime/doc/os_beos.txt for BeBox
|
||||
|
||||
See ../runtime/doc/os_haiku.txt for Haiku
|
||||
|
||||
1. Generic
|
||||
==========
|
||||
|
75
src/Makefile
75
src/Makefile
@ -1385,6 +1385,20 @@ CARBONGUI_BUNDLE = gui_bundle
|
||||
APPDIR = $(VIMNAME).app
|
||||
CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET)
|
||||
|
||||
### Haiku GUI
|
||||
HAIKUGUI_SRC = gui.c gui_haiku.cc
|
||||
HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o
|
||||
HAIKUGUI_DEFS = -DFEAT_GUI_HAIKU
|
||||
HAIKUGUI_IPATH =
|
||||
HAIKUGUI_LIBS_DIR =
|
||||
HAIKUGUI_LIBS1 = -lbe -lroot -ltracker -ltranslation -lsupc++ -lstdc++
|
||||
HAIKUGUI_LIBS2 =
|
||||
HAIKUGUI_INSTALL = install_normal install_haiku_extra
|
||||
HAIKUGUI_TARGETS = installglinks_haiku
|
||||
HAIKUGUI_MAN_TARGETS =
|
||||
HAIKUGUI_TESTTARGET = gui
|
||||
HAIKUGUI_BUNDLE =
|
||||
|
||||
# All GUI files
|
||||
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c
|
||||
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro
|
||||
@ -3217,6 +3231,9 @@ objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c
|
||||
objects/gui_gtk_x11.o: gui_gtk_x11.c
|
||||
$(CCC) -o $@ gui_gtk_x11.c
|
||||
|
||||
objects/gui_haiku.o: gui_haiku.cc
|
||||
$(CCC) -o $@ gui_haiku.cc
|
||||
|
||||
objects/gui_motif.o: gui_motif.c
|
||||
$(CCC) -o $@ gui_motif.c
|
||||
|
||||
@ -3349,6 +3366,9 @@ objects/os_beos.o: os_beos.c
|
||||
objects/os_qnx.o: os_qnx.c
|
||||
$(CCC) -o $@ os_qnx.c
|
||||
|
||||
objects/os_haiku.rsrc: os_haiku.rdef
|
||||
cat $< | $(CCC) -E - | grep -v '^#' | rc -o "$@" -
|
||||
|
||||
objects/os_macosx.o: os_macosx.m
|
||||
$(CCC) -o $@ os_macosx.m
|
||||
|
||||
@ -3616,6 +3636,61 @@ $(APPDIR)/Contents:
|
||||
# Dependencies that "make depend" doesn't find
|
||||
objects/gui_gtk_x11.o: version.h
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Haiku installation
|
||||
#
|
||||
# This rule:
|
||||
# - add resources to already installed vim binary to avoid
|
||||
# stripping them during install;
|
||||
# - copy rgb.txt to runtime directory;
|
||||
# - update system MIME database with info about vim application.
|
||||
#
|
||||
install_haiku_extra: $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc
|
||||
xres -o $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(DEST_RT)
|
||||
mimeset $(DEST_BIN)/$(VIMTARGET)
|
||||
|
||||
# List of g*-links that should be replaced with shell script equivalents.
|
||||
# This solves the problem of them from Tracker.
|
||||
#
|
||||
HAIKU_GLINKS = $(DEST_BIN)/$(GVIMTARGET) \
|
||||
$(DEST_BIN)/$(GVIEWTARGET) \
|
||||
$(DEST_BIN)/$(GVIMDIFFTARGET) \
|
||||
$(DEST_BIN)/$(RGVIMTARGET) \
|
||||
$(DEST_BIN)/$(RGVIEWTARGET)
|
||||
|
||||
# This rule:
|
||||
# - Replace gvim link with copy of vim binary.
|
||||
# - Replace g*-links with shell script equivalents to solve the
|
||||
# problem of calling them from Tracker,
|
||||
# - Add icon resources to mentioned g*-link shell scripts
|
||||
# - in case gui-less vim.con executable available use it.
|
||||
#
|
||||
installglinks_haiku: $(HAIKU_GLINKS) install_haiku_extra
|
||||
@catattr -r "BEOS:ICON" $(DEST_BIN)/$(GVIMTARGET) > ~icon.attr
|
||||
for i in $(HAIKU_GLINKS); do \
|
||||
rm $$i ; \
|
||||
echo "#!/bin/sh" > $$i ; \
|
||||
case $$i in \
|
||||
$(DEST_BIN)/$(GVIMTARGET)) \
|
||||
cp $(DEST_BIN)/$(VIMTARGET) $$i ; \
|
||||
if [ -f $(VIMTARGET).con ] ; then \
|
||||
$(STRIP) $(VIMTARGET).con ; \
|
||||
mv $(VIMTARGET).con $(DEST_BIN)/$(VIMTARGET) ; \
|
||||
fi ;; \
|
||||
$(DEST_BIN)/$(GVIEWTARGET)) printf "%s -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
$(DEST_BIN)/$(GVIMDIFFTARGET)) printf "%s -d %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
$(DEST_BIN)/$(RGVIMTARGET)) printf "%s -Z %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
$(DEST_BIN)/$(RGVIEWTARGET)) printf "%s -Z -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
*) printf "%s %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
esac ; \
|
||||
chmod $(BINMOD) $$i ; \
|
||||
addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $$i ; \
|
||||
done
|
||||
addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $(DEST_BIN)/$(VIMNAME)tutor
|
||||
@rm ~icon.attr
|
||||
|
||||
###############################################################################
|
||||
### (automatically generated by 'make depend')
|
||||
### Dependencies:
|
||||
|
89
src/auto/configure
vendored
89
src/auto/configure
vendored
@ -1501,7 +1501,7 @@ Optional Features:
|
||||
--disable-farsi Deprecated.
|
||||
--enable-xim Include XIM input support.
|
||||
--enable-fontset Include X fontset output support.
|
||||
--enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon
|
||||
--enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon
|
||||
--enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
|
||||
--enable-gnome-check If GTK GUI, check for GNOME default=no
|
||||
--enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
|
||||
@ -4543,6 +4543,15 @@ $as_echo "yes" >&6; };;
|
||||
$as_echo "no" >&6; };;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
|
||||
$as_echo_n "checking for Haiku... " >&6; }
|
||||
case `uname` in
|
||||
Haiku) HAIKU=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; };;
|
||||
*) HAIKU=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; };;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
|
||||
$as_echo_n "checking for QNX... " >&6; }
|
||||
case `uname` in
|
||||
@ -7714,7 +7723,55 @@ $as_echo "yes" >&6; }
|
||||
fi
|
||||
|
||||
if test "$enable_channel" = "yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
|
||||
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
|
||||
$as_echo_n "checking for socket in -lnetwork... " >&6; }
|
||||
if ${ac_cv_lib_network_socket+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lnetwork $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char socket ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return socket ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_network_socket=yes
|
||||
else
|
||||
ac_cv_lib_network_socket=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
|
||||
$as_echo "$ac_cv_lib_network_socket" >&6; }
|
||||
if test "x$ac_cv_lib_network_socket" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBNETWORK 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lnetwork $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
|
||||
$as_echo_n "checking for socket in -lsocket... " >&6; }
|
||||
if ${ac_cv_lib_socket_socket+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@ -7759,6 +7816,8 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
|
||||
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
|
||||
if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
|
||||
@ -9034,7 +9093,7 @@ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
|
||||
as_fn_error $? "could not configure X" "$LINENO" 5
|
||||
fi
|
||||
|
||||
test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
|
||||
$as_echo_n "checking --enable-gui argument... " >&6; }
|
||||
@ -9056,10 +9115,27 @@ SKIP_MOTIF=YES
|
||||
SKIP_ATHENA=YES
|
||||
SKIP_NEXTAW=YES
|
||||
SKIP_PHOTON=YES
|
||||
SKIP_HAIKU=YES
|
||||
SKIP_CARBON=YES
|
||||
GUITYPE=NONE
|
||||
|
||||
if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
SKIP_HAIKU=
|
||||
case "$enable_gui_canon" in
|
||||
no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
|
||||
$as_echo "no GUI support" >&6; }
|
||||
SKIP_HAIKU=YES ;;
|
||||
yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
|
||||
$as_echo "yes - automatic GUI support" >&6; } ;;
|
||||
auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
|
||||
$as_echo "auto - automatic GUI support" >&6; } ;;
|
||||
haiku) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
|
||||
$as_echo "Haiku GUI support" >&6; } ;;
|
||||
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
|
||||
$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
|
||||
SKIP_HAIKU=YES ;;
|
||||
esac
|
||||
elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
SKIP_PHOTON=
|
||||
case "$enable_gui_canon" in
|
||||
no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
|
||||
@ -9283,6 +9359,7 @@ $as_echo "yes" >&6; };
|
||||
SKIP_ATHENA=YES;
|
||||
SKIP_NEXTAW=YES;
|
||||
SKIP_PHOTON=YES;
|
||||
SKIP_HAIKU=YES;
|
||||
SKIP_CARBON=YES
|
||||
fi
|
||||
|
||||
@ -10589,6 +10666,10 @@ $as_echo "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
|
||||
enable_fontset="no"
|
||||
fi
|
||||
|
||||
if test -z "$SKIP_HAIKU"; then
|
||||
GUITYPE=HAIKUGUI
|
||||
fi
|
||||
|
||||
if test -z "$SKIP_PHOTON"; then
|
||||
GUITYPE=PHOTONGUI
|
||||
fi
|
||||
|
@ -154,6 +154,12 @@ case `uname` in
|
||||
*) BEOS=no; AC_MSG_RESULT(no);;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(for Haiku)
|
||||
case `uname` in
|
||||
Haiku) HAIKU=yes; AC_MSG_RESULT(yes);;
|
||||
*) HAIKU=no; AC_MSG_RESULT(no);;
|
||||
esac
|
||||
|
||||
dnl If QNX is found, assume we don't want to use Xphoton
|
||||
dnl unless it was specifically asked for (--with-x)
|
||||
AC_MSG_CHECKING(for QNX)
|
||||
@ -2033,7 +2039,13 @@ fi
|
||||
|
||||
if test "$enable_channel" = "yes"; then
|
||||
dnl On Solaris we need the socket and nsl library.
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
AC_CHECK_LIB(network, socket)
|
||||
else
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(nsl, gethostbyname)
|
||||
AC_MSG_CHECKING(whether compiling with process communication is possible)
|
||||
AC_TRY_LINK([
|
||||
@ -2311,11 +2323,11 @@ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
|
||||
AC_MSG_ERROR([could not configure X])
|
||||
fi
|
||||
|
||||
test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
|
||||
AC_MSG_CHECKING(--enable-gui argument)
|
||||
AC_ARG_ENABLE(gui,
|
||||
[ --enable-gui[=OPTS] X11 GUI. [default=auto] [OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon]], , enable_gui="auto")
|
||||
[ --enable-gui[=OPTS] X11 GUI. [default=auto] [OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon]], , enable_gui="auto")
|
||||
|
||||
dnl Canonicalize the --enable-gui= argument so that it can be easily compared.
|
||||
dnl Do not use character classes for portability with old tools.
|
||||
@ -2330,10 +2342,22 @@ SKIP_MOTIF=YES
|
||||
SKIP_ATHENA=YES
|
||||
SKIP_NEXTAW=YES
|
||||
SKIP_PHOTON=YES
|
||||
SKIP_HAIKU=YES
|
||||
SKIP_CARBON=YES
|
||||
GUITYPE=NONE
|
||||
|
||||
if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
SKIP_HAIKU=
|
||||
case "$enable_gui_canon" in
|
||||
no) AC_MSG_RESULT(no GUI support)
|
||||
SKIP_HAIKU=YES ;;
|
||||
yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;;
|
||||
auto) AC_MSG_RESULT(auto - automatic GUI support) ;;
|
||||
haiku) AC_MSG_RESULT(Haiku GUI support) ;;
|
||||
*) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
|
||||
SKIP_HAIKU=YES ;;
|
||||
esac
|
||||
elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
SKIP_PHOTON=
|
||||
case "$enable_gui_canon" in
|
||||
no) AC_MSG_RESULT(no GUI support)
|
||||
@ -2499,6 +2523,7 @@ if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
|
||||
SKIP_ATHENA=YES;
|
||||
SKIP_NEXTAW=YES;
|
||||
SKIP_PHOTON=YES;
|
||||
SKIP_HAIKU=YES;
|
||||
SKIP_CARBON=YES
|
||||
fi
|
||||
|
||||
@ -3112,6 +3137,11 @@ if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
|
||||
enable_fontset="no"
|
||||
fi
|
||||
|
||||
dnl There is no test for the Haiku GUI, if it's selected it's used
|
||||
if test -z "$SKIP_HAIKU"; then
|
||||
GUITYPE=HAIKUGUI
|
||||
fi
|
||||
|
||||
if test -z "$SKIP_PHOTON"; then
|
||||
GUITYPE=PHOTONGUI
|
||||
fi
|
||||
|
@ -3264,6 +3264,9 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef __BEOS__
|
||||
"beos",
|
||||
#endif
|
||||
#ifdef __HAIKU__
|
||||
"haiku",
|
||||
#endif
|
||||
#if defined(BSD) && !defined(MACOS_X)
|
||||
"bsd",
|
||||
#endif
|
||||
@ -3450,6 +3453,9 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef FEAT_GUI_GNOME
|
||||
"gui_gnome",
|
||||
#endif
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
"gui_haiku",
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
"gui_mac",
|
||||
#endif
|
||||
|
@ -514,7 +514,11 @@
|
||||
*/
|
||||
#if defined(FEAT_GUI_MSWIN) && !defined(FEAT_MBYTE_IME)
|
||||
// #define FEAT_MBYTE_IME
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_BIG) && defined(FEAT_GUI_HAIKU) && !defined(FEAT_MBYTE_IME)
|
||||
# define FEAT_MBYTE_IME
|
||||
#endif
|
||||
|
||||
// Use iconv() when it's available.
|
||||
#if (defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) || defined(DYNAMIC_ICONV)
|
||||
@ -604,7 +608,9 @@
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
|
||||
&& defined(HAVE_XPM)) \
|
||||
|| defined(FEAT_GUI_PHOTON))
|
||||
|| defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_HAIKU))
|
||||
|
||||
# define FEAT_TOOLBAR
|
||||
#endif
|
||||
|
||||
@ -627,6 +633,7 @@
|
||||
&& (defined(FEAT_GUI_GTK) \
|
||||
|| (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| (defined(FEAT_GUI_MSWIN) \
|
||||
&& (!defined(_MSC_VER) || _MSC_VER > 1020)))
|
||||
# define FEAT_GUI_TABLINE
|
||||
@ -638,7 +645,9 @@
|
||||
*/
|
||||
#if defined(FEAT_NORMAL)
|
||||
# define FEAT_BROWSE_CMD
|
||||
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
|
||||
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_MAC)
|
||||
# define FEAT_BROWSE
|
||||
# endif
|
||||
#endif
|
||||
@ -663,6 +672,7 @@
|
||||
&& defined(HAVE_X11_XPM_H)) \
|
||||
|| defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MAC)
|
||||
# define FEAT_CON_DIALOG
|
||||
@ -680,7 +690,8 @@
|
||||
#if defined(FEAT_GUI_DIALOG) && \
|
||||
(defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_HAIKU))
|
||||
# define FEAT_GUI_TEXTDIALOG
|
||||
# ifndef ALWAYS_USE_GUI
|
||||
# define FEAT_CON_DIALOG
|
||||
|
214
src/fileio.c
214
src/fileio.c
@ -3367,6 +3367,7 @@ shorten_fnames(int force)
|
||||
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(PROTO)
|
||||
/*
|
||||
* Shorten all filenames in "fnames[count]" by current directory.
|
||||
@ -4422,130 +4423,133 @@ readdir_core(
|
||||
void *context,
|
||||
int (*checkitem)(void *context, char_u *name))
|
||||
{
|
||||
int failed = FALSE;
|
||||
# ifdef MSWIN
|
||||
char_u *buf, *p;
|
||||
int ok;
|
||||
HANDLE hFind = INVALID_HANDLE_VALUE;
|
||||
WIN32_FIND_DATAW wfb;
|
||||
WCHAR *wn = NULL; // UTF-16 name, NULL when not used.
|
||||
# endif
|
||||
int failed = FALSE;
|
||||
char_u *p;
|
||||
|
||||
ga_init2(gap, (int)sizeof(char *), 20);
|
||||
|
||||
# ifdef MSWIN
|
||||
buf = alloc(MAXPATHL);
|
||||
if (buf == NULL)
|
||||
return FAIL;
|
||||
STRNCPY(buf, path, MAXPATHL-5);
|
||||
p = buf + STRLEN(buf);
|
||||
MB_PTR_BACK(buf, p);
|
||||
if (*p == '\\' || *p == '/')
|
||||
*p = NUL;
|
||||
STRCAT(buf, "\\*");
|
||||
{
|
||||
char_u *buf;
|
||||
int ok;
|
||||
HANDLE hFind = INVALID_HANDLE_VALUE;
|
||||
WIN32_FIND_DATAW wfb;
|
||||
WCHAR *wn = NULL; // UTF-16 name, NULL when not used.
|
||||
|
||||
wn = enc_to_utf16(buf, NULL);
|
||||
if (wn != NULL)
|
||||
hFind = FindFirstFileW(wn, &wfb);
|
||||
ok = (hFind != INVALID_HANDLE_VALUE);
|
||||
if (!ok)
|
||||
{
|
||||
failed = TRUE;
|
||||
smsg(_(e_notopen), path);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (ok)
|
||||
buf = alloc(MAXPATHL);
|
||||
if (buf == NULL)
|
||||
return FAIL;
|
||||
STRNCPY(buf, path, MAXPATHL-5);
|
||||
p = buf + STRLEN(buf);
|
||||
MB_PTR_BACK(buf, p);
|
||||
if (*p == '\\' || *p == '/')
|
||||
*p = NUL;
|
||||
STRCAT(buf, "\\*");
|
||||
|
||||
wn = enc_to_utf16(buf, NULL);
|
||||
if (wn != NULL)
|
||||
hFind = FindFirstFileW(wn, &wfb);
|
||||
ok = (hFind != INVALID_HANDLE_VALUE);
|
||||
if (!ok)
|
||||
{
|
||||
int ignore;
|
||||
|
||||
p = utf16_to_enc(wfb.cFileName, NULL); // p is allocated here
|
||||
if (p == NULL)
|
||||
break; // out of memory
|
||||
|
||||
ignore = p[0] == '.' && (p[1] == NUL
|
||||
|| (p[1] == '.' && p[2] == NUL));
|
||||
if (!ignore && checkitem != NULL)
|
||||
{
|
||||
int r = checkitem(context, p);
|
||||
|
||||
if (r < 0)
|
||||
{
|
||||
vim_free(p);
|
||||
break;
|
||||
}
|
||||
if (r == 0)
|
||||
ignore = TRUE;
|
||||
}
|
||||
|
||||
if (!ignore)
|
||||
{
|
||||
if (ga_grow(gap, 1) == OK)
|
||||
((char_u**)gap->ga_data)[gap->ga_len++] = vim_strsave(p);
|
||||
else
|
||||
{
|
||||
failed = TRUE;
|
||||
vim_free(p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vim_free(p);
|
||||
ok = FindNextFileW(hFind, &wfb);
|
||||
failed = TRUE;
|
||||
smsg(_(e_notopen), path);
|
||||
}
|
||||
FindClose(hFind);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (ok)
|
||||
{
|
||||
int ignore;
|
||||
|
||||
vim_free(buf);
|
||||
vim_free(wn);
|
||||
p = utf16_to_enc(wfb.cFileName, NULL); // p is allocated here
|
||||
if (p == NULL)
|
||||
break; // out of memory
|
||||
|
||||
ignore = p[0] == '.' && (p[1] == NUL
|
||||
|| (p[1] == '.' && p[2] == NUL));
|
||||
if (!ignore && checkitem != NULL)
|
||||
{
|
||||
int r = checkitem(context, p);
|
||||
|
||||
if (r < 0)
|
||||
{
|
||||
vim_free(p);
|
||||
break;
|
||||
}
|
||||
if (r == 0)
|
||||
ignore = TRUE;
|
||||
}
|
||||
|
||||
if (!ignore)
|
||||
{
|
||||
if (ga_grow(gap, 1) == OK)
|
||||
((char_u**)gap->ga_data)[gap->ga_len++] = vim_strsave(p);
|
||||
else
|
||||
{
|
||||
failed = TRUE;
|
||||
vim_free(p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vim_free(p);
|
||||
ok = FindNextFileW(hFind, &wfb);
|
||||
}
|
||||
FindClose(hFind);
|
||||
}
|
||||
|
||||
vim_free(buf);
|
||||
vim_free(wn);
|
||||
}
|
||||
# else
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
char_u *p;
|
||||
{
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
|
||||
dirp = opendir((char *)path);
|
||||
if (dirp == NULL)
|
||||
{
|
||||
failed = TRUE;
|
||||
smsg(_(e_notopen), path);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
dirp = opendir((char *)path);
|
||||
if (dirp == NULL)
|
||||
{
|
||||
int ignore;
|
||||
|
||||
dp = readdir(dirp);
|
||||
if (dp == NULL)
|
||||
break;
|
||||
p = (char_u *)dp->d_name;
|
||||
|
||||
ignore = p[0] == '.' &&
|
||||
(p[1] == NUL ||
|
||||
(p[1] == '.' && p[2] == NUL));
|
||||
if (!ignore && checkitem != NULL)
|
||||
failed = TRUE;
|
||||
smsg(_(e_notopen), path);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int r = checkitem(context, p);
|
||||
int ignore;
|
||||
|
||||
if (r < 0)
|
||||
dp = readdir(dirp);
|
||||
if (dp == NULL)
|
||||
break;
|
||||
if (r == 0)
|
||||
ignore = TRUE;
|
||||
}
|
||||
p = (char_u *)dp->d_name;
|
||||
|
||||
if (!ignore)
|
||||
{
|
||||
if (ga_grow(gap, 1) == OK)
|
||||
((char_u**)gap->ga_data)[gap->ga_len++] = vim_strsave(p);
|
||||
else
|
||||
ignore = p[0] == '.' &&
|
||||
(p[1] == NUL ||
|
||||
(p[1] == '.' && p[2] == NUL));
|
||||
if (!ignore && checkitem != NULL)
|
||||
{
|
||||
failed = TRUE;
|
||||
break;
|
||||
int r = checkitem(context, p);
|
||||
|
||||
if (r < 0)
|
||||
break;
|
||||
if (r == 0)
|
||||
ignore = TRUE;
|
||||
}
|
||||
|
||||
if (!ignore)
|
||||
{
|
||||
if (ga_grow(gap, 1) == OK)
|
||||
((char_u**)gap->ga_data)[gap->ga_len++] = vim_strsave(p);
|
||||
else
|
||||
{
|
||||
failed = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dirp);
|
||||
closedir(dirp);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
|
@ -1524,7 +1524,7 @@ EXTERN char e_failed[] INIT(= N_("E472: Command failed"));
|
||||
EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
|
||||
#endif
|
||||
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN)
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
|
||||
EXTERN char e_font[] INIT(= N_("E235: Unknown font: %s"));
|
||||
#endif
|
||||
#if defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK)
|
||||
|
37
src/gui.c
37
src/gui.c
@ -446,7 +446,8 @@ gui_init_check(void)
|
||||
gui.menu_width = 0;
|
||||
# endif
|
||||
#endif
|
||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
|
||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_HAIKU))
|
||||
gui.toolbar_height = 0;
|
||||
#endif
|
||||
#if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF)
|
||||
@ -1371,10 +1372,11 @@ gui_position_components(int total_width UNUSED)
|
||||
text_area_y += gui.tabline_height;
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
|
||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_HAIKU))
|
||||
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
|
||||
{
|
||||
# ifdef FEAT_GUI_ATHENA
|
||||
# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)
|
||||
gui_mch_set_toolbar_pos(0, text_area_y,
|
||||
gui.menu_width, gui.toolbar_height);
|
||||
# endif
|
||||
@ -1382,6 +1384,13 @@ gui_position_components(int total_width UNUSED)
|
||||
}
|
||||
#endif
|
||||
|
||||
# if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_HAIKU)
|
||||
gui_mch_set_tabline_pos(0, text_area_y,
|
||||
gui.menu_width, gui.tabline_height);
|
||||
if (gui_has_tabline())
|
||||
text_area_y += gui.tabline_height;
|
||||
#endif
|
||||
|
||||
text_area_width = gui.num_cols * gui.char_width + gui.border_offset * 2;
|
||||
text_area_height = gui.num_rows * gui.char_height + gui.border_offset * 2;
|
||||
|
||||
@ -1453,7 +1462,7 @@ gui_get_base_height(void)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MOTIF))
|
||||
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU))
|
||||
if (gui_has_tabline())
|
||||
base_height += gui.tabline_height;
|
||||
# endif
|
||||
@ -1496,6 +1505,10 @@ again:
|
||||
new_pixel_height = 0;
|
||||
busy = TRUE;
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
vim_lock_screen();
|
||||
#endif
|
||||
|
||||
// Flush pending output before redrawing
|
||||
out_flush();
|
||||
|
||||
@ -1518,6 +1531,10 @@ again:
|
||||
|| gui.num_rows != Rows || gui.num_cols != Columns)
|
||||
shell_resized();
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
vim_unlock_screen();
|
||||
#endif
|
||||
|
||||
gui_update_scrollbars(TRUE);
|
||||
gui_update_cursor(FALSE, TRUE);
|
||||
#if defined(FEAT_XIM) && !defined(FEAT_GUI_GTK)
|
||||
@ -4254,9 +4271,10 @@ gui_update_scrollbars(
|
||||
y += gui.menu_height;
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA))
|
||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_HAIKU))
|
||||
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
|
||||
# ifdef FEAT_GUI_ATHENA
|
||||
# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)
|
||||
y += gui.toolbar_height;
|
||||
# else
|
||||
# ifdef FEAT_GUI_MSWIN
|
||||
@ -4265,7 +4283,7 @@ gui_update_scrollbars(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN)
|
||||
#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
|
||||
if (gui_has_tabline())
|
||||
y += gui.tabline_height;
|
||||
#endif
|
||||
@ -5035,10 +5053,11 @@ ex_gui(exarg_T *eap)
|
||||
}
|
||||
|
||||
#if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_PHOTON)) \
|
||||
|| defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_HAIKU)) \
|
||||
&& defined(FEAT_TOOLBAR)) || defined(PROTO)
|
||||
/*
|
||||
* This is shared between Athena, Motif and GTK.
|
||||
* This is shared between Athena, Haiku, Motif, and GTK.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
23
src/gui.h
23
src/gui.h
@ -29,6 +29,10 @@
|
||||
# include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
# include "gui_haiku.h"
|
||||
#endif
|
||||
|
||||
// Needed when generating prototypes, since FEAT_GUI is always defined then.
|
||||
#if defined(FEAT_XCLIPBOARD) && !defined(FEAT_GUI_MOTIF) \
|
||||
&& !defined(FEAT_GUI_ATHENA) && !defined(FEAT_GUI_GTK)
|
||||
@ -73,7 +77,8 @@
|
||||
*/
|
||||
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MAC)
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_HAIKU)
|
||||
# define HAVE_DROP_FILE
|
||||
#endif
|
||||
|
||||
@ -200,6 +205,10 @@ typedef struct GuiScrollbar
|
||||
// scroll_shift is set to the number of shifts
|
||||
// to reduce the count.
|
||||
#endif
|
||||
|
||||
#if FEAT_GUI_HAIKU
|
||||
VimScrollBar *id; // Pointer to real scroll bar
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
ControlHandle id; // A handle to the scrollbar
|
||||
#endif
|
||||
@ -426,7 +435,7 @@ typedef struct Gui
|
||||
|
||||
#if defined(FEAT_GUI_TABLINE) \
|
||||
&& (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
|
||||
|| defined(FEAT_GUI_MAC))
|
||||
|| defined(FEAT_GUI_MAC) || defined(FEAT_GUI_HAIKU))
|
||||
int tabline_height;
|
||||
#endif
|
||||
|
||||
@ -435,7 +444,7 @@ typedef struct Gui
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_TOOLBAR) \
|
||||
&& (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF))
|
||||
&& (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU))
|
||||
int toolbar_height; // height of the toolbar
|
||||
#endif
|
||||
|
||||
@ -456,6 +465,14 @@ typedef struct Gui
|
||||
guicolor_T currSpColor; // Current special text color
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
VimApp *vimApp;
|
||||
VimWindow *vimWindow;
|
||||
VimFormView *vimForm;
|
||||
VimTextAreaView *vimTextArea;
|
||||
int vdcmp; // Vim Direct Communication Message Port
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_MAC
|
||||
WindowPtr VimWindow;
|
||||
MenuHandle MacOSHelpMenu; // Help menu provided by the MacOS
|
||||
|
5242
src/gui_haiku.cc
Normal file
5242
src/gui_haiku.cc
Normal file
File diff suppressed because it is too large
Load Diff
51
src/gui_haiku.h
Normal file
51
src/gui_haiku.h
Normal file
@ -0,0 +1,51 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* VIM - Vi IMproved by Bram Moolenaar
|
||||
* GUI support by Olaf "Rhialto" Seibert
|
||||
*
|
||||
* Do ":help uganda" in Vim to read copying and usage conditions.
|
||||
* Do ":help credits" in Vim to see a list of people who contributed.
|
||||
*
|
||||
* Haiku GUI.
|
||||
*
|
||||
* Based on "GUI support for the Buzzword Enhanced Operating System for PPC."
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file must be acceptable both as C and C++.
|
||||
* The BeOS API is defined in terms of C++, but some classes
|
||||
* should be somewhat known in the common C code.
|
||||
*/
|
||||
|
||||
// System classes
|
||||
|
||||
struct BMenu;
|
||||
struct BMenuItem;
|
||||
struct BPictureButton;
|
||||
|
||||
// Our own Vim-related classes
|
||||
|
||||
struct VimApp;
|
||||
struct VimFormView;
|
||||
struct VimTextAreaView;
|
||||
struct VimWindow;
|
||||
struct VimScrollBar;
|
||||
|
||||
// Locking functions
|
||||
|
||||
extern int vim_lock_screen();
|
||||
extern void vim_unlock_screen();
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
typedef struct BMenu BMenu;
|
||||
typedef struct BMenuItem BMenuItem;
|
||||
typedef struct BPictureButton BPictureButton;
|
||||
typedef struct VimWindow VimWindow;
|
||||
typedef struct VimFormView VimFormView;
|
||||
typedef struct VimTextAreaView VimTextAreaView;
|
||||
typedef struct VimApp VimApp;
|
||||
typedef struct VimScrollBar VimScrollBar;
|
||||
|
||||
#endif
|
@ -6488,7 +6488,7 @@ im_set_active(int active_arg)
|
||||
# endif
|
||||
}
|
||||
|
||||
# if defined(FEAT_GUI) && !defined(VIMDLL)
|
||||
# if defined(FEAT_GUI) && !defined(FEAT_GUI_HAIKU) && !defined(VIMDLL)
|
||||
void
|
||||
im_set_position(int row UNUSED, int col UNUSED)
|
||||
{
|
||||
|
@ -2525,7 +2525,7 @@ winbar_click(win_T *wp, int col)
|
||||
}
|
||||
|
||||
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_TERM_POPUP_MENU) \
|
||||
|| defined(FEAT_TERM_POPUP_MENU) || defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(FEAT_BEVAL_TIP) || defined(PROTO)
|
||||
/*
|
||||
* Given a menu descriptor, e.g. "File.New", find it in the menu hierarchy.
|
||||
|
16
src/misc1.c
16
src/misc1.c
@ -14,6 +14,10 @@
|
||||
#include "vim.h"
|
||||
#include "version.h"
|
||||
|
||||
#if defined(__HAIKU__)
|
||||
# include <storage/FindDirectory.h>
|
||||
#endif
|
||||
|
||||
#if defined(MSWIN)
|
||||
# include <lm.h>
|
||||
#endif
|
||||
@ -1667,6 +1671,18 @@ vim_getenv(char_u *name, int *mustfree)
|
||||
// handling $VIMRUNTIME and $VIM is below, bail out if it's another name.
|
||||
vimruntime = (STRCMP(name, "VIMRUNTIME") == 0);
|
||||
if (!vimruntime && STRCMP(name, "VIM") != 0)
|
||||
#if defined(__HAIKU__)
|
||||
// special handling for user settings directory...
|
||||
if (STRCMP(name, "BE_USER_SETTINGS") == 0)
|
||||
{
|
||||
static char userSettingsPath[MAXPATHL] = {0};
|
||||
|
||||
if (B_OK == find_directory(B_USER_SETTINGS_DIRECTORY, 0,
|
||||
false, userSettingsPath, MAXPATHL))
|
||||
return userSettingsPath;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
|
@ -538,7 +538,7 @@ do_mouse(
|
||||
// menu on the button down event.
|
||||
return FALSE;
|
||||
# endif
|
||||
# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN)
|
||||
# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
|
||||
if (is_click || is_drag)
|
||||
// Ignore right button down and drag mouse events. Windows
|
||||
// only shows the popup menu on the button up event.
|
||||
|
@ -10,6 +10,9 @@
|
||||
* option.h: definition of global variables for settable options
|
||||
*/
|
||||
|
||||
#ifndef _OPTION_H_
|
||||
#define _OPTION_H_
|
||||
|
||||
//
|
||||
// Flags
|
||||
//
|
||||
@ -1290,3 +1293,5 @@ enum
|
||||
|
||||
// Value for b_p_ul indicating the global value must be used.
|
||||
#define NO_LOCAL_UNDOLEVEL -123456
|
||||
|
||||
#endif // _OPTION_H_
|
||||
|
37
src/os_haiku.h
Normal file
37
src/os_haiku.h
Normal file
@ -0,0 +1,37 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* VIM - Vi IMproved by Bram Moolenaar
|
||||
* Haiku port by Siarzhuk Zharski
|
||||
*
|
||||
* Do ":help uganda" in Vim to read copying and usage conditions.
|
||||
* Do ":help credits" in Vim to see a list of people who contributed.
|
||||
*/
|
||||
|
||||
/*
|
||||
* os_haiku.h
|
||||
*/
|
||||
|
||||
#define USE_TERM_CONSOLE
|
||||
|
||||
#define USR_VIM_DIR "$BE_USER_SETTINGS/vim"
|
||||
|
||||
#define USR_EXRC_FILE USR_VIM_DIR "/exrc"
|
||||
#define USR_EXRC_FILE2 USR_VIM_DIR "/vim/exrc"
|
||||
#define USR_VIMRC_FILE USR_VIM_DIR "/vimrc"
|
||||
#define USR_VIMRC_FILE2 USR_VIM_DIR "/vim/vimrc"
|
||||
#define USR_GVIMRC_FILE USR_VIM_DIR "/gvimrc"
|
||||
#define USR_GVIMRC_FILE2 USR_VIM_DIR "/vim/gvimrc"
|
||||
#define VIMINFO_FILE USR_VIM_DIR "/viminfo"
|
||||
|
||||
#ifdef RUNTIME_GLOBAL
|
||||
# ifdef RUNTIME_GLOBAL_AFTER
|
||||
# define DFLT_RUNTIMEPATH USR_VIM_DIR "," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER "," USR_VIM_DIR "/after"
|
||||
# define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER
|
||||
# else
|
||||
# define DFLT_RUNTIMEPATH USR_VIM_DIR "," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after," USR_VIM_DIR "/after"
|
||||
# define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
|
||||
# endif
|
||||
#else
|
||||
# define DFLT_RUNTIMEPATH USR_VIM_DIR ",$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after," USR_VIM_DIR "/after"
|
||||
# define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
|
||||
#endif
|
143
src/os_haiku.rdef
Normal file
143
src/os_haiku.rdef
Normal file
@ -0,0 +1,143 @@
|
||||
/*
|
||||
* os_haiku.rdef
|
||||
*/
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-Vim-8";
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "VIM Editor",
|
||||
long_info = "VI Improved Editor by Bram Moolenaar et al."
|
||||
};
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource file_types message {
|
||||
"types" = "text",
|
||||
"types" = "text/plain",
|
||||
"types" = "text/x-source-code",
|
||||
"types" = "text/x-patch",
|
||||
"types" = "text/html",
|
||||
"types" = "text/xml",
|
||||
"types" = "text/x-makefile",
|
||||
"types" = "text/x-jamfile"
|
||||
};
|
||||
|
||||
resource vector_icon {
|
||||
$"6E636966050501020006023B8CFD3CB8E4BF59B63E2F604BACDB47A13E00FFFF"
|
||||
$"FFFF909DA702000603BAF8BA3CE3F6BF8EB9BDA8484BC75C4AEA1200C1C7CC79"
|
||||
$"D9E0E5FFC1C7CC020006020000003DC000C000000000004C000049FFFF00B3FF"
|
||||
$"B3FF026C52020006023BD04F3BD04FBED4133ED4134B6000462FB00053AB53FF"
|
||||
$"007F00060618FFFCFFFF63FF282528252725262726262627262B262B262C282D"
|
||||
$"272D282D2B2B582B582B592D5A2C5A2D5A2F5A2F5A305ABA2659315ABA26595E"
|
||||
$"2D5E2D5F2C5F2A5F2B5F2A5F275F275F265D255E255D254A254A254925482748"
|
||||
$"264827482B482B482C4A2D492D4A2D4C3A3F2D3C2D3C2D3D2D3E2B3E2C3E2B3E"
|
||||
$"273E273E263C253D253C250618FFFCFFFF63FF28252825272526272626262726"
|
||||
$"2B262B262C282D272D282D2B2B582B582B592D5A2C5A2D5A2F5A2F5A305ABA26"
|
||||
$"59315ABA26595E2D5E2D5F2C5F2A5F2B5F2A5F275F275F265D255E255D254A25"
|
||||
$"4A254925482748264827482B482B482C4A2D492D4A2D4C3A3F2D3C2D3C2D3D2D"
|
||||
$"3E2B3E2C3E2B3E273E273E263C253D253C250A08BEA359BE3D593C5A415AC03B"
|
||||
$"59BFD559434C404C06218A88888888C83E3F02484CC1D359C16D445A49C36B59"
|
||||
$"C305C3CA50C5C8C50359C49D4C5A51C69B59C635C6FA50C8F8C83359C7CD545A"
|
||||
$"59C9CB59C965CA6B4DCA6B4DCA804C5A4C584C584C574CC86D4DC8D34DC86D4D"
|
||||
$"C73B524C534C524C504C504C4F4CC53D4DC5A34DC53D4DC40B4B4C0608EBECC0"
|
||||
$"B64AC0B64AC11C4AC13349C14848C0F847C15E47C0F847C092C01648C02C47C0"
|
||||
$"1648C00149C0504ABFEA4AC0504A0A04405E5E40402222400A0A000105180015"
|
||||
$"01178600040A0001051815FF01178400040A030105000A0401051001157C0004"
|
||||
$"0A000100381D1F001501178600040A000100381D1F15FF01178300040A010101"
|
||||
$"201D1F0A020101301D1F01157E00040A0003020304381D1F15FF01178400040A"
|
||||
$"0203020304281D1F15FF"
|
||||
};
|
||||
|
||||
resource(1, "builtin-tools") #'PNG ' array {
|
||||
$"89504E470D0A1A0A0000000D494844520000022E0000001208030000004BB3A5"
|
||||
$"1200000300504C5445000000800000008000808000000080800080008080C0C0"
|
||||
$"C0C0DCC0A6CAF0402000602000802000A02000C02000E0200000400020400040"
|
||||
$"4000604000804000A04000C04000E04000006000206000406000606000806000"
|
||||
$"A06000C06000E06000008000208000408000608000808000A08000C08000E080"
|
||||
$"0000A00020A00040A00060A00080A000A0A000C0A000E0A00000C00020C00040"
|
||||
$"C00060C00080C000A0C000C0C000E0C00000E00020E00040E00060E00080E000"
|
||||
$"A0E000C0E000E0E000000040200040400040600040800040A00040C00040E000"
|
||||
$"40002040202040402040602040802040A02040C02040E0204000404020404040"
|
||||
$"4040604040804040A04040C04040E04040006040206040406040606040806040"
|
||||
$"A06040C06040E06040008040208040408040608040808040A08040C08040E080"
|
||||
$"4000A04020A04040A04060A04080A040A0A040C0A040E0A04000C04020C04040"
|
||||
$"C04060C04080C040A0C040C0C040E0C04000E04020E04040E04060E04080E040"
|
||||
$"A0E040C0E040E0E040000080200080400080600080800080A00080C00080E000"
|
||||
$"80002080202080402080602080802080A02080C02080E0208000408020408040"
|
||||
$"4080604080804080A04080C04080E04080006080206080406080606080806080"
|
||||
$"A06080C06080E06080008080208080408080608080808080A08080C08080E080"
|
||||
$"8000A08020A08040A08060A08080A080A0A080C0A080E0A08000C08020C08040"
|
||||
$"C08060C08080C080A0C080C0C080E0C08000E08020E08040E08060E08080E080"
|
||||
$"A0E080C0E080E0E0800000C02000C04000C06000C08000C0A000C0C000C0E000"
|
||||
$"C00020C02020C04020C06020C08020C0A020C0C020C0E020C00040C02040C040"
|
||||
$"40C06040C08040C0A040C0C040C0E040C00060C02060C04060C06060C08060C0"
|
||||
$"A060C0C060C0E060C00080C02080C04080C06080C08080C0A080C0C080C0E080"
|
||||
$"C000A0C020A0C040A0C060A0C080A0C0A0A0C0C0A0C0E0A0C000C0C020C0C040"
|
||||
$"C0C060C0C080C0C0A0C0C0FFFBF0A0A0A4808080FF000000FF00FFFF000000FF"
|
||||
$"FF00FF00FFFFFFFFFF58D234440000000874524E53FFFFFFFFFFFFFF00DE83BD"
|
||||
$"59000000097048597300000B1200000B1201D2DD7EFC0000070D494441546881"
|
||||
$"DD994B6E23390C86695880F6BDCD19BCCD3AD7CA7DB4CD197C965EE7044619D0"
|
||||
$"F0299192AA5C9907D018762776D12A3DA8AF7E520E64B382FFB792FF004BCD4E"
|
||||
$"DF02C1DC0717347779C3FFDB8D5F43A3705900FE8838FCDB868119C3F3E32EDA"
|
||||
$"BB5A1897CA916A1B566CA49DED7865B2E3E930FC6397A9AAEDE232F10409EA37"
|
||||
$"5B851A70793C020BB70C1B8CB4C436057EFFF6BCACE0BD0CAF75159D21567B6D"
|
||||
$"B2BB9EC73AF7E89C21013E3EF03F1A4CD339BDA77E390523594BE549EA7E55DD"
|
||||
$"E8793B68FEF332D4D3BD72BFE1B2D68D19171A87861F37ADB4163A3FEB87E6A7"
|
||||
$"06411B06146E37D8B60D6E9E176C121A212D81976930BAE5C231A657895D5B80"
|
||||
$"8735AE6BD5068729057FCC318FB5183DC682BB8924AC4D5AB456557F9771D647"
|
||||
$"066E0B378A6491FD65381017DDB2793BD2674A9F64E14950CF67DFD8941D3D5D"
|
||||
$"37DA62B1BB1B9ADFE4452BA3B3C41649D58BE6B77E58065C36B3EEC26C856D7A"
|
||||
$"3E2A332ECFA73E3BBD53EE955F5BB8F939B3F85B749D2DDA003A0A5E546B392D"
|
||||
$"6CE11962C1FD4412D6664C01702B990E4FA5C6591F18F4CDF1913475B1597975"
|
||||
$"498A4BB3B632E7EA7B5F5C2E620A83C4C0ED2AFB7BBD4268157191693455129A"
|
||||
$"BF6BD329C265918F461496EAF23219E5E7B3549977BF036FE1DFEDE9ACB2E7FB"
|
||||
$"819736D9B76152F8C7B6B95E5AE06DA99327C682FBF9289E04B46B306D2519AB"
|
||||
$"6480361D9A8ABDC0F291ABFE8271F916D9A849D505432FEA42D3E4965E5D1C2E"
|
||||
$"B486CE463247C025E54159436982B898395C26759970A9BE9386CB948FC64473"
|
||||
$"A676912AC06DFA53E5A51753C0A4D08F17730E6A734C81F7C94853BC3C8AF44B"
|
||||
$"79A9974B5C18EE6573795C86041E49405ACAE68CC72168AEF9FAF686BF4D5DDC"
|
||||
$"74CB98902AB8D7EA70112E0ACE076B1776DEFB7EA4BBE1B2509784893799BCA4"
|
||||
$"76ED71416971BBCEEA623DF1B21197DB50D2840662853E2A2E19E95C2C6883BA"
|
||||
$"A4B6DB63EDB23A19C536BCBF5E5ECAF329F2D22704C221DEE670113016C540DD"
|
||||
$"C18576B7B0BA202CC2CB85B410F9B085F1D5E3228F00F45880CC221891A04EA1"
|
||||
$"E55B7F181705081B15F12C71A9DC41FBC454489B414F4685D0D80A4E3F3E1789"
|
||||
$"9FFA1D7521509ABCC89BF439E2E28B9BA82E0D97F844AD6A17E969D09F1E3448"
|
||||
$"699EA2B0100FC9793C44E7E1B02DA50BA6A3E621655179E9B858FD32D1E11C75"
|
||||
$"74B567B0CB0AC55B4EA37425106AFDEC1D35F2A1692DF24224E8BBB221840117"
|
||||
$"038871F9DEC385122A83AF2E914B6B06E06B17C605E70F776760B8B45A32292E"
|
||||
$"76D01E710907F0E1F4B4A72ECEE3594D417103762C223D688A4B5497391F9CF0"
|
||||
$"80E1622393B290C0607CF2A1BA4CB84CAE6E8A4B257929242EF4CEE078F48599"
|
||||
$"E712F900417117976DC3021AA9907F084703E885BA48426D5955E432F78B880B"
|
||||
$"DD8AFEFB7BB32B182EDD64844299A74CB8D0C1903ED13594A1D47DA12E34B8B7"
|
||||
$"D223E28F0249C5A5056DA52EAEA7AF2FEEE88C87BEA42364DCC83D40D97059D5"
|
||||
$"2E7BC9A8F62D51EBC9A8B2C0DB01C9E8E80BEB7213F880F032E18240081C1D17"
|
||||
$"03E8585D72FE91BA6805E6707987515D4CE9932F598637EECCC7B8F8134D5DA9"
|
||||
$"8BC7E5F1F86A56DCF13AE022EAD282C6B844010CDC15DAFD331EE5C51FA5537D"
|
||||
$"3C727E704A7A3ED9B53A198DA56E0FEB949F7AA92B0072F552A463CA8C7D6156"
|
||||
$"BB0C7CF00E1EE0029BA41E4D47C8E9E6D5E5089755ED62CDD6B80CF21270F9F5"
|
||||
$"ABE3C2E7202970F3E8695B2CEAD28AD81D7571C9E8FEF5B5C4C59BA94B0B9AE0"
|
||||
$"1204D075F478281CAF3DB9A5A3968D522DC8CB0379C1B4C4BCACBF77C9FE201D"
|
||||
$"4F46D666719016846C9D720CF234C8C968E443867BDBC1C578E927A306D0212E"
|
||||
$"35984D09DCC54B5CDEF770E95FB3B883B439CCD3BE7751DD61D3A3D89EBAECE0"
|
||||
$"32ABCB58EA46010C1D8D70EC7A7AADDB78C1D9154E095E5D2EFAAA87AAF990CC"
|
||||
$"59B9D95E1BE0546747EA6CDFBB381AD2E4E158D02ADFDE022F0E17C9A81E5703"
|
||||
$"E8B07681F12EF9C85D2C71C130BAEF78F670B1435083A37DABDB1D599391952F"
|
||||
$"14BA78F0E1DD7500ADE73CE1A20F00DE2B995652909F22DC7B2784C2394FE6BF"
|
||||
$"01683A0237985717AC5D742297A02E1185D196B8F0BBFE374DB730A561F6F458"
|
||||
$"445E3C2E8155C65501A24612D60997D55DAE3399EF1A9769C7965B2867A0E2E2"
|
||||
$"A31E7759F41835B4E9C7A71120F0EA02E51017BA45FF3253665C5C19AB70BCF6"
|
||||
$"642D5B2423411F8C6B97868B8D9E5BED326AB84637E032B5E94A648AED17C634"
|
||||
$"CC1E178B7D5C661302A891ECBE4E07E6591FD81A9781B3A5A339E749F94BFF32"
|
||||
$"75AED701A01D71099DF832450BF94900492EBA3109273CD9FE02C03909FA6024"
|
||||
$"912D194D339C0EC9D6CCAD7AD166F2C485312E93671150B617B88C8D86DC731A"
|
||||
$"1767E7EEF90FEC3599BB77B416E3EAE7689CF114DBE3E262B898CB34FECE845E"
|
||||
$"4CFAEF79764372DC201F65AC97B792C14FE6F387DBB4F83918273C6E9B866FD9"
|
||||
$"FF17F6CF36F92F1B9E631E8B8F3FBC0000000049454E44AE426082"
|
||||
};
|
@ -2151,7 +2151,8 @@ mch_settitle(char_u *title, char_u *icon)
|
||||
if (get_x11_windis() == OK)
|
||||
type = 1;
|
||||
#else
|
||||
# if defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK)
|
||||
# if defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU)
|
||||
if (gui.in_use)
|
||||
type = 1;
|
||||
# endif
|
||||
@ -2184,7 +2185,7 @@ mch_settitle(char_u *title, char_u *icon)
|
||||
# endif
|
||||
set_x11_title(title); // x11
|
||||
#endif
|
||||
#if defined(FEAT_GUI_GTK) \
|
||||
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
|
||||
else
|
||||
gui_mch_settitle(title, icon);
|
||||
@ -4591,7 +4592,7 @@ mch_call_shell_fork(
|
||||
{
|
||||
SIGSET_DECL(curset)
|
||||
|
||||
# ifdef __BEOS__
|
||||
# if defined(__BEOS__) && USE_THREAD_FOR_INPUT_WITH_TIMEOUT
|
||||
beos_cleanup_read_thread();
|
||||
# endif
|
||||
|
||||
|
@ -364,22 +364,26 @@ typedef struct dsc$descriptor DESC;
|
||||
|
||||
#define DFLT_ERRORFILE "errors.err"
|
||||
|
||||
#ifdef VMS
|
||||
# define DFLT_RUNTIMEPATH "sys$login:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,sys$login:vimfiles/after"
|
||||
# define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
|
||||
#else
|
||||
# ifdef RUNTIME_GLOBAL
|
||||
# ifdef RUNTIME_GLOBAL_AFTER
|
||||
# define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.vim/after"
|
||||
# define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER
|
||||
# else
|
||||
# define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
|
||||
# define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
|
||||
# endif
|
||||
#ifndef DFLT_RUNTIMEPATH
|
||||
|
||||
# ifdef VMS
|
||||
# define DFLT_RUNTIMEPATH "sys$login:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,sys$login:vimfiles/after"
|
||||
# define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
|
||||
# else
|
||||
# define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
|
||||
# define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
|
||||
# ifdef RUNTIME_GLOBAL
|
||||
# ifdef RUNTIME_GLOBAL_AFTER
|
||||
# define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.vim/after"
|
||||
# define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER
|
||||
# else
|
||||
# define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
|
||||
# define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
|
||||
# endif
|
||||
# else
|
||||
# define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
|
||||
# define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
|
@ -65,7 +65,7 @@ extern void memmove(char *, char *, int);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#ifndef __BIONIC__ // Android's libc #defines bzero to memset.
|
||||
#if !defined(__BIONIC__) && !defined(__HAIKU__) // Android's libc #defines bzero to memset.
|
||||
// used inside of FD_ZERO macro
|
||||
extern void bzero(void *, size_t);
|
||||
#endif
|
||||
|
@ -313,6 +313,9 @@ extern char_u *vimpty_getenv(const char_u *string); // in misc2.c
|
||||
extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*show_entry)(), int x, int y, guicolor_T fg, guicolor_T bg, guicolor_T scroll_fg, guicolor_T scroll_bg);
|
||||
# endif
|
||||
# endif
|
||||
# ifdef FEAT_GUI_HAIKU
|
||||
# include "gui_haiku.pro"
|
||||
# endif
|
||||
# ifdef FEAT_GUI_MAC
|
||||
# include "gui_mac.pro"
|
||||
# endif
|
||||
|
95
src/proto/gui_haiku.pro
Normal file
95
src/proto/gui_haiku.pro
Normal file
@ -0,0 +1,95 @@
|
||||
/* gui_haiku.cc - hand crafted */
|
||||
|
||||
void gui_mch_prepare(int *argc, char **argv);
|
||||
int gui_mch_init(void);
|
||||
int gui_mch_open(void);
|
||||
void gui_mch_exit(int vim_exitcode);
|
||||
int gui_mch_init_check(void);
|
||||
void gui_mch_flush(void);
|
||||
|
||||
void gui_mch_new_colors(void);
|
||||
void gui_mch_set_bg_color(guicolor_T color);
|
||||
void gui_mch_set_fg_color(guicolor_T color);
|
||||
void gui_mch_set_sp_color(guicolor_T color);
|
||||
guicolor_T gui_mch_get_rgb(guicolor_T pixel);
|
||||
guicolor_T gui_mch_get_rgb_color(int r, int g, int b);
|
||||
guicolor_T gui_mch_get_color(char_u *name);
|
||||
|
||||
GuiFont gui_mch_get_font(char_u *name, int giveErrorIfMissing);
|
||||
void gui_mch_set_font(GuiFont font);
|
||||
int gui_mch_init_font(char_u *font_name, int fontset);
|
||||
void gui_mch_free_font(GuiFont font);
|
||||
char_u *gui_mch_get_fontname(GuiFont font, char_u *name);
|
||||
|
||||
void gui_mch_set_winpos(int x, int y);
|
||||
int gui_mch_get_winpos(int *x, int *y);
|
||||
void gui_mch_set_shellsize(int w, int h, int m_w, int m_h, int b_w, int b_h, int d);
|
||||
void gui_mch_get_screen_dimensions(int* screen_w, int* screen_h);
|
||||
void gui_mch_set_text_area_pos(int x, int y, int w, int h);
|
||||
|
||||
void gui_mch_enable_scrollbar(scrollbar_T *sb, int flag);
|
||||
|
||||
//void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb,int val, int size, int max));
|
||||
void gui_mch_set_scrollbar_thumb(scrollbar_T *sb, int val, int size, int max);
|
||||
|
||||
void gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h);
|
||||
void gui_mch_create_scrollbar(scrollbar_T *sb, int orient);
|
||||
void gui_mch_destroy_scrollbar(scrollbar_T *sb);
|
||||
|
||||
void gui_mch_set_blinking(long waittime, long on, long off);
|
||||
void gui_mch_stop_blink(int may_call_gui_update_cursor);
|
||||
void gui_mch_start_blink(void);
|
||||
|
||||
int gui_mch_adjust_charheight(void);
|
||||
void gui_mch_draw_string(int row, int col, char_u *s, int len, int flags);
|
||||
int gui_mch_haskey(char_u *name);
|
||||
void gui_mch_beep(void);
|
||||
void gui_mch_flash(int msec);
|
||||
void gui_mch_invert_rectangle(int r, int c, int nr, int nc);
|
||||
void gui_mch_iconify(void);
|
||||
void gui_mch_set_foreground(void);
|
||||
void gui_mch_settitle(char_u *title, char_u *icon);
|
||||
void gui_mch_draw_hollow_cursor(guicolor_T color);
|
||||
void gui_mch_draw_part_cursor(int w, int h, guicolor_T color);
|
||||
void gui_mch_update(void);
|
||||
int gui_mch_wait_for_chars(int wtime);
|
||||
void gui_mch_clear_block(int row1, int col1, int row2, int col2);
|
||||
void gui_mch_clear_all(void);
|
||||
void gui_mch_delete_lines(int row, int num_lines);
|
||||
void gui_mch_insert_lines(int row, int num_lines);
|
||||
|
||||
void gui_mch_getmouse(int *x, int *y);
|
||||
void gui_mch_setmouse(int x, int y);
|
||||
void gui_mch_mousehide(int hide);
|
||||
|
||||
void gui_mch_enable_menu(int flag);
|
||||
void gui_mch_set_menu_pos(int x, int y, int w, int h);
|
||||
void gui_mch_add_menu(vimmenu_T *menu, int idx);
|
||||
void gui_mch_add_menu_item(vimmenu_T *menu, int idx);
|
||||
void gui_mch_destroy_menu(vimmenu_T *menu);
|
||||
void gui_mch_menu_grey(vimmenu_T *menu, int grey);
|
||||
void gui_mch_menu_hidden(vimmenu_T *menu, int hidden);
|
||||
void gui_mch_draw_menubar(void);
|
||||
void gui_mch_show_popupmenu(vimmenu_T *menu);
|
||||
void gui_mch_toggle_tearoffs(int enable);
|
||||
|
||||
void clip_mch_request_selection(Clipboard_T *cbd);
|
||||
void clip_mch_set_selection(Clipboard_T *cbd);
|
||||
void clip_mch_lose_selection(Clipboard_T *cbd);
|
||||
int clip_mch_own_selection(Clipboard_T *cbd);
|
||||
|
||||
char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
|
||||
int gui_mch_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
|
||||
|
||||
void im_set_position(int row, int col);
|
||||
void im_set_active(int activate);
|
||||
int im_get_status(void);
|
||||
|
||||
void gui_mch_show_toolbar(int showit);
|
||||
void gui_mch_set_toolbar_pos(int x, int y, int w, int h);
|
||||
|
||||
void gui_mch_show_tabline(int showit);
|
||||
void gui_mch_set_tabline_pos(int x, int y, int w, int h);
|
||||
int gui_mch_showing_tabline(void);
|
||||
void gui_mch_update_tabline(void);
|
||||
void gui_mch_set_curtab(int nr);
|
@ -386,7 +386,7 @@ mch_openpty(char **ttyn)
|
||||
static char PtyProto[] = "/dev/ptym/ptyXY";
|
||||
static char TtyProto[] = "/dev/pty/ttyXY";
|
||||
# else
|
||||
# ifdef __BEOS__
|
||||
# if defined (__BEOS__) || defined(__HAIKU__)
|
||||
static char PtyProto[] = "/dev/pt/XY";
|
||||
static char TtyProto[] = "/dev/tt/XY";
|
||||
# else
|
||||
|
20
src/screen.c
20
src/screen.c
@ -2549,6 +2549,10 @@ retry:
|
||||
|
||||
win_new_shellsize(); // fit the windows in the new sized shell
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
vim_lock_screen(); // be safe, put it here
|
||||
#endif
|
||||
|
||||
comp_col(); // recompute columns for shown command and ruler
|
||||
|
||||
/*
|
||||
@ -2799,6 +2803,10 @@ give_up:
|
||||
#endif
|
||||
clear_TabPageIdxs();
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
vim_unlock_screen();
|
||||
#endif
|
||||
|
||||
entered = FALSE;
|
||||
--RedrawingDisabled;
|
||||
|
||||
@ -3646,6 +3654,10 @@ screen_ins_lines(
|
||||
clip_scroll_selection(-line_count);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
vim_lock_screen();
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI
|
||||
// Don't update the GUI cursor here, ScreenLines[] is invalid until the
|
||||
// scrolling is actually carried out.
|
||||
@ -3700,6 +3712,10 @@ screen_ins_lines(
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
vim_unlock_screen();
|
||||
#endif
|
||||
|
||||
screen_stop_highlight();
|
||||
windgoto(cursor_row, cursor_col);
|
||||
if (clear_attr != 0)
|
||||
@ -3928,6 +3944,10 @@ screen_del_lines(
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FEAT_GUI_HAIKU
|
||||
vim_unlock_screen();
|
||||
#endif
|
||||
|
||||
if (screen_attr != clear_attr)
|
||||
screen_stop_highlight();
|
||||
if (clear_attr != 0)
|
||||
|
@ -3643,6 +3643,13 @@ struct VimMenu
|
||||
HMENU submenu_id; // If this is submenu, add children here
|
||||
HWND tearoff_handle; // hWnd of tearoff if created
|
||||
#endif
|
||||
#if FEAT_GUI_HAIKU
|
||||
BMenuItem *id; // Id of menu item
|
||||
BMenu *submenu_id; // If this is submenu, add children here
|
||||
# ifdef FEAT_TOOLBAR
|
||||
BPictureButton *button;
|
||||
# endif
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
// MenuHandle id;
|
||||
// short index; // the item index within the father menu
|
||||
|
@ -1420,6 +1420,11 @@ termgui_mch_get_rgb(guicolor_T color)
|
||||
# define DEFAULT_TERM (char_u *)"beos-ansi"
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
# undef DEFAULT_TERM
|
||||
# define DEFAULT_TERM (char_u *)"xterm"
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_TERM
|
||||
# define DEFAULT_TERM (char_u *)"dumb"
|
||||
#endif
|
||||
|
@ -738,6 +738,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
320,
|
||||
/**/
|
||||
319,
|
||||
/**/
|
||||
@ -1722,6 +1724,9 @@ list_version(void)
|
||||
msg_puts(_("with X11-Athena GUI."));
|
||||
# endif
|
||||
# else
|
||||
# ifdef FEAT_GUI_HAIKU
|
||||
msg_puts(_("with Haiku GUI."));
|
||||
# else
|
||||
# ifdef FEAT_GUI_PHOTON
|
||||
msg_puts(_("with Photon GUI."));
|
||||
# else
|
||||
@ -1736,6 +1741,7 @@ list_version(void)
|
||||
# else
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
11
src/vim.h
11
src/vim.h
@ -103,6 +103,7 @@
|
||||
#if defined(FEAT_GUI_MOTIF) \
|
||||
|| defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_PHOTON)
|
||||
@ -223,6 +224,11 @@
|
||||
# include "os_beos.h"
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
# include "os_haiku.h"
|
||||
# define __ARGS(x) x
|
||||
#endif
|
||||
|
||||
#if (defined(UNIX) || defined(VMS)) \
|
||||
&& (!defined(MACOS_X) || defined(HAVE_CONFIG_H))
|
||||
# include "os_unix.h" // bring lots of system header files
|
||||
@ -2075,6 +2081,9 @@ typedef struct
|
||||
int_u format; // Vim's own special clipboard format
|
||||
int_u format_raw; // Vim's raw text clipboard format
|
||||
# endif
|
||||
# ifdef FEAT_GUI_HAIKU
|
||||
// No clipboard at the moment. TODO?
|
||||
# endif
|
||||
} Clipboard_T;
|
||||
#else
|
||||
typedef int Clipboard_T; // This is required for the prototypes.
|
||||
@ -2136,7 +2145,7 @@ typedef enum {
|
||||
// functions of these names. The declarations would break if the defines had
|
||||
// been seen at that stage. But it must be before globals.h, where error_ga
|
||||
// is declared.
|
||||
#if !defined(MSWIN) && !defined(FEAT_GUI_X11) \
|
||||
#if !defined(MSWIN) && !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_HAIKU) \
|
||||
&& !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC) && !defined(PROTO)
|
||||
# define mch_errmsg(str) fprintf(stderr, "%s", (str))
|
||||
# define display_errors() fflush(stderr)
|
||||
|
Reference in New Issue
Block a user