72 ret = (*baseclass_redraw)(
edt->pwidget);
110 dest.x - 1, dest.y + (
edt->bg->h / 8),
111 dest.x - 1, dest.y +
edt->bg->h - (
edt->bg->h / 4),
181 rdest.y += (pedit->h - text->h) / 2;
184 rdest.x += (pedit->w - text->w) / 2;
245 for (
i = 0;
i <
len - 1;
i++) {
278 for (j = 1; (
text_in[j] & (128 + 64)) == 128; j++) {
284 for (
i = 1;
i <
len;
i += j) {
287 for (j = 1; (
text_in[
i + j] & (128 + 64)) == 128; j++) {
315 for (
i = 0;
i <
len;
i++) {
353 pedit->
theme2 = background;
373 pedit->
size.w = length;
390 pedit->
size.x = start_x;
443 if (
edt->input_chain->next) {
449 edt->input_chain =
edt->input_chain->next;
463 if (
edt->input_chain->prev) {
464 edt->input_chain =
edt->input_chain->prev;
465 if ((
edt->input_chain_x <=
471 edt->start_x += (
edt->input_chain->tsurf->w);
486 edt->input_chain =
edt->begin_text_chain;
500 edt->input_chain =
edt->end_text_chain;
503 if (
edt->pwidget->size.w -
edt->true_length < 0) {
511 if (
edt->input_chain->prev) {
512 if ((
edt->input_chain_x <=
517 edt->start_x += (
edt->input_chain->prev->tsurf->w);
520 if (
edt->input_chain->prev->prev) {
521 edt->input_chain->prev->prev->next =
edt->input_chain;
523 edt->true_length -=
edt->input_chain->prev->tsurf->w;
528 edt->true_length -=
edt->input_chain->prev->tsurf->w;
531 edt->begin_text_chain =
edt->input_chain;
548 if (
edt->input_chain->next &&
edt->input_chain->prev) {
549 edt->input_chain->prev->next =
edt->input_chain->next;
550 edt->input_chain->next->prev =
edt->input_chain->prev;
552 edt->true_length -=
edt->input_chain->tsurf->w;
560 if (
edt->input_chain->next && !
edt->input_chain->prev) {
561 edt->input_chain =
edt->input_chain->next;
562 edt->true_length -=
edt->input_chain->prev->tsurf->w;
565 edt->begin_text_chain =
edt->input_chain;
591 for (
i = 0; text[
i] !=
'\0';) {
598 if (
edt->input_chain !=
edt->begin_text_chain) {
601 edt->input_chain->prev->next =
edt->input_chain;
606 edt->input_chain->prev->next =
edt->input_chain;
607 edt->begin_text_chain =
edt->input_chain->prev;
613 edt->input_chain->prev->chr[
charlen++] = text[
i++];
623 edt->input_chain->prev->tsurf =
626 edt->pwidget->string_utf8->fgcol);
628 edt->input_chain->prev->tsurf =
630 edt->input_chain->prev->chr, 0,
631 edt->pwidget->string_utf8->fgcol);
633 edt->true_length +=
edt->input_chain->prev->tsurf->w;
636 if (
edt->input_chain ==
edt->end_text_chain) {
639 edt->start_x -=
edt->input_chain->prev->tsurf->w -
689 edt.input_chain_x = 0;
706 edt.end_text_chain =
edt.input_chain;
707 edt.end_text_chain->chr[0] = 32;
708 edt.end_text_chain->chr[1] = 0;
709 edt.end_text_chain->next =
NULL;
710 edt.end_text_chain->prev =
NULL;
718 edt.end_text_chain->tsurf =
720 edt.end_text_chain->chr, 0,
724 if (
edt.begin_text_chain) {
757 edt.begin_text_chain =
edt.input_chain;
769 if (
edt.begin_text_chain ==
edt.end_text_chain) {
SDL_Color * get_theme_color(enum theme_color themecolor)
void create_line(SDL_Surface *dest, Sint16 x0, Sint16 y0, Sint16 x1, Sint16 y1, SDL_Color *pcolor)
int alphablit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, unsigned char alpha_mod)
struct gui_layer * add_gui_layer(int width, int height)
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))
void utf8_str_size(utf8_str *pstr, SDL_Rect *fill)
SDL_Surface * create_text_surf_from_utf8(utf8_str *pstr)
@ COLOR_THEME_EDITFIELD_CARET
#define fc_calloc(n, esz)
struct utf8_char * begin_text_chain
struct utf8_char * end_text_chain
struct utf8_char * input_chain