Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-10

xlib method parameter names

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

The h2pas tool obviously didn't know about parameter names when it was used. Not sure if it does now.

All xlib methods that have parameters are defined as; para1, para2, para3 .....

I've redefined some of the more frequently used functions in fpGUI so the parameter names match those of the Xlib documentation. This makes it much easier to work with.

// example of a redefined function with more well know parameter names
function XmbLookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar;
    len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;

If h2pas now supports parameter names, could we regenerate the xlib.pp unit? If h2pas still doesn't, could I submit a few patches that renames the parameter names? It's wouldn't affect any developers code, only improve the understanding of the parameters easier.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Hi, The h2pas tool obviously didn't know about parameter names when it was used. Not sure if it does now.

Yes, it does.

All xlib methods that have parameters are defined as; para1, para2, para3 .....

Many official c headers do not contain parameter names. Then h2pas adds these names.

Show quoted text 14 lines
I've redefined some of the more frequently used functions in fpGUI so the parameter names match those of the Xlib documentation. This makes it much easier to work with. // example of a redefined function with more well know parameter names function XmbLookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external; If h2pas now supports parameter names, could we regenerate the xlib.pp unit? If h2pas still doesn't, could I submit a few patches that renames the parameter names? It's wouldn't affect any developers code, only improve the understanding of the parameters easier.

That would be great.

Mattias

Reply by email