Description
Objects derived from this type may be used to access the
data of a GoData object.
This is an abstract base class of which no objects may be
instantiated. Derived classes, which use the GoClient
infrastructure, are GoPlayerList and GoGameList.
Details
struct GoClient
struct GoClient {
GoData * data;
}; |
go_client_register_player ()
A virtual method to register a player with the Client. This is
called exactly once for each player by the underlying GoData
object. If your subclass overrides this method, it must "chain
up" the call.
This function is called by the GoData object the view
is connected to. There is no need to call it yourself.
go_client_unregister_player ()
A virtual method to unregister a player from the Client.
This is called once for each removed player by the underlying GoData
object. If your subclass overrides this method, it must "chain
up" the call.
This function is called by the GoData object the view
is connected to. There is no need to call it yourself.
go_client_player_count ()
int go_client_player_count (GoClient *self); |
Determine the number of players in self.
go_client_player ()
Get player data from the database.
go_client_foreach_player ()
Calls function f for each of the client's players in turn,
using data as the client_data argument.
go_client_sort_players ()
Sort the list of players displayed by self.
The order for the client self is independent of the sort
order for any other client.
The function redisplay() is called internally to display
the new player list.
go_client_register_game ()
A virtual method to register a game with the Client. This is
called exactly once for each game by the underlying GoData
object. If your subclass overrides this method, it must "chain
up" the call.
This function is called by the GoData object the view
is connected to. There is no need to call it yourself.
go_client_unregister_game ()
A virtual method to unregister a game from the Client. This is
called once for each removed game by the underlying GoData
object. If your subclass overrides this method, it must "chain
up" the call.
This function is called by the GoData object the view
is connected to. There is no need to call it yourself.
go_client_game_count ()
int go_client_game_count (GoClient *self); |
Determine the number of games in self.
go_client_game ()
Get game data from the database.
go_client_foreach_game ()
Calls function f for each of the client's games in turn,
using data as the client_data argument.
go_client_redisplay ()
void go_client_redisplay (GoClient *self,
gboolean games,
gboolean players); |
Redisplay all the data of the client.
This must be called every time the database is changed.
You may do a whole batch of changes at once (e.g. loading
several players and games from a file) and call redisplay afterwards.
games must be set to TRUE, if there are any changes to the list
of games. players must be set, if there are any changes to the
list of players.
This function works by calling the print_player() and print_game()
functions.
go_client_make_game_visible ()
Call select_game() for the game g.
go_client_print_player ()
Print a player into a GoClient object. This is called
foreach player everytime there is a change in the player list.
If the playerlist is empty, this function is called
as print_player(self, NULL, -1, 0). Subclasses should
clear the display in this case.
This is a pure virtual class method of the GoClient class.
Subclasses should override this in order to be notified
of changes in the player list. There should be no need to
call this function manually.
go_client_print_game ()
void go_client_print_game (GoClient *self,
GoGame *game,
int i,
int n); |
Print a game into a GoClient object. This is called
foreach game everytime there is a change in the game list.
If the gamelist is empty, this function is called
as print_game(self, NULL, -1, 0). Subclasses should
clear the display in this case.
This is a pure virtual class method of the GoClient class.
Subclasses should override this in order to be notified
of changes in the game list. There should be no need to
call this function manually.
go_client_select_game ()
Select game number i from the GoClient object and
try to make it visible on the screen.
This is a pure virtual class method of the GoClient class.
Subclasses should override this in order to be notified
of changes in the game list. There should be no need to
call this function manually.
GoClientGameFunc ()
void (*GoClientGameFunc) (GoClient *c,
GoGame *g,
int i,
int n,
gpointer client_data); |
GoClientPlayerFunc ()
void (*GoClientPlayerFunc) (GoClient *c,
GoPlayer *p,
int i,
int n,
gpointer client_data); |
GoComparePlayersFunc ()
int (*GoComparePlayersFunc) (const GoPlayer *a,
const GoPlayer *b,
void *client_data); |