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.3 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE, STOX_REPLY_TYPE_WITHOUT_QUOTES,XPRIO autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail From: "ldries46" Newsgroups: comp.lang.ada Subject: Gtk3 Cairo Context 0x0 Date: Thu, 21 Jul 2016 16:42:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 Message-ID: <5790df74$0$32235$e4fe514c@news.kpn.nl> NNTP-Posting-Host: 77.168.179.107 X-Trace: 1469112180 dreader32.news.xs4all.nl 32235 77.168.179.107:51425 X-Complaints-To: abuse@kpn.nl Xref: news.eternal-september.org comp.lang.ada:31116 Date: 2016-07-21T16:42:41+02:00 List-Id: I am creating a new Drawing_Area. I have packed the drawing Area in a Viewport which is packed in a scrolled window. Now have the program line: CR := Create(Get_Window (MainWindow.DrawingArea)); where MainWindow.DrawingArea is type Gtk_Drawing_Area with the value 0x4694f98 (meaning the value is no null) created with Gtk_New (MainWindow.DrawingArea); The Cairo context CR has however a value 0x0 which finally results when using Save(CR); in: Program received signal SIGSEGV, Segmentation fault. cairo_save (cr=0x0) at ../../src/src/cairo.c:409 409 ../../src/src/cairo.c: No such file or directory. Current language: auto The current source language is "auto; currently c". In the version 2015 of GtkAda from AdaCore the create function worked and was positioned after the creation of the Drawing Area but before the connection to the "draw" event. On the Gtkada group I do get only the answer that only in the handler I can get the context but that means that I cannot create a framework within the area before any work with on the area because therefore I need the cairo context f.i. to set s line color. What must I do to retrieve a valid CR? Bertus