Re: [Freeciv-Dev] UI->client protocol?

2007-06-04 Thread Per I. Mathisen
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


[Freeciv-Dev] UI->client protocol?

2007-06-04 Thread James Supancic
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... =)

Perhaps a UI developer could write a brief document to help me figure
out the basic interaction scheme? What data structures and functions
do I need to know about?

If you can help me limit my exposure to only the required APIs you
will render it much easier for me to to learn how to interact with the
client.

Thank you for your time,
James Steven Supancic III

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