From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT,REPLYTO_WITHOUT_TO_CC,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,faac757f0214fa1d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-07 08:46:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!wanadoo.fr!not-for-mail From: "Jean-Claude Mahieux" Newsgroups: comp.lang.ada Subject: Re: X11 binding with FSF version of gnat Date: Fri, 7 Feb 2003 17:50:36 +0100 Organization: Top Graph'X Message-ID: References: <060220032349197450%hopperj@macconnect.com> Reply-To: "Jean-Claude Mahieux" NNTP-Posting-Host: aste-genev-bois-104-1-6-91.abo.wanadoo.fr X-Trace: news-reader11.wanadoo.fr 1044636368 23013 81.48.210.91 (7 Feb 2003 16:46:08 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 7 Feb 2003 16:46:08 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:33881 Date: 2003-02-07T16:46:08+00:00 List-Id: Why not use a full Ada implementation ? :) We plan offering our XInAda Xlib under GPL, but need to allocate some time to do it. The entire XInAda library set includes Toolkit and 1.2 Motif widget set 100% Ada95 Jean-Claude MAHIEUX Top Graph'X Sales Manager 10 All�e de la Mare Jacob 91290 La Norville - FRANCE Tel : +33 1 69 26 97 88 Fax : +33 1 69 26 97 89 Email : sales@topgraphx.com URL : http://www.topgraphx.com German Representative : orbriver-de@topgraphx.com US Representative : sroliver@topgraphx.com "jim hopper" a �crit dans le message de news: 060220032349197450%hopperj@macconnect.com... > From: james hopper > > I am having a bit of a problem with x11 bindings when compiled for osx > (the intermetrics bindings updated for linux). I was hoping someone > might have worked with the bindings on os x or have some idea whats > going on. This is using the os x version of gnat, so i don't know if > its a problem with our version of gnat or something that is specif to > gnat 5x. > > problem is this: > > there is a type in x-xlib.ads that looks like this: > > type XEvent (Event_Type: X.signed_int := X.LASTEvent + 1) is record > -- Xlib.h:934 > serial : X.unsigned_long; -- > Xlib.h:902 > send_event : Bool; -- > Xlib.h:903 > display : XDisplay_access; -- > Xlib.h:904 > case Event_Type is > when X.KeyPress | X.KeyRelease => > xkey : XKeyEvent; -- Xlib.h:937 > when X.ButtonPress | X.ButtonRelease => > xbutton : XButtonEvent; -- Xlib.h:938 > ... > > its used in test sample called basicwin.adb where the type is > instantiated as > > Report : aliased X.Xlib.XEvent; > > (note its using the default for the descriminant > > ok now its used like this: > > loop > X.Xlib.XNextEvent(Display, Report'access); > ada.text_io.put_line("Here" & X.signed_int'image(Report.Event_Type) & > Integer'image(Report'size/8)); > case (Report.Event_Type) is > when X.Expose => > ada.text_io.put_line("Expose"); > ... > when X.ConfigureNotify => > ada.text_io.put_line("ConfigureNotify"); > ada.text_io.put_line("width = " & > integer'image(integer(Report.Xconfigure.Width))); > ada.text_io.put_line("height = " & > X.signed_int'image(Report.Xconfigure.Height)); > ... > when ... > > i thought at first the problem was it wasnt being allocated because > when you use the debugger and stop right after the xnextevent and do > "print report" it shows report as a null record, however if i do > > x/20 report'address > > i can see that the data is all there and looks correct. > > when i try to access the height and width field in x.configurenotify > version of the variant record, the print statements above it gets a > constraint error. if i change x-xlib.ads to use x.xconfignotify as the > default descriminant then the height and width are fine, but then > expose variant gets a constraint error when it tries to access internal > fields of the expose variant. > > This looks like either a compiler problem, or something thats changed > from 3.13 (which i used the bindings for before) that doesnt like the > variant being changed behind the compilers back. oh yes and i have to > use -gnatp or it always blows up when i try to access it with > constraint error in the descriminant. > > Any information on this would help. > > thanks jim