paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] Understanding the PG_Application Object


From: Ulf Lorenz
Subject: Re: [paragui-users] Understanding the PG_Application Object
Date: Sun, 2 Oct 2005 21:37:16 +0200
User-agent: Mutt/1.5.10i

On Fri, Sep 30, 2005 at 10:33:36AM +0100, Caroline Middlebrook wrote:
> Hi there everyone,
> 
> I've just subscribed to this list and I don't know if anyone is actually out 
> there or not but we'll see:)
> 
> 
> I've got a very simple client / server pair of applications and I've
> just started trying to get ParaGUI to work with the client but I am
> stumped right at the beginning. It seems that we're supposed to use
> the PG_Application class and call Run() to start off the event loop
> but if thats the case where do I put my own stuff in the event loop?
> In my current client I communicate with the server, handle any SDL
> events and and render the current frame. Where do I put that code if
> I'm using the application object? 
There are two possiblities:

1. Use threads (does Windows support stuff like that?)

2. Use your own event supplier. The PG_Application object uses an event
supplier (can be changed via SetEventSupplier()) to get the SDL events
that are waiting (See pgapplication.cpp; start at PG_Application::Run()
with reading). By deriving your own supplier and having the application
ovject use an instance of it, you can insert your own code into the
event handling chain. (Though I have to admit that I have not used it so
far, so I cannot give you mroe help here for now).


good luck, 
Ulf

-- 
recursive:
            see recursive




reply via email to

[Prev in Thread] Current Thread [Next in Thread]