comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Inconsistency in gtkada (Override_Color)
Date: Sun, 22 Jan 2017 12:32:33 +0000
Date: 2017-01-22T12:32:33+00:00	[thread overview]
Message-ID: <ly7f5njmvy.fsf@pushface.org> (raw)
In-Reply-To: eejhobFa40uU1@mid.individual.net

hreba <f_hreba@yahoo.com.br> 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


  reply	other threads:[~2017-01-22 12:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-22 11:01 Inconsistency in gtkada (Override_Color) hreba
2017-01-22 12:32 ` Simon Wright [this message]
2017-01-23 10:17   ` hreba
2017-01-23 10:38     ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox