From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp1-1.free.fr!not-for-mail Newsgroups: comp.lang.ada References: <6133e791$0$6461$426a74cc@news.free.fr> <6134cb26$0$3697$426a74cc@news.free.fr> <6134db32$0$6461$426a74cc@news.free.fr> <6134dc71$0$3693$426a74cc@news.free.fr> <6134e03d$0$3372$426a74cc@news.free.fr> From: DrPi <314@drpi.fr> Subject: Re: GtkAda callback and event Date: Sun, 5 Sep 2021 22:49:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Message-ID: <61352d42$0$3749$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 05 Sep 2021 22:49:06 CEST NNTP-Posting-Host: 82.65.30.55 X-Trace: 1630874946 news-2.free.fr 3749 82.65.30.55:60382 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:62651 List-Id: Le 05/09/2021 à 17:53, Dmitry A. Kazakov a écrit : > On 2021-09-05 17:20, DrPi wrote: >> Le 05/09/2021 à 17:12, Dmitry A. Kazakov a écrit : > >>> It is a part of GValues object. But you could create a child package >>> that would have access to the internals of GValue and get access to >>> C_GValues in GValue. >>> >> I didn't know I can create a  child Package of a GtkAda Package myself. > > Of course you can: > >    package Glib.Values.My_Stuff is >       function Get_C_Values (List : GValues) return C_GValues; >    end Glib.Values.My_Stuff; > >    package body Glib.Values.My_Stuff is >       function Get_C_Values (List : GValues) return C_GValues is >       begin >          return List.Arr; >       end Get_C_Values; >    end Glib.Values.My_Stuff; > That's what I did after you told me it's possible. My first attempt was with an expression function like the following : package Glib.Values.User is function Get_C_GValues (Val : GValues) return C_GValues is (Val.Arr); end Glib.Values.User; But that didn't work. The compiler complained about something I don't remember. I then used the classical function implementation and all went well.