diff --git a/configure.ac b/configure.ac index 2b19c41..3b41236 100644 --- a/configure.ac +++ b/configure.ac @@ -185,7 +185,7 @@ AC_SUBST(MWMRCDIR) INCDIR="${includedir}/X11" AC_SUBST(INCDIR) -XMBINDDIR_FALLBACK="${libdir}/X11/bindings" +XMBINDDIR_FALLBACK="${datadir}/X11/bindings" AC_SUBST(XMBINDDIR_FALLBACK) RM="rm -f" diff --git a/configure.ac.bindings b/configure.ac.bindings new file mode 100644 index 0000000..2b19c41 --- /dev/null +++ b/configure.ac.bindings @@ -0,0 +1,401 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT +AC_CONFIG_SRCDIR([lib/Xm/Form.c]) +AC_PREREQ(2.52) +AC_CONFIG_AUX_DIR(.) +AC_CHECK_FILE(/usr/X/include/X11/X.h, + AC_PREFIX_DEFAULT(/usr/X), + AC_PREFIX_DEFAULT(/usr)) +AC_CHECK_FILE(/usr/X11R6/include/X11/X.h, + AC_PREFIX_DEFAULT(/usr/X11R6), + AC_PREFIX_DEFAULT(/usr)) + +dnl AM_MAINTAINER_MODE +AC_CANONICAL_TARGET + +dnl The version of the Motif libraries +CURRENT=4 +REVISION=4 +AGE=0 +AC_SUBST(CURRENT) +AC_SUBST(REVISION) +AC_SUBST(AGE) + +dnl This is really dumb but it seems to be bug +AM_INIT_AUTOMAKE(motif,2.3.4,no-define) + +LIBTOOL_VERSION=$CURRENT:$REVISION:$AGE + +dnl +dnl Override a default in libtool. +dnl +dnl AC_DISABLE_STATIC + +AM_CONFIG_HEADER(include/config.h lib/Xm/Xm.h) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AM_PROG_CC_STDC +AM_PROG_LIBTOOL + +AC_EXEEXT + +dnl AC_PROG_YACC +dnl Do this the old fashioned way. 'bison -y' doesn't cut it +AC_CHECK_PROGS(YACC, byacc, yacc) + +dnl AC_PROG_SPLINT +AC_CHECK_PROGS(SPLINT, splint) +if test x$SPLINT = x +then + AC_MSG_WARN([No splint is dound]) +fi + +AM_PROG_LEX +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET + + +dnl Checks for libraries. + +AC_PATH_X +AC_PATH_XTRA +LT_LIB_XTHREADS + +dnl Checks for Xos_r.h + +AC_CHECK_HEADERS([X11/Xos_r.h]) +AC_CHECK_HEADERS([X11/Xpoll.h]) + +dnl Compile in EditRes support if we can find Xmu + +save_LIBS="$LIBS" +save_CFLAGS="$CFLAGS" +LIBS="$X_LIBS $LIBS" +CFLAGS="$X_CFLAGS $CFLAGS" +AC_CHECK_HEADERS(X11/Xmu/Editres.h, +AC_CHECK_LIB(Xmu, _XEditResCheckMessages, +X_XMU=-lXmu +AC_DEFINE(HAVE_LIBXMU, 1, This System has libXmu) +, X_XMU="", -lXt -lX11) +AC_CHECK_LIB(Xmu,XmuNCopyISOLatin1Lowered , +AC_DEFINE(HAVE_XMU_N_COPY_ISO,1,Have XmuNCopyISOLatin1Lowered) +, , -lXt -lX11) +,,[[#include ]] +) + + +AC_SUBST(X_XMU) +LIBS="$save_LIBS" +CFLAGS="$save_CFLAGS" +AM_CONDITIONAL(OM_XMU, test x$X_XMU != x) + +dnl Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/malloc.h strings.h sys/file.h sys/time.h unistd.h wchar.h) +AC_CHECK_HEADERS(wctype.h, AC_DEFINE(HAS_WIDECHAR_FUNCTIONS,1,System supports wchar)) +AC_CHECK_HEADER(langinfo.h,,AC_DEFINE(CSRG_BASED,1,System Has langinfo.h)) +AC_CHECK_HEADER(X11/Xos_r.h,,AC_DEFINE(NEED_XOS_R_H,1,System Missing Xos_r.h)) +AC_CHECK_HEADER(X11/Xpoll.h,,AC_DEFINE(NEED_XPOLL_H,1,system Missing X11/Xpoll.h)) +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM +AC_TYPE_UID_T + +dnl Checks for library functions. +AC_FUNC_ALLOCA +AC_FUNC_MEMCMP +AC_FUNC_SETPGRP +AC_TYPE_SIGNAL +AC_FUNC_STRCOLL +AC_FUNC_STRFTIME +AC_FUNC_FORK([]) +AC_FUNC_VPRINTF +AM_FUNC_VOID_SPRINTF +AC_CHECK_FUNCS(wcslen wcscpy wcsncpy wcschr wcscat wcsncat getcwd gettimeofday mkdir re_comp regcmp select strcspn strerror strstr strtod strtol uname) +AC_CHECK_FUNCS(strdup,,AC_DEFINE(NEED_STRDUP, 1, no strdup)) +AC_CHECK_FUNCS(strcasecmp,,AC_DEFINE(NEED_STRCASECMP, 1, no strcasecmp)) +AC_CHECK_FUNCS(putenv,,AC_DEFINE(NO_PUTENV, 1, No PUTENV)) +AC_CHECK_FUNCS(regcomp,,AC_DEFINE(NO_REGCOMP, 1, no regcmp)) +AC_CHECK_FUNCS(memmove,,AC_DEFINE(NO_MEMMOVE, 1, no memmove)) +AC_CHECK_TYPE(XICProc,,AC_DEFINE(NO_XICPROC, 1, XICProc isn't defined), [#include ]) + +AC_ARG_ENABLE(message-catalog, [ --enable-message-catalog + Enable building of the message catalog (default=no)]) +if test "$enable_message_catalog" != "yes" +then + AC_DEFINE(NO_MESSAGE_CATALOG, 1, No Defined Message Catalog) +fi +AM_CONDITIONAL(MessageCatalog, test x$enable_message_catalog = xyes) + +AC_ARG_ENABLE(themes, [ --enable-themes Enable themes (default=no)]) +if test "$enable_themes" = "yes" +then + if test -f $srcdir/lib/Xm/Theme.h + then + AC_DEFINE(USE_XMTHEMES, 1, "Use XmThemes") + XMTHEME_DIST = "Theme.h ThemeP.h DynLibP.h Theme.c DynLib.c" + else + AC_MSG_WARN([--enable-themes specified, but I don't have the code. Disabled]) + enable_themes="no" + fi +fi +AC_SUBST(XMTHEME_DIST) +AM_CONDITIONAL(OM_XMTHEMES, test "$enable_themes" = "yes") + +AC_ARG_ENABLE(debug-themes, [ --enable-debug-themes Enable themes debugging (default=no)]) +if test "$enable_themes" = "yes" +then + if test "$enable_debug_themes" = "yes" + then + AC_DEFINE(DEBUGTHEMES, 1, "Debug Themes") + fi +fi + +if test x$GCC = xyes +then + CFLAGS="$CFLAGS -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment" + if test ` $CC -dumpversion | sed -e 's/\(^.\).*/\1/'` = "4" ; then + CFLAGS="$CFLAGS -fno-tree-ter" + fi +fi +AC_DEFINE(NO_OL_COMPAT, 1, "No OL Compatability") + +CDE_INSTALLATION_TOP="\${prefix}/dt" +AC_SUBST(CDE_INSTALLATION_TOP) + +CDE_CONFIGURATION_TOP="\${prefix}/etc/dt" +AC_SUBST(CDE_CONFIGURATION_TOP) + +LIBDIR="${libdir}/X11" +AC_SUBST(LIBDIR) + +MWMRCDIR="/etc/X11/mwm" +AC_SUBST(MWMRCDIR) + +INCDIR="${includedir}/X11" +AC_SUBST(INCDIR) + +XMBINDDIR_FALLBACK="${libdir}/X11/bindings" +AC_SUBST(XMBINDDIR_FALLBACK) + +RM="rm -f" +AC_SUBST(RM) + +AC_ARG_ENABLE(motif22-compatibility, [ --disable-motif22-compatibility + Disable binary compatibility with OpenMotif 2.2]) +AC_ARG_ENABLE(utf8, [ --disable-utf8 + Disable UTF-8 support]) + +case "$host_os" in + freebsd*) CFLAGS="$CFLAGS -DCSRG_BASED -DXNO_MTSAFE_API -DXNO_MTSAFE_PWDAPI"; + LDFLAGS="$LDFLAGS -L/usr/local/lib";; + cygwin*) CFLAGS="$CFLAGS -DXNO_MTSAFE_DIRENTDAPI";; + solaris* | sunos*) X_LIBS="$X_LIBS -L/usr/X/lib" && + if test x$enable_motif22_compatibility = x + then + enable_motif22_compatibility="no" + fi; + if test x$enable_utf8 = x + then + enable_utf8="no" + fi; + if test x$enable_xft = x + then + enable_xft="no" + fi;; +esac + +if test x$enable_motif22_compatibility = x +then + enable_motif22_compatibility="yes" +fi + +if test "$enable_motif22_compatibility" = "yes" +then + AC_DEFINE([OM22_COMPATIBILITY], [1], [Compatibility with OpenMotif 2.2]) + OM22_COMPATIBILITY_FALSE=! + OM22_COMPATIBILITY_TRUE= +else + OM22_COMPATIBILITY_FALSE= + OM22_COMPATIBILITY_TRUE=! +fi +AC_SUBST(OM22_COMPATIBILITY_FALSE) +AC_SUBST(OM22_COMPATIBILITY_TRUE) + +if test x$enable_utf8 = x +then + enable_utf8="yes" +fi + +if test "$enable_utf8" = "yes" +then + AC_DEFINE([UTF8_SUPPORTED], [1], [UTF8 is supported]) + AC_SEARCH_LIBS([iconv_open], [iconv], , + AC_SEARCH_LIBS([libiconv_open], [iconv])) +fi + +AC_ARG_ENABLE(printing, [ --disable-printing + Disable printing support]) + +if test x$enable_printing = x +then + enable_printing="yes" +fi + +if test "$enable_printing" = "yes" +then + AC_MSG_CHECKING([for libXp]) + AC_CHECK_HEADERS(X11/extensions/Print.h, + AC_CHECK_LIB(Xp, XpCreateContext, ,enable_printing="no"), + enable_printing="no") +fi + +if test "$enable_printing" = "yes" +then + LIB_XP=-lXp + AC_DEFINE([PRINTING_SUPPORTED], [1], [Printing is supported]) + PRINTING_SUPPORTED_FALSE=! + PRINTING_SUPPORTED_TRUE= +else + LIB_XP= + PRINTING_SUPPORTED_FALSE= + PRINTING_SUPPORTED_TRUE=! +fi +AC_SUBST(PRINTING_SUPPORTED_FALSE) +AC_SUBST(PRINTING_SUPPORTED_TRUE) + +AM_CONDITIONAL(PRINTING, test "$enable_printing" = "yes") +AC_SUBST(LIB_XP) + +AC_FIND_XFT +AC_IMAGE_SUPPORT + + + +# AM_CONDITIONAL(Motif22Compatibility, test x$enable_motif22_compatibility = xyes) + +AC_CONFIG_FILES([Makefile \ +bindings/Makefile \ +bitmaps/Makefile \ +clients/Makefile \ +clients/mwm/Makefile \ +clients/mwm/WmWsmLib/Makefile \ +clients/uil/Makefile \ +clients/xmbind/Makefile \ +config/Makefile \ +config/cf/Makefile \ +config/imake/Makefile \ +config/util/Makefile \ +config/makedepend/Makefile \ +include/Makefile \ +include/Dt/Makefile \ +lib/Makefile \ +lib/Xm/Makefile \ +lib/Mrm/Makefile \ +localized/Makefile \ +localized/util/Makefile \ +doc/Makefile \ +doc/man/Makefile \ +doc/man/man1/Makefile \ +doc/man/man3/Makefile \ +doc/man/man4/Makefile \ +doc/man/man5/Makefile \ +tools/Makefile \ +tools/wml/Makefile \ +demos/Makefile \ +demos/lib/Makefile \ +demos/lib/Xmd/Makefile \ +demos/lib/Wsm/Makefile \ +demos/lib/Exm/Makefile \ +demos/lib/Exm/wml/Makefile \ +demos/programs/Makefile \ +demos/programs/Exm/Makefile \ +demos/programs/Exm/app_in_c/Makefile \ +demos/programs/Exm/app_in_uil/Makefile \ +demos/programs/Exm/simple_app/Makefile \ +demos/programs/airport/Makefile \ +demos/programs/animate/Makefile \ +demos/programs/drag_and_drop/Makefile \ +demos/programs/draw/Makefile \ +demos/programs/earth/Makefile \ +demos/programs/filemanager/Makefile \ +demos/programs/fileview/Makefile \ +demos/programs/getsubres/Makefile \ +demos/programs/hellomotif/Makefile \ +demos/programs/hellomotifi18n/Makefile \ +demos/programs/hellomotifi18n/C/Makefile \ +demos/programs/hellomotifi18n/C/uid/Makefile \ +demos/programs/hellomotifi18n/english/Makefile \ +demos/programs/hellomotifi18n/english/uid/Makefile \ +demos/programs/hellomotifi18n/french/Makefile \ +demos/programs/hellomotifi18n/french/uid/Makefile \ +demos/programs/hellomotifi18n/hebrew/Makefile \ +demos/programs/hellomotifi18n/hebrew/uid/Makefile \ +demos/programs/hellomotifi18n/japan/Makefile \ +demos/programs/hellomotifi18n/japan/uid/Makefile \ +demos/programs/hellomotifi18n/japanese/Makefile \ +demos/programs/hellomotifi18n/japanese/uid/Makefile \ +demos/programs/hellomotifi18n/swedish/Makefile \ +demos/programs/hellomotifi18n/swedish/uid/Makefile \ +demos/programs/i18ninput/Makefile \ +demos/programs/panner/Makefile \ +demos/programs/periodic/Makefile \ +demos/programs/piano/Makefile \ +demos/programs/popups/Makefile \ +demos/programs/sampler2_0/Makefile \ +demos/programs/setdate/Makefile \ +demos/programs/todo/Makefile \ +demos/programs/workspace/Makefile \ +demos/programs/tooltips/Makefile \ +demos/programs/FontSel/Makefile \ +demos/programs/ButtonBox/Makefile \ +demos/programs/ColorSel/Makefile \ +demos/programs/Column/Makefile \ +demos/programs/Combo2/Makefile \ +demos/programs/Ext18List/Makefile \ +demos/programs/Ext18List/pixmaps/Makefile \ +demos/programs/IconB/Makefile \ +demos/programs/Outline/Makefile \ +demos/programs/Paned/Makefile \ +demos/programs/TabStack/Makefile \ +demos/programs/Tree/Makefile \ +demos/programs/pixmaps/Makefile \ +demos/unsupported/Makefile \ +demos/unsupported/Exm/Makefile \ +demos/unsupported/aicon/Makefile \ +demos/unsupported/dainput/Makefile \ +demos/unsupported/dogs/Makefile \ +demos/unsupported/hellomotif/Makefile \ +demos/unsupported/motifshell/Makefile \ +demos/unsupported/uilsymdump/Makefile \ +demos/unsupported/xmapdef/Makefile \ +demos/unsupported/xmfonts/Makefile \ +demos/unsupported/xmforc/Makefile \ +demos/unsupported/xmform/Makefile \ +demos/doc/Makefile \ +demos/doc/programGuide/Makefile \ +demos/doc/programGuide/ch05/Makefile \ +demos/doc/programGuide/ch05/Scale/Makefile \ +demos/doc/programGuide/ch06/Makefile \ +demos/doc/programGuide/ch06/spin_box/Makefile \ +demos/doc/programGuide/ch06/combo_box/Makefile \ +demos/doc/programGuide/ch08/Makefile \ +demos/doc/programGuide/ch08/Notebook/Makefile \ +demos/doc/programGuide/ch08/Container/Makefile \ +demos/doc/programGuide/ch16/Makefile \ +demos/doc/programGuide/ch17/Makefile \ +demos/doc/programGuide/ch17/simple_drop/Makefile \ +demos/doc/programGuide/ch17/simple_drag/Makefile \ +lib/Xm/xmstring.list \ +]) +AC_OUTPUT diff --git a/doc/man/man3/VirtualBindings.3 b/doc/man/man3/VirtualBindings.3 index e227f0e..8c10e18 100644 --- a/doc/man/man3/VirtualBindings.3 +++ b/doc/man/man3/VirtualBindings.3 @@ -90,7 +90,7 @@ bindings contained in that file\&. If it has found no bindings, Motif next looks for the file \fBxmbind\&.alias\fP in the directory specified by the environment variable \fBXMBINDDIR\fP, if \fBXMBINDDIR\fP is set, or in the directory -\fB/usr/lib/Xm/bindings\fP if \fBXMBINDDIR\fP is not set\&. +\fB/usr/share/X11/bindings\fP if \fBXMBINDDIR\fP is not set\&. If this file exists Motif searches it for a pathname associated with the vendor string or with the vendor string and vendor release\&. If it finds such a pathname and if that file exists, Motif loads the diff --git a/doc/man/man3/VirtualBindings.3.bindings b/doc/man/man3/VirtualBindings.3.bindings new file mode 100644 index 0000000..e227f0e --- /dev/null +++ b/doc/man/man3/VirtualBindings.3.bindings @@ -0,0 +1,412 @@ +'\" t +...\" VirtBind.sgm /main/12 1996/09/08 21:43:15 rws $ +.de P! +.fl +\!!1 setgray +.fl +\\&.\" +.fl +\!!0 setgray +.fl \" force out current output buffer +\!!save /psv exch def currentpoint translate 0 0 moveto +\!!/showpage{}def +.fl \" prolog +.sy sed -e 's/^/!/' \\$1\" bring in postscript file +\!!psv restore +. +.de pF +.ie \\*(f1 .ds f1 \\n(.f +.el .ie \\*(f2 .ds f2 \\n(.f +.el .ie \\*(f3 .ds f3 \\n(.f +.el .ie \\*(f4 .ds f4 \\n(.f +.el .tm ? font overflow +.ft \\$1 +.. +.de fP +.ie !\\*(f4 \{\ +. ft \\*(f4 +. ds f4\" +' br \} +.el .ie !\\*(f3 \{\ +. ft \\*(f3 +. ds f3\" +' br \} +.el .ie !\\*(f2 \{\ +. ft \\*(f2 +. ds f2\" +' br \} +.el .ie !\\*(f1 \{\ +. ft \\*(f1 +. ds f1\" +' br \} +.el .tm ? font underflow +.. +.ds f1\" +.ds f2\" +.ds f3\" +.ds f4\" +.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n +.TH "VirtualBindings" "library call" +.SH "NAME" +\fBVirtualBindings\fP \(em Bindings for virtual mouse and key events +.iX "VirtualBindings" +.iX "default bindings" "VirtualBindings" +.SH "DESCRIPTION" +.PP +The Motif reference pages describe key translations in terms of +\fIvirtual bindings\fP, based on those described in the \fIMotif Style Guide\fP\&. +.SS "Bindings for osf Keysyms" +.PP +Keysym strings that begin with \fB\fP are not part of the X server\&'s +keyboard mapping\&. +Instead, these keysyms are produced on the client side at run time\&. +They are interpreted by the routine \fBXmTranslateKey\fP, and +are used by the translation manager when the server delivers an actual +key event\&. +For each application, a mapping is maintained between \fB\fP keysyms and +keysyms that correspond to actual keys\&. +This mapping is based on information obtained at application startup +from one of the following sources, listed in order of precedence: +.IP " \(bu" 6 +The \fBXmNdefaultVirtualBindings\fP resource from Display\&. +.IP " \(bu" 6 +A property on the root window, which can be set by \fBmwm\fP on startup, +or by the \fBxmbind\fP client, or on prior startup of a Motif +application\&. +.IP " \(bu" 6 +The file \fB\&.motifbind\fP in the user\&'s home directory\&. +.IP " \(bu" 6 +A set of bindings based on the vendor string and optionally the vendor +release of the X server\&. +Motif searches for these bindings in the following steps: +.RS +.IP " 0." 6 +If the file \fBxmbind\&.alias\fP exists in the user\&'s home directory, +Motif searches this file for a pathname associated with the vendor +string or with the vendor string and vendor release\&. +If it finds such a pathname and if that file exists, Motif loads the +bindings contained in that file\&. +.IP " 1." 6 +If it has found no bindings, Motif next looks for the file +\fBxmbind\&.alias\fP in the directory specified by the environment +variable \fBXMBINDDIR\fP, if \fBXMBINDDIR\fP is set, or in the directory +\fB/usr/lib/Xm/bindings\fP if \fBXMBINDDIR\fP is not set\&. +If this file exists Motif searches it for a pathname associated with the +vendor string or with the vendor string and vendor release\&. +If it finds such a pathname and if that file exists, Motif loads the +bindings contained in that file\&. +.IP " 2." 6 +If it still has found no bindings, Motif loads a set of hard-coded +fallback bindings\&. +.RE +.PP +The \fBxmbind\&.alias\fP file contains zero or more lines of the following form: +.PP +.nf +\f(CW"\fIvendor_string\fP[ \fIvendor_release\fP]" \fIbindings_file\fP\fR +.fi +.PP +.PP +where \fIvendor_string\fP is the X server vendor name as returned by the +X client \fBxdpyinfo\fP or the Xlib function \fBXServerVendor\fP, and +must appear in double quotes\&. +If \fIvendor_release\fP is included, it is the X server vendor release +number as returned by the X client \fBxdpyinfo\fP or the Xlib function +\fBXVendorRelease\fP, and must also be contained within the double +quotes separated by one space from \fIvendor_string\fP\&. +The \fIvendor_release\fP argument is provided to allow support +of changes in keyboard +hardware from a vendor, assuming that the vendor increments the release +number to flag such changes\&. +Alternatively, the vendor may simply use a unique vendor string for each +different keyboard\&. +.PP +The \fIbindings_file\fP argument is the pathname of +the file containing the bindings +themselves\&. +It can be a relative or absolute pathname\&. +If it it is a relative pathname, it is relative to the location of the +\fBxmbind\&.alias\fP file\&. +.PP +Comment lines in the \fBxmbind\&.alias\fP file begin with ! (exclamation +point)\&. +.PP +The bindings found in either the \fB\&.motifbind\fP file or the vendor +mapping are placed in a property on the root window\&. +This property is used to determine the bindings for subsequent Motif +applications\&. +.PP +On startup \fBmwm\fP attempts to load the file \fB\&.motifbind\fP in the +user\&'s home directory\&. +If this is unsuccessful, it loads the vendor bindings as described +previously\&. +It places the bindings it loads in a property on the root window for use +by subsequent Motif applications\&. +.PP +The \fBxmbind\fP function loads bindings +from a file if that file is specified on the +command line\&. +If no file is specified on the command line, it attempts to load the +file \fB\&.motifbind\fP in the user\&'s home directory\&. +If this fails, it loads the vendor bindings as described previously\&. +It places the bindings it loads in a property on the root window for use +by subsequent Motif applications\&. +.PP +The format of the specification for mapping \fB\fP keysyms to +actual keysyms is similar to that of a specification for an event +translation\&. (See below) The syntax is specified (and below) here in +EBNF notation using the following conventions: +.PP +.nf +\f(CW[\fIa\fP] Means either nothing or \fIa\fP +{\fIa\fP} Means zero or more occurrences of \fIa\fP +(\fIa\fP|\fIb\fP) Means either \fIa\fP or \fIb\fP\&.\fR +.fi +.PP +.PP +Terminals are enclosed in double quotation marks\&. +.PP +The syntax of an \fB\fP keysym binding specification is as follows: +.PP +.nf +\f(CWbinding_spec = {line "\en"} [line] +line = virtual_keysym ":" list_of_key_event +list_of_key_event= key_event { "," key_event} +key_event = {modifier_name} "" actual_keysym +virtual_keysym = keysym +actual_keysym = keysym +keysym = A valid X11 keysym name that is + mapped by \fBXStringToKeysym\fP\fR +.fi +.PP +.PP +As with event translations, more specific event descriptions must +precede less specific descriptions\&. +For example, an event description for a key with a modifier must precede +a description for the same key without the same modifier\&. +.PP +Following is an example of a specification for the +\fBdefaultVirtualBindings\fP resource in a resource file: +.PP +.nf +\f(CW*defaultVirtualBindings: \e + osfBackSpace: BackSpace \en\e + osfInsert: InsertChar \en\e + osfDelete: DeleteChar \en\e +\&.\&.\&. + osfLeft: left, CtrlH\fR +.fi +.PP +.PP +The format of a \fB\&.motifbind\fP file or of a file containing vendor +bindings is the same, except that the binding specification for each +keysym is placed on a separate line\&. +The previous example specification appears as follows in a +\fB\&.motifbind\fP or vendor bindings file: +.PP +.nf +\f(CWosfBackSpace: BackSpace +osfInsert: InsertChar +osfDelete: DeleteChar +\&.\&.\&. +osfLeft: left, CtrlH\fR +.fi +.PP +.PP +The following table lists the fixed fallback default bindings for +\fB\fP keysyms\&. +.TS +tab() box; +c s +l| l. +T{ +\fBFallback Default Bindings for osf Keysyms\fP +T} +\fB\fP\fBFallback Default Binding\fP +__ +\fB\fP\fB:\fP\fBKP_Enter\fP, \fBExecute\fP +__ +\fB\fP\fB:\fP\fBShiftF8\fP +__ +\fB\fP\fB:\fP\fB\fP\fBBackSpace\fP +__ +\fB\fP\fB:\fP\fBHome\fP, \fBBegin\fP +__ +\fB\fP\fB:\fP\fBEscape\fP, \fBCancel\fP +__ +\fB\fP\fB:\fP\fB\fP\fBClear\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fB\fP\fBDelete\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fB\fP\fBDown\fP +__ +\fB\fP\fB:\fP\fB\fP\fBEnd\fP +__ +\fB\fP\fB:\fP\fBF1\fP, \fBHelp\fP +__ +\fB\fP\fB:\fP\fB\fP\fBInsert\fP +__ +\fB\fP\fB:\fP\fB\fP\fBLeft\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fBShift\fP\fBF10\fP, \fBMenu\fP +__ +\fB\fP\fB:\fP\fBF10\fP, \fBShift\fP\fBMenu\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fB\fP\fBNext\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fB\fP\fBPrior\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fB\fP\fBRight\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fB\fP\fBSelect\fP +__ +\fB\fP\fB:\fP\fIunbound\fP +__ +\fB\fP\fB:\fP\fBAltReturn\fP, \fBAltKP_Enter\fP +__ +\fB\fP\fB:\fP\fB\fP\fBUndo\fP +__ +\fB\fP\fB:\fP\fB\fP\fBUp\fP +__ +.TE +.SS "Changes in the Handling of Shifted Keys" +.PP +In conjunction with MIT X11R5 Patch 24, this version of Motif +introduces a change in the way that keys involving the +modifier are processed\&. This change allows the numeric keypad to be +used to generate numbers using the standard X mechanisms\&. Since the +default behavior is now to honor the xmodmap keymap bindings, +translations and virtual key bindings that use may behave +differently\&. A common symptom is that unshifted keypad and function +keys (with or without other modifiers) produce the expected results, +but shifted ones do not\&. +.PP +To obtain the old behavior you can remove the shifted interpretation +from problematic keys using the \fBxmodmap\fP utility\&. Each entry in +a \fBxmodmap\fP keymap table contains up to four keysym bindings\&. The +second and fourth keysyms are for shifted keys\&. If an expression +contains only two keysyms, simply remove the second keysym\&. If +an entry contains three or more keysyms, replace the second keysym +with \fBNoSymbol\fP and remove the fourth keysym\&. +.SS "Action Translations" +.PP +The translation table syntax used by Motif is completely specified +in the X11R5 Toolkit Intrinsics Documentation\&. For the complete syntax +description, and for general instructions about writing or modifying a +translation table, please refer to this document\&. A brief summary of the +translation table format, however, is included below\&. +.PP +The syntax is defined as in the binding syntax specification above\&. +Informal descriptions are contained in angle brackets (<>)\&. +.PP +.nf +\f(CWTranslationTable= [ directive ] { production } +directive = ( "#replace" | "#override" | "#augment") "\en" +production = lhs ":" rhs "\en" +lhs = ( event | keyseq) {"," ( event | keyseq) } +keyseq = """ keychar { keychar } """ +keychar = ( "^" | "$" | "\e\e") +event = [ modifier_list ] "<" event_type ">" [ count ] {detail} +modifier_list = ( ["!"][":"] { modifier } | "None") +modifier = [ "~" ] ( "@" | ) +count = "(" [ "+" ] ")" +rhs = { action_name "(" [params] ")" } +params = string { "," string }\fR +.fi +.PP +The \fIstring\fP field need not be quoted unless it includes a space +or tab character, or any comma, newline, or parenthesis\&. The entire +list of string values making up the \fIparams\fP field will ba passed +to the named action routine\&. +.PP +The \fIdetails\fP field may be used to specify a keysym that will +identify a particular key event\&. For example, \fB\fP is the name +of a type of event, but it must be modified by the \fIdetails\fP field +to name a specific event, such as \fB\fP\fBA\fP\&. +.PP +\fBModifier Names\fP +The modifier list, which may be empty, consists of a list of modifier +keys that must be pressed with the key sequence\&. The modifier keys +may abbreviated with single letters, as in the following list of the +familiar modifiers: +.IP "s" 10 +Shift +.IP "c\ or\ ^" 10 +Ctrl (Control) +.IP "m\ or\ $" 10 +Meta +.IP "a" 10 +Alt +.PP +Other modifiers are available, such as "Mod5" and "Button2\&." These +have no abbreviation (although the "Button" modifiers may be +abbreviated in combination with events, as outlined below)\&. If a +modifier list has no entries, and is not "None", it means the position +of the modifier keys is irrelevant\&. If modifiers are listed, the +designated keys must be in the specified position, but the unlisted +modifier keys are irrelevant\&. If the list begins with an exclamation +point (!), however, the unlisted modifiers may not be asserted\&. In +addition, if a modifier name is preceded by a tilde (~), the +corresponding key must \fInot\fP be pressed\&. +.PP +If a modifier list begins with a colon (:), X tries to use the +standard modifiers (Shift and Lock), if present, to map the key event +code into a recognized keysym\&. +.PP +Event Types +These are a few of the recognized event types\&. +.IP "Key or KeyDown" 10 +A keyboard key was pressed\&. +.IP "KeyUp" 10 +A keyboard key was released\&. +.IP "BtnDown" 10 +A mouse button was pressed\&. +.IP "BtnUp" 10 +A mouse button was released\&. +.IP "Motion" 10 +The mouse pointer moved\&. +.IP "Enter" 10 +The pointer entered the widget\&'s window\&. +.IP "Leave" 10 +The pointer left the widget\&'s window\&. +.IP "FocusIn" 10 +The widget has received focus\&. +.IP "FocusOut" 10 +The widget has lost focus\&. +.PP +There are some event abbreviations available\&. For example, +\fB\fP is actually a "Motion" event, modified with the +"Button1" modifier (\fBButton1\fP)\&. Similarly, \fB\fP +is actually a "BtnUp" event with the "Button3" modifier\&. These +abbreviations are used extensively in the Motif translation +tables\&. +.SH "RELATED" +.PP +\fBxmbind\fP(1) +...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:16 diff --git a/lib/Xm/XmosP.h b/lib/Xm/XmosP.h index 4b33e3b..d77c82a 100644 --- a/lib/Xm/XmosP.h +++ b/lib/Xm/XmosP.h @@ -175,7 +175,7 @@ extern "C" { #define XMBINDDIR "XMBINDDIR" #ifndef XMBINDDIR_FALLBACK -#define XMBINDDIR_FALLBACK "/usr/lib/Xm/bindings" +#define XMBINDDIR_FALLBACK "/usr/share/X11/bindings" #endif #define XMBINDFILE "xmbind.alias" #define MOTIFBIND ".motifbind" diff --git a/lib/Xm/XmosP.h.bindings b/lib/Xm/XmosP.h.bindings new file mode 100644 index 0000000..4b33e3b --- /dev/null +++ b/lib/Xm/XmosP.h.bindings @@ -0,0 +1,216 @@ +/* + * Motif + * + * Copyright (c) 1987-2012, The Open Group. All rights reserved. + * + * These libraries and programs are free software; you can + * redistribute them and/or modify them under the terms of the GNU + * Lesser General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * These libraries and programs are distributed in the hope that + * they will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with these librararies and programs; if not, write + * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth + * Floor, Boston, MA 02110-1301 USA +*/ +/* + * HISTORY +*/ +/* $TOG: XmosP.h /main/15 1997/03/25 14:45:55 dbl $ */ +/* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */ +/* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */ +#ifndef _XmosP_h +#define _XmosP_h + +/* Some SVR4 systems don't have bzero. */ +#include /* for bzero et al */ + +/* + * Fix for 8975 - using LOGNAME instead of USER on SYSV and SVR4 +*/ + +#ifndef USER_VAR +#if defined(SYSV) || defined(SVR4) +#define USER_VAR "LOGNAME" +#else +#define USER_VAR "USER" +#endif +#endif + +/* + * Fix for 5222 - if NO_MEMMOVE is defined, some systems will still + * require stdlib.h. + */ +#ifdef NO_MEMMOVE +#ifdef bcopy +#undef bcopy +#endif +#ifdef memmove +#undef memmove +#endif +#define memmove( p1, p2, p3 ) bcopy( p2, p1, p3 ) +#endif + +#ifndef X_NOT_STDC_ENV +#include /* Needed for MB_CUR_MAX, mbtowc, mbstowcs and mblen */ +#endif + +/* On Sun systems, mblen is broken. It doesn't return 0 when the + string is empty. Here's a patch. NOTE: On Sun systems, mblen + is a macro wrapper around mbtowc. Hence the implementation below. */ +#if defined(sun) +#undef mblen +#define mblen(ptr, size) \ + ((ptr && *(ptr) == '\0') ? 0 : mbtowc((wchar_t *)0, (ptr), (size))) +#endif + +#include /* for MB_LEN_MAX et al */ + +#ifndef INT_MAX +#define INT_MAX 2147483647 +#endif +#ifndef LONG_MAX +#define LONG_MAX 2147483647 +#endif +#ifdef BOGUS_MB_MAX /* some systems don't properly set MB_[CUR|LEN]_MAX */ +#undef MB_LEN_MAX +#define MB_LEN_MAX 1 /* temp fix for ultrix */ +#undef MB_CUR_MAX +#define MB_CUR_MAX 1 /* temp fix for ultrix */ +#endif /* BOGUS_MB_MAX */ + +/**********************************************************************/ +/* here we duplicate Xtos.h, since we can't include this private file */ + +#if defined(INCLUDE_ALLOCA_H) || defined(HAVE_ALLOCA_H) +#include +#endif + +#ifdef CRAY +#define WORD64 +#endif + +/* Don't Use Alloca On Solaris */ +#if defined(sun) +#define NO_ALLOCA +#endif + +/* stolen from server/include/os.h */ +#ifndef NO_ALLOCA +/* + * os-dependent definition of local allocation and deallocation + * If you want something other than XtMalloc/XtFree for ALLOCATE/DEALLOCATE + * LOCAL then you add that in here. + */ +#if defined(__HIGHC__) + +#if HCVERSION < 21003 +#define ALLOCATE_LOCAL(size) alloca(size) +pragma on(alloca); +#else /* HCVERSION >= 21003 */ +#define ALLOCATE_LOCAL(size) _Alloca(size) +#endif /* HCVERSION < 21003 */ + +#define DEALLOCATE_LOCAL(ptr) /* as nothing */ + +#endif /* defined(__HIGHC__) */ + + +#ifdef __GNUC__ + +#ifndef alloca /* gnu itself might have done that already */ +#define alloca __builtin_alloca +#endif + +#define ALLOCATE_LOCAL(size) alloca(size) +#define DEALLOCATE_LOCAL(ptr) /* as nothing */ +#else /* ! __GNUC__ */ +/* + * warning: mips alloca is unsuitable, do not use. + */ +#if defined(vax) || defined(sun) || defined(apollo) || defined(stellar) +/* + * Some System V boxes extract alloca.o from libPW.a; if you + * decide that you don't want to use alloca, you might want to fix it here. + */ +char *alloca(); +#define ALLOCATE_LOCAL(size) alloca(size) +#define DEALLOCATE_LOCAL(ptr) /* as nothing */ +#endif /* who does alloca */ +#endif /* __GNUC__ */ + +#endif /* NO_ALLOCA */ + +#ifndef ALLOCATE_LOCAL +#define ALLOCATE_LOCAL(size) XtMalloc(size) +#define DEALLOCATE_LOCAL(ptr) XtFree(ptr) +#endif /* ALLOCATE_LOCAL */ + +/* End of Xtos.h */ +/*****************/ + +#include + +/* For padding structures in Mrm we need to know how big pointers are. */ +#if !defined(CRAY) && !defined(__alpha) +#define MrmShortPtr +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +#define MATCH_CHAR 'P' /* referenced in InitPath strings and in the files + that uses it (ImageCache.c and Mrmhier.c) */ + +/* OS-dependent file info for VirtKeys */ + +#define XMBINDDIR "XMBINDDIR" +#ifndef XMBINDDIR_FALLBACK +#define XMBINDDIR_FALLBACK "/usr/lib/Xm/bindings" +#endif +#define XMBINDFILE "xmbind.alias" +#define MOTIFBIND ".motifbind" + +typedef enum { + XmOS_METHOD_NULL, + XmOS_METHOD_DEFAULTED, + XmOS_METHOD_REPLACED +} XmOSMethodStatus; + +typedef XmDirection (*XmCharDirectionProc)(XtPointer /* char */, + XmTextType /* type */, + XmStringTag /* locale */); + +typedef Status (*XmInitialDirectionProc)(XtPointer /* chars */, + XmTextType /* type */, + XmStringTag /* locale */, + unsigned int * /* num_bytes */, + XmDirection * /* direction */); + + +/******** Private Function Declarations ********/ + +extern XmOSMethodStatus XmOSGetMethod(Widget w, + String method_name, + XtPointer * method, + XtPointer * os_data); + +/******** End Private Function Declarations ********/ + + +#ifdef __cplusplus +} /* Close scope of 'extern "C"' declaration which encloses file. */ +#endif + + +#endif /* _XmosP_h */ +/* DON'T ADD ANYTHING AFTER THIS #endif */