search for: text_display

Displaying 7 results from an estimated 7 matches for "text_display".

2007 Oct 22
0
12 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...g_string_new (""); + data.text = text->input; data.tags_open = NULL; data.tags_closed = NULL; @@ -422,10 +424,6 @@ swfdec_text_field_movie_html_parse (SwfdecTextFieldMovie *text, const char *str) (ParserTag *)data.tags_open->data); } - // set parsed text - text->text_display = - swfdec_as_context_give_string (data.cx, g_string_free (data.text, FALSE)); - // add parsed styles while (data.tags_closed != NULL) { ParserTag *tag = (ParserTag *)data.tags_closed->data; diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c index 7b5c688..a...
2007 Oct 17
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...;data))->index <= end_index; + iter = iter->next) + { + index_prev = index_; + format_prev = format; + index_ = ((SwfdecFormatIndex *)(iter->data))->index; + format = ((SwfdecFormatIndex *)(iter->data))->format; + + escaped = swfdec_xml_escape_len (text->text_display + index_prev, + index_ - index_prev); + string = g_string_append (string, escaped); + g_free (escaped); + escaped = NULL; + + // Figure out what tags need to be rewritten + if (format->font != format_prev->font || + format->size != format_prev->size || + format->color...
2007 Oct 14
0
3 commits - doc/Makefile.am libswfdec/swfdec_text_field_movie_as.c
...fdecAsValue *ret) -{ - SwfdecTextFieldMovie *text; - gboolean value; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - - swfdec_as_value_to_number (cx, &argv[0]); - - text->text->html = value; + SWFDEC_AS_VALUE_SET_INT (ret, strlen (text->text_display)); } +/* + * Native properties: Input + */ static void swfdec_text_field_movie_get_condenseWhite (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, @@ -412,8 +443,11 @@ swfdec_text_field_movie_set_condenseWhite (SwfdecAsContext *cx, text->condense_white =...
2007 Oct 14
0
10 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...,7 +112,7 @@ swfdec_text_field_movie_generate_paragraph (SwfdecTextFieldMovie *text, g_assert (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); g_assert (paragraph != NULL); - g_assert (start_index < end_index); + g_assert (start_index <= end_index); g_assert (end_index <= strlen (text->text_display)); paragraph->text = text->text_display + start_index; @@ -122,6 +122,9 @@ swfdec_text_field_movie_generate_paragraph (SwfdecTextFieldMovie *text, paragraph->attrs = NULL; paragraph->attrs_list = pango_attr_list_new (); + if (paragraph->text_length == 0) + return; +...
2007 Oct 18
0
14 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h libswfdec/swfdec_text_format.c
...ieldMovie *text, guint start_index, guint end_index, const char *str) { + SwfdecFormatIndex *findex; char *text_new; - GSList *iter; + GSList *iter, *prev; + gboolean first; g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); g_return_if_fail (end_index <= strlen (text->text_display)); @@ -1492,12 +1494,40 @@ swfdec_text_field_movie_replace_text (SwfdecTextFieldMovie *text, text->text_display + end_index, strlen (text->text_display + end_index) + 1); + first = TRUE; + prev = NULL; for (iter = text->formats; iter != NULL; iter = iter->next) {...
2007 Oct 18
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...e *text) +static SwfdecParagraph * +swfdec_text_field_movie_get_paragraphs (SwfdecTextFieldMovie *text, int *num) { + SwfdecParagraph *paragraphs; const char *p, *end; - int num, i; + int count, i; g_assert (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); - num = 0; + count = 0; p = text->text_display; while (p != NULL && *p != '\0') { - num++; + count++; p = strchr (p, '\r'); if (p != NULL) p++; } - text->paragraphs = g_new0 (SwfdecParagraph, num + 1); + paragraphs = g_new0 (SwfdecParagraph, count + 1); + if (num != NULL) + *num = count;...
2007 Oct 15
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...c_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -420,7 +420,7 @@ swfdec_text_field_movie_get_length (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_INT (ret, strlen (text->text_display)); + SWFDEC_AS_VALUE_SET_INT (ret, g_utf8_strlen (text->text_display, -1)); } /* @@ -453,6 +453,69 @@ swfdec_text_field_movie_set_condenseWhite (SwfdecAsContext *cx, text->condense_white = value; } +static void +swfdec_text_field_movie_get_multiline (SwfdecAsContext *cx, + Swfde...