Thu Feb 10 15:10:01 PST 2000 Michael Jennings <mej@eterm.org>

This is the first public availability of the work thus far on Eterm
	0.9.1.  There's quite a bit of new stuff here.

	* Added scrollbar thumb support.

	* Completely redid the terminfo/termcap stuff.  The terminfo file is
	now compiled (by tic) and installed by default (unless you specify
	--without-terminfo).  The config files still say xterm, though,
	because some programs (like SLang and GNU mc) use the silly algorithm
	of "Is $TERM set to xterm?" to detect mouse reporting support in a
	terminal. =P  But if you don't ever use xterm, you can use Eterm's
	termcap and just name it "xterm" instead.  Thanks to Marius Gedminas
	<mgedmin@takas.lt> for his patch that started this whole revamp.

	* Added the kEsetroot script for KDE users from Dax Games
	<dgames@isoc.net>.

	* You can now configure the Home and End emulation via --with-home=
	and --with-end= options to configure.  The --with-terminfo option is
	also new, and --enable-xim is now the default.

	* Added a new image state, disabled, for when Eterm loses focus.  This
	is supported by all widgets (well, all those that could possibly be
	on screen when Eterm lost focus), even the background image.  So you
	could actually have all your images darken on focus out and restore
	to normal on focus in.

	* Widget colors formerly dealt with as colors (menu text color,
	scrollbar color, etc.) are now handled by the imageclasses.  Each
	image state can have a foreground and background color defined.  The
	current exception is the background image; I hope to add that later.
	The foreground is the text color and the background is the object
	color (for solid color mode).  So menu text color is set by the menu
	imageclass.  And again, for unfocused colors, use the disabled state
	of the imageclass.

	* Proportionally-spaced fonts are now handled much better.  They are
	still forced into evenly-spaced columns (it's a terminal for crying
	out loud!) but at least you don't end up with Eterm's wider than your
	screen. :-)

	* Home on refresh is gone, as is home on echo.  It's now much simpler.
	There are two options:  home on output, and home on input, the former
	being a combination of echo and refresh.  Also, keypresses that don't
	necessarily have corresonding output can trigger a home on input,
	like Ctrl-End or whatever...ones that don't have special meaning.
	Credit to Darren Stuart Embry <dse@louisville.edu> for pointing out
	this issue and the one with "m-" in font names.

	* I finally got around to re-merging the new parser stuff from my
	work on the Not Game.  Closed up some old potential behavior quirks
	with theme parsing.

	* Added a new escape sequence to fork-and-exec a program.  Also added
	a scrollback search capability to highlight all occurances of a string
	in your scrollback buffer.  Use the new "Etsearch" utility to access
	it.  "Etsearch string" to search for a string, then "Etsearch" by
	itself to reset the highlighting.

	* And of course, the biggie.  Eterm now supports a completely-
	customizeable buttonbar.  Not a menubar, a buttonbar.  It can have an
	arbitrary number of buttons, and each button can perform an action,
	just like a menuitem.  So a button could bring up a menu (like a
	menubar) or launch a program (like a launchbar) or perform an
	operation (like a toolbar).  Each button can have an icon, text, or
	both.  And you can have buttons left- or right-justified in the
	buttonbar.  You will eventually be able to have an arbitrary number
	of buttonbars, but I'm still working on that.

	As with any change this big, things could very easily be broken.  So
	beware. :-)  I have tested this myself, and everything seems to work,
	but I can't test every possibility.  Let me know if you find anything
	that's broken, and enjoy!


SVN revision: 2048
eterm-0.10
Michael Jennings 23 years ago
parent 9a0e0ce8fc
commit 42fde9c99d
  1. 77
      ChangeLog
  2. 2
      acconfig.h
  3. 112
      configure.in
  4. 170
      doc/Eterm.tcap
  5. 266
      doc/Eterm.ti
  6. 5
      doc/Makefile.am
  7. 8
      libmej/mem.h
  8. 2
      libmej/strings.c
  9. 3
      pix/Makefile.am
  10. BIN
      pix/exit.png
  11. BIN
      pix/help.png
  12. BIN
      pix/thumb_1.png
  13. BIN
      pix/thumb_2.png
  14. 15
      src/Makefile.am
  15. 781
      src/buttons.c
  16. 129
      src/buttons.h
  17. 65
      src/command.c
  18. 7
      src/command.h
  19. 45
      src/debug.h
  20. 16
      src/e.c
  21. 88
      src/events.c
  22. 2
      src/events.h
  23. 2
      src/feature.h
  24. 22
      src/font.c
  25. 189
      src/menus.c
  26. 8
      src/menus.h
  27. 8
      src/misc.c
  28. 1305
      src/options.c
  29. 245
      src/options.h
  30. 851
      src/pixmap.c
  31. 36
      src/pixmap.h
  32. 166
      src/screen.c
  33. 7
      src/screen.h
  34. 98
      src/scrollbar.c
  35. 2
      src/scrollbar.h
  36. 32
      src/startup.c
  37. 116
      src/startup.h
  38. 10
      src/system.c
  39. 225
      src/term.c
  40. 8
      src/term.h
  41. 349
      src/windows.c
  42. 4
      src/windows.h
  43. 31
      themes/Eterm/menus.cfg
  44. 95
      themes/Eterm/theme.cfg.in
  45. 6
      themes/auto/menus.cfg
  46. 95
      themes/auto/theme.cfg.in
  47. 31
      themes/cEterm/menus.cfg
  48. 95
      themes/cEterm/theme.cfg.in
  49. 19
      themes/chooser/menus.cfg
  50. 96
      themes/chooser/theme.cfg.in
  51. 27
      themes/emacs/menus.cfg
  52. 97
      themes/emacs/theme.cfg.in
  53. 31
      themes/irc/menus.cfg
  54. 97
      themes/irc/theme.cfg.in
  55. 15
      themes/mutt/menus.cfg
  56. 141
      themes/mutt/theme.cfg.in
  57. 31
      themes/trans/menus.cfg
  58. 95
      themes/trans/theme.cfg.in
  59. 1
      utils/.cvsignore
  60. 30
      utils/Etsearch
  61. 5
      utils/Makefile.am
  62. 107
      utils/kEsetroot.in

