19#ifdef SDL2_PLAIN_INCLUDE
52#define widget_add_next(new_widget, add_dock) \
54 new_widget->prev = add_dock; \
55 new_widget->next = add_dock->next; \
56 if (add_dock->next) { \
57 add_dock->next->prev = new_widget; \
59 add_dock->next = new_widget; \
137 ret = (*baseclass_redraw)(
vert);
269 ret = (*baseclass_redraw)(horiz);
341 (
float)scroll->
count);
388 struct widget *begin_active_widget_list,
389 struct widget *begin_widget_list,
390 struct widget *end_widget_list);
393 struct widget *begin_active_widget_list,
394 struct widget *begin_widget_list,
395 struct widget *end_widget_list);
398 struct widget *begin_active_widget_list,
399 struct widget *begin_widget_list,
400 struct widget *end_widget_list);
518 buf->private_data.adv_dlg = dlg;
533 buf->private_data.adv_dlg = dlg;
548 buf->private_data.adv_dlg = dlg;
634 struct widget *begin_widget_list,
635 struct widget *end_widget_list,
636 int active,
int step,
int dir)
638 struct widget *begin = active_widget_list;
648 if (
buf != end_widget_list) {
693 buf->size.y =
tmp->size.y;
696 if ((
buf->size.w !=
tmp->size.w) || (
buf->size.h !=
tmp->size.h)) {
709 if (
tmp == begin_widget_list) {
726 buf->size.y +=
buf->size.h;
730 buf->size.y =
buf->next->size.y;
745 count = active *
step;
758 while (count &&
buf != begin_widget_list->
prev) {
763 if (!count &&
buf != begin_widget_list->
prev) {
831 buf->size.x =
tmp->size.x;
832 buf->size.y =
tmp->size.y;
835 if ((
buf->size.w !=
tmp->size.w) || (
buf->size.h !=
tmp->size.h)) {
983 && (
motion->vscroll->pscroll_bar->size.y >
motion->vscroll->min)))
986 && (
motion->vscroll->pscroll_bar->size.y < (
motion->vscroll->max -
motion->vscroll->pscroll_bar->size.h)))) ) {
993 if ((
motion->vscroll->pscroll_bar->size.y +
yrel) >
994 (
motion->vscroll->max -
motion->vscroll->pscroll_bar->size.h)) {
996 motion->vscroll->pscroll_bar->size.y =
997 (
motion->vscroll->max -
motion->vscroll->pscroll_bar->size.h);
999 }
else if ((
motion->vscroll->pscroll_bar->size.y +
yrel) <
motion->vscroll->min) {
1000 motion->vscroll->pscroll_bar->size.y =
motion->vscroll->min;
1002 motion->vscroll->pscroll_bar->size.y +=
yrel;
1012 motion->begin_widget_list,
1055 struct widget *begin_active_widget_list,
1056 struct widget *begin_widget_list,
1057 struct widget *end_widget_list)
1060 struct widget *begin = begin_active_widget_list;
1064 begin = begin->
prev;
1068 down.
begin = begin_active_widget_list;
1084 struct widget *begin_active_widget_list,
1085 struct widget *begin_widget_list,
1086 struct widget *end_widget_list)
1091 up.
begin = begin_active_widget_list;
1106 struct widget *begin_active_widget_list,
1107 struct widget *begin_widget_list,
1108 struct widget *end_widget_list)
1113 motion.begin = begin_active_widget_list;
1263 buf->size.x =
buf->next->size.x;
1264 buf->size.y =
buf->next->size.y;
1265 buf->gfx =
buf->next->gfx;
1294 buf->size.x =
tmp->size.x;
1295 buf->size.y =
tmp->size.y +
tmp->size.h;
1299 buf->size.x =
buf->prev->size.x;
1300 buf->size.y =
buf->prev->size.y;
1301 buf->gfx =
buf->prev->gfx;
1407 if (
buf == pwidget) {
1418 while (
buf != pwidget) {
1421 buf->size.x =
buf->prev->size.x;
1422 buf->size.y =
buf->prev->size.y;
1437std:
while (
buf != pwidget) {
1438 buf->gfx =
buf->next->gfx;
1440 buf->size.x =
buf->next->size.x;
1441 buf->size.y =
buf->next->size.y;
1470 while (
buf != pwidget) {
1471 buf->gfx =
buf->next->gfx;
1473 buf->size.x =
buf->next->size.x;
1474 buf->size.y =
buf->next->size.y;
1577 buf->data.ptr = (
void *)dlg;
1580 buf->size.x = start_x;
1598 buf->data.ptr = (
void *)dlg;
1620 buf->data.ptr = (
void *)dlg;
1637 buf->size.x = start_x;
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
SDL_Surface * crop_rect_from_surface(SDL_Surface *psource, SDL_Rect *prect)
int alphablit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, unsigned char alpha_mod)
struct sdl2_data main_data
int blit_entire_src(SDL_Surface *psrc, SDL_Surface *pdest, Sint16 dest_x, Sint16 dest_y)
SDL_Surface * create_surf(int width, int height, Uint32 flags)
int FilterMouseMotionEvents(void *data, SDL_Event *event)
Uint16 gui_event_loop(void *data, void(*loop_action)(void *data), Uint16(*key_down_handler)(SDL_Keysym key, void *data), Uint16(*key_up_handler)(SDL_Keysym key, void *data), Uint16(*textinput_handler)(const char *text, void *data), Uint16(*finger_down_handler)(SDL_TouchFingerEvent *touch_event, void *data), Uint16(*finger_up_handler)(SDL_TouchFingerEvent *touch_event, void *data), Uint16(*finger_motion_handler)(SDL_TouchFingerEvent *touch_event, void *data), Uint16(*mouse_button_down_handler)(SDL_MouseButtonEvent *button_event, void *data), Uint16(*mouse_button_up_handler)(SDL_MouseButtonEvent *button_event, void *data), Uint16(*mouse_motion_handler)(SDL_MouseMotionEvent *motion_event, void *data))
struct widget * selected_widget
#define DEFAULT_MOVE_STEP
#define PRESSED_EVENT(event)
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#define fc_assert_ret_val(condition, val)
#define fc_calloc(n, esz)
struct widget * end_widget_list
struct widget * begin_widget_list
struct scroll_bar * vscroll
struct widget * begin_active_widget_list
struct widget * end_widget_list
struct widget * end_active_widget_list
struct widget * active_widget_list
struct scroll_bar * scroll
struct widget * begin_widget_list