On Mon, 4 Jun 2007, James Supancic wrote:
> It looks like that (to implement a new UI) I'm going to have to make a
> lot of calls to the client code. I had initially expected that my UI
> code would be called by the client to do certain tasks (client->UI
> protocol, which is well documented in gui-stub) more than the inverse.
>
> Will someone explain to me the rules for the GUI calling the client?
> What functions am I allowed to use? Right now I'm trying to implement
> the GUI for the pregame phase.
>
> When I visualized the call graph for the SDL client... I think a part
> of me died... =)

Told you it would be difficult ;)

The general rule is that the client code will call the stub functions, and 
the GUI code may use the client/*_common.c|h code to implement common 
tasks. We have been working at putting general/duplicated client code into 
client/*_common.c files, but this job is only partially complete, so you 
will need to copy/look at another client for some implementation details.

We will, of course, be happy if you would help us move more 
general/duplicated code from GUIs to client/*_common.c!

Perhaps another developer who has worked with this part of the code more 
intimately can tell you more.

   - Per

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to