------------------------------------------------------------------------------ I decide to share to the OS-9 community a trap version of X11R6pl13 X Window System libraries. This is beta version with probably a few uncovered bugs inside ;-) I hope it may be usefull for samebody, however. Please, send any comments and bug reports to: aha@it.pw.edu.pl Adam ------------------------------------------------------------------------------ Warsaw, 22.03.96 X11R6pl13 X Window System libraries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OS-9 trap version 0.6 ~~~~~~~~~~~~~~~~~~~~~ X11 R6 libraries, trap version apply to patch level 13 This distribution for OS-9 contains the fallowing directories: EXAMPLE - example of using trap handler basicwin.c xengine.c makefile INCLUDE - header files for X11 and os9unix.l LIBS X11R6shl - trap handler X11R6shl.l - user to trap interface library os9unix.l - unix to os9 interface library Following X libraries are included into X11R6shl trap handler: - FSlib - ICElib - PEX5lib - SMlib - X11lib - Xaulib - Xawlib - XDMCPlib - Xextlib - XIElib - Xilib - XMUlib - Xtlib - XTSTlib The X11R6shl trap handler supports more than 1600 X11 functions! Release notes: 1. Following CFLAGS are desired during compilation: CFLAGS = -ibtp=020d 2. In every callback function which can use global or static variables or call any run-time library function (ie: printf, malloc) you should put two 'magic' functions: Begin_CallBack_Procedure() at the beginning of your callback function and End_CallBack_Procedure() at the end of it. For example: XtCallbackProc redraw_callback(w, event, params, nparams) Widget w; XEvent *event; String *params; Cardinal *nparams; { Arg args[10]; static int flag = 0; ----> Begin_CallBack_Procedure(); XtSetArg(args[0], XtNwidth, 0); XtGetValues(w, args, 2); if (++flag>10) { system ("sleep 15"); ! --> exit(); } if( flag > 5 ) { ! --> End_CallBack_Procedure(); return; } width = args[0].value; height = args[1].value; XFreePixmap(XtDisplay(engine), enginePixmap); enginePixmap = XCreatePixmap(XtDisplay(engine),XtWindow(engine), width, height, DefaultDepth(XtDisplay(engine), 0)); ----> End_CallBack_Procedure(); } 3. NOTE: Following identyficators are not a constant values: asciiSinkObjectClass asciiSrcObjectClass asciiTextWidgetClass asciiStringWidgetClass asciiDiskWidgetClass boxWidgetClass commandWidgetClass dialogWidgetClass formWidgetClass gripWidgetClass labelWidgetClass listWidgetClass menuButtonWidgetClass multiSinkObjectClass multiSrcObjectClass panedWidgetClass pannerWidgetClass portholeWidgetClass repeaterWidgetClass scrollbarWidgetClass simpleWidgetClass simpleMenuWidgetClass smeObjectClass smeBSBObjectClass smeLineObjectClass stripChartWidgetClass templateWidgetClass textWidgetClass textSinkObjectClass textSrcObjectClass toggleWidgetClass treeWidgetClass viewportWidgetClass sessionShellWidgetClass shellWidgetClass overrideShellWidgetClass wmShellWidgetClass transientShellWidgetClass topLevelShellWidgetClass applicationShellWidgetClass vendorShellWidgetClass widgetClassRec _XtQString _XtAppDestroyCount _XtperDisplayList XtCXtToolkitError XtShellStrings XtStrings _XtGlobalTM _Xdebug compositeWidgetClass compositeClassRec constraintClassRec constraintWidgetClass coreWidgetClass widgetClass _XtInheritTranslations hookObjectClass hookObjClassRec colorConvertArgs screenConvertArg objectClass objectClassRec rectObjClass rectObjClassRec shellClassRec overrideShellClassRec wmShellClassRec transientShellClassRec topLevelShellClassRec applicationShellClassRec sessionShellClassRec vendorShellClassRec _IceConnectionObjs _IceConnectionStrings _IceConnectionCount _IceProtocols _IceLastMajorOpcode _IceAuthCount _IceAuthNames _IcePoAuthProcs _IcePaAuthProcs _IceVersionCount _IceVersions _IceWatchProcs _IceErrorHandler _IceIOErrorHandler XawWidgetArray XawWidgetCount asciiSinkClassRec asciiSrcClassRec asciiTextClassRec asciiStringClassRec asciiDiskClassRec boxClassRec commandClassRec dialogClassRec formClassRec gripClassRec labelClassRec listClassRec menuButtonClassRec multiSinkClassRec multiSrcClassRec panedClassRec pannerClassRec portholeClassRec repeaterClassRec scrollbarClassRec simpleMenuClassRec simpleClassRec smeBSBClassRec smeLineClassRec smeClassRec stripChartClassRec FMT8BIT XawFmt8Bit XawFmtWide _XawTextActionsTable _XawTextActionsTableCount textClassRec textSinkClassRec textSrcClassRec toggleClassRec treeClassRec viewportClassRec PEXDisplayInfoHeader PEXPickCache PEXPickCacheSize PEXPickCacheInUse PEX_fp_convert _SmcOpcode _SmsOpcode _SmVersionCount _SmcVersions _SmsVersions _SmAuthCount _SmAuthNames _SmcAuthProcs _SmsAuthProcs _SmsNewClientProc _SmsNewClientData _SmcErrorHandler _SmsErrorHandler so, you cannot use it for example in this way: MyClassRec myClassRec = { { /* core fields */ /* superclass */ &widgetClassRec, ... } }; WidgetClass myWidgetClass = &myClassRec; You should use it following way instead: MyClassRec myClassRec = { { /* core fields */ /* superclass */ NULL, ... } }; WidgetClass myWidgetClass = &myClassRec; and before initialization: #include myWidgetClass -> core_class.superclass = &widgetClassRec; 4. or This is a result of leaving uncleared points 1 .. 3! It may happen also when your '.Xdefaults' file has unproper values (for example missing font names) 5. Set envar XENVIRONMENT to pointing your '.Xdefaults' file, i.e: setenv XENVIRONMENT /dd/x11r6/.Xdefaults 6. Set envar XAPPLRESDIR to pointing application specific resource file, i.e if you start 'xcalc' and have resource file 'XCalc' in '/dd/XRES' directory, you should set: setenv XAPPLRESDIR /dd/XRES 7. Set envar XLOCALEDIR to pointing system specific locale database, ie: setenv XLOCALEDIR /dd/LOCALE COPYRIGHT OF OS-9 PORT: This software is Copyright (C) Adam Hajduk, 1996. You are free to copy, modify and distribute this software as you see fit, and to use it for any purpose. DISCLAIMER: The author makes no warranties, either expressed or implied, with respect to this software, its quality, performance, merchantability, or fitness for any particular purpose. This software is distributed AS IS. The user of this software assumes all risks as to its quality and performance. In no event shall the author be liable for any direct, indirect or consequential damages, even if the author has been advised as to the possibility of such damages. AUTHOR OF OS-9 PORT: Adam Hajduk Snail mail: E-mail: aha@it.pw.edu.pl Warsaw University of Technology, Faculty of Transport, ul. Koszykowa 75 00-662 Warsaw, POLAND ABOUT X WINDOW SYSTEM: Copyright (c) 1993, 1996 X Consortium 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 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 X CONSORTIUM 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. ------------------------------------------------------------------------------