Atrinik Client  4.0
popup.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef POPUP_H
31 #define POPUP_H
32 
36 typedef struct popup_button {
38  int x;
39 
41  int y;
42 
44  char *text;
45 
48 
56  int (*event_func)(struct popup_button *button);
57 } popup_button;
58 
60 typedef struct popup_struct {
65  SDL_Surface *surface;
66 
71 
76 
78  void *custom_data;
79 
81  char *buf;
82 
84  int64_t i[3];
85 
87  int x;
88 
90  int y;
91 
94 
97 
99  struct popup_struct *next;
100 
103 
106 
108  int64_t selection_end;
109 
112 
114  uint8_t redraw;
115 
116  uint8_t modal;
117 
118  uint8_t destroy_on_switch;
119 
127  int (*draw_func)(struct popup_struct *popup);
128 
137  int (*draw_post_func)(struct popup_struct *popup);
138 
148  int (*event_func)(struct popup_struct *popup, SDL_Event *event);
149 
159  int (*destroy_callback_func)(struct popup_struct *popup);
160 
168  const char *(*clipboard_copy_func)(struct popup_struct *popup);
169 } popup_struct;
170 
171 #endif
char * text
Definition: popup.h:44
int(* event_func)(struct popup_struct *popup, SDL_Event *event)
Definition: popup.h:148
int(* draw_func)(struct popup_struct *popup)
Definition: popup.h:127
int(* draw_post_func)(struct popup_struct *popup)
Definition: popup.h:137
int(* destroy_callback_func)(struct popup_struct *popup)
Definition: popup.h:159
void * custom_data
Definition: popup.h:78
int y
Definition: popup.h:41
struct popup_struct * next
Definition: popup.h:99
button_struct button
Definition: popup.h:47
int x
Definition: popup.h:87
uint8_t redraw
Definition: popup.h:114
uint8_t selection_started
Definition: popup.h:111
int(* event_func)(struct popup_button *button)
Definition: popup.h:56
char * buf
Definition: popup.h:81
int y
Definition: popup.h:90
popup_button button_left
Definition: popup.h:93
int x
Definition: popup.h:38
struct popup_struct * prev
Definition: popup.h:102
popup_button button_right
Definition: popup.h:96
SDL_Surface * surface
Definition: popup.h:65
int64_t i[3]
Definition: popup.h:84
int64_t selection_end
Definition: popup.h:108
texture_struct * texture
Definition: popup.h:70
uint8_t disable_texture_drawing
Definition: popup.h:75
int64_t selection_start
Definition: popup.h:105