hyland@esosun.UUCP (Steve Hyland) (05/17/88)
X Window System X11R2 Ada Binding At long last, we are happy to announce that Revision 2 of the X_Ada binding is now going out the door (phew!). This binding is much improved, incorporating the comments of previous users as well as all the bugs we know about. Changes you are likely to notice: 1) Masks are now boolean arrays. This should not affect your code since we had defined "or" and "and" in the previous release. 2) The specs no longer contain record representation specs. These still exist, but are in the package body now. The dependence upon C is more transparent to you. 3) Calls which return only a single value are now, logically, functions. This change, for those who have written code already, should be the most significant change in the spec. 4) We have added all calls that MIT added to their release 2. The only calls missing are If_Event, Peek_If_Event and one other If call. These will make it into Revision 3. 5) Other things we are not supporting (at this release) are the extension mechanism and the resource manager. The resource manager may come out with the toolkit. 6) We have reduced the number of compilation units to the following: x_lib_.a -- X_Windows specification x_keysyms_.a -- X_Keysyms specification x_int_.a -- X_Windows_Interface specification x_lib.a -- X_Windows body x_events.a -- X_Windows.Events body x_keyboard.a -- X_Windows.Keyboard body x_atoms.a -- X_Windows.Atoms body x_colors.a -- X_Windows.Colors body x_cursors.a -- X_Windows.Cursors body x_cutpaste.a -- X_Windows.Cut_And_Paste body x_fonts.a -- X_Windows.Fonts body x_graphic.a -- X_Windows.Graphic_Output body x_regions.a -- X_Windows.Regions body x_win_mgr.a -- X_Windows.Window_Manager body 7) String_Lists are much easier to use. They are still access types to arrays of string_pointers but no longer private. 8) We added a function Get_Command_Line_Arguments to enable you to have applications which use arguments. This returns a string_list. Parsing the list is up to you. This function is easily rewritten for your favorite compiler. 9) The C binding has six calls for text output. We have nine. Three of these are overloaded to allow you to output ASCII strings or X_Strings (arrays of X_Character). X_Character is in the range 0 .. 255 and represents most extended fonts except things like Kanji. These calls are Draw_String, Draw_Text and Draw_Image_String. 10) Mark has been hard at work cleaning up some of his examples for you. We have included Hello_World.ada and Sketch_Pad.ada. This is not the only thing he does so if you have stylistic comments, please send them to /dev/null. One thing you should look at in Sketch_Pad; we provide three ways to set the background pixmap: - Use the command line argument -b with the name of a bitmap you have created using the bitmap editor which came with your MIT distribution. Ex., Sketch_Pad -b gray - If you don't specify a bitmap as an argument, Sketch_Pad looks for a file called ".sketchpadrc", created with the same bitmap editor. - If you don't specify a bitmap and .sketchpadrc is not found, or if you do specify a bitmap and it is not found, Sketch_Pad creates a pixmap from a byte array declared locally. The reason I point this out is because these are the correct way to handle bitmaps (not with the Image type). 11) The interface portion (X_Windows_Interface) is about as portable as its going to get right now. How portable is it ? Well, Telesoft got Sketch_Pad and Hello_World up and running within two days of receiving the code. Thanks to Dave Emery at MITRE for his comments and suggestions here. Now for all of those who want the distribution, we ask that you do the following; FTP from the AJPO repository if you have FTP capability. Otherwise, we will be happy to cut a tape for you BUT, we must charge you $150 to do so. And I STRONGLY encourage you to FTP instead. Cutting these tapes takes a lot of time for us. Now for the toolkit. I would like to have shipped this at the same time but we're just not ready yet. Part of the delay has been the transition to revision 2. We couldn't test things until we had X_Lib working. So we hope to have this out Real Soon Now (before the end of May). For those of you who are unaware, it is written on top of Xr (Xray) from Hewlett Packard and it is not extensible - that is to say, if you were hoping to roll your own widgets, we are not yet supporting that feature. Our next bit of work is the implementation down to the protocol level of X_Lib. That will free you of the dependence upon the C binding to X_Lib but not to the server (obviously). This means that your Ada client will directly connect to the server through sockets (in UNIX) and generate the protocol packets without using the C calls. Following that is a full Ada toolkit. Watch for more discussion on this. Suffice it to say the Ada toolkit will be extensible, will support tasking, will provide the same set of widgets as Xr and will allow you to associate procedures or task entries to be executed as a call back routine. Finally, feel free to submit bug reports to us. We'll try to fix them as we have time. Steve Hyland Mark Nelson SAIC (619) 458-2656