[fpc-devel] Chosing a graphical interface for specific proposals

luciano de souza luchyanus at gmail.com
Tue Oct 26 16:41:38 CEST 2010


2010/10/26, Sven Barth <pascaldragon at googlemail.com>:
> Am 26.10.2010 16:18, schrieb luciano de souza:
>> IUP 2.x are not compatible with screen readers. The reason is the
>> excessive usage of Canvas Draw. I did a large number of tests with IUP
>> and Lua and I can assure IUP 3.1 and 3.2, the last version, are very
>> good so in Linux as in Windows. For this reason, I would like to
>> translate IUP 3.2.
>>
>
> Ok, then I'll concentrate on IUP 3.
>
>> Yes, we can find lots of "define", but I find a problem seeming to be
>> more complicated.
>>
>> See this declaration in C:
>>
>> ihandle* IupVbox(ihandle *child, ...)
>>
>> IupVbox is a vertical container wich can encompass several objects, so
>> it's not possible to know how many arguments it will contain.
>
> Ok... you can translate this with FreePascal, but you must do it by hand
> (so you need to comment (//...) the functions in the C header).
>
> Here's the translation (I herby assume that a type "Pihandle = ^ihandle"
> and a constant "libiup='libiup.so'" are defined):
>
> Variant a:
>
> Declaration:
> function IupVbox(child: Pihandle; args: array of const): Pihandle;
> cdecl; external libiup;
>
> Calling:
> IupVbox(Iuplabel("Label 1"), [hbox1, Nil]);
>
> Variant b:
>
> Declaration:
> function IupVbox(child: Pihandle): Pihandle; cdecl; varargs; external
> libiup;
>
> Calling:
> IupVbox(Iuplabel("Label 1"), hbox1, Nil);
>
> The compiler won't do any checks on the arguments.
>
> See also:
> http://www.freepascal.org/docs-html/ref/refsu74.html#x159-16600011.9.16
>
> Regards,
> Sven
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>


-- 
Luciano de Souza



More information about the fpc-devel mailing list