webperimental: killstack decides stack protects.
[freeciv.git] / client / gui-sdl2 / widget_edit.h
blob919ee8bfb1e6c478d96794ba5c6aabbbae585115
1 /**********************************************************************
2 Freeciv - Copyright (C) 2006 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
14 #ifndef FC__WIDGET_EDIT_H
15 #define FC__WIDGET_EDIT_H
17 enum Edit_Return_Codes {
18 ED_RETURN = 1,
19 ED_ESC = 2,
20 ED_MOUSE = 3,
21 ED_FORCE_EXIT = 4
24 #define create_edit_from_chars(pBackground, pDest, pCharString, iPtsize, length, flags) \
25 create_edit(pBackground, pDest, \
26 create_utf8_from_char(pCharString, iPtsize), \
27 length, flags)
29 #define edit(pEdit) edit_field(pEdit)
31 struct widget *create_edit(SDL_Surface *pBackground, struct gui_layer *pDest,
32 utf8_str *pstr, int length,
33 Uint32 flags);
34 enum Edit_Return_Codes edit_field(struct widget *pEdit_Widget);
35 int draw_edit(struct widget *pEdit, Sint16 start_x, Sint16 start_y);
37 #endif /* FC__WIDGET_EDIT_H */