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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable 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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Inconsistency in gtkada (Override_Color) Date: Sun, 22 Jan 2017 12:32:33 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="c969b48d4cb9606a65cb9441fa652b51"; logging-data="32360"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VOgM8j420K3RnxrChMdxaJ8eV9CIR2sQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:2TxL+z+81IPYwzHfxJ9sTCNqp8I= sha1:GQs4o9bnDWhbBsg27C1GyaUtmvs= Xref: news.eternal-september.org comp.lang.ada:33120 Date: 2017-01-22T12:32:33+00:00 List-Id: hreba writes: > I found an inconsistency in Gtkada 2015. > > A procedure specification there is > > procedure Override_Color > (Widget : not null access Gtk_Widget_Record; > State : Gtk.Enums.Gtk_State_Flags; > Color : Gdk.RGBA.Gdk_RGBA); > > The last comment line reads: > "Since: gtk+ 3.0 "state": the state for which to set the color > "color": the color to assign, or null to undo the effect of previous > calls to Gtk.Widget.Override_Color". > > This is a copy from GTK where the color parameter is indeed a pointer, > and not a record as Gdk.RGBA.Gdk_RGBA. Several other > override-procedures show the same inconsistency between specification > and description. > > Any workaround for resetting the color? The same inconsistency is present in the Github version[1]. I suppose an issue should be raised. Looks to me as though you are supposed to use Gdk.RGBA.Null_RGBA (which gets translated internally into the needed null). There are also White_RGBA, Black_RGBA. [1] https://github.com/AdaCore/gtkada