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!feeder.eternal-september.org!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail From: "ldries46" Newsgroups: comp.lang.ada Subject: Printer handling from Gtk Date: Wed, 21 Nov 2018 15:45:24 +0100 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: <5bf56f84$0$14957$e4fe514c@news.kpn.nl> NNTP-Posting-Host: b7b83635.news.kpn.nl X-Trace: G=C3LiIamS,C=U2FsdGVkX1/55eYN/MU9wm5rmQ/yHojXQIcfF+m37IslDGJJtgtfgIfuPn/pkgZNNA/cgWBiFzUUFkZM61qZEzK4MBaDR6187YMMPGPvDfk= X-Complaints-To: abuse@kpn.nl Xref: reader01.eternal-september.org comp.lang.ada:54862 Date: 2018-11-21T15:45:24+01:00 List-Id: I am in need for working example of printing from a Gtk environment in Ada. I know then I need to use function "Connect_and_Run(Print_Op ,Action_Print, Main_Window) and earlier the procedure On_Draw_Page(Print_Op, Call to Draw_Page) The problem is the " Callto Draw_Page" according to the gtk.print_operations that call must be procedure On_Draw_Page (Self : not null access Gtk_Print_Operation_Record; Call : Cb_Gtk_Print_Operation_Gtk_Print_Context_Gint_Void; After : Boolean := False); where the procedure to call must b of the type Cb_Gtk_Print_Operation_Gtk_Print_Context_Gint_Void of which the type definition is: type Cb_Gtk_Print_Operation_Gtk_Print_Context_Gint_Void is not null access procedure (Self : access Gtk_Print_Operation_Record'Class; Context : not null access Gtk.Print_Context.Gtk_Print_Context_Record'Class; Page_Nr : Glib.Gint); The Draw_Page procedure has the following declaration: procedure Draw_Page (Op : access Gtkada_Print_Operation_Record'Class; Context : not null access Gtk_Print_Context_Record'Class; Page_Number : Gint) Where use clauses are used for most packages. My question is now: how must I convert the Namme Draw_Page to the type used in On_Draw_Page L. Dries