@ -3084,3 +3084,80 @@ Fri Jan 21 18:40:13 PST 2000 Michael Jennings <mej@eterm.org>
updated it.
-------------------------------------------------------------------------------
Thu Feb 10 15:10:01 PST 2000 Michael Jennings <mej@eterm.org>
This is the first public availability of the work thus far on Eterm
0.9.1. There's quite a bit of new stuff here.
* Added scrollbar thumb support.
* Completely redid the terminfo/termcap stuff. The terminfo file is
now compiled (by tic) and installed by default (unless you specify
--without-terminfo). The config files still say xterm, though,
because some programs (like SLang and GNU mc) use the silly algorithm
of "Is $TERM set to xterm?" to detect mouse reporting support in a
terminal. =P But if you don't ever use xterm, you can use Eterm's
termcap and just name it "xterm" instead. Thanks to Marius Gedminas
<mgedmin@takas.lt> for his patch that started this whole revamp.
* Added the kEsetroot script for KDE users from Dax Games
<dgames@isoc.net>.
* You can now configure the Home and End emulation via --with-home=
and --with-end= options to configure. The --with-terminfo option is
also new, and --enable-xim is now the default.
* Added a new image state, disabled, for when Eterm loses focus. This
is supported by all widgets (well, all those that could possibly be
on screen when Eterm lost focus), even the background image. So you
could actually have all your images darken on focus out and restore
to normal on focus in.
* Widget colors formerly dealt with as colors (menu text color,
scrollbar color, etc.) are now handled by the imageclasses. Each
image state can have a foreground and background color defined. The
current exception is the background image; I hope to add that later.
The foreground is the text color and the background is the object
color (for solid color mode). So menu text color is set by the menu
imageclass. And again, for unfocused colors, use the disabled state
of the imageclass.
* Proportionally-spaced fonts are now handled much better. They are
still forced into evenly-spaced columns (it's a terminal for crying
out loud!) but at least you don't end up with Eterm's wider than your
screen. :-)
* Home on refresh is gone, as is home on echo. It's now much simpler.
There are two options: home on output, and home on input, the former
being a combination of echo and refresh. Also, keypresses that don't
necessarily have corresonding output can trigger a home on input,
like Ctrl-End or whatever...ones that don't have special meaning.
Credit to Darren Stuart Embry <dse@louisville.edu> for pointing out
this issue and the one with "m-" in font names.
* I finally got around to re-merging the new parser stuff from my
work on the Not Game. Closed up some old potential behavior quirks
with theme parsing.
* Added a new escape sequence to fork-and-exec a program. Also added
a scrollback search capability to highlight all occurances of a string
in your scrollback buffer. Use the new "Etsearch" utility to access
it. "Etsearch string" to search for a string, then "Etsearch" by
itself to reset the highlighting.
* And of course, the biggie. Eterm now supports a completely-
customizeable buttonbar. Not a menubar, a buttonbar. It can have an
arbitrary number of buttons, and each button can perform an action,
just like a menuitem. So a button could bring up a menu (like a
menubar) or launch a program (like a launchbar) or perform an
operation (like a toolbar). Each button can have an icon, text, or
both. And you can have buttons left- or right-justified in the
buttonbar. You will eventually be able to have an arbitrary number
of buttonbars, but I'm still working on that.
As with any change this big, things could very easily be broken. So
beware. :-) I have tested this myself, and everything seems to work,
but I can't test every possibility. Let me know if you find anything
that's broken, and enjoy!
-------------------------------------------------------------------------------

@ -326,6 +326,8 @@
#undef HAVE_UTEMPTER
#undef PTY_GRP_NAME
#undef ENABLE_PROFILE
#undef KS_HOME
#undef KS_END
/* Leave that blank line there!! Autoheader needs it.

@ -1,7 +1,7 @@
dnl# $Id$
AC_INIT(src/feature.h)
AM_INIT_AUTOMAKE(Eterm, 0.9)
AM_INIT_AUTOMAKE(Eterm, 0.9.1)
dnl# Set some basic variables
DATE="`date '+%d %B %Y'`"
@ -104,10 +104,15 @@ AC_CHECK_PROG(MKDIR, mkdir, mkdir, false)
AC_CHECK_PROG(CTAGS, ctags, ctags, true)
AC_CHECK_PROG(AR, ar, ar, false)
AC_CHECK_PROG(MV, mv, mv, true)
AC_CHECK_PROG(TIC, tic, tic, true)
AC_LN_S
AC_PATH_PROG(PERL, perl, /usr/bin/perl, $PATH:/usr/bin:/bin:/usr/local/bin:/usr/ccs/bin:/usr/contrib/bin)
AC_PATH_PROG(AWK, awk, /usr/bin/awk, $PATH:/usr/bin:/bin:/usr/local/bin:/usr/ccs/bin:/usr/contrib/bin)
export PERL AWK
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(void *, 4)
AC_CHECK_SIZEOF(long long, 8)
dnl AC_C_BIGENDIAN
@ -355,6 +360,36 @@ AC_ARG_WITH(delete,
fi, AC_MSG_RESULT(default)
AC_DEFINE_UNQUOTED(KS_DELETE, "\177")
)
XTERM_HOME="\033\133H"
LINUX_HOME="\033\1331~"
AC_MSG_CHECKING(for home key configuration)
AC_ARG_WITH(home,
[ --with-home=SEQUENCE specify which sequence to use for the Home key ("xterm", "linux", or "vt102")],
if test "$withval" = "xterm"; then
AC_MSG_RESULT(emulate xterm)
AC_DEFINE_UNQUOTED(KS_HOME, "$XTERM_HOME")
elif test "$withval" = "linux"; then
AC_MSG_RESULT(emulate linux console/vt220)
AC_DEFINE_UNQUOTED(KS_HOME, "$LINUX_HOME")
else
AC_MSG_RESULT(default vt102)
fi, AC_MSG_RESULT(default)
)
XTERM_END="\033\133F"
LINUX_END="\033\1334~"
AC_MSG_CHECKING(for end key configuration)
AC_ARG_WITH(end,
[ --with-end=SEQUENCE specify which sequence to use for the End key ("xterm", "linux", or "vt102")],
if test "$withval" = "xterm"; then
AC_MSG_RESULT(emulate xterm)
AC_DEFINE_UNQUOTED(KS_END, "$XTERM_END")
elif test "$withval" = "linux"; then
AC_MSG_RESULT(emulate linux console/vt220)
AC_DEFINE_UNQUOTED(KS_END, "$LINUX_END")
else
AC_MSG_RESULT(default vt102)
fi, AC_MSG_RESULT(default)
)
MULTICHAR_ENCODING=""
AC_MSG_CHECKING(for multi-charset support)
AC_ARG_ENABLE(multi-charset,
@ -441,6 +476,7 @@ AC_SUBST(FONT1)
AC_SUBST(FONT2)
AC_SUBST(FONT3)
AC_SUBST(FONT4)
export FONT0 FONT1 FONT2 FONT3 FONT4 DEF_FONT_IDX
AC_DEFINE_UNQUOTED(MULTICHAR_ENCODING, "$MULTICHAR_ENCODING")
AC_DEFINE_UNQUOTED(MFONT0, "$MFONT0")
@ -454,18 +490,21 @@ AC_SUBST(MFONT1)
AC_SUBST(MFONT2)
AC_SUBST(MFONT3)
AC_SUBST(MFONT4)
export MFONT0 MFONT1 MFONT2 MFONT3 MFONT4 MULTICHAR_ENCODING
AC_MSG_CHECKING(for XIM support)
AC_ARG_ENABLE(xim,
[ --enable-xim compile with XIM support],
if test "$enableval" = "yes"; then
[ --enable-xim compile with XIM support (default)],
if test "$enableval" = "no"; then
AC_MSG_RESULT(no)
XIM="FALSE"
else
AC_MSG_RESULT(yes)
AC_DEFINE(USE_XIM)
XIM="TRUE"
else
AC_MSG_RESULT(no)
XIM="FALSE"
fi, AC_MSG_RESULT(no)
fi, AC_MSG_RESULT(yes)
AC_DEFINE(USE_XIM)
XIM="TRUE"
)
AC_MSG_CHECKING(for Greek keyboard support)
AC_ARG_ENABLE(greek,
@ -477,6 +516,13 @@ AC_ARG_ENABLE(greek,
AC_MSG_RESULT(no)
fi, AC_MSG_RESULT(no)
)
AC_ARG_WITH(terminfo,
[ --without-terminfo do not compile the Eterm terminfo file],
if test "$withval" = "yes"; then
:
else
TIC=true
fi)
AC_ARG_WITH(theme-update,
[ --with-theme-update existing themes will be forceably removed and new ones installed],
if test "$withval" = "yes"; then
@ -595,9 +641,6 @@ if test "$prefix" = "NONE"; then
prefix=$ac_default_prefix
fi
PKGDATADIR=`eval echo "${datadir}/$PACKAGE"`
AC_SUBST(PKGDATADIR)
dnl Stack Tracing toys
AC_ARG_ENABLE(stack-trace, [ --disable-stack-trace disable stack trace on abnormal termination],
if test "$enableval" = "no"; then
@ -668,24 +711,37 @@ basedir=.
AM_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile \
bg/Makefile \
doc/Makefile \
utils/Makefile \
libmej/Makefile \
pix/Makefile \
src/Makefile \
themes/Makefile \
Eterm.spec \
themes/Eterm/theme.cfg
themes/auto/theme.cfg
themes/cEterm/theme.cfg
themes/chooser/theme.cfg
themes/emacs/theme.cfg
themes/irc/theme.cfg
themes/mutt/theme.cfg
themes/trans/theme.cfg
)
AC_OUTPUT(Makefile bg/Makefile doc/Makefile utils/Makefile libmej/Makefile
pix/Makefile src/Makefile themes/Makefile Eterm.spec)
# Do replacements on theme files and such. All variables to be replaced
# by this routine MUST be exported before the awk script runs.
if test "X$PKGDATADIR" = "X" ; then
PKGDATADIR=`eval eval eval eval echo "$datadir/$PACKAGE"`
fi
export PKGDATADIR
# Mega evals to make sure all the relative variables get resolved.
BINDIR=`eval eval eval eval echo ${bindir}`
export BINDIR bindir prefix exec_prefix datadir PACKAGE
changequote(%&, &%)dnl
%&
for i in utils/kEsetroot themes/Eterm/theme.cfg themes/auto/theme.cfg themes/cEterm/theme.cfg \
themes/chooser/theme.cfg themes/emacs/theme.cfg themes/irc/theme.cfg themes/mutt/theme.cfg \
themes/trans/theme.cfg ; do
echo creating $i
$AWK '{if (match($0,/@[A-Za-z0-9_]*@/)) {
i=ENVIRON[substr($0,RSTART+1,RLENGTH-2)];
outp=$0;
gsub(/@[A-Za-z0-9_]*@/,i,outp);
print outp;
} else {
print $0;
}
}' $i.in > $i
done
&%
changequote([, ])dnl
dnl If we're not building with Imlib support, don't build Esetroot
if test -z "$GRLIBS"; then

@ -1,44 +1,130 @@
# termcap for rxvt (and xterm) -- (modified from the Midnight Commander)
#
# From: Jakub Jelinek <jj@jfch.vc.cvut.cz> 1 Sep 1995
# This is a checked termcap entry for the xterm terminal emulator.
# It is compatible with the enclosed terminfo entry.
# Install this by cutting off the old xterm entry from /etc/termcap
# and replacing that place it with this file.
# Heavily based on xterm from:
# Eric S. Raymond <esr@snark.thyrsus.com> 30 Mar 1995
# Note: If you use the line-drawing character set, the disable afterwards
# will leave you in US-ASCII. If you live somewhere that wants a pound sign
# at 2/3, change rmacs to "\E(A". Further note: cuf and cub don't seem
# to be reliable under my xterm, so they're commented out.
#-------------------------------------------------------------------------
# termcap for Eterm. Needs to be downsized to fit in < 1023 bytes.
# Generated by infocmp -C -r -sc -T <term>
Eterm-base|Eterm basic terminal capabilities:\
:5i:am:bw:eo:km:mi:ms:ut:xn:xo:\
:co#80:it#8:li#24:\
:#2=\E[7$:#4=\E[d:%1=\E[28~:%c=\E[6$:%e=\E[5$:%i=\E[c:\
:*4=\E[3$:*6=\E[4~:*7=\E[8$:@0=\E[1~:@1=\EOu:@7=\E[8~:\
:@8=\EOM:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:\
:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\
:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
:IC=\E[%d@:K1=\E[7~:K2=\EOu:K3=\E[5~:K4=\E[8~:K5=\E[6~:\
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
:ae=^O:al=\E[L:as=^N:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:\
:ch=\E[%i%dG:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:\
:cs=\E[%i%d;%dr:ct=\E[3g:cv=\E[%i%dd:dc=\E[P:dl=\E[M:\
:do=\E[B:eA=\E)0:ec=\E[%dX:ei=\E[4l:ho=\E[H:\
:i1=\E[?47l\E>\E[?1l:ic=\E[@:im=\E[4h:\
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=:kh=\E[7~:\
:kl=\E[D:kr=\E[C:ks=:ku=\E[A:le=^H:mb=\E[5m:md=\E[1m:\
:me=\E[m\017:mr=\E[7m:nd=\E[C:pf=\E[4i:po=\E[5i:\
:r2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>:\
:rc=\E8:\
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
:sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:u7=\E[6n:u8=\E[?1;2c:\
:u9=\E[c:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\
:ve=\E[?25h:vi=\E[?25l:vs=\E[?25h:
xterm|vs100|xterm terminal emulator (X11R6 Window System):\
:am:bs:km:mi:ms:pt:xn:xo:co#80:li#24:it#8:\
:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\
:IC=\E[%d@:LE=\E[%dD:UP=\E[%dA:\
:ac=++\054\054..00II--``aaffgghhjjkkllmmnnooqqssttuuvvwwxx~~:\
:ae=\E(B:al=\E[L:as=\E(0:bl=^G:cd=\E[J:ce=\E[K:\
:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:\
:ct=\E[3k:dc=\E[P:dl=\E[M:ei=\E[4l:ho=\E[H:\
:ic=\E[@:im=\E[4h:\
Eterm|Eterm-color|eterm|Eterm with xterm-style color support (X Window System):\
:5i:am:bw:eo:km:mi:ms:ut:xn:xo:\
:Co#8:co#80:it#8:li#24:pa#64:\
:#2=\E[7$:#4=\E[d:%1=\E[28~:%c=\E[6$:%e=\E[5$:%i=\E[c:\
:*4=\E[3$:*6=\E[4~:*7=\E[8$:@0=\E[1~:@1=\EOu:@7=\E[8~:\
:@8=\EOM:AB=\E[%p1%{40}%+%dm:AF=\E[%p1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=\E[1m:me=\E[m:mr=\E[7m:\
:r2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<:\
:rc=\E8:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:ta=^I:\
:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:u6=\E[%d;%dR:\
:u7=\E[6n:u8=\E[?1;2c:u9=\E[c:ue=\E[m:\
:us=\E[4m:
xterm-color|color-xterm|xterm with color support:\
:tc=xterm:tc=ansi-pc-color:
:k0=\E[21~:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:\
:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\
:k;=\E[21~:kB=\E[Z:kD=\E[3~:\
:kE=\E[8\014rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H:\
:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\E[B:ke=:kh=\E[7~:\
:kl=\E[D:kr=\E[C:ks=:ku=\E[A:le=^H:mb=\E[5m:md=\E[1m:\
:me=\E[m\017:mr=\E[7m:nd=\E[C:op=\E[39;49m:pf=\E[4i:\
:po=\E[5i:\
:r2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>:\
:rc=\E8:\
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
:sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:u7=\E[6n:u8=\E[?1;2c:\
:u9=\E[c:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\
:ve=\E[?25h:vi=\E[?25l:vs=\E[?25h:

@ -1,147 +1,153 @@
#-------------------------------------------------------------------------
# terminfo for Eterm (and xterm) -- [modified from the Midnight Commander]
#
# Install using `tic Eterm.ti', to be used with the enclosed termcap
#-------------------------------------------------------------------------
xterm-basic|xterm terminal base (X Window System),
am, km, mir, msgr, xenl, xon, cols#80, lines#24, it#8,
# Not sure about eo (Erase overstrike with a blank)
eo,
cr=\r, bel=^G,
# Scroll text up, down
ind=\n, ri=\EM,
# Eterm terminfo file
# Clear Screen, EOS, EOL, BOL
clear=\E[H\E[2J, ed=\E[J, el=\E[K, el1=\E[1K,
# Change Scroll Region
csr=\E[%i%p1%d;%p2%dr,
Eterm-base|Eterm basic terminal capabilities,
# FIXME: xterm does not specify bce, bw, eo, or xon. Should we?
am, bw, bce, km, mir, msgr, xenl, xon, eo, mc5i,
cols#80, lines#24, it#8, lm#0, btns#5,
cr=\r, bel=^G,
# Cursor Position
cup=\E[%i%p1%d;%p2%dH,
# Scroll text down/up one line
ind=\n, ri=\eM,
# Horizontal & Vertical Position Absolute
hpa=\E[%i%p1%dG, vpa=\E[%i%p1%dd,
# Clear entire screen (home, then clear to EOS), EOS, EOL, BOL
clear=\e[H\e[2J, ed=\e[J, el=\e[K, el1=\e[1K,
# Cursor Up/Down/Forward/Backward: any, 1 char
cuu=\E[%p1%dA, cud=\E[%p1%dB, cuf=\E[%p1%dC, cub=\E[%p1%dD,
cuu1=\E[A, cud1=\E[B, cuf1=\E[C, cub1=\b,
# Change scrolling region to lines $1+1 to $2+1
# %i means add one to params 1 and 2; convert from 0-based to
# 1-based counting.
csr=\e[%i%p1%d;%p2%dr,
# Misc cursor motion
home=\E[1;1H,
# Move cursor to row $1+1, column $2+1. Can end with H or f
cup=\e[%i%p1%d;%p2%dH,
# Move cursor to column n, same row; or row n, same column
hpa=\e[%i%p1%dG, vpa=\e[%i%p1%dd,
# Move cursor up/down/forward/back by n chars
cuu=\e[%p1%dA, cud=\e[%p1%dB, cuf=\e[%p1%dC, cub=\e[%p1%dD,
# Move cursor up/down/forward/back by 1 char
cuu1=\e[A, cud1=\e[B, cuf1=\e[C, cub1=\b,
# Home cursor (row 1, col 1). Was \e[1;1H but 1's are redundant
home=\e[H,
# Enter insert mode, leave insert mode
smir=\E[4h, rmir=\E[4l,
# Enter/leave insert mode
smir=\e[4h, rmir=\e[4l,
# Set tab stops, clear tab stops, tab character
hts=\EH, tbc=\E[3g, ht=\t,
hts=\eH, tbc=\e[3g, ht=\t,
# Make cursor invisible, normal, bold
civis=\E[?25l, cnorm=\E[?25h, cvvis=\E[?25h,
# Turn on/off auto margins
smam=\e[?7h, rmam=\e[?7l,
# Make cursor invisible, normal, bold (not supported)
civis=\e[?25l, cnorm=\e[?25h, cvvis=\e[?25h,
# Save/restore cursor position
sc=\e7, rc=\e8,
# Save/Restore Cursor position
sc=\E7, rc=\E8,
# Alternate Char Set (line drawing), enable/enter/exit ACS
# Alternate character set (line drawing), enable/enter/exit ACS
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
enacs=\E(B\E)0, smacs=\E(B\E)U^N, rmacs=\E(B\E)0^O,
#-- begin AIX 3.2.5 hack
# acsc (box2 is the standard AIX form, box1 has been changed to work!)
# box1=llqqkkxxjjmmwwuuvvttnn,
# box2=lqkxjmwuvtn,
# font0=\E(B, font1=\E(0,
# position occupied by kend
# colf7=\E[8~,
#-- end AIX 3.2.5 hack
# Delete/Insert: Chars, Lines, 1-char, 1-line
dch=\E[%p1%dP, dl=\E[%p1%dM,
ich=\E[%p1%d@, il=\E[%p1%dL,
dch1=\E[P, dl1=\E[M,
ich1=\E[@, il1=\E[L,
# Erase Chars
ech=\E[%p1%dX,
# Enter/Leave Fonts: Bold, Reverse, Blink, Underline
# standout (enter/leave), Define attribs 1-9
bold=\E[1m, rev=\E[7m, blink=\E[5m,
smul=\E[4m, rmul=\E[24m, smso=\E[7m, rmso=\E[m,
# visual bell
flash=\E[?5h\E[?5l,
# Enter/leave keypad transmit, Cursor keys (sent by terminal). Don't touch
# cursor keys! use ANSI cursor keys rather than application cursor keys to
# avoid starting in application cursor mode when `$xterm&' is used and to
# enable the Eterm Shift/Ctrl cursor extensions.
smkx=\E=, rmkx=\E>,
kcuu1=\E[A, kcud1=\E[B, kcuf1=\E[C, kcub1=\E[D,
# Other nice keys
ka1=\EOw, ka3=\EOy, kb2=\EOu, kc1=\EOq, kc3=\EOs
enacs=\e)0, smacs=^N, rmacs=^O,
# Delete/insert n chars, 1 char
dch=\e[%p1%dP, ich=\e[%p1%d@, dch1=\e[P, ich1=\e[@,
# Delete/insert n lines, 1 line
dl=\e[%p1%dM, il=\e[%p1%dL, dl1=\e[M, il1=\e[L,
# Erase next n chars
ech=\e[%p1%dX,
# Activate SGR mode: bold, reverse video, blink (bright bg color)
bold=\e[1m, rev=\e[7m, blink=\e[5m,
# Start/stop underline, standout (reverse video)
smul=\e[4m, rmul=\e[24m, smso=\e[7m, rmso=\e[27m,
# Flash the screen (sets and resets reverse video for the whole screen)
flash=\e[?5h\e[?5l,
# Enter/leave application keypad mode. We always send the ANSI values
# because that seems to be the most portable solution. The valid escape
# sequences are here but are commented out for this reason. The 1st set
# is for keypad cursor keys, the second is for application cursor key
# mode. The third is what gets sent by default.
## smkx=\e=, rmkx=\e>,
smkx=, rmkx=,
## kcuu1=\e[Ox, kcud1=\e[Or, kcuf1=\e[Ov, kcub1=\e[Ot,
## kcuu1=\eOA, kcud1=\eOB, kcuf1=\eOC, kcub1=\eOD,
kcuu1=\e[A, kcud1=\e[B, kcuf1=\e[C, kcub1=\e[D,
# Keypad 7, 9, 5, 1, and 3. The 1st set are the appl. keypad mode
# sequences. The 2nd set are the values for Home/End/PgUp/PgDn.
# The 5 key is the same either way.
## ka1=\eOw, ka3=\eOy, kb2=\eOu, kc1=\eOq, kc3=\eOs,
ka1=\e[7~, ka3=\e[5~, kb2=\eOu, kc1=\e[8~, kc3=\e[6~,
# Function keys
kf0=\E[21~,
kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~,
kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kf10=\E[21~,
kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
kf18=\E[32~, kf19=\E[33~, kf20=\E[34~,
# Find, Insert, Delete, Select, Prior, Next
kfnd=\E[1~, kich1=\E[2~, kdch1=\E[3~, kslt=\E[4~, kpp=\E[5~, knp=\E[6~,
# Home (vt100 may use khome=\E[H), End, Backspace, Enter, Backtab
khome=\E[7~, kend=\E[8~, kbs=\177, kent=\EOM, kcbt=\E[Z,
# Shifted Right, Left, Delete, Prior, Next, Home, End, Ctrl-End
kRIT=\E[c, kLFT=\E[d,
kDC=\E[3$, kPRV=\E[5$, kNXT=\E[6$,
kHOM=\E[7$, kEND=\E[8$, kel=\E[8^,
kf1=\e[11~, kf2=\e[12~, kf3=\e[13~, kf4=\e[14~, kf5=\e[15~,
kf6=\e[17~, kf7=\e[18~, kf8=\e[19~, kf9=\e[20~, kf10=\e[21~,
kf11=\e[23~, kf12=\e[24~, kf13=\e[25~, kf14=\e[26~, kf15=\e[28~,
kf16=\e[29~, kf17=\e[31~, kf18=\e[32~, kf19=\e[33~, kf20=\e[34~,
# F0, same as F10
kf0=\e[21~,
# Find, Insert, Delete, Select, Prior (PgUp), Next (PgDn). The first set of
# sequences are accurate. The second set lets Find/Select act like Home/End.
kfnd=\e[1~, kich1=\e[2~, kdch1=\e[3~, kslt=\e[4~, kpp=\e[5~, knp=\e[6~,
## kfnd=\e[7~, kich1=\e[2~, kdch1=\e[3~, kslt=\e[8~, kpp=\e[5~, knp=\e[6~,
# Home (vt100 may use khome=\e[H), End, Backspace, Keypad Enter, Shift-Tab
# The 1st set is the default. The 2nd set is based on Linux console/vt220
# settings for Home/End and Backspace sending Delete (^?). The 3rd set gives
# xterm's settings for Home/End.
khome=\e[7~, kend=\e[8~, kbs=\010, kent=\eOM, kcbt=\e[Z,
## khome=\e[1~, kend=\e[4~, kbs=\177, kent=\eOM, kcbt=\e[Z,
## khome=\e[H, kend=\e[F, kbs=\010, kent=\eOM, kcbt=\e[Z,
# Help and Begin keys
khlp=\e[28~, kbeg=\eOu,
# "Shifted" right and left (actually Ctrl, not Shift)
kRIT=\e[c, kLFT=\e[d,
# Shift-Prior/Next (PgUp/PgDn). Usually, these key combos scroll.
kPRV=\e[5$, kNXT=\e[6$,
# Shift-Delete/Home/End and Ctrl-End. It's a $ instead of a ~ for
# Shift-, a ^ for Ctrl-, and @ for Ctrl-Shift-.
kDC=\e[3$, kHOM=\e[7$, kEND=\e[8$, kel=\e[8^,
# Reset terminal, turn off all attributes
rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>,
# dec.ti
# rs2=@,
rs1=\e>\e[1;3;4;5;6l\e[?7h\e[m\e[r\e[2J\e[H,
rs2=\e[r\e[m\e[2J\e[H\e[?7h\e[?1;3;4;6l\e[4l\e>,
# Init terminal
is1=\E[?47l\E=\E[?1l,
is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l,
# Leave/Enter CA-Mode.
smcup=\E7\E[?47h, rmcup=\E[?47l\E8,
# dec.ti
# smcup=\E[?7h\E[?1l\E(B\E=, rmcup=\E[?7h,
# turn on/off the printer
# mc5=\E[5i, mc4=\E[4i,
mc4=\E[4i,
#
# XTerm with color support.
#
xterm|vs100|xterm terminal emulator (X Window System),
use=xterm-basic,
# sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m,
sgr0=\E[m^O,
# from dec.ti
# sgr0=\E[m\E(B,
# sgr0=\E[m,
# sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;,
xterm-color|color-xterm|Eterm|eterm|color xterm terminal emulator (X Window System),
use=xterm, colors#8, pairs#64,
# Set all color pairs to the original ones
# op=\E[0m,
op=\E[39;49m,
is1=\e[?47l\e>\e[?1l,
is2=\e[r\e[m\e[2J\e[H\e[?7h\e[?1;3;4;6l\e[4l,
# Enter/leave cursor address mode. The 1st set uses the
# secondary screen. The 2nd one doesn't.
smcup=\e7\e[?47h, rmcup=\e[2J\e[?47l\e8,
## smcup=\e7, rmcup=\e8,
# Start/stop redirection to the printpipe
mc4=\e[4i, mc5=\e[5i,
# User-defined string capabilities
# Report current screen position
u7=\e[6n,
# vt100 answerback
u8=\e[?1;2c,
# Request identity (replies with u8)
u9=\e[c,
###### Add ANSI color support
Eterm-ansi|Eterm with ANSI color (X Window System),
use=Eterm-base,
sgr=\e[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
## sgr=\e[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m,
sgr0=\e[m^O,
###### Add mouse reporting
Eterm-mouse|Eterm with X11 mouse reporting,
use=Eterm-ansi,
# Mouse info packet introducer
kmous=\e[M,
###### Add xterm-style color sequences.
Eterm|Eterm-color|eterm|Eterm with xterm-style color support (X Window System),
use=Eterm-mouse, colors#8, pairs#64,
# Revert to the original foreground/background pair
op=\e[39;49m,
# Set foreground color, background color
setf=\E[%p1%{30}%+%dm, setb=\E[%p1%{40}%+%dm,
#--------------------------------------------------------------------- eof
setaf=\e[%p1%{30}%+%dm, setab=\e[%p1%{40}%+%dm,

@ -2,7 +2,7 @@
man_MANS = Eterm.1
all: Makefile Eterm.1.html
all: Makefile Eterm.1.html terminfo
Eterm.1: $(top_srcdir)/doc/Eterm.1.in
$(SED) -e 's%@''VERSION''@%$(VERSION)%g' -e 's%@''DATE''@%$(DATE)%g' -e 's%@THEMEDIR@%$(pkgdatadir)/themes%g' $(top_srcdir)/doc/$@.in > $@
@ -10,5 +10,8 @@ Eterm.1: $(top_srcdir)/doc/Eterm.1.in
Eterm.1.html: Eterm.1
-nroff -man $< | man2html -title Eterm > $@
terminfo: Eterm.ti
-$(TIC) Eterm.ti
EXTRA_DIST = Eterm.1.in Eterm_reference.html Eterm.tcap Eterm.ti Makefile.am Makefile.in

@ -42,12 +42,12 @@ typedef struct memrec_struct {
# define MALLOC(sz) malloc(sz)
# define CALLOC(type,n) calloc((n),(sizeof(type)))
# define REALLOC(mem,sz) realloc((mem), (sz))
# define FREE(ptr) do { free(ptr); ptr = NULL; } while (0)
# define FREE(ptr) do { free(ptr); (ptr) = NULL; } while (0)
#elif (DEBUG >= DEBUG_MALLOC)
# define MALLOC(sz) Malloc(__FILE__, __LINE__, sz)
# define MALLOC(sz) Malloc(__FILE__, __LINE__, (sz))
# define CALLOC(type,n) Calloc(__FILE__, __LINE__, (n),(sizeof(type)))
# define REALLOC(mem,sz) Realloc(#mem, __FILE__, __LINE__, (mem),(sz))
# define FREE(ptr) do { Free(#ptr, __FILE__, __LINE__, ptr); ptr = NULL; } while (0)
# define FREE(ptr) do { Free(#ptr, __FILE__, __LINE__, (ptr)); (ptr) = NULL; } while (0)
# define MALLOC_MOD 25
# define REALLOC_MOD 25
# define CALLOC_MOD 25
@ -56,7 +56,7 @@ typedef struct memrec_struct {
# define MALLOC(sz) malloc(sz)
# define CALLOC(type,n) calloc((n),(sizeof(type)))
# define REALLOC(mem,sz) ((sz) ? ((mem) ? (realloc((mem), (sz))) : (malloc(sz))) : ((mem) ? (free(mem)) : (NULL)))
# define FREE(ptr) do { free(ptr); ptr = NULL; } while (0)
# define FREE(ptr) do { free(ptr); (ptr) = NULL; } while (0)
#endif
extern char *SafeStr(char *, unsigned short);

@ -83,7 +83,7 @@ usleep(unsigned long usec)
/***** Not needed ******
#ifndef HAVE_NANOSLEEP
inline void
__inline__ void
nanosleep(unsigned long nsec) {
usleep(nsec / 1000);
}

@ -2,7 +2,8 @@
EXTRA_DIST = bar_horizontal_1.png bar_horizontal_2.png bar_horizontal_3.png bar_vertical_1.png bar_vertical_2.png \
bar_vertical_3.png button_arrow_down_1.png button_arrow_down_2.png button_arrow_down_3.png \
button_arrow_up_1.png button_arrow_up_2.png button_arrow_up_3.png menu1.png menu2.png menu3.png
button_arrow_up_1.png button_arrow_up_2.png button_arrow_up_3.png menu1.png menu2.png menu3.png \
thumb_1.png thumb_2.png help.png exit.png
pixmapdir = $(pkgdatadir)/pix

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -2,13 +2,14 @@
lib_LTLIBRARIES = libEterm.la
libEterm_la_SOURCES = actions.c actions.h command.c command.h debug.h draw.c \
draw.h e.c e.h eterm_utmp.h events.c events.h feature.h \
font.c font.h grkelot.c grkelot.h icon.h menus.c menus.h \
misc.c misc.h netdisp.c options.c options.h pixmap.c \
pixmap.h profile.h screen.c screen.h scrollbar.c \
scrollbar.h startup.c startup.h system.c system.h term.c \
term.h timer.c timer.h utmp.c windows.c windows.h
libEterm_la_SOURCES = actions.c actions.h buttons.c buttons.h command.c \
command.h debug.h draw.c draw.h e.c e.h eterm_utmp.h \
events.c events.h feature.h font.c font.h grkelot.c \
grkelot.h icon.h menus.c menus.h misc.c misc.h netdisp.c \
options.c options.h pixmap.c pixmap.h profile.h screen.c \
screen.h scrollbar.c scrollbar.h startup.c startup.h \
system.c system.h term.c term.h timer.c timer.h utmp.c \
windows.c windows.h
libEterm_la_DEPENDENCIES = $(top_builddir)/libmej/libmej.la feature.h
libEterm_la_LDFLAGS = -release $(VERSION)

@ -0,0 +1,781 @@
/*
* Copyright (C) 1997-2000, Michael Jennings
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies of the Software, its documentation and marketing & publicity
* materials, and acknowledgment shall be given in the documentation, materials
* and software packages that this Software was used.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
static const char cvs_ident[] = "$Id$";
#include "config.h"
#include "feature.h"
#include <X11/cursorfont.h>
#include "../libmej/debug.h"
#include "../libmej/mem.h"
#include "../libmej/strings.h"
#include "buttons.h"
#include "command.h"
#include "draw.h"
#include "e.h"
#include "events.h"
#include "font.h"
#include "startup.h"
#include "menus.h"
#include "misc.h"
#include "options.h"
#include "pixmap.h"
#include "screen.h"
#include "term.h"
#include "windows.h"
static __inline__ void draw_string(buttonbar_t *, Drawable, GC, int, int, char *, size_t);
buttonbar_t *buttonbar = NULL;
long bbar_total_h = -1;
static __inline__ void
draw_string(buttonbar_t *bbar, Drawable d, GC gc, int x, int y, char *str, size_t len)
{
D_BBAR(("Writing string \"%s\" (length %lu) onto drawable 0x%08x at %d, %d\n", str, len, d, x, y));
#ifdef MULTI_CHARSET
if (bbar->fontset)
XmbDrawString(Xdisplay, d, bbar->fontset, gc, x, y, str, len);
else
#endif
XDrawString(Xdisplay, d, gc, x, y, str, len);
return;
bbar = NULL;
}
buttonbar_t *
bbar_create(void)
{
buttonbar_t *bbar;
Cursor cursor;
long mask;
XGCValues gcvalue;
XSetWindowAttributes xattr;
bbar = (buttonbar_t *) MALLOC(sizeof(buttonbar_t));
MEMSET(bbar, 0, sizeof(buttonbar_t));
xattr.border_pixel = BlackPixel(Xdisplay, Xscreen);
xattr.save_under = FALSE;
xattr.backing_store = NotUseful;
xattr.override_redirect = TRUE;
xattr.colormap = cmap;
cursor = XCreateFontCursor(Xdisplay, XC_left_ptr);
mask = EnterWindowMask | LeaveWindowMask | PointerMotionMask | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
gcvalue.foreground = xattr.border_pixel;
bbar->font = load_font(etfonts[def_font_idx], "fixed", FONT_TYPE_X);
bbar->fwidth = bbar->font->max_bounds.width;
bbar->fheight = bbar->font->ascent + bbar->font->descent + rs_line_space;
bbar->h = 1;
bbar->w = 1;
gcvalue.font = bbar->font->fid;
bbar->win = XCreateWindow(Xdisplay, Xroot, bbar->x, bbar->y, bbar->w, bbar->h, 0, Xdepth, InputOutput, CopyFromParent,
CWOverrideRedirect | CWSaveUnder | CWBackingStore | CWBorderPixel | CWColormap, &xattr);
XDefineCursor(Xdisplay, bbar->win, cursor);
XSelectInput(Xdisplay, bbar->win, mask);
XStoreName(Xdisplay, bbar->win, "Eterm Button Bar");
bbar->gc = XCreateGC(Xdisplay, bbar->win, GCForeground | GCFont, &gcvalue);
bbar_set_docked(bbar, BBAR_DOCKED_TOP);
return bbar;
}
void
bbar_init(buttonbar_t *bbar, int width)
{
event_register_dispatcher(bbar_dispatch_event, bbar_event_init_dispatcher);
XSetForeground(Xdisplay, bbar->gc, images[image_bbar].norm->fg);
bbar_resize(bbar, width);
bbar_reset_total_height();
bbar_calc_total_height();
}
void
bbar_event_init_dispatcher(void)
{
/* FIXME: The event subsystem needs to be able to pass a pointer to the event data structure. */
EVENT_DATA_ADD_HANDLER(buttonbar->event_data, EnterNotify, bbar_handle_enter_notify);
EVENT_DATA_ADD_HANDLER(buttonbar->event_data, LeaveNotify, bbar_handle_leave_notify);
EVENT_DATA_ADD_HANDLER(buttonbar->event_data, ButtonPress, bbar_handle_button_press);
EVENT_DATA_ADD_HANDLER(buttonbar->event_data, ButtonRelease, bbar_handle_button_release);
EVENT_DATA_ADD_HANDLER(buttonbar->event_data, MotionNotify, bbar_handle_motion_notify);
event_data_add_mywin(&buttonbar->event_data, buttonbar->win);
}
unsigned char
bbar_handle_enter_notify(event_t * ev)
{
button_t *b;
Window unused_root, unused_child;
int unused_root_x, unused_root_y;
unsigned int unused_mask;
D_EVENTS(("bbar_handle_enter_notify(ev [%8p] on window 0x%08x)\n", ev, ev->xany.window));
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &buttonbar->event_data), 0);
bbar_draw(buttonbar, IMAGE_STATE_SELECTED, 0);
XQueryPointer(Xdisplay, buttonbar->win, &unused_root, &unused_child, &unused_root_x, &unused_root_y, &(ev->xbutton.x), &(ev->xbutton.y), &unused_mask);
b = find_button_by_coords(buttonbar, ev->xbutton.x, ev->xbutton.y);
if (b) {
bbar_select_button(buttonbar, b);
}
return 1;
}
unsigned char
bbar_handle_leave_notify(event_t * ev)
{
D_EVENTS(("bbar_handle_leave_notify(ev [%8p] on window 0x%08x)\n", ev, ev->xany.window));
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &buttonbar->event_data), 0);
bbar_draw(buttonbar, IMAGE_STATE_NORMAL, 0);
if (buttonbar->current) {
bbar_deselect_button(buttonbar, buttonbar->current);
}
return 1;
}
unsigned char
bbar_handle_button_press(event_t * ev)
{
D_EVENTS(("bbar_handle_button_press(ev [%8p] on window 0x%08x)\n", ev, ev->xany.window));
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &buttonbar->event_data), 0);
if (buttonbar->current) {
bbar_click_button(buttonbar, buttonbar->current);
button_check_action(buttonbar, buttonbar->current, 1, ev->xbutton.time);
}
return 1;
}
unsigned char
bbar_handle_button_release(event_t * ev)
{
button_t *b;
Window unused_root, unused_child;
int unused_root_x, unused_root_y;
unsigned int unused_mask;
D_EVENTS(("bbar_handle_button_release(ev [%8p] on window 0x%08x)\n", ev, ev->xany.window));
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &buttonbar->event_data), 0);
XQueryPointer(Xdisplay, buttonbar->win, &unused_root, &unused_child, &unused_root_x, &unused_root_y, &(ev->xbutton.x), &(ev->xbutton.y), &unused_mask);
b = find_button_by_coords(buttonbar, ev->xbutton.x, ev->xbutton.y);
if (b) {
if (buttonbar->current && (b != buttonbar->current)) {
bbar_deselect_button(buttonbar, buttonbar->current);
} else {
bbar_select_button(buttonbar, b);
button_check_action(buttonbar, b, 0, ev->xbutton.time);
}
}
return 1;
}
unsigned char
bbar_handle_motion_notify(event_t * ev)
{
button_t *b;
Window unused_root, unused_child;
int unused_root_x, unused_root_y;
unsigned int mask;
D_EVENTS(("bbar_handle_motion_notify(ev [%8p] on window 0x%08x)\n", ev, ev->xany.window));
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &buttonbar->event_data), 0);
while (XCheckTypedWindowEvent(Xdisplay, ev->xany.window, MotionNotify, ev));
XQueryPointer(Xdisplay, buttonbar->win, &unused_root, &unused_child, &unused_root_x, &unused_root_y, &(ev->xbutton.x), &(ev->xbutton.y), &mask);
D_BBAR((" -> Pointer is at %d, %d with mask 0x%08x\n", ev->xbutton.x, ev->xbutton.y, mask));
b = find_button_by_coords(buttonbar, ev->xbutton.x, ev->xbutton.y);
if (b != buttonbar->current) {
if (buttonbar->current) {
bbar_deselect_button(buttonbar, buttonbar->current);
}
if (b) {
if (mask & (Button1Mask | Button2Mask | Button3Mask)) {
bbar_click_button(buttonbar, b);
} else {
bbar_select_button(buttonbar, b);
}
}
}
return 1;
}
unsigned char
bbar_dispatch_event(event_t * ev)
{
if (buttonbar->event_data.handlers[ev->type] != NULL) {
return ((buttonbar->event_data.handlers[ev->type]) (ev));
}
return (0);
}
void
bbar_add(buttonbar_t *bbar)
{
if (buttonbar) {
buttonbar_t *bb;
for (bb = buttonbar; bb->next; bb = bb->next);
bb->next = bbar;
} else {
buttonbar = bbar;
}
bbar->next = NULL;
bbar_reset_total_height();
bbar_calc_total_height();
}
unsigned short
bbar_calc_height(buttonbar_t *bbar)
{
button_t *b;
ImlibBorder *bbord = images[image_bbar].norm->iml->border, *bord = images[image_button].norm->iml->border;
D_BBAR(("bbar_calc_height(%8p): fascent == %d, fdescent == %d, h == %d\n", bbar, bbar->fascent, bbar->fdescent, bbar->h));
bbar->h = bbar->fascent + bbar->fdescent + 1;
if (bord) {
bbar->h += bord->top + bord->bottom;
}
for (b = bbar->buttons; b; b = b->next) {
if (b->h != bbar->h) {
b->h = bbar->h;
button_calc_size(bbar, b);
}
}
for (b = bbar->rbuttons; b; b = b->next) {
if (b->h != bbar->h) {
b->h = bbar->h;
button_calc_size(bbar, b);
}
}
if (bbord) {
bbar->h += bbord->top + bbord->bottom;
}
D_BBAR(("Final height is %d\n", bbar->h));
return bbar->h;
}
void
bbar_calc_sizes(buttonbar_t *bbar)
{
button_t *b;
D_BBAR(("bbar == %8p\n", bbar));
for (b = bbar->buttons; b; b = b->next) {
button_calc_size(bbar, b);
}
for (b = bbar->rbuttons; b; b = b->next) {
button_calc_size(bbar, b);
}
}
void
bbar_calc_positions(buttonbar_t *bbar)
{
button_t *b;
unsigned short x, y;
ImlibBorder *border = images[image_bbar].norm->iml->border;
D_BBAR(("bbar == %8p\n", bbar));
y = ((border) ? (border->top) : 0);
if (bbar->buttons) {
x = ((border) ? (border->left) : 0) + MENU_HGAP;
for (b = bbar->buttons; b; b = b->next) {
b->x = x;
b->y = y;
D_BBAR(("Set button \"%s\" (%8p, width %d) to coordinates %d, %d\n", b->text, b, b->w, x, y));
x += b->w + MENU_HGAP;
button_calc_rel_coords(bbar, b);
}
}
if (bbar->rbuttons) {
x = bbar->w - ((border) ? (border->right) : 0);
for (b = bbar->rbuttons; b; b = b->next) {
x -= b->w + MENU_HGAP;
b->x = x;
b->y = y;
button_calc_rel_coords(bbar, b);
D_BBAR(("Set button \"%s\" (%8p, width %d) to coordinates %d, %d\n", b->text, b, b->w, x, y));
}
}
}
void
button_calc_size(buttonbar_t *bbar, button_t *button)
{
ImlibBorder *bord = images[image_button].norm->iml->border;
int ascent, descent, direction;
XCharStruct chars;
D_BBAR(("button_calc_size(%8p, %8p): XTextExtents(%8p, %s, %d, ...)\n", bbar, button, bbar->font, button->text, button->len));
button->w = 0;
if (button->len) {
XTextExtents(bbar->font, button->text, button->len, &direction, &ascent, &descent, &chars);
LOWER_BOUND(bbar->fascent, chars.ascent);
LOWER_BOUND(bbar->fdescent, chars.descent);
button->w += chars.width;
}
if (bord) {
button->w += bord->left + bord->right;
}
if (button->h == 0) {
button->h = bbar->fascent + bbar->fdescent + 1;
if (bord) {
button->h += bord->top + bord->bottom;
}
}
if (button->icon) {
unsigned short b = 0;
if (bord) {
b = button->h - bord->top - bord->bottom;
}
button->icon_w = button->icon->iml->im->rgb_width;
button->icon_h = button->icon->iml->im->rgb_height;
D_BBAR((" -> Initial icon dimensions are %hux%hu\n", button->icon_w, button->icon_h));
if (button->icon_h > b) {
button->icon_w = (unsigned short) ((float) button->icon_w / button->icon_h * b);
button->icon_h = b;
}
button->w += button->icon_w;
if (button->len) {
button->w += MENU_HGAP;
}
D_BBAR((" -> Final icon dimensions are %hux%hu\n", button->icon_w, button->icon_h));
}
D_BBAR((" -> Set button to %dx%d at %d, %d and icon to %dx%d\n", button->w, button->h, button->x, button->y, button->icon_w, button->icon_h));
}
void
button_calc_rel_coords(buttonbar_t *bbar, button_t *button)
{
ImlibBorder *bord = images[image_button].norm->iml->border;
D_BBAR(("bbar == %8p, button == %8p\n", bbar, button));
if (button->icon) {
unsigned short b = 0;
if (bord) {
b = button->h - bord->top - bord->bottom - 2;
}
if (button->icon_h == button->h) {
button->icon_y = button->y + ((bord) ? (bord->top) : 0);
} else {
button->icon_y = button->y + ((b - button->icon_h) / 2) + ((bord) ? (bord->top) : 0);
}
button->icon_x = button->x + ((bord) ? (bord->left) : 0);
}
if (button->len) {
button->text_x = button->x + ((button->icon_w) ? (button->icon_w + MENU_HGAP) : 0) + ((bord) ? (bord->left) : (0));
button->text_y = button->y + button->h - ((bord) ? (bord->bottom) : (0)) - bbar->fdescent;
}
D_BBAR((" -> Text is at %d, %d and icon is at %d, %d\n", button->text_x, button->text_y, button->icon_x, button->icon_y));
}
void
bbar_add_button(buttonbar_t *bbar, button_t *button)
{
button_t *b;
D_BBAR(("bbar_add_button(%8p, %8p): Adding button \"%s\".\n", bbar, button, button->text));
if (bbar->buttons) {
for (b = bbar->buttons; b->next; b = b->next);
b->next = button;
} else {
bbar->buttons = button;
}
button->next = NULL;
}
void
bbar_add_rbutton(buttonbar_t *bbar, button_t *button)
{
button_t *b;
D_BBAR(("bbar_add_rbutton(%8p, %8p): Adding button \"%s\".\n", bbar, button, button->text));
b = ((bbar->rbuttons) ? (bbar->rbuttons) : NULL);
bbar->rbuttons = button;
button->next = b;
}
unsigned char
bbar_set_font(buttonbar_t *bbar, const char *fontname)
{
XFontStruct *font;
ASSERT_RVAL(fontname != NULL, 0);
D_BBAR(("bbar_set_font(%8p, \"%s\"): Current font is %8p, dimensions %d/%d/%d\n", bbar, fontname, bbar->font, bbar->fwidth, bbar->fheight, bbar->h));
if (bbar->font) {
free_font(bbar->font);
}
#ifdef MULTI_CHARSET
if (bbar->fontset) {
XFreeFontSet(Xdisplay, bbar->fontset);
}
#endif
font = (XFontStruct *) load_font(fontname, "fixed", FONT_TYPE_X);
#ifdef MULTI_CHARSET
bbar->fontset = create_fontset(fontname, etmfonts[def_font_idx]);
#endif
bbar->font = font;
bbar->fwidth = font->max_bounds.width;
bbar->fheight = font->ascent + font->descent + rs_line_space;
XSetFont(Xdisplay, bbar->gc, font->fid);
bbar_reset_total_height();
D_BBAR(("New dimensions are %d/%d/%d\n", bbar->fwidth, bbar->fheight, bbar->h));
return 1;
}
button_t *
find_button_by_text(buttonbar_t *bbar, char *text)
{
register button_t *b;
REQUIRE_RVAL(text != NULL, NULL);
for (b = bbar->buttons; b; b = b->next) {
if (!strcasecmp(b->text, text)) {
return (b);
}
}
for (b = bbar->rbuttons; b; b = b->next) {
if (!strcasecmp(b->text, text)) {
return (b);
}
}
return NULL;
}
button_t *
find_button_by_coords(buttonbar_t *bbar, int x, int y)
{
register button_t *b;
ASSERT_RVAL(bbar != NULL, NULL);
for (b = bbar->buttons; b; b = b->next) {
if ((x >= b->x) && (y >= b->y) && (x < b->x + b->w) && (y < b->y + b->h)) {
return (b);
}
}
for (b = bbar->rbuttons; b; b = b->next) {
if ((x >= b->x) && (y >= b->y) && (x < b->x + b->w) && (y < b->y + b->h)) {
return (b);
}
}
return NULL;
}
button_t *
button_create(char *text)
{
button_t *button;
button = (button_t *) MALLOC(sizeof(button_t));
MEMSET(button, 0, sizeof(button_t));
if (text) {
button->text = StrDup(text);
button->len = strlen(text);
} else {
button->text = "";
button->len = 0;
}
return button;
}
unsigned char
button_set_icon(button_t *button, simage_t * icon)
{
ASSERT_RVAL(button != NULL, 0);
ASSERT_RVAL(icon != NULL, 0);
button->icon = icon;
return 1;
}
unsigned char
button_set_action(button_t *button, action_type_t type, char *action)
{
ASSERT_RVAL(button != NULL, 0);
button->type = type;
switch (type) {
case ACTION_MENU:
button->action.menu = find_menu_by_title(menu_list, action);
break;
case ACTION_STRING:
case ACTION_ECHO:
button->action.string = (char *) MALLOC(strlen(action) + 2);
strcpy(button->action.string, action);
parse_escaped_string(button->action.string);
break;
default:
break;
}
return 1;
}
void
bbar_select_button(buttonbar_t *bbar, button_t *button)
{
bbar->current = button;
if (image_mode_is(image_button, MODE_MASK)) {
paste_simage(images[image_button].selected, image_button, bbar->win, button->x, button->y, button->w, button->h);
} else {