Atrinik Client  4.0
Data Fields
popup_struct Struct Reference

#include <popup.h>

Data Fields

SDL_Surface * surface
 
texture_structtexture
 
uint8_t disable_texture_drawing
 
void * custom_data
 
char * buf
 
int64_t i [3]
 
int x
 
int y
 
popup_button button_left
 
popup_button button_right
 
struct popup_structnext
 
struct popup_structprev
 
int64_t selection_start
 
int64_t selection_end
 
uint8_t selection_started
 
uint8_t redraw
 
uint8_t modal
 
uint8_t destroy_on_switch
 
int(* draw_func )(struct popup_struct *popup)
 
int(* draw_post_func )(struct popup_struct *popup)
 
int(* event_func )(struct popup_struct *popup, SDL_Event *event)
 
int(* destroy_callback_func )(struct popup_struct *popup)
 
const char *(* clipboard_copy_func )(struct popup_struct *popup)
 

Detailed Description

A single popup.

Definition at line 60 of file popup.h.

Field Documentation

char* popup_struct::buf

Optional character pointer.

Definition at line 81 of file popup.h.

popup_button popup_struct::button_left

The left button, generally the help button.

Definition at line 93 of file popup.h.

popup_button popup_struct::button_right

The right button, generally the close button.

Definition at line 96 of file popup.h.

const char*(* popup_struct::clipboard_copy_func)(struct popup_struct *popup)

Function used to get contents for clipboard copy operation.

Parameters
popupPopup.
Returns
Contents to copy.

Definition at line 168 of file popup.h.

void* popup_struct::custom_data

Custom data.

Definition at line 78 of file popup.h.

int(* popup_struct::destroy_callback_func)(struct popup_struct *popup)

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 159 of file popup.h.

uint8_t popup_struct::disable_texture_drawing

Disable automatically drawing the texture on the popup surface?

Definition at line 75 of file popup.h.

int(* popup_struct::draw_func)(struct popup_struct *popup)

Function used for drawing on the popup's surface.

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

Definition at line 127 of file popup.h.

int(* popup_struct::draw_post_func)(struct popup_struct *popup)

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 137 of file popup.h.

int(* popup_struct::event_func)(struct popup_struct *popup, SDL_Event *event)

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 148 of file popup.h.

int64_t popup_struct::i[3]

Optional integers.

Definition at line 84 of file popup.h.

struct popup_struct* popup_struct::next

Next popup in a doubly-linked list.

Definition at line 99 of file popup.h.

struct popup_struct* popup_struct::prev

Previous popup in a doubly-linked list.

Definition at line 102 of file popup.h.

uint8_t popup_struct::redraw

Whether redrawing is in order.

Definition at line 114 of file popup.h.

int64_t popup_struct::selection_end

End of selection.

Definition at line 108 of file popup.h.

int64_t popup_struct::selection_start

Start of selection.

Definition at line 105 of file popup.h.

uint8_t popup_struct::selection_started

Whether the selection has started.

Definition at line 111 of file popup.h.

SDL_Surface* popup_struct::surface

Surface the popup uses for drawing. This surface is then copied to ScreenSurface.

Definition at line 65 of file popup.h.

texture_struct* popup_struct::texture

Texture to use.

Definition at line 70 of file popup.h.

int popup_struct::x

X position of the popup.

Definition at line 87 of file popup.h.

int popup_struct::y

Y position of the popup.

Definition at line 90 of file popup.h.


The documentation for this struct was generated from the following file: