Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/global_worklist.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Macros | Functions
global_worklist.h File Reference
`#include "registry.h"`
`#include "shared.h"`
`#include "worklist.h"`
`#include "speclist.h"`

Go to the source code of this file.

## Macros

#define | SPECLIST_TAG global_worklist
#define | SPECLIST_TYPE struct global_worklist
#define | global_worklists_iterate_all(pgwl)
#define | global_worklists_iterate_all_end
#define | global_worklists_iterate(pgwl)
#define | global_worklists_iterate_end

## Functions

void | global_worklists_init (void)
void | global_worklists_free (void)
void | global_worklists_build (void)
void | global_worklists_unbuild (void)
void | global_worklists_load (struct section_file *file)
void | global_worklists_save (struct section_file *file)
int | global_worklists_number (void)
struct global_worklist * | global_worklist_new (const char *name)
void | global_worklist_destroy (struct global_worklist *pgwl)
struct global_worklist * | global_worklist_by_id (int id)
bool | global_worklist_is_valid (const struct global_worklist *pgwl)
bool | global_worklist_set (struct global_worklist *pgwl, const struct worklist *pwl)
const struct worklist * | global_worklist_get (const struct global_worklist *pgwl)
int | global_worklist_id (const struct global_worklist *pgwl)
void | global_worklist_set_name (struct global_worklist *pgwl, const char *name)
const char * | global_worklist_name (const struct global_worklist *pgwl)

## Macro Definition Documentation

## ◆ global_worklists_iterate

#define global_worklists_iterate | ( |  | pgwl | ) |

Value:
global_worklists_iterate_all(pgwl) { \
if (global_worklist_is_valid(pgwl)) {
global_worklists_iterate_all
#define global_worklists_iterate_all(pgwl)
Definition global_worklist.h:57
global_worklist_is_valid
bool global_worklist_is_valid(const struct global_worklist *pgwl)
Definition global_worklist.c:255

Definition at line 65 of file global_worklist.h.

## ◆ global_worklists_iterate_all

#define global_worklists_iterate_all | ( |  | pgwl | ) |

Value:
if (client.worklists) { \
TYPED_LIST_ITERATE(struct global_worklist, client.worklists, pgwl)
client
struct civclient client
Definition client_main.c:149
civclient::worklists
struct global_worklist_list * worklists
Definition client_main.h:97
global_worklist
Definition global_worklist.c:49

Definition at line 57 of file global_worklist.h.

## ◆ global_worklists_iterate_all_end

#define global_worklists_iterate_all_end

Value:
LIST_ITERATE_END \
}
LIST_ITERATE_END
#define LIST_ITERATE_END
Definition speclist.h:586

Definition at line 60 of file global_worklist.h.

## ◆ global_worklists_iterate_end

#define global_worklists_iterate_end

Value:
} \
} global_worklists_iterate_all_end;
global_worklists_iterate_all_end
#define global_worklists_iterate_all_end
Definition global_worklist.h:60

Definition at line 68 of file global_worklist.h.

## ◆ SPECLIST_TAG

#define SPECLIST_TAG global_worklist

Definition at line 52 of file global_worklist.h.

## ◆ SPECLIST_TYPE

#define SPECLIST_TYPE struct global_worklist

Definition at line 53 of file global_worklist.h.

## Function Documentation

## ◆ global_worklist_by_id()

struct global_worklist * global_worklist_by_id | ( | int | id | ) |

Returns the global worklist corresponding to this id. N.B.: It can returns an invalid glocbal worklist.

Definition at line 298 of file global_worklist.c.

Referenced by add_global_worklist(), append_worklist_callback(), append_worklist_callback(), cell_edited(), commit_worklist(), city_widget::display_list_menu(), city_dialog::display_worklist_menu(), edit_worklist_callback(), menu_item_callback(), menu_item_callback(), ok_worklist_editor_callback(), refresh_worklist(), set_global_worklist(), set_worklist_callback(), set_worklist_callback(), update_worklist_report_dialog(), and worklists_response().

## ◆ global_worklist_destroy()

void global_worklist_destroy | ( | struct global_worklist * | pgwl | ) |

Destroys a glocal worklist.

Definition at line 214 of file global_worklist.c.

Referenced by edit_worklist_callback(), global_worklists_free(), global_worklists_load(), and worklists_response().

## ◆ global_worklist_get()

const struct worklist * global_worklist_get | ( | const struct global_worklist * | pgwl | ) |

Returns the worklist of this global worklist or NULL if it's not valid.

Definition at line 276 of file global_worklist.c.

Referenced by add_global_worklist(), append_worklist_callback(), append_worklist_callback(), city_widget::display_list_menu(), city_dialog::display_worklist_menu(), menu_item_callback(), menu_item_callback(), popup_worklist_editor(), refresh_worklist(), set_global_worklist(), set_worklist_callback(), and set_worklist_callback().

## ◆ global_worklist_id()

int global_worklist_id | ( | const struct global_worklist * | pgwl | ) |

Returns the id of the global worklist.

Definition at line 288 of file global_worklist.c.

Referenced by add_new_worklist_callback(), create_wl_menu(), create_wl_menu(), delete_worklist(), city_dialog::display_worklist_menu(), city_widget::gen_worklist_labels(), get_worklist(), insert_worklist(), option_dialog_worklist(), popdown_worklist(), popup_add_menu(), popup_worklist(), popup_worklist_editor(), production_menu_shown(), reset_global_worklist(), and update_worklist_report_dialog().

## ◆ global_worklist_is_valid()

bool global_worklist_is_valid | ( | const struct global_worklist * | pgwl | ) |

Returns TRUE if this global worklist is valid.

Definition at line 255 of file global_worklist.c.

## ◆ global_worklist_name()

const char * global_worklist_name | ( | const struct global_worklist * | pgwl | ) |

Return the name of the global worklist.

Definition at line 323 of file global_worklist.c.

Referenced by add_new_worklist_callback(), create_wl_menu(), create_wl_menu(), city_dialog::display_worklist_menu(), city_widget::gen_worklist_labels(), option_dialog_worklist(), popup_add_menu(), popup_worklist(), popup_worklist_editor(), production_menu_shown(), and update_worklist_report_dialog().

## ◆ global_worklist_new()

struct global_worklist * global_worklist_new | ( | const char * | name | ) |

Creates a new global worklist form a normal worklist.

Definition at line 244 of file global_worklist.c.

Referenced by add_new_worklist_callback(), city_dialog::save_worklist(), and worklists_response().

## ◆ global_worklist_set()

bool global_worklist_set | ( | struct global_worklist * | pgwl,
|  | const struct worklist * | pwl
| ) |  |

Sets the worklist. Return TRUE on success.

Definition at line 263 of file global_worklist.c.

Referenced by commit_worklist(), ok_worklist_editor_callback(), and city_dialog::save_worklist().

## ◆ global_worklist_set_name()

void global_worklist_set_name | ( | struct global_worklist * | pgwl,
|  | const char * | name
| ) |  |

Sets the name of this global worklist.

Definition at line 312 of file global_worklist.c.

Referenced by cell_edited(), global_worklist_load(), global_worklist_new(), and ok_worklist_editor_callback().

## ◆ global_worklists_build()

void global_worklists_build | ( | void |  | ) |

Check if the global worklists are valid or not for the ruleset.

Definition at line 100 of file global_worklist.c.

Referenced by global_worklists_load(), and set_client_state().

## ◆ global_worklists_free()

void global_worklists_free | ( | void |  | ) |

Free the client global worklists.

Definition at line 86 of file global_worklist.c.

## ◆ global_worklists_init()

void global_worklists_init | ( | void |  | ) |

Initialize the client global worklists.

Definition at line 76 of file global_worklist.c.

## ◆ global_worklists_load()

void global_worklists_load | ( | struct section_file * | file | ) |

Load all global worklist from a section file.

Definition at line 390 of file global_worklist.c.

## ◆ global_worklists_number()

int global_worklists_number | ( | void |  | ) |

Returns the number of valid global worklists. N.B.: This counts only the valid global worklists.

Definition at line 173 of file global_worklist.c.

## ◆ global_worklists_save()

void global_worklists_save | ( | struct section_file * | file | ) |

Save all global worklist into a section file.

Definition at line 465 of file global_worklist.c.

## ◆ global_worklists_unbuild()

void global_worklists_unbuild | ( | void |  | ) |

Convert the universal pointers to strings to work out-ruleset.

Definition at line 145 of file global_worklist.c.

Referenced by set_client_state().