comp.lang.ada
 help / color / mirror / Atom feed
From: tim@trident.NoSubdomain.NoDomain (Timothy Barton)
Subject: Re: Ada Motif bindings ?
Date: 23 Nov 94 16:18:51 GMT
Date: 1994-11-23T16:18:51+00:00	[thread overview]
Message-ID: <840@trident.datasys.swri.edu> (raw)

In article <3aqvlm$4ih@news.tamu.edu>, you write:
|> 
|>    Does anyone (other than the developers), have any experience using 
|> Ada Motif bindings? ...

snip, snip

I have used the AXI bindings for over 2 years and am very pleased with them.
Our application is developed on SunOS and then recompiled for Solaris and
DEC Ultrix (and soon OSF/1) targets.  I have also used the SERC GNU bindings
several times over the last couple of months.

Both sets of bindings work fine.  I prefer the AXI bindings because the Ada
sources are much easier to read.  The GNU bindings are broken into many
more packages, and I found it frustrating to have to determine which new
package I needed when ever I added a new Xt call.  The AXI bindings IMHO are
much cleaner, there are only 4 or 5 packages: X11, Xt, Xm, Xmdef.  Some
sample code from each follows:

AXI
---
with Xt;

begin

  App_Context := Xt.CreateApplicationContext;
  Xt.AppInitialize( App_Context, "XAlto", options, 0, argv, fallback,
                    Args, 0, W(TOP_LEVEL) );

  menu_pane := Xm.CreatePulldownMenu( MB_Main, "", Args, 0 );

  Xt.AppMainLoop( App_Context );




SERC
----
with X_System_Utilities;
with X_Lib;                  use X_Lib;
with Xt;                     use Xt;
with Xt_Shell;               use Xt_Shell;
with Xt_StringDefs;          use Xt_StringDefs;

procedure

  use X_System_Utilities.Command_Line_Utilities;
  use Xt_Ancillary_Types;
  use Xt_Callbacks;
  use Xt_Composite_Management;
  use Xt_Event_Management;
  use Xt_Instance_Management;
  use Xt_Initializers;
  use Xt_Resource_Management;
 
begin

  App := Xt_Create_Application_Context;

  Xt_Open_Display( App, "", "line_graph", "Line_Graph",
                   X_Lib.Resource_Manager.Null_Xrm_Options, Argc, Argv, Dpy );

  Shell_W := Xt_App_Create_Shell( "line_graph", "Line_Graph",
                                  Application_Shell_Widget_Class, Dpy,
                                  args(0..1) );
  Xt_App_Main_Loop( App );

------------------------------------------------------------------------------

Hopefully, from this you can see the difference in the amount of separate
packages the GNU bindings are broken into.  You may view this as good for
obvious Ada visibility reasons, but I found it anoying.

I've had good luck with both.  I have not used SERC's MOTIF product, only
the free Xlib, Xt bindings.

Hope this helps.

------------------------------------------------------------------------------
Timothy J. Barton                         tim@trident.datasys.swri.edu
Southwest Research Institute (SwRI)       (210) 522-3540
San Antonio, Texas                  "Smooth seas do not make skillful sailors"



             reply	other threads:[~1994-11-23 16:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-23 16:18 Timothy Barton [this message]
  -- strict thread matches above, loose matches on Subject: below --
1994-11-21 20:24 Ada Motif bindings ? Ron J Theriault
1994-11-22 16:52 ` Larry Kahn
1994-11-23 13:30 ` Garlington KE
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox