Freeciv-3.3
Loading...
Searching...
No Matches
Functions
widget_core.c File Reference
#include <SDL2/SDL.h>
#include "colors.h"
#include "graphics.h"
#include "mapview.h"
#include "themespec.h"
#include "widget.h"
#include "widget_p.h"

Go to the source code of this file.

Functions

void set_wstate (struct widget *pwidget, enum widget_state state)
 
void set_wtype (struct widget *pwidget, enum widget_type type)
 
void set_wflag (struct widget *pwidget, enum widget_flag flag)
 
void clear_wflag (struct widget *pwidget, enum widget_flag flag)
 
enum widget_state get_wstate (const struct widget *pwidget)
 
enum widget_type get_wtype (const struct widget *pwidget)
 
enum widget_flag get_wflags (const struct widget *pwidget)
 
void widget_free (struct widget **pwidget)
 
static void widget_core_set_area (struct widget *pwidget, SDL_Rect area)
 
static void widget_core_set_position (struct widget *pwidget, int x, int y)
 
static void widget_core_resize (struct widget *pwidget, int w, int h)
 
static int widget_core_redraw (struct widget *pwidget)
 
static void widget_core_draw_frame (struct widget *pwidget)
 
static void widget_core_mark_dirty (struct widget *pwidget)
 
static void widget_core_flush (struct widget *pwidget)
 
static void widget_core_undraw (struct widget *pwidget)
 
static void widget_core_select (struct widget *pwidget)
 
static void widget_core_unselect (struct widget *pwidget)
 
struct widgetwidget_new (void)
 

Function Documentation

◆ clear_wflag()

void clear_wflag ( struct widget pwidget,
enum widget_flag  flag 
)

Clear flag from the widget.

Definition at line 62 of file widget_core.c.

◆ get_wflags()

enum widget_flag get_wflags ( const struct widget pwidget)

Get all flags of the widget.

Definition at line 86 of file widget_core.c.

Referenced by widget_core_redraw(), widget_core_undraw(), widget_free(), and widget_free().

◆ get_wstate()

enum widget_state get_wstate ( const struct widget pwidget)

Get state of the widget.

Definition at line 70 of file widget_core.c.

◆ get_wtype()

enum widget_type get_wtype ( const struct widget pwidget)

Get type of the widget.

Definition at line 78 of file widget_core.c.

Referenced by widget_free(), and widget_free().

◆ set_wflag()

void set_wflag ( struct widget pwidget,
enum widget_flag  flag 
)

Set flags of the widget.

Definition at line 54 of file widget_core.c.

◆ set_wstate()

void set_wstate ( struct widget pwidget,
enum widget_state  state 
)

Set state of the widget.

Definition at line 36 of file widget_core.c.

◆ set_wtype()

void set_wtype ( struct widget pwidget,
enum widget_type  type 
)

Set type of the widget.

Definition at line 45 of file widget_core.c.

◆ widget_core_draw_frame()

static void widget_core_draw_frame ( struct widget pwidget)
static

Draw frame of the widget.

Definition at line 180 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_flush()

static void widget_core_flush ( struct widget pwidget)
static

Flush part of the display covered by the widget.

Definition at line 203 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_mark_dirty()

static void widget_core_mark_dirty ( struct widget pwidget)
static

Mark part of the display covered by the widget dirty.

Definition at line 188 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_redraw()

static int widget_core_redraw ( struct widget pwidget)
static

Draw widget to the surface its on, if it's visible.

Definition at line 160 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_resize()

static void widget_core_resize ( struct widget pwidget,
int  w,
int  h 
)
static

Set widget size.

Definition at line 151 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_select()

static void widget_core_select ( struct widget pwidget)
static

Callback for when widget gets selected.

Definition at line 234 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_set_area()

static void widget_core_set_area ( struct widget pwidget,
SDL_Rect  area 
)
static

Set widget area.

Definition at line 134 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_set_position()

static void widget_core_set_position ( struct widget pwidget,
int  x,
int  y 
)
static

Set widget position.

Definition at line 142 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_undraw()

static void widget_core_undraw ( struct widget pwidget)
static

Clear widget from the display.

Definition at line 218 of file widget_core.c.

Referenced by widget_new().

◆ widget_core_unselect()

static void widget_core_unselect ( struct widget pwidget)
static

Callback for when widget gets unselected.

Definition at line 243 of file widget_core.c.

Referenced by widget_new().

◆ widget_free()

void widget_free ( struct widget **  pwidget)

Free resources allocated for the widget.

Definition at line 94 of file widget_core.c.

◆ widget_new()

struct widget * widget_new ( void  )