Re: [fpc-devel] type PPGdkScreen = PGdkScreen;

2023-05-21 Thread Juha Manninen via fpc-devel
... but PPGdkScreen definition should be fixed anyways. Juha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] type PPGdkScreen = PGdkScreen;

2023-05-20 Thread Juha Manninen via fpc-devel
On Saturday, May 20, 2023, Juha Manninen wrote: > which is used in LCL function TGtk2TrayIconHandle.GetPosition: TPoint; > gtk_status_icon_get_geometry(FStatusIcon, @AScreen, @AArea, > @AOrientation); > where > AScreen: PGdkScreen; > OK, actually the @AScreen in LCL code is correct if the

[fpc-devel] type PPGdkScreen = PGdkScreen;

2023-05-20 Thread Juha Manninen via fpc-devel
In gtkstatusiconh.inc there is a type definition PPGdkScreen = PGdkScreen; It is most likely a bug. I guess it should be PPGdkScreen = ^PGdkScreen; It is used for : gtk_status_icon_get_geometry : function(status_icon:PGtkStatusIcon; screen:PPGdkScreen; area:PGdkRectangle;

Re: [fpc-devel] Gaps in a non-contiguous enum

2022-08-16 Thread Juha Manninen via fpc-devel
On Thu, Aug 11, 2022 at 9:37 PM Martin Frb via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > fpc code is still "unexpected". > It takes into account the MinValue > > type TMyEnum = (a=5, b=7); > > GetEnumName(pt, 5) // a > GetEnumName(pt, 6) // b // should be 7 > > if it is just the nth

Re: [fpc-devel] Gaps in a non-contiguous enum

2022-08-11 Thread Juha Manninen via fpc-devel
On Thu, Aug 11, 2022 at 4:44 PM Martin Frb via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > Because you are not supposed to use MaxValue > Instead use GetEnumNameCount > > for I := MinValue to MinValue + GetEnumNameCount(...) - 1 do begin > > The unit name is returned because the

[fpc-devel] Gaps in a non-contiguous enum

2022-08-11 Thread Juha Manninen via fpc-devel
I was able to fix issue https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39832 about TEnumPropertyEditor in Lazarus IdeIntf. Explanation: function GetEnumName() in FPC's rtl/objpas/typinfo.pp returns the enum's unit name for one gap in a non-contiguous enum, and an empty string for the