![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
AXI Release Notes Version 4.4.0
ContentsThis chapter is organized as follows:
ObjectivesAXI 4.4.0
AXI version 4.4.0 is an upward compatible minor revision of AXI 4.1.6. AXI application code written for the earlier version should continue to work with AXI 4.4.0 without the need for changes.
AXI licensing has changed in AXI 4.4.0. AXI users upgrading to 4.4.0 will have to obtain new FlexLM license codes to compile and link AXI applications.
The only changes in AXI 4.4.0 are:
- AXI FlexLM feature names have changed, in order to provide architecture-independent licensing of the AXI libraries. Feature names such as "axi.ada95.sun4" have been changed to "axi.ada95".
- AXI internal libraries are no longer supplied as shared libraries. These were a nuisance to link and to install on target computers, and they provided no real benefits.
- The generic subprograms X_Lib.X_Peek_If_Event, X_Lib.X_Check_If_Event, and X_Lib.If_Event have been removed from the STARS Xlib/Xt library. These required semantics that are not portable and are no longer supported by Apex 4.0.0.
- The types X_Lib.Milliseconds_Type, X_Lib.Bell-Volume_Type, X_Lib.Percent_Type, X_Lib.Hertz_Type, X_Lib.Led_Type, and Xt_Stars.Xt_Boolean no longer have range declarations. Range declarations on these types caused record layouts to be calculated improperly.
- There is a new function Xlib.XFreeStringList that frees X Window System string list objects such as the string list returned by XGetCommand.
Testing ConfigurationThis version has been tested on a limited hardware and software configuration consisting of the following:
Solaris
- Sun SPARCstation 20 Workstation with the following software:
- Sun SPARC Solaris
- Rational Apex 4.2.0b
- Rational Apex 4.2.2b
- Rational Apex 4.4.0
- Sun OpenWindows 3.6.1
Alpha, OSF/1, Tru64 UNIX
- DEC 3000 M300 Workstation with the following software:
- Tru64 UNIX (formerly Digital UNIX) 4.0D
- Rational Apex 4.2.0b
- Rational Apex 4.2.2b
HP-UX
- HP 9000/715 Workstation with the following software:
- HP-UX 11.0
- Rational Apex 4.2.0b
- Rational Apex 4.2.2b
- HP CDE 2.1, Motif 2.1, and X11R6
- Patches described under "Host-dependent Information"
SGI MIPS/IRIX
- SGI Indigo 2 Workstation with the following software:
- IRIX 6.5
- Rational Apex 4.2.0b
- Rational Apex 4.2.2b
IBM RS/6000 AIX
- IBM PowerPC Workstation with the following software:
- AIX 4.3.3
- Rational Apex 4.2.0b
- Rational Apex 4.2.2b
- IBM AIXWindows 3.0 (X11R6 and Motif 2.1)
- SGI X11R6 and Motif 1.2
Linux
- Red Hat 8.0 Distribution Kernel version 2.4.18-14 with the following software:
- Red Hat 8.0 Distribution for X11R6 and Motif
- Rational Apex 4.2.2b
Red Hat Enterprise 3.0 Distribution Kernel version 2.4.21-58.ELsmp with the following software:
- Red Hat 8.0 Distribution for X11R6 and Motif
- Apex 4.4.0
Hummingbird Communications Ltd. (HCL) eXceed 6.2 X Server and MWM on all platforms.
Summary of ChangesAXI 4.4.0 Refresh #5
The test subsystems and veiws are delivered under $APEX_BASE/ada. The make_test script has been updated and the $APEX_AXI_HOME/ada direcotry has been deleted.
AXI 4.1.9 to AXI 4.4.0
Threaded Models have Been Removed
Apex 4.4.0 now uses the pragma Concurrent_Processing_Policy in a main program to determine whether threads are used or not.
AXI 4.1.6 to AXI 4.1.9
This section lists the changes from AXI version 4.1.6 to AXI version 4.1.9.
FlexLM Feature Names
In order to make licensing of AXI independent of the host computer architecture, AXI feature names have been changed in AXI 4.1.9. AXI users will have to obtain new FlexLM license codes in order to compile and link with AXI 4.1.9. The new feature names and the corresponding old feature names are:
- Feature axi replaces axi.alpha, axi.hppa, axi.rs6k, axi.sgi, and axi.sun4.
- Feature axi.ada95 replaces axi.ada95.alpha, axi.ada95.hppa, axi.ada95.rs6k, axi.ada95.sgi, and axi.ada95.sun4.
Shared Library Support
New Subprograms
Subprograms Removed
Type Declaration Changes
Host-specific InformationThis section lists items specific to this compiler and host environment.
SPARC/Solaris and OpenWindows Environment
The SPARC/Solaris and OpenWindows environment does not present any unusual portability problems.
AXI applications that depend on interaction with the Motif window manager (e.g. by setting mwm window manager hints) will not work correctly with the OpenLook window manager, because the OpenLook window manager will ignore mwm-specific resources. Note that this is true of any Motif application running on OpenWindows; it is not a limitation specific to AXI.
Linking Issues using Motif on Linux
The standard X/Motif libraries installed on Linux have a serious problem which will prevent any of the AXI Motif examples from linking successfully.
There is a conflict between the libraries /usr/X11R6/lib/libXm.a and /usr/X11R6/lib/libXmu.a.
Both libraries contain a version of the object file EditresCom.o, but there are differences between the versions of this object file. The latest version appears to be in /usr/X11R6/lib/Xmu.a.
When both these libraries are used the linker detects the conflict and the link fails.
The suggested way to work around this issue is to modify libXm.a and remove the EditresCom.o module from the archive, as libXm.a appears to contain the older version of this module.
The following commands will remove the object module from the library:
If it is preferred that the existing library remains unchanged then make a copy of libXm.a to a private directory and modify it there. You will then need to modify the NON_ADA_LINKAGE switch of any view that link Motif applications to include this private directory on the linker search path so that the modified version of libXm.a is used. Insert -L<private_directory_path> just before -lXm.
Ada Callbacks
To register a callback with either Xt or Motif certain conventions should be followed. Callback procedures should always be library-level procedures or declared in library-level packages. Callback procedures should never be instantiations of generics. This ensures that the compiler will have proper visibility to the callback procedure and any global data used by the procedure. Pragma EXTERNAL or EXPORT is needed for the compiler to generate proper subprogram linkage.
A simple example of a callback routine is illustrated below:
with Xt;
package Callbacks is
procedure HelloWorldCB (
w : Xt.Widget;
client : Xt.Pointer;
call : Xt.Pointer );
pragma EXTERNAL (C, HelloWorldCB); -- Ada 83; use EXPORT in Ada 95
end Callbacks;
with Text_IO;
package body Callbacks is
procedure HelloWorldCB (
w : Xt.Widget;
client :Xt. Pointer;
call : Xt.Pointer ) is
begin
Text_IO.Put_Line( "Hello World" );
end HelloWorldCB;
end Callbacks;
with Xt;
with Xtdef;
with Callbacks;
procedure HelloWorld is
button : Widget;
begin
-- Widget creation code
-- ...
Xt.AddCallback ( button, Xtdef.NCallback,
Callbacks.HelloWorldCB'Address,
Xt.XtNULL );
-- ...
Xt.AppMainLoop( app_context );
end HelloWorld;This example will add the callback Callbacks.HelloWorldCB to the button widget
Ada Event Handlers
The same restrictions and conventions that apply to Ada callbacks also apply to Ada event handlers. With AXI 4.4.0 for Apex, however, it is no longer necessary to call Xlib.ConvertCToAdaEvent before dereferencing an event pointer. An example of an Ada event handler is the following:
with Xlib;
with Xt;
package Event_Handler is
procedure Keyboard_Event_Handler (
The_Widget : in Xt.Widget;
Data : in Xt.Pointer;
Event : in Xlib.Event_Ptr);
pragma External (C, Keyboard_Event_Handler); -- pragma Export in Ada 95
end Event_Handler;
package body Event_Handler is
procedure Keyboard_Event_Handler (
The_Widget : in Xt.Widget;
Data : in Xt.Pointer;
Event : in Xlib.Event_Ptr)
is
Keysym : Xlib.Keysym;
Status : Xlib.ComposeStatus;
Str_Ptr : Xlib.String_Ptr := new String'(" ");
Number : Xlib.Status;
begin
Xlib.LookupString (Event.all, Str_Ptr.all, Keysym, Status, Number);
if (Str_Ptr (1) = `q' or Str_Ptr (1) = `Q') then
C_Exit (0);
end if;
end Keyboard_Event_Handler;
end Event_Handler;Control of Event Loop Behavior
In previous versions of AXI, the event loop was blocking: it did not allow task scheduling to occur, unless a callback or an event handler happened to execute a task scheduling event. The usual workaround for multi-task Ada programs was to write an application-specific event loop.
In AXI 4.4.0, additional control over the behavior of the event loop (Xt.AppEventLoop) is possible. There are global variables in package Xt.Signal that provide this control. These variables should be set before Xt.OpenDisplay (or any subprogram that calls Xt.OpenDisplay, e.g. Xt.AppInitialize) is called and should not be changed thereafter.
The global variables in Signal and their defaults and effects are as follows:
Do_Wait_On_Sigio : Boolean := False;
- In AXI 4.4.0, this variable is of no effect; AXI 4.4.0 never waits on any UNIX signal.
- If Blocking_Behavior is set to True, potentially blocking AXI subprograms such as Xt.AppEventLoop will block task scheduling. If Blocking_Behavior is set to False, these subprograms will poll, allowing task scheduling to occur.
- If it is necessary in an application to allow task scheduling to occur, but polling behavior is not desirable, setting both Blocking_Behavior and Cooperative_Tasks to True will allow task scheduling after each event handled by the AXI event loop.
- When the AXI event loop is allowed to poll (Blocking_Behavior is False), Default_Delay establishes the interval (in seconds) between polling events.
Motifburger demo
If the Motifburger demo fails with the error message "Invalid URM code" followed by an unhandled exception, the Motif function MrmOpenHierarchy (which is deprecated in Motif 1.2) is incompatible with the Motifburger UIL file. If this occurs, make the following changes to the file motifburger.2.ada:
- Change the line with Mrm; to with Mrm1_2_2;
- After the line procedure Motifburger is, add the line:
- Change the line Mrm.Openhierarchy (Vec, to:
Recompile and relink the file motifburger.2.ada.
Periodic demo
The Periodic Table of Widgets demo has some widgets that may overlap each other. If this occurs, it is because the local X Window System environment uses default fonts that are larger than those used when the demo was first laid out, or the display dimensions are smaller than when the demo was first laid out. The Periodic Table of Widgets demo works best when the default fonts are 12 point or less, and the display dimensions are 1600x1200. This is not a defect in the AXI bindings.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2003, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |