Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-gtk-3.22/mapview.h File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Macros | Functions
mapview.h File Reference
`#include <gtk/gtk.h>`
`#include "fc_types.h"`
`#include "citydlg_common.h"`
`#include "mapview_g.h"`
`#include "mapview_common.h"`
`#include "canvas.h"`
`#include "graphics.h"`

Go to the source code of this file.

## Macros

#define | CURSOR_INTERVAL 200 /* milliseconds */

## Functions

GdkPixbuf * | get_thumb_pixbuf (int onoff)
gboolean | overview_canvas_draw (GtkWidget *w, cairo_t *cr, gpointer data)
gboolean | map_canvas_draw (GtkWidget *w, cairo_t *cr, gpointer data)
gboolean | map_canvas_configure (GtkWidget *w, GdkEventConfigure *ev, gpointer data)
void | put_unit_image (struct unit *punit, GtkImage *p, int height)
void | put_unit_image_city_overlays (struct unit *punit, GtkImage *p, int height, int *upkeep_cost, int happy_cost)
void | scrollbar_jump_callback (GtkAdjustment *adj, gpointer hscrollbar)
void | update_map_canvas_scrollbars_size (void)
void | pixmap_put_overlay_tile (GdkWindow *pixmap, float zoom, int canvas_x, int canvas_y, struct sprite *ssprite)
void | pixmap_put_overlay_tile_draw (struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *ssprite, bool fog)
void | mapview_freeze (void)
void | mapview_thaw (void)
bool | mapview_is_frozen (void)

## Macro Definition Documentation

## ◆ CURSOR_INTERVAL

#define CURSOR_INTERVAL 200 /* milliseconds */

Definition at line 32 of file mapview.h.

## Function Documentation

## ◆ get_thumb_pixbuf()

GdkPixbuf * get_thumb_pixbuf | ( | int | onoff | ) |

Get sprite for treaty acceptance or rejection.

Definition at line 292 of file mapview.c.

## ◆ map_canvas_configure()

gboolean map_canvas_configure | ( | GtkWidget * | w,
|  | GdkEventConfigure * | ev,
|  | gpointer | data
| ) |  |

Update on canvas widget size change

Definition at line 403 of file mapview.c.

Referenced by setup_widgets().

## ◆ map_canvas_draw()

gboolean map_canvas_draw | ( | GtkWidget * | w,
|  | cairo_t * | cr,
|  | gpointer | data
| ) |  |

Redraw map canvas.

Definition at line 424 of file mapview.c.

Referenced by setup_widgets().

## ◆ mapview_freeze()

void mapview_freeze | ( | void |  | ) |

Freeze the drawing of the map.

Definition at line 373 of file mapview.c.

## ◆ mapview_is_frozen()

bool mapview_is_frozen | ( | void |  | ) |

Return whether the map should be drawn or not.

Definition at line 395 of file mapview.c.

## ◆ mapview_thaw()

void mapview_thaw | ( | void |  | ) |

Thaw the drawing of the map.

Definition at line 381 of file mapview.c.

## ◆ overview_canvas_draw()

gboolean overview_canvas_draw | ( | GtkWidget * | w,
|  | cairo_t * | cr,
|  | gpointer | data
| ) |  |

Redraw overview canvas

Definition at line 356 of file mapview.c.

Referenced by setup_widgets().

## ◆ pixmap_put_overlay_tile()

void pixmap_put_overlay_tile | ( | GdkWindow * | pixmap,
|  | float | zoom,
|  | int | canvas_x,
|  | int | canvas_y,
|  | struct sprite * | ssprite
| ) |  |

Put overlay tile to pixmap

Definition at line 543 of file mapview.c.

Referenced by put_cross_overlay_tile().

## ◆ pixmap_put_overlay_tile_draw()

void pixmap_put_overlay_tile_draw | ( | struct canvas * | pcanvas,
|  | int | canvas_x,
|  | int | canvas_y,
|  | struct sprite * | ssprite,
|  | bool | fog
| ) |  |

Only used for isometric view.

Definition at line 566 of file mapview.c.

## ◆ put_unit_image()

void put_unit_image | ( | struct unit * | punit,
|  | GtkImage * | p,
|  | int | height
| ) |  |

Fill image with unit gfx

Definition at line 496 of file mapview.c.

Referenced by city_dialog_update_present_units(), and set_unit_icon().

## ◆ put_unit_image_city_overlays()

void put_unit_image_city_overlays | ( | struct unit * | punit,
|  | GtkImage * | p,
|  | int | height,
|  | int * | upkeep_cost,
|  | int | happy_cost
| ) |  |

FIXME: For now only two food, two gold one shield and two masks can be drawn per unit, the proper way to do this is probably something like what Civ II does. (One food/shield/mask drawn N times, possibly one top of itself. – SKi

Definition at line 521 of file mapview.c.

Referenced by city_dialog_update_supported_units().

## ◆ scrollbar_jump_callback()

void scrollbar_jump_callback | ( | GtkAdjustment * | adj,
|  | gpointer | hscrollbar
| ) |  |

Scrollbar has moved

Definition at line 721 of file mapview.c.

## ◆ update_map_canvas_scrollbars_size()

void update_map_canvas_scrollbars_size | ( | void |  | ) |

Refresh map canvas scrollbar as canvas size changes

Update the size of the sliders on the scrollbars.

Definition at line 696 of file mapview.c.