From: Ji-hoon Lee Date: Mon, 21 Nov 2016 06:51:34 +0000 (+0900) Subject: Added features needed for adopting 3.0 GUI change X-Git-Tag: accepted/tizen/3.0/common/20161215.163147~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7937b424774db721e026917b6619ab9d450fb4cd;p=platform%2Fcore%2Fuifw%2Flibscl-ui.git Added features needed for adopting 3.0 GUI change Change-Id: I7ef073ce602356de08c02b213eddfff4ff5f5d68 --- diff --git a/scl/gwes/efl/sclgraphics-efl.cpp b/scl/gwes/efl/sclgraphics-efl.cpp index 9da68ab..d6e8589 100644 --- a/scl/gwes/efl/sclgraphics-efl.cpp +++ b/scl/gwes/efl/sclgraphics-efl.cpp @@ -889,11 +889,17 @@ CSCLGraphicsImplEfl::draw_rectangle(sclwindow window, const scldrawctx draw_ctx, target_window_context->etc_info = eina_list_append((Eina_List*)(target_window_context->etc_info), object); + /* FIXME : this is for placing the background image at the lowest depth */ sclint window_layer = 29000; if (!windows->is_base_window(reinterpret_cast(draw_ctx))) { window_layer = 29010; } - evas_object_layer_set(rectobj, window_layer + 1); + if (window_context->geometry.width == width && + window_context->geometry.height == height) { + evas_object_layer_set(rectobj, window_layer + 0); + } else { + evas_object_layer_set(rectobj, window_layer + 1); + } } } } diff --git a/scl/include/sclconfig.h b/scl/include/sclconfig.h index 58d1143..a9029fa 100644 --- a/scl/include/sclconfig.h +++ b/scl/include/sclconfig.h @@ -323,6 +323,7 @@ typedef enum _SCLWindowDecorator { WND_DECORATOR_TOP_CENTER, WND_DECORATOR_TOP_RIGHT, WND_DECORATOR_MIDDLE_LEFT, + WND_DECORATOR_MIDDLE_CENTER, WND_DECORATOR_MIDDLE_RIGHT, WND_DECORATOR_BOTTOM_LEFT, WND_DECORATOR_BOTTOM_CENTER, diff --git a/scl/include/sclkeyfocushandler.h b/scl/include/sclkeyfocushandler.h index 6f5f17e..457af56 100644 --- a/scl/include/sclkeyfocushandler.h +++ b/scl/include/sclkeyfocushandler.h @@ -70,10 +70,10 @@ typedef struct _SclPopupNavigationInfo { * @brief The class to store key focus navigation information * * This class implements functions to support key focus navigation on the software keyboard -* using remote controller input. It generates navigation information for the currently loaded +* using remote controller input. It generates navigation information for the currently loaded * keyboard layout and provides the index of next key depending upon the navigation direction. * The key information can be retrieved from the array of key coordinates from Resource Cache. -* +* * Apart from key navigation information, this class also provides functions to grab and ungrab * the remote controller keys. * diff --git a/scl/include/sclstructs.h b/scl/include/sclstructs.h index df0093f..7058f09 100644 --- a/scl/include/sclstructs.h +++ b/scl/include/sclstructs.h @@ -371,6 +371,9 @@ typedef struct _SclMagnifierWndConfigure { sclshort padding_x; /* Padding value X for displaying label string */ sclshort padding_y; /* Padding value Y for displaying label string */ sclboolean show_shift_label; /* Whether a shift label or a default label string should be displayed in shift mode */ + /* A 8-way decotation images for magnifier window */ + sclchar* decoration_image_path[MAX_WND_DECORATOR]; + sclbyte decoration_size; /* Size of window decoration images */ }SclMagnifierWndConfigure; /** @@ -388,6 +391,7 @@ typedef struct _SclAutoPopupConfigure { sclshort button_width; /* Each button's width */ sclshort button_height; /* Each button's height */ sclbyte button_spacing; /* Spacing amount between buttons */ + sclchar* line_image_path; /* Line image between buttons */ sclchar* label_type; /* Label property name for each strings */ /* A 8-way decotation images for autopopup window */ sclchar* decoration_image_path[MAX_WND_DECORATOR]; diff --git a/scl/sclresourcecache.cpp b/scl/sclresourcecache.cpp index 353c2a9..633796d 100644 --- a/scl/sclresourcecache.cpp +++ b/scl/sclresourcecache.cpp @@ -1236,7 +1236,64 @@ void CSCLResourceCache::generate_autopopup_layout(const SclLayoutKeyCoordinate * memset((*pCurButtonContext), 0x00, sizeof(SclButtonContext) * MAX_KEY); - for (loop = 0;loop < (num_columns * num_rows) && loop < MAX_KEY && loop < MAX_SIZE_OF_AUTOPOPUP_STRING;loop++) { + int button_index = 0; + + if (autopopup_configure->line_image_path && + strlen(autopopup_configure->line_image_path) > 0) { + for (loop = 0;loop < num_columns - 1;loop++) { + if (button_index < MAX_KEY) { + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + + (*pCurLayoutKeyCoordinates)[button_index].x = + autopopup_configure->bg_padding * utils->get_smallest_custom_scale_rate() + + (autopopup_configure->button_width * utils->get_custom_scale_rate_x() * (loop + 1)) + + (autopopup_configure->button_spacing * utils->get_smallest_custom_scale_rate() * loop); + (*pCurLayoutKeyCoordinates)[button_index].y = pCurLayout->bg_line_width; + (*pCurLayoutKeyCoordinates)[button_index].width = + autopopup_configure->button_spacing * utils->get_smallest_custom_scale_rate(); + (*pCurLayoutKeyCoordinates)[button_index].height = height - (pCurLayout->bg_line_width * 2); + + (*pCurButtonContext)[button_index].used = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].button_type = BUTTON_TYPE_UIITEM; + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[0][0] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[0][1] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[1][0] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[1][1] = + autopopup_configure->line_image_path; + button_index++; + } + } + + for (loop = 0;loop < num_rows - 1;loop++) { + if (button_index < MAX_KEY) { + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + + (*pCurLayoutKeyCoordinates)[button_index].x = pCurLayout->bg_line_width; + (*pCurLayoutKeyCoordinates)[button_index].y = + autopopup_configure->bg_padding * utils->get_smallest_custom_scale_rate() + + (autopopup_configure->button_height * utils->get_custom_scale_rate_y() * (loop + 1)) + + (autopopup_configure->button_spacing * utils->get_smallest_custom_scale_rate() * loop); + (*pCurLayoutKeyCoordinates)[button_index].width = width - (pCurLayout->bg_line_width * 2); + (*pCurLayoutKeyCoordinates)[button_index].height = + autopopup_configure->button_spacing * utils->get_smallest_custom_scale_rate(); + + (*pCurButtonContext)[button_index].used = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].button_type = BUTTON_TYPE_UIITEM; + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[0][0] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[0][1] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[1][0] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[1][1] = + autopopup_configure->line_image_path; + button_index++; + } + } + } + + for (loop = 0;loop < (num_columns * num_rows) && button_index < MAX_KEY && loop < MAX_SIZE_OF_AUTOPOPUP_STRING;loop++) { column = (loop % num_columns); row = loop / num_columns; x = autopopup_configure->bg_padding * utils->get_smallest_custom_scale_rate() + @@ -1246,202 +1303,185 @@ void CSCLResourceCache::generate_autopopup_layout(const SclLayoutKeyCoordinate * (autopopup_configure->button_height * utils->get_custom_scale_rate_y() * (num_rows - row - 1)) + (autopopup_configure->button_spacing * utils->get_smallest_custom_scale_rate() * row); - (*pCurLayoutKeyCoordinates)[loop].valid = TRUE; - (*pCurLayoutKeyCoordinates)[loop].x = x + + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].x = x + autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop].y = y + + (*pCurLayoutKeyCoordinates)[button_index].y = y + autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop].width = + (*pCurLayoutKeyCoordinates)[button_index].width = autopopup_configure->button_width * utils->get_custom_scale_rate_x(); - (*pCurLayoutKeyCoordinates)[loop].height = + (*pCurLayoutKeyCoordinates)[button_index].height = autopopup_configure->button_height * utils->get_custom_scale_rate_y(); - (*pCurLayoutKeyCoordinates)[loop].popup_relative_x = 0; - (*pCurLayoutKeyCoordinates)[loop].popup_relative_y = 0; - (*pCurLayoutKeyCoordinates)[loop].extract_offset_x = 0; - (*pCurLayoutKeyCoordinates)[loop].extract_offset_y = 0; - (*pCurLayoutKeyCoordinates)[loop].sub_layout = NULL; + (*pCurLayoutKeyCoordinates)[button_index].popup_relative_x = 0; + (*pCurLayoutKeyCoordinates)[button_index].popup_relative_y = 0; + (*pCurLayoutKeyCoordinates)[button_index].extract_offset_x = 0; + (*pCurLayoutKeyCoordinates)[button_index].extract_offset_y = 0; + (*pCurLayoutKeyCoordinates)[button_index].sub_layout = NULL; - (*pCurLayoutKeyCoordinates)[loop].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; if (loop < num_keys) { - (*pCurLayoutKeyCoordinates)[loop].button_type = BUTTON_TYPE_NORMAL; + (*pCurLayoutKeyCoordinates)[button_index].button_type = BUTTON_TYPE_NORMAL; } else { - (*pCurLayoutKeyCoordinates)[loop].button_type = BUTTON_TYPE_UIITEM; + (*pCurLayoutKeyCoordinates)[button_index].button_type = BUTTON_TYPE_UIITEM; } - (*pCurLayoutKeyCoordinates)[loop].key_type = KEY_TYPE_STRING; - (*pCurLayoutKeyCoordinates)[loop].popup_type = POPUP_TYPE_NONE; - (*pCurLayoutKeyCoordinates)[loop].use_magnifier = FALSE; - (*pCurLayoutKeyCoordinates)[loop].use_long_key_magnifier = TRUE; - memset((*pCurLayoutKeyCoordinates)[loop].popup_input_mode, NOT_USED, sizeof((*pCurLayoutKeyCoordinates)[loop].popup_input_mode)); - - (*pCurLayoutKeyCoordinates)[loop].valid = TRUE; - (*pCurLayoutKeyCoordinates)[loop].label_count = 1; + (*pCurLayoutKeyCoordinates)[button_index].key_type = KEY_TYPE_STRING; + (*pCurLayoutKeyCoordinates)[button_index].popup_type = POPUP_TYPE_NONE; + (*pCurLayoutKeyCoordinates)[button_index].use_magnifier = FALSE; + (*pCurLayoutKeyCoordinates)[button_index].use_long_key_magnifier = TRUE; + memset((*pCurLayoutKeyCoordinates)[button_index].popup_input_mode, NOT_USED, sizeof((*pCurLayoutKeyCoordinates)[loop].popup_input_mode)); + + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].label_count = 1; if (context->get_caps_lock_mode()) { - (*pCurLayoutKeyCoordinates)[loop].label[SCL_SHIFT_STATE_OFF][0] = + (*pCurLayoutKeyCoordinates)[button_index].label[SCL_SHIFT_STATE_OFF][0] = coordinate->autopopup_key_labels[SCL_SHIFT_STATE_ON][loop]; - (*pCurLayoutKeyCoordinates)[loop].label[SCL_SHIFT_STATE_ON][0] = + (*pCurLayoutKeyCoordinates)[button_index].label[SCL_SHIFT_STATE_ON][0] = coordinate->autopopup_key_labels[SCL_SHIFT_STATE_OFF][loop]; - (*pCurLayoutKeyCoordinates)[loop].label[SCL_SHIFT_STATE_LOCK][0] = + (*pCurLayoutKeyCoordinates)[button_index].label[SCL_SHIFT_STATE_LOCK][0] = coordinate->autopopup_key_labels[SCL_SHIFT_STATE_OFF][loop]; } else { - (*pCurLayoutKeyCoordinates)[loop].label[SCL_SHIFT_STATE_OFF][0] = + (*pCurLayoutKeyCoordinates)[button_index].label[SCL_SHIFT_STATE_OFF][0] = coordinate->autopopup_key_labels[SCL_SHIFT_STATE_OFF][loop]; - (*pCurLayoutKeyCoordinates)[loop].label[SCL_SHIFT_STATE_ON][0] = + (*pCurLayoutKeyCoordinates)[button_index].label[SCL_SHIFT_STATE_ON][0] = coordinate->autopopup_key_labels[SCL_SHIFT_STATE_ON][loop]; - (*pCurLayoutKeyCoordinates)[loop].label[SCL_SHIFT_STATE_LOCK][0] = + (*pCurLayoutKeyCoordinates)[button_index].label[SCL_SHIFT_STATE_LOCK][0] = coordinate->autopopup_key_labels[SCL_SHIFT_STATE_LOCK][loop]; } //(*pCurLayoutKeyProperties)[loop].labelPropId = SCL_LABEL_PROPERTY_AUTOPOPUP; - (*pCurLayoutKeyCoordinates)[loop].label_type = autopopup_configure->label_type; - memset((*pCurLayoutKeyCoordinates)[loop].image_label_path, 0x00, sizeof((*pCurLayoutKeyCoordinates)[loop].image_label_path)); - memset((*pCurLayoutKeyCoordinates)[loop].bg_image_path, 0x00, sizeof((*pCurLayoutKeyCoordinates)[loop].bg_image_path)); + (*pCurLayoutKeyCoordinates)[button_index].label_type = autopopup_configure->label_type; + memset((*pCurLayoutKeyCoordinates)[button_index].image_label_path, 0x00, sizeof((*pCurLayoutKeyCoordinates)[loop].image_label_path)); + memset((*pCurLayoutKeyCoordinates)[button_index].bg_image_path, 0x00, sizeof((*pCurLayoutKeyCoordinates)[loop].bg_image_path)); for (int innerLoop = 0;innerLoop < SCL_BUTTON_STATE_MAX;innerLoop++) { - (*pCurLayoutKeyCoordinates)[loop].bg_image_path[SCL_SHIFT_STATE_OFF][innerLoop] = - (*pCurLayoutKeyCoordinates)[loop].bg_image_path[SCL_SHIFT_STATE_ON][innerLoop] = - (*pCurLayoutKeyCoordinates)[loop].bg_image_path[SCL_SHIFT_STATE_LOCK][innerLoop] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[SCL_SHIFT_STATE_OFF][innerLoop] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[SCL_SHIFT_STATE_ON][innerLoop] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[SCL_SHIFT_STATE_LOCK][innerLoop] = autopopup_configure->button_image_path[innerLoop]; } - (*pCurLayoutKeyCoordinates)[loop].key_value_count = 1; + (*pCurLayoutKeyCoordinates)[button_index].key_value_count = 1; if (coordinate->autopopup_key_values[0][loop] == NULL) { - (*pCurLayoutKeyCoordinates)[loop].key_value[0][0] = coordinate->autopopup_key_labels[0][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_value[0][0] = coordinate->autopopup_key_labels[0][loop]; } else { - (*pCurLayoutKeyCoordinates)[loop].key_value[0][0] = coordinate->autopopup_key_values[0][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_value[0][0] = coordinate->autopopup_key_values[0][loop]; } if (coordinate->autopopup_key_values[1][loop] == NULL) { - (*pCurLayoutKeyCoordinates)[loop].key_value[1][0] = coordinate->autopopup_key_labels[1][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_value[1][0] = coordinate->autopopup_key_labels[1][loop]; } else { - (*pCurLayoutKeyCoordinates)[loop].key_value[1][0] = coordinate->autopopup_key_values[1][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_value[1][0] = coordinate->autopopup_key_values[1][loop]; } if (coordinate->autopopup_key_values[2][loop] == NULL) { - (*pCurLayoutKeyCoordinates)[loop].key_value[2][0] = coordinate->autopopup_key_labels[2][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_value[2][0] = coordinate->autopopup_key_labels[2][loop]; } else { - (*pCurLayoutKeyCoordinates)[loop].key_value[2][0] = coordinate->autopopup_key_values[2][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_value[2][0] = coordinate->autopopup_key_values[2][loop]; } - (*pCurLayoutKeyCoordinates)[loop].key_event[0][0] = coordinate->autopopup_key_events[0][loop]; - (*pCurLayoutKeyCoordinates)[loop].key_event[1][0] = coordinate->autopopup_key_events[1][loop]; - (*pCurLayoutKeyCoordinates)[loop].key_event[2][0] = coordinate->autopopup_key_events[2][loop]; - (*pCurLayoutKeyCoordinates)[loop].long_key_type = KEY_TYPE_NONE; - (*pCurLayoutKeyCoordinates)[loop].long_key_value = NULL; - (*pCurLayoutKeyCoordinates)[loop].long_key_event = 0; - - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_labels[0][0] = NULL; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_labels[1][0] = NULL; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_labels[2][0] = NULL; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_events[0][0] = 0; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_events[1][0] = 0; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_events[2][0] = 0; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_values[0][0] = NULL; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_values[1][0] = NULL; - (*pCurLayoutKeyCoordinates)[loop].autopopup_key_values[2][0] = NULL; - (*pCurLayoutKeyCoordinates)[loop].extra_option = 0; + (*pCurLayoutKeyCoordinates)[button_index].key_event[0][0] = coordinate->autopopup_key_events[0][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_event[1][0] = coordinate->autopopup_key_events[1][loop]; + (*pCurLayoutKeyCoordinates)[button_index].key_event[2][0] = coordinate->autopopup_key_events[2][loop]; + (*pCurLayoutKeyCoordinates)[button_index].long_key_type = KEY_TYPE_NONE; + (*pCurLayoutKeyCoordinates)[button_index].long_key_value = NULL; + (*pCurLayoutKeyCoordinates)[button_index].long_key_event = 0; + + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_labels[0][0] = NULL; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_labels[1][0] = NULL; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_labels[2][0] = NULL; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_events[0][0] = 0; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_events[1][0] = 0; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_events[2][0] = 0; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_values[0][0] = NULL; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_values[1][0] = NULL; + (*pCurLayoutKeyCoordinates)[button_index].autopopup_key_values[2][0] = NULL; + (*pCurLayoutKeyCoordinates)[button_index].extra_option = 0; /* If the keyvalue is in between the SCL_ISCHAR range, consider this to be a KEY_TYPE_CHAR */ - if ((*pCurLayoutKeyCoordinates)[loop].key_value[0][0]) { - if (strlen((*pCurLayoutKeyCoordinates)[loop].key_value[0][0]) == 1) { - if (SCL_ISCHAR(*(*pCurLayoutKeyCoordinates)[loop].key_value[0][0])) { - (*pCurLayoutKeyCoordinates)[loop].key_type = KEY_TYPE_CHAR; + if ((*pCurLayoutKeyCoordinates)[button_index].key_value[0][0]) { + if (strlen((*pCurLayoutKeyCoordinates)[button_index].key_value[0][0]) == 1) { + if (SCL_ISCHAR(*(*pCurLayoutKeyCoordinates)[button_index].key_value[0][0])) { + (*pCurLayoutKeyCoordinates)[button_index].key_type = KEY_TYPE_CHAR; } } } - (*pCurButtonContext)[loop].used = TRUE; - } - if (autopopup_configure->decoration_size > 0) { - sclbyte decoidx; - for (decoidx = 0;decoidx < MAX_WND_DECORATOR;decoidx++) { - if (loop + decoidx < MAX_KEY) { - (*pCurLayoutKeyCoordinates)[loop + decoidx].valid = TRUE; - switch (decoidx) { - case WND_DECORATOR_TOP_LEFT: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = 0; - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = 0; - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); + (*pCurButtonContext)[button_index].used = TRUE; + button_index++; + } + + for (loop = 0;loop < MAX_WND_DECORATOR;loop++) { + if (button_index < MAX_KEY && + autopopup_configure->decoration_image_path[loop] && + strlen(autopopup_configure->decoration_image_path[loop]) > 0) { + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + int decoration_size = autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); + switch (loop) { + case WND_DECORATOR_TOP_LEFT: + (*pCurLayoutKeyCoordinates)[button_index].x = 0; + (*pCurLayoutKeyCoordinates)[button_index].y = 0; + (*pCurLayoutKeyCoordinates)[button_index].width = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].height = decoration_size; + break; + case WND_DECORATOR_TOP_CENTER: + (*pCurLayoutKeyCoordinates)[button_index].x = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].y = 0; + (*pCurLayoutKeyCoordinates)[button_index].width = width - (2 * decoration_size); + (*pCurLayoutKeyCoordinates)[button_index].height = decoration_size; + break; + case WND_DECORATOR_TOP_RIGHT: + (*pCurLayoutKeyCoordinates)[button_index].x = width - decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].y = 0; + (*pCurLayoutKeyCoordinates)[button_index].width = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].height = decoration_size; + break; + case WND_DECORATOR_MIDDLE_LEFT: + (*pCurLayoutKeyCoordinates)[button_index].x = 0; + (*pCurLayoutKeyCoordinates)[button_index].y = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].width = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].height = height - (2 * decoration_size); + break; + case WND_DECORATOR_MIDDLE_CENTER: + (*pCurLayoutKeyCoordinates)[button_index].x = 0; + (*pCurLayoutKeyCoordinates)[button_index].y = 0; + (*pCurLayoutKeyCoordinates)[button_index].width = width; + (*pCurLayoutKeyCoordinates)[button_index].height = height; + break; + case WND_DECORATOR_MIDDLE_RIGHT: + (*pCurLayoutKeyCoordinates)[button_index].x = width - decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].y = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].width = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].height = height - (2 * decoration_size); + break; + case WND_DECORATOR_BOTTOM_LEFT: + (*pCurLayoutKeyCoordinates)[button_index].x = 0; + (*pCurLayoutKeyCoordinates)[button_index].y = height - decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].width = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].height = decoration_size; + break; + case WND_DECORATOR_BOTTOM_CENTER: + (*pCurLayoutKeyCoordinates)[button_index].x = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].y = height - decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].width = width - (2 * decoration_size); + (*pCurLayoutKeyCoordinates)[button_index].height = decoration_size; + break; + case WND_DECORATOR_BOTTOM_RIGHT: + (*pCurLayoutKeyCoordinates)[button_index].x = width - decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].y = height - decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].width = decoration_size; + (*pCurLayoutKeyCoordinates)[button_index].height = decoration_size; + break; + default: break; - case WND_DECORATOR_TOP_CENTER: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = 0; - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = width - - (2 * autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate()); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - break; - case WND_DECORATOR_TOP_RIGHT: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = - width - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = 0; - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - break; - case WND_DECORATOR_MIDDLE_LEFT: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = 0; - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = height - - (2 * autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate()); - break; - case WND_DECORATOR_MIDDLE_RIGHT: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = - width - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = height - - (2 * autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate()); - break; - case WND_DECORATOR_BOTTOM_LEFT: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = 0; - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = - height - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - break; - case WND_DECORATOR_BOTTOM_CENTER: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = - height - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = width - - (2 * autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate()); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - break; - case WND_DECORATOR_BOTTOM_RIGHT: - (*pCurLayoutKeyCoordinates)[loop + decoidx].x = - width - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].y = - height - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].width = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - (*pCurLayoutKeyCoordinates)[loop + decoidx].height = - autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate(); - break; - default: - break; - } - - (*pCurButtonContext)[loop + decoidx].used = TRUE; - (*pCurLayoutKeyCoordinates)[loop + decoidx].valid = TRUE; - (*pCurLayoutKeyCoordinates)[loop + decoidx].button_type = BUTTON_TYPE_UIITEM; - (*pCurLayoutKeyCoordinates)[loop + decoidx].valid = TRUE; - (*pCurLayoutKeyCoordinates)[loop + decoidx].bg_image_path[0][0] = - (*pCurLayoutKeyCoordinates)[loop + decoidx].bg_image_path[0][1] = - (*pCurLayoutKeyCoordinates)[loop + decoidx].bg_image_path[1][0] = - (*pCurLayoutKeyCoordinates)[loop + decoidx].bg_image_path[1][1] = - autopopup_configure->decoration_image_path[decoidx]; } + + (*pCurButtonContext)[button_index].used = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].button_type = BUTTON_TYPE_UIITEM; + (*pCurLayoutKeyCoordinates)[button_index].valid = TRUE; + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[0][0] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[0][1] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[1][0] = + (*pCurLayoutKeyCoordinates)[button_index].bg_image_path[1][1] = + autopopup_configure->decoration_image_path[loop]; } + button_index++; } } } diff --git a/scl/scluibuilder.cpp b/scl/scluibuilder.cpp index 7d97180..801f764 100644 --- a/scl/scluibuilder.cpp +++ b/scl/scluibuilder.cpp @@ -1108,6 +1108,57 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx) } } + for (int loop = 0;loop < MAX_WND_DECORATOR;loop++) { + if (magnifier_configure->decoration_image_path[loop] && + strlen(magnifier_configure->decoration_image_path[loop]) > 0) { + m_utils->get_composed_path(composed_path, IMG_PATH_PREFIX, magnifier_configure->decoration_image_path[loop]); + int decoration_size = magnifier_configure->decoration_size * utils->get_smallest_custom_scale_rate(); + switch (loop) { + case WND_DECORATOR_TOP_LEFT: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + 0, 0, decoration_size, decoration_size); + break; + case WND_DECORATOR_TOP_CENTER: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + decoration_size, 0, magnifier_configure->width - (2 * decoration_size), decoration_size); + break; + case WND_DECORATOR_TOP_RIGHT: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + magnifier_configure->width - decoration_size, 0, decoration_size, decoration_size); + break; + case WND_DECORATOR_MIDDLE_LEFT: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + 0, decoration_size, decoration_size, magnifier_configure->height - (2 * decoration_size)); + break; + case WND_DECORATOR_MIDDLE_CENTER: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + 0, 0, magnifier_configure->width, magnifier_configure->height); + break; + case WND_DECORATOR_MIDDLE_RIGHT: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + magnifier_configure->width - decoration_size, decoration_size, + decoration_size, magnifier_configure->height - (2 * decoration_size)); + break; + case WND_DECORATOR_BOTTOM_LEFT: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + 0, magnifier_configure->height - decoration_size, decoration_size, decoration_size); + break; + case WND_DECORATOR_BOTTOM_CENTER: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + decoration_size, magnifier_configure->height - decoration_size, + magnifier_configure->width - (2 * decoration_size), decoration_size); + break; + case WND_DECORATOR_BOTTOM_RIGHT: + m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, + magnifier_configure->width - decoration_size, magnifier_configure->height - decoration_size, + decoration_size, decoration_size); + break; + default: + break; + } + } + } + sclboolean ended = FALSE; for (int loop = 0;loop < MAX_SIZE_OF_LABEL_FOR_ONE && !ended;loop++) { const SclLabelProperties *labelproperties = cache->get_label_properties(magnifier_configure->label_type, loop); diff --git a/scl/sclutils.cpp b/scl/sclutils.cpp index fd8f99c..6c2a749 100644 --- a/scl/sclutils.cpp +++ b/scl/sclutils.cpp @@ -231,7 +231,7 @@ CSCLUtils::sleep(sclulong msc) return TRUE; } -/* FIXME : let's just look for appropriate directory once and cache it +/* FIXME : let's just look for appropriate directory once and cache it and one more thing, let's find a closest resolution when caching the appropriate directory */ /** diff --git a/xmlresource/autopopup_configure_parser.cpp b/xmlresource/autopopup_configure_parser.cpp index a033f00..13da834 100644 --- a/xmlresource/autopopup_configure_parser.cpp +++ b/xmlresource/autopopup_configure_parser.cpp @@ -60,6 +60,11 @@ class AutoPopupConfigureParserImpl { xmlFree(m_autopopup_configure.bg_image_path); m_autopopup_configure.bg_image_path = NULL; } + + if (m_autopopup_configure.line_image_path) { + xmlFree(m_autopopup_configure.line_image_path); + m_autopopup_configure.line_image_path = NULL; + } } int parsing_autopopup_configure(const char* input_file) { @@ -107,6 +112,9 @@ class AutoPopupConfigureParserImpl { parsing_button_size(cur_node); } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"button_spacing")) { m_autopopup_configure.button_spacing = get_content_int(cur_node); + } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"line_image_path")) { + xmlChar* temp = xmlNodeGetContent(cur_node); + m_autopopup_configure.line_image_path = (sclchar *)temp; } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"label_type")) { xmlChar* temp = xmlNodeGetContent(cur_node); m_autopopup_configure.label_type = (sclchar *)temp; @@ -177,6 +185,7 @@ class AutoPopupConfigureParserImpl { child_node = child_node->next; } } + void parsing_button_size(const xmlNodePtr cur_node) { assert(cur_node != NULL); @@ -198,22 +207,24 @@ class AutoPopupConfigureParserImpl { while (child_node != NULL) { if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"image")) { - if (equal_prop(cur_node, "direction", "top_left")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_TOP_LEFT] = (sclchar *)xmlNodeGetContent(cur_node);; - } else if (equal_prop(cur_node, "direction", "top_center")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_TOP_CENTER] = (sclchar *)xmlNodeGetContent(cur_node);; - } else if (equal_prop(cur_node, "direction", "top_right")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_TOP_RIGHT] = (sclchar *)xmlNodeGetContent(cur_node);; - } else if (equal_prop(cur_node, "direction", "middle_left")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_MIDDLE_LEFT] = (sclchar *)xmlNodeGetContent(cur_node);; - } else if (equal_prop(cur_node, "direction", "middle_right")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_MIDDLE_RIGHT] = (sclchar *)xmlNodeGetContent(cur_node);; - } else if (equal_prop(cur_node, "direction", "bottom_left")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_BOTTOM_LEFT] = (sclchar *)xmlNodeGetContent(cur_node);; - } else if (equal_prop(cur_node, "direction", "bottom_center")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_BOTTOM_CENTER] = (sclchar *)xmlNodeGetContent(cur_node);; - } else if (equal_prop(cur_node, "direction", "bottom_right")) { - m_autopopup_configure.decoration_image_path[WND_DECORATOR_BOTTOM_RIGHT] = (sclchar *)xmlNodeGetContent(cur_node);; + if (equal_prop(child_node, "direction", "top_left")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_TOP_LEFT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "top_center")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_TOP_CENTER] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "top_right")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_TOP_RIGHT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "middle_left")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_MIDDLE_LEFT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "middle_center")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_MIDDLE_CENTER] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "middle_right")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_MIDDLE_RIGHT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "bottom_left")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_BOTTOM_LEFT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "bottom_center")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_BOTTOM_CENTER] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "bottom_right")) { + m_autopopup_configure.decoration_image_path[WND_DECORATOR_BOTTOM_RIGHT] = (sclchar *)xmlNodeGetContent(child_node); } } child_node = child_node->next; diff --git a/xmlresource/layout_parser.cpp b/xmlresource/layout_parser.cpp index ae55757..cc27e1a 100644 --- a/xmlresource/layout_parser.cpp +++ b/xmlresource/layout_parser.cpp @@ -85,6 +85,8 @@ using namespace std; #define LAYOUT_BACKGROUND_DISABLED_TAG "button_disabled" #define LAYOUT_BACKGROUND_TOGGLED_TAG "button_toggled" +#define LAYOUT_SW_BACKGROUND_TAG "background_color" + #define LAYOUT_ROW_TAG "row" #define LAYOUT_ROW_SUBLAYOUT_ID_ATTRIBUTE "sub_layout" #define LAYOUT_ROW_X_ATTRIBUTE "x" @@ -197,6 +199,7 @@ class LayoutParserImpl { void parsing_background(const xmlNodePtr cur_node, const PSclLayout); void parsing_key_background(const xmlNodePtr cur_node, const PSclLayout); void parsing_grab_area(const xmlNodePtr cur_node, const PSclLayout cur_rec_layout); + void parsing_sw_background_color(const xmlNodePtr cur_node, const PSclLayout); void set_default_layout_value(const PSclLayout); void set_default_row_value(Row*, const PSclLayout cur_rec_layout, const int row_y); @@ -476,6 +479,29 @@ LayoutParserImpl::parsing_background( } void +LayoutParserImpl::parsing_sw_background_color( + const xmlNodePtr cur_node, + PSclLayout cur_layout) { + assert(cur_node != NULL); + assert(cur_layout != NULL); + + xmlNodePtr child_node = cur_node->xmlChildrenNode; + while (child_node != NULL) { + if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"r")) { + cur_layout->bg_color.r = get_content_int(child_node); + } else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"g")) { + cur_layout->bg_color.g = get_content_int(child_node); + } else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"b")) { + cur_layout->bg_color.b = get_content_int(child_node); + } else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"a")) { + cur_layout->bg_color.a = get_content_int(child_node); + } + + child_node = child_node->next; + } +} + +void LayoutParserImpl::parsing_key_background( const xmlNodePtr cur_node, PSclLayout cur_layout) { @@ -759,9 +785,10 @@ LayoutParserImpl::parsing_layout_node( xmlNodePtr child_node = cur_node->xmlChildrenNode; while (child_node != NULL) { /* row node: layout coordinate resources is no need to parsing at this time */ - if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_BACKGROUND_TAG)) { parsing_background(child_node, cur_rec_layout); + } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_SW_BACKGROUND_TAG)) { + parsing_sw_background_color(child_node, cur_rec_layout); } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_KEY_BACKGROUND_TAG)) { parsing_key_background(child_node, cur_rec_layout); } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)LAYOUT_ADD_GRAB_TAG)) { diff --git a/xmlresource/magnifier_configure_parser.cpp b/xmlresource/magnifier_configure_parser.cpp index 04a6d9e..7f21962 100644 --- a/xmlresource/magnifier_configure_parser.cpp +++ b/xmlresource/magnifier_configure_parser.cpp @@ -111,6 +111,9 @@ class MagnifierConfigureParserImpl { } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"label_type")) { xmlChar* temp = xmlNodeGetContent(cur_node); m_magnifier_configure.label_type = (sclchar*)temp; + } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"window_decorator")) { + get_prop_number(cur_node, "size", &(m_magnifier_configure.decoration_size)); + parsing_window_decorator_image_path(cur_node); } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"padding")) { parsing_padding_values(cur_node); } else if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"show_shift_label")) { @@ -165,6 +168,36 @@ class MagnifierConfigureParserImpl { child_node = child_node->next; } } + void parsing_window_decorator_image_path(const xmlNodePtr cur_node) { + assert(cur_node != NULL); + assert(0 == xmlStrcmp(cur_node->name, (const xmlChar*)"window_decorator")); + xmlNodePtr child_node = cur_node->xmlChildrenNode; + + while (child_node != NULL) { + if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"image")) { + if (equal_prop(child_node, "direction", "top_left")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_TOP_LEFT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "top_center")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_TOP_CENTER] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "top_right")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_TOP_RIGHT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "middle_left")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_MIDDLE_LEFT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "middle_center")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_MIDDLE_CENTER] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "middle_right")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_MIDDLE_RIGHT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "bottom_left")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_BOTTOM_LEFT] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "bottom_center")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_BOTTOM_CENTER] = (sclchar *)xmlNodeGetContent(child_node); + } else if (equal_prop(child_node, "direction", "bottom_right")) { + m_magnifier_configure.decoration_image_path[WND_DECORATOR_BOTTOM_RIGHT] = (sclchar *)xmlNodeGetContent(child_node); + } + } + child_node = child_node->next; + } + } void parsing_padding_values(const xmlNodePtr cur_node) { assert(cur_node != NULL);