Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-sdl2/mapview.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Functions
mapview.h File Reference
`#include <SDL2/SDL.h>`
`#include "unitlist.h"`
`#include "mapview_g.h"`
`#include "mapview_common.h"`

Go to the source code of this file.

## Functions

void | redraw_unit_info_label (struct unit_list *punitlist)
SDL_Surface * | create_city_map (struct city *pcity)
void | city_map_canvas_free (void)
SDL_Surface * | get_terrain_surface (struct tile *ptile)
void | refresh_overview (void)
void | flush_rect (SDL_Rect *rect, bool force_flush)
void | dirty_sdl_rect (SDL_Rect *rect)
void | unqueue_flush (void)
void | queue_flush (void)
void | flush_all (void)

## Function Documentation

## ◆ city_map_canvas_free()

void city_map_canvas_free | ( | void |  | ) |

Free memory allocated for the city map canvas

Definition at line 1185 of file mapview.c.

Referenced by create_city_map(), and ui_main().

## ◆ create_city_map()

SDL_Surface * create_city_map | ( | struct city * | pcity | ) |

Create new city map surface.

Definition at line 1196 of file mapview.c.

Referenced by get_scaled_city_map().

## ◆ dirty_sdl_rect()

void dirty_sdl_rect | ( | SDL_Rect * | Rect | ) |

Save Flush rect used by "end" flush.

Definition at line 181 of file mapview.c.

Referenced by arrange_widgets(), dirty_rect(), flush_rect(), option_dialog_worklist(), refresh_production_label(), refresh_worklist_count_label(), update_info_label(), widget_core_mark_dirty(), and widget_pressed_action().

## ◆ flush_all()

void flush_all | ( | void |  | ) |

flush entire screen.

Definition at line 201 of file mapview.c.

Referenced by arrange_widgets(), notify_goto_dialog_update(), popup_join_game_dialog(), popup_new_user_passwd_dialog(), popup_user_passwd_dialog(), real_resize_window_callback(), redraw_unit_info_label(), and show_main_page().

## ◆ flush_rect()

void flush_rect | ( | SDL_Rect * | rect,
|  | bool | force_flush
| ) |  |

Flush the given part of the buffer(s) to the screen.

Definition at line 103 of file mapview.c.

Referenced by draw_mouse_cursor(), unselect_widget_action(), and widget_core_flush().

## ◆ get_terrain_surface()

SDL_Surface * get_terrain_surface | ( | struct tile * | ptile | ) |

Return surface containing terrain of the tile.

Definition at line 1212 of file mapview.c.

Referenced by popup_terrain_info_dialog().

## ◆ queue_flush()

void queue_flush | ( | void |  | ) |

Called when a region is marked dirty, this function queues a flush event to be handled later by SDL. The flush may end up being done by freeciv before then, in which case it will be a wasted call.

Definition at line 152 of file mapview.c.

Referenced by dirty_all(), dirty_sdl_rect(), exit_meta_server_dlg_callback(), options_callback(), popdown_diplomat_dialog(), popup_connection_dialog(), popup_join_game_dialog(), popup_new_user_passwd_dialog(), popup_user_passwd_dialog(), and update_info_label().

## ◆ redraw_unit_info_label()

void redraw_unit_info_label | ( | struct unit_list * | punitlist | ) |

Read Function Name :) FIXME: should use same method as client/text.c popup_info_text()

Definition at line 517 of file mapview.c.

Referenced by set_turn_done_button_state(), toggle_unit_info_window_callback(), and update_unit_info_label().

## ◆ refresh_overview()

void refresh_overview | ( | void |  | ) |

Refresh (update) the viewrect on the overview. This is the rectangle showing the area covered by the mapview.

Definition at line 1119 of file mapview.c.

Referenced by flush_dirty(), gui_flush(), real_set_client_page(), resize_minimap(), and toggle_map_window_callback().

## ◆ unqueue_flush()

void unqueue_flush | ( | void |  | ) |

A callback invoked as a result of a FLUSH event, this function simply flushes the mapview canvas.

Definition at line 140 of file mapview.c.

Referenced by gui_event_loop().