[OLPC-Games] Howto connect GTK mouse events to pygame events

Noah Kantrowitz kantrn at rpi.edu
Tue May 29 01:01:13 EDT 2007


Noah Kantrowitz wrote:
> stas zytkiewicz wrote:
>   
>> On 5/29/07, Noah Kantrowitz <kantrn at rpi.edu> wrote:
>>     
>>> stas zytkiewicz wrote:
>>>       
>>>> Hi, I'm using the 'proof of concept' code from Noah Kantrowitz's
>>>>         
>>> USInvaders
>>>       
>>>> to integrate schoolsplay into Sugar and it all works pretty well
>>>>         
>>> except that
>>>       
>>>> the mouse events are not linked.
>>>>         
>> [..]
>>     
>>> The biggest reason I have not added this yet is there is still some
>>> concern on the SDL vs. Cairo front. I'll look at adding this soon, if
>>> only as an interim measure.
>>>       
>> Thanks, Noah that would be great.
>> About the SDL vs Cairo.
>> I was under the impression that SDL was the toolkit for edu-games on
>> the XO?
>> Anyway, if you add mouse support, I will demonstrate that SDL beats Cairo
>> every time when doing edu-games ;-)
>>     
> The API is PyGame, not SDL. The proposed alternative is to re-implement
> the PyGame API using Cairo. This would take care of integrating things
> like Pango and SVG rendering, which SDL lacks natively (and so does
> PyGame). The other reason this might be a better option is that OLPC is
> already committing to making Cairo run as as fast/effectively as it can
> on the XO hardware. Is it really wise to divide our efforts? I'm not
> saying this is obviously the way to go, but it should really be answered
> at some point soon.
>
>   
I should probably mention that I mean using Cairo/Pango for graphics,
and the GTK mainloop for interface (as the PyGameCanvas widget already
does).

--Noah

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://mailman.laptop.org/pipermail/games/attachments/20070529/ffb8a22b/attachment.pgp 


More information about the Games mailing list