Atrinik Client  4.0
Data Structures | Typedefs | Functions
painting.c File Reference
#include <global.h>
#include <toolkit/string.h>
#include <resources.h>
#include <toolkit/curl.h>
#include <toolkit/packet.h>

Go to the source code of this file.

Data Structures

struct  popup_painting
 

Typedefs

typedef struct popup_painting popup_painting_t
 

Functions

static SDL_Surface * popup_painting_data_surface (popup_painting_t *data)
 
static void popup_painting_data_free (popup_painting_t *data)
 
static int popup_draw_func (popup_struct *popup)
 
static int popup_draw_post_func (popup_struct *popup)
 
static int popup_event_func (popup_struct *popup, SDL_Event *event)
 
static int popup_destroy_callback (popup_struct *popup)
 
void socket_command_painting (uint8_t *data, size_t len, size_t pos)
 

Detailed Description

Painting GUI code.

Author
Alex Tokar

Definition in file painting.c.

Typedef Documentation

Structure used to store data related to the painting popup.

Function Documentation

static int popup_destroy_callback ( popup_struct popup)
static

Function used right before the visible popup is destroyed using popup_destroy_visible().

Parameters
popupThe popup.
Returns
1 to proceed with the destruction of the popup, 0 otherwise.

Definition at line 289 of file painting.c.

static int popup_draw_func ( popup_struct popup)
static

Function used for drawing on the popup's surface.

Parameters
popupThe popup.
Returns
0 to destroy the popup, 1 otherwise.

Definition at line 106 of file painting.c.

static int popup_draw_post_func ( popup_struct popup)
static

Function used for drawing after drawing the popup's surface on the main surface.

Parameters
popupThe popup.
Returns
0 to destroy the popup, 1 otherwise.

Definition at line 219 of file painting.c.

static int popup_event_func ( popup_struct popup,
SDL_Event *  event 
)
static

Function used for handling mouse/key events when popup is visible.

Parameters
eventSDL event.
Return values
-1Did not handle the event.
0Did not handle the event, but allow other keyboard events.
1Handled the event.

Definition at line 242 of file painting.c.

static void popup_painting_data_free ( popup_painting_t data)
static

Frees the specified painting data structure.

Parameters
dataWhat to free.

Definition at line 86 of file painting.c.

static SDL_Surface* popup_painting_data_surface ( popup_painting_t data)
inlinestatic

Acquire the surface to use for rendering the painting.

Parameters
dataPainting data.
Returns
Surface to use.

Definition at line 64 of file painting.c.

void socket_command_painting ( uint8_t *  data,
size_t  len,
size_t  pos 
)

Definition at line 299 of file painting.c.