[Nvda-dev] Fw: Please last help!

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] Fw: Please last help!

Simone Dal Maso (mobile)
I forward this message of Gianluca to the develoment list.
He says:
From: "Gianluca Casalino" <[hidden email]>

> Hi,
>
> I solved all problems and the driver work fine.
> The last thing I have to implement is indexing, but Iam in trouble with
> c types.
> Here what I have to do and what I did>
>
>
> a structure
> ttscallback
> int CallMode
> int BookIndex
> Pointer Callbackproc
>
> then I have to define a c function of callback
> void (int Handle, int CallMode, int index, Int sample)
>
> I defined this class and this callbacktype:
>
>
> class TtsCallBack(Structure):
> _fields_=[
> ('CallMode', c_int),
> ('BookIndex', c_int),
> ('CallbackProc', callbackType)]
> callbackType = CFUNCTYPE(None, c_int, c_int, c_int, c_int)
>
> (I am not sure if I have to define the first none or c_int or c_void_p? )
>
> Call=TtsCallBack()
>
> this is the python method:
>
>
> @callbackType
> def CallBackproc(Handle, callmode, index, sample):
> global LastIndex
> LastIndex=index
>
>
> and I assign the function in this way:
>
> Tts3SetCallBack(Handle byref(call))
>
>
> I get a lot of types and memory errors.
> What is wrong?
> I promise this is the last my message if I can solve this problem too!!
> :-))!!
> regards
>
> Gianluca
>
> _______________________________________________
> Nvda-dev mailing list
> [hidden email]
> http://lists.nvaccess.org/listinfo/nvda-dev
>