scl/sclactionstate.cpp
scl/sclresourcecache.cpp
res/sclresource.cpp
- res/simple_debug.cpp
)
SET(PACKAGE ${PROJECT_NAME})
INSTALL(FILES "${CMAKE_SOURCE_DIR}/scl/include/sclconfig.h" DESTINATION include/libscl-ui)
INSTALL(FILES "${CMAKE_SOURCE_DIR}/scl/include/sclstructs.h" DESTINATION include/libscl-ui)
INSTALL(FILES "${CMAKE_SOURCE_DIR}/scl/include/scleventcallback.h" DESTINATION include/libscl-ui)
-INSTALL(FILES "${CMAKE_SOURCE_DIR}/res/simple_debug.h" DESTINATION include/libscl-ui)
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
#include "autopopup_configure_bin_parser.h"
#include <assert.h>
using namespace std;
-#include "put_record.h"
BinAutoPopupConfigParser* BinAutoPopupConfigParser::m_instance = NULL;
//add_grab_bottom
cur->add_grab_bottom = m_storage.get<sint_t>(record_width.add_grab_bottom);
-#ifdef __SCL_TXT_DEBUG
- put_autopopup_configure(DECODE, m_autopopup_configure);
-#endif
}
PSclAutoPopupConfigure BinAutoPopupConfigParser::get_autopopup_configure() {
#include "string_provider.h"
#include "metadata_provider.h"
#include <assert.h>
-#include "simple_debug.h"
using namespace binary_xmlresource;
}
void BinResource::init(const char *entry_filepath) {
- SCLLOG_TIME_BEGIN();
-
char path[_POSIX_PATH_MAX] = {0};
m_nine_patch_file_list_parser->init(storageAllData, info[NINE_PATCH].offset, info[NINE_PATCH].size, &parser_info_provider);
}
- SCLLOG_TIME_END("Parsing binary XML files");
}
void BinResource::load(int layout_id) {
#include "default_configure_bin_parser.h"
#include <assert.h>
using namespace std;
-#include "put_record.h"
BinDefaultConfigParser* BinDefaultConfigParser::m_instance = NULL;
//dim_color
decode_color(cur->dim_color, record_width.dim_color);
-
-#ifdef __SCL_TXT_DEBUG
- put_default_configure(DECODE, m_default_configure);
-#endif
}
PSclDefaultConfigure BinDefaultConfigParser::get_default_configure() {
#ifndef __METADATA_PROVIDER_H__
#define __METADATA_PROVIDER_H_
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include "imetadata_provider.h"
#include "metadata_bin_parser.h"
class Metadata_Provider:public IMetadata_Provider{
current_record_name = record_name;
curRecordIndex = find_metadata_record_index(record_name);
if (curRecordIndex == -1) {
- printf("Can not find %s metadata record.\n", record_name);
+ LOGD("Can not find %s metadata record.\n", record_name);
}
}
}
*/
#include "input_mode_configure_bin_parser.h"
-#include "simple_debug.h"
-#include "put_record.h"
using namespace std;
BinInputModeConfigParser* BinInputModeConfigParser::m_instance = NULL;
#include "string_provider.h"
#include "metadata_provider.h"
#include <algorithm>
-#include "put_record.h"
#include <malloc.h>
#include "binary_xmlresource.h"
-#include "simple_debug.h"
using namespace binary_xmlresource;
using namespace std;
for (int j = 0; j < pKey_num_array[i]; ++j) {
SclLayoutKeyCoordinatePointer curPointer = (SclLayoutKeyCoordinatePointer)malloc(sizeof(SclLayoutKeyCoordinate));
if (curPointer == NULL) {
- SCLLOG(SclLog::ERROR, "Memory malloc error.\n");
assert(0);
}
memset(curPointer, 0x00, sizeof(SclLayoutKeyCoordinate));
*/
#include "label_properties_bin_parser.h"
-#include "simple_debug.h"
-#include "put_record.h"
BinLabelPropertyParser* BinLabelPropertyParser::m_instance = NULL;
BinLabelPropertyParser::BinLabelPropertyParser() {
int maxj = m_storage.get<sint_t>(4);
if (parser_info_provider == NULL) {
- SCLLOG(SclLog::ERROR, "Error parser_info_provider is NULL\n");
return;
}
decode_label_properties_record(&cur, record_width);
}
}
-#ifdef __SCL_TXT_DEBUG
- put_label_properties_frame(DECODE, m_label_properties_frame);
-#endif
}
void
#include "key_coordinate_frame_bin_parser.h"
#include "sclutils.h"
-#include "put_record.h"
#include <algorithm>
using namespace std;
using namespace scl;
SclLayout& cur = m_layout_table[i];
decode_layout_record(cur, record_width);
}
-#ifdef __SCL_TXT_DEBUG
- put_layout_table(DECODE, m_layout_table);
-#endif
-
}
void
#include "file_storage.h"
#include <assert.h>
using namespace std;
-#include "put_record.h"
BinMagnifierConfigParser* BinMagnifierConfigParser::m_instance = NULL;
BinMagnifierConfigParser::BinMagnifierConfigParser() {
cur->padding_y = m_storage.get<sint_t>(record_width.padding_y);
//show_shift_label
cur->show_shift_label = m_storage.get<sint_t>(record_width.show_shift_label);
-
-#ifdef __SCL_TXT_DEBUG
- put_magnifier_wnd_configure(DECODE, m_magnifier_configure);
-#endif
}
PSclMagnifierWndConfigure BinMagnifierConfigParser::get_magnifier_configure() {
#include "modifier_decoration_bin_parser.h"
#include <memory.h>
-#include "put_record.h"
BinModifierDecorationParser* BinModifierDecorationParser::m_instance = NULL;
cur++;
}
-#ifdef __SCL_TXT_DEBUG
- put_modifier_decoration(DECODE, m_modifier_decoration_table);
-#endif
}
int
#include "nine_patch_file_list_bin_parser.h"
#include <memory.h>
#include <assert.h>
-#include "put_record.h"
BinNinePatchFileParser* BinNinePatchFileParser::m_instance = NULL;
BinNinePatchFileParser::BinNinePatchFileParser() {
cur->bottom = m_storage.get<sint_t>(record_width.bottom);
cur++;
}
-#ifdef __SCL_TXT_DEBUG
- put_nine_patch_info(DECODE, m_nine_patch_file_list);
-#endif
}
SclNinePatchInfo*
+++ /dev/null
-/*
- * Copyright 2012-2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __PUT_RECORD_H__
-#define __PUT_RECORD_H__
-/*This file is just for debug*/
-/*Use this file to output scl resources in txt format*/
-
-// Open this flag to output the scl txt
-// #define __SCL_TXT_DEBUG
-
-/////////////////////////////////////////////////////
-#ifdef __SCL_TXT_DEBUG
-
-#include <stdio.h>
-#include <string>
-#include <unistd.h>
-using namespace std;
-#include "sclresource.h"
-
-#define ENCODE 0
-#define DECODE 1
-#define PARSER 2
-static const string get_folder() {
- return string(getenv("HOME")) + "/";
-}
-
-static inline void
-put_str(FILE* fp, const char* str) {
- assert(fp);
- if (NULL != str) {
- fprintf(fp, "%s\n", str);
- } else {
- fprintf(fp, "String:NULL\n");
- }
-}
-
-static inline void
-put_int(FILE* fp, int data) {
- assert(fp);
- fprintf(fp, "%d\n", data);
-}
-static inline void
-put_flt(FILE* fp, double data) {
- assert(fp);
- fprintf(fp, "%lf\n", data);
-}
-static inline void
-put_color(FILE* fp, const SclColor& c) {
- assert(fp);
-
- fprintf(fp, "Color:\n");
- put_int(fp, c.r);
- put_int(fp, c.g);
- put_int(fp, c.b);
- put_int(fp, c.a);
-}
-
-static inline void
-put_point(FILE* fp, const SclPoint& p) {
- assert(fp);
-
- fprintf(fp, "Point:\n");
- put_int(fp, p.x);
- put_int(fp, p.y);
-}
-static inline void
-put_rect(FILE* fp, const SclRect& r) {
- assert(fp);
-
- fprintf(fp, "Rect:\n");
- put_int(fp, r.left);
- put_int(fp, r.top);
- put_int(fp, r.right);
- put_int(fp, r.bottom);
-}
-
-static inline void
-put_note(FILE*fp, int no) {
- fprintf(fp, "--------------------------");
- fprintf(fp, "%d", no);
- fprintf(fp, "--------------------------\n\n");
-}
-
-static inline void
-put_note(FILE*fp, int i, int j) {
- fprintf(fp, "--------------------------");
- fprintf(fp, "i is %d, j is %d", i, j);
- fprintf(fp, "--------------------------\n\n");
-}
-static inline void
-put_seperator(FILE *fp) {
- fprintf(fp, "\n##########\n\n");
-}
-
-static void
-put_magnifier_wnd_configure_record(FILE* fp, const SclMagnifierWndConfigure& record) {
- assert(fp);
-
- put_int(fp, record.style);
- put_int(fp, record.width);
- put_int(fp, record.height);
- put_rect(fp, record.label_area_rect);
- put_str(fp, record.bg_image_path);
- put_seperator(fp);
-
- put_str(fp, record.bg_shift_image_path);
- put_str(fp, record.bg_shift_lock_image_path);
- put_str(fp, record.bg_long_key_image_path);
- put_int(fp, record.use_actual_window);
- put_str(fp, record.label_type);
- put_seperator(fp);
-
- put_int(fp, record.padding_x);
- put_int(fp, record.padding_y);
- put_int(fp, record.show_shift_label);
-}
-
-static void
-put_autopopup_configure_record(FILE*fp, const SclAutoPopupConfigure& record) {
- assert(fp);
-
- put_str(fp, record.bg_image_path);
- put_color(fp, record.bg_color);
- put_flt(fp, record.bg_line_width);
- put_color(fp, record.bg_line_color);
- put_int(fp, record.bg_padding);
- put_seperator(fp);
-
- for (int i = 0; i < SCL_BUTTON_STATE_MAX; ++i) {
- put_str(fp, record.button_image_path[i]);
- }
- put_seperator(fp);
-
- put_int(fp, record.sw_button_style);
- put_int(fp, record.button_width);
- put_int(fp, record.button_height);
- put_int(fp, record.button_spacing);
-
- put_str(fp, record.label_type);
- put_seperator(fp);
- for (int i = 0; i < MAX_WND_DECORATOR; ++i) {
- put_str(fp, record.decoration_image_path[i]);
- }
-
- put_seperator(fp);
- put_int(fp, record.decoration_size);
- put_int(fp, record.max_column);
- put_int(fp, record.add_grab_left);
- put_int(fp, record.add_grab_right);
- put_int(fp, record.add_grab_top);
- put_seperator(fp);
- put_int(fp, record.add_grab_bottom);
-}
-
-static void
-put_nine_patch_info_record(FILE* fp, const SclNinePatchInfo& record) {
- assert(fp);
-
- put_str(fp, record.image_path);
- put_int(fp, record.left);
- put_int(fp, record.right);
- put_int(fp, record.top);
- put_int(fp, record.bottom);
-}
-
-static void
-put_modifier_decoration_record(FILE* fp, const SclModifierDecoration& record) {
- assert(fp);
-
- put_int(fp, record.extract_background);
- put_str(fp, record.name);
- put_seperator(fp);
-
- for (int i = 0; i < DISPLAYMODE_MAX; ++i) {
- for (int j = 0; j < KEY_MODIFIER_MAX; ++j) {
- put_str(fp, record.bg_image_path[i][j]);
- }
- }
-}
-
-static void
-put_default_configure_record(FILE* fp, const SclDefaultConfigure& record) {
- put_int(fp, record.display_mode);
- put_str(fp, record.input_mode);
- put_str(fp, record.image_file_base_path);
- put_int(fp, record.target_screen_width);
- put_int(fp, record.target_screen_height);
- put_seperator(fp);
-
- put_int(fp, record.auto_detect_landscape);
- put_int(fp, record.use_magnifier_window);
- put_int(fp, record.use_auto_popup);
- put_int(fp, record.use_zoom_window);
- put_int(fp, record.on_error_noti_send);
- put_seperator(fp);
- put_int(fp, record.use_word_deletion);
- put_int(fp, record.sw_button_style);
- put_seperator(fp);
- for (int i = 0; i < DISPLAYMODE_MAX; ++i) {
- put_int(fp, record.touch_offset_level[i]);
- }
-
- put_seperator(fp);
- for (int i = 0; i < DISPLAYMODE_MAX; ++i) {
- put_point(fp, record.touch_offset[i]);
- }
-
- put_seperator(fp);
- put_str(fp, record.default_sub_layout);
- put_int(fp, record.use_actual_dim_window);
- put_color(fp, record.dim_color);
-}
-
-static void put_label_properties_record(FILE* fp, const SclLabelProperties& record) {
- put_str(fp, record.label_type);
- put_str(fp, record.font_name);
- put_int(fp, record.font_size);
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < SCL_BUTTON_STATE_MAX; ++j) {
- put_color(fp, record.font_color[i][j]);
- }
- }
- put_seperator(fp);
- put_int(fp, record.alignment);
- put_int(fp, record.padding_x);
- put_int(fp, record.padding_y);
- put_int(fp, record.inner_width);
- put_int(fp, record.inner_height);
- put_int(fp, record.shadow_distance);
- put_int(fp, record.shadow_direction);
- put_seperator(fp);
-
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < SCL_BUTTON_STATE_MAX; ++j) {
- put_color(fp, record.shadow_color[i][j]);
- }
- }
-}
-
-static void put_key_coordinate_record(FILE* fp, const SclLayoutKeyCoordinate& record) {
- put_int(fp, record.x);
- put_int(fp, record.y);
- put_int(fp, record.width);
- put_int(fp, record.height);
- put_seperator(fp);
- put_int(fp, record.add_hit_left);
- put_int(fp, record.add_hit_right);
- put_int(fp, record.add_hit_top);
- put_int(fp, record.add_hit_bottom);
- put_seperator(fp);
-
- put_int(fp, record.popup_relative_x);
- put_int(fp, record.popup_relative_y);
- put_int(fp, record.extract_offset_x);
- put_int(fp, record.extract_offset_y);
- put_seperator(fp);
- put_str(fp, record.sub_layout);
- put_seperator(fp);
-
- put_int(fp, record.magnifier_offset_x);
- put_int(fp, record.magnifier_offset_y);
- put_seperator(fp);
- put_str(fp, record.custom_id);
- put_int(fp, record.button_type);
- put_int(fp, record.key_type);
- put_int(fp, record.popup_type);
- put_seperator(fp);
-
- put_int(fp, record.use_magnifier);
- put_int(fp, record.use_long_key_magnifier);
-
- put_seperator(fp);
- for (int i = 0; i < SCL_DRAG_STATE_MAX; ++i) {
- put_str(fp, record.popup_input_mode[i]);
- }
- put_seperator(fp);
- put_str(fp, record.sound_style);
- put_str(fp, record.vibe_style);
- put_int(fp, record.is_side_button);
- put_int(fp, record.label_count);
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < MAX_SIZE_OF_LABEL_FOR_ONE; ++j) {
- put_str(fp, record.label[i][j]);
- }
- }
- put_seperator(fp);
- put_str(fp, record.label_type);
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < SCL_BUTTON_STATE_MAX; ++j) {
- put_str(fp, record.image_label_path[i][j]);
- }
- }
- put_str(fp, record.image_label_type);
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < SCL_BUTTON_STATE_MAX; ++j) {
- put_str(fp, record.bg_image_path[i][j]);
- }
- }
- put_seperator(fp);
- put_int(fp, record.key_value_count);
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < MAX_SIZE_OF_MULTITAP_CHAR; ++j) {
- put_str(fp, record.key_value[i][j]);
- }
- }
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < MAX_SIZE_OF_LABEL_FOR_ONE; ++j) {
- put_int(fp, record.key_event[i][j]);
-
- }
- }
- put_seperator(fp);
- put_str(fp, record.long_key_value);
- put_int(fp, record.use_repeat_key);
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < MAX_SIZE_OF_AUTOPOPUP_STRING; ++j) {
- put_str(fp, record.autopopup_key_labels[i][j]);
- put_str(fp, record.autopopup_key_values[i][j]);
- put_int(fp, record.autopopup_key_events[i][j]);
- }
- }
- put_seperator(fp);
- put_int(fp, record.dont_close_popup);
- put_int(fp, record.extra_option);
- put_int(fp, record.multitouch_type);
- put_seperator(fp);
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < MAX_SIZE_OF_LABEL_FOR_ONE; ++j) {
- put_str(fp, record.magnifier_label[i][j]);
- }
- }
-}
-static void put_input_mode_configure_record(FILE* fp, const SclInputModeConfigure& record) {
- put_str(fp, record.name);
- put_str(fp, record.layouts[0]);
- put_str(fp, record.layouts[1]);
- put_int(fp, record.use_virtual_window);
- put_int(fp, record.use_dim_window);
- put_flt(fp, record.timeout);
-}
-static void put_layout_record(FILE* fp, const SclLayout& record ) {
- put_str(fp, record.name);
- put_int(fp, record.display_mode);
- put_int(fp, record.style);
- put_int(fp, record.width);
- put_int(fp, record.height);
- put_seperator(fp);
- put_int(fp, record.use_sw_button);
- put_int(fp, record.extract_background);
- put_int(fp, record.use_magnifier_window);
- put_int(fp, record.key_width);
- put_int(fp, record.key_height);
- put_seperator(fp);
- put_int(fp, record.use_sw_background);
- put_flt(fp, record.bg_line_width);
- put_int(fp, record.add_grab_left);
- put_int(fp, record.add_grab_right);
- put_int(fp, record.add_grab_top);
- put_int(fp, record.add_grab_bottom);
- put_seperator(fp);
- for(int i = 0; i < SCL_BUTTON_STATE_MAX; ++i) {
- put_str(fp, record.image_path[i]);
- }
- put_seperator(fp);
- //key_background_image
- for (int i = 0; i < SCL_SHIFT_STATE_MAX; ++i) {
- for (int j = 0; j < SCL_BUTTON_STATE_MAX; ++j) {
- put_str(fp, record.key_background_image[i][j]);
- }
- }
-}
-
-static void put_input_mode_configure_table(int flag, const PSclInputModeConfigure table) {
- string file_name;
- if (flag == ENCODE)
- file_name = "encode_input_mode_configure.txt";
- else if (flag == DECODE)
- file_name = "decode_input_mode_configure.txt";
- else
- file_name = "sclres_input_mode_configure.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
- for (int i = 0; i < MAX_SCL_INPUT_MODE; ++i) {
- put_note(fp, i);
- put_input_mode_configure_record(fp, table[i]);
- }
-
- fclose(fp);
-}
-
-static void put_layout_table(int flag, const PSclLayout table) {
- string file_name;
- if (flag == ENCODE)
- file_name = "encode_layout.txt";
- else if (flag == DECODE)
- file_name = "decode_layout.txt";
- else
- file_name = "sclres_layout.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
- for (int i = 0; i < MAX_SCL_LAYOUT; ++i) {
- put_note(fp, i);
- put_layout_record(fp, table[i]);
- }
- fclose(fp);
-}
-
-static void
-put_key_coordinate_frame(int flag, const PSclLayoutKeyCoordinatePointerTable frame) {
- string file_name;
- if (flag == ENCODE) {
- file_name = "encode_key_coordinate_frame.txt";
- } else if (flag == DECODE){
- file_name = "decode_key_coordinate_frame.txt";
- } else
- file_name = "sclres_key_coordinate_frame.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
- for (int i = 0; i < MAX_SCL_LAYOUT; ++i) {
- if (frame[i][0] == NULL) break;
-
- for (int j = 0; j < MAX_KEY; ++j) {
- put_note(fp, i, j);
- const SclLayoutKeyCoordinatePointer p = frame[i][j];
- if (!p) break;
- const SclLayoutKeyCoordinate& cur = *p;
- put_key_coordinate_record(fp, cur);
- }
- }
- fclose(fp);
-}
-
-static void
-put_label_properties_frame(int flag, const PSclLabelPropertiesTable frame) {
- string file_name;
- if (flag == ENCODE) {
- file_name = "encode_label_properties_frame.txt";
- } else if (flag == DECODE){
- file_name = "decode_label_properties_frame.txt";
- } else
- file_name = "sclres_label_properties_frame.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
- for (int i = 0; i < MAX_SCL_LABEL_PROPERTIES; ++i) {
- for(int j = 0; j < MAX_SIZE_OF_LABEL_FOR_ONE; ++j) {
- put_note(fp, i, j);
- put_label_properties_record(fp, frame[i][j]);
- }
- }
- fclose(fp);
-}
-
-static void
-put_default_configure(int flag, const SclDefaultConfigure& record) {
-
- string file_name;
- if (flag == ENCODE) {
- file_name = "encode_default_configure.txt";
- } else if (flag == DECODE) {
- file_name = "decode_default_configure.txt";
- } else
- file_name = "sclres_default_configure.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
- put_default_configure_record(fp, record);
- fclose(fp);
-}
-
-static void
-put_autopopup_configure(int flag, const SclAutoPopupConfigure& record) {
-
- string file_name;
- if (flag == ENCODE) {
- file_name = "encode_autopopup_configure.txt";
- } else if (flag == DECODE){
- file_name = "decode_autopopup_configure.txt";
- } else
- file_name = "sclres_autopopup_configure.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
- put_autopopup_configure_record(fp, record);
- fclose(fp);
-}
-
-static void
-put_nine_patch_info(int flag, const SclNinePatchInfo* table) {
- static const int MAX_NINE_PATCH_FILE_LIST = 128;
-
- string file_name;
- if (flag == ENCODE) {
- file_name = "encode_nine_patch_info.txt";
- } else if (flag == DECODE) {
- file_name = "decode_nine_patch_info.txt";
- } else
- file_name = "sclres_nine_patch_info.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
-
- for (int i = 0; i < MAX_NINE_PATCH_FILE_LIST; ++i) {
- put_note(fp, i);
- put_nine_patch_info_record(fp, table[i]);
- }
- fclose(fp);
-}
-
-
-static void
-put_magnifier_wnd_configure(int flag, const SclMagnifierWndConfigure& record) {
- string file_name;
- if (flag == ENCODE) {
- file_name = "encode_magnifier_wnd_configure.txt";
- } else if (flag == DECODE) {
- file_name = "decode_magnifier_wnd_configure.txt";
- } else
- file_name = "sclres_magnifier_wnd_configure.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
- put_magnifier_wnd_configure_record(fp, record);
- fclose(fp);
-}
-
-static void
-put_modifier_decoration(int flag, const PSclModifierDecoration table) {
- string file_name;
- if (flag == ENCODE) {
- file_name = "encode_modifier_decoration.txt";
- } else if (flag == DECODE) {
- file_name = "decode_modifier_decoration.txt";
- } else
- file_name = "sclres_modifier_decoration.txt";
-
- string path = get_folder() + file_name;
- FILE *fp = fopen(path.c_str(), "w+");
- if (!fp) {
- perror("Warning: path.c_str()");
- return;
- }
-
- for (int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
- put_note(fp, i);
- put_modifier_decoration_record(fp, table[i]);
- }
- fclose(fp);
-}
-#endif
-#endif
+++ /dev/null
-/*
- * Copyright 2012-2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "simple_debug.h"
-#include <stdlib.h>
-#include <time.h>
-#include <sys/time.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-SclLog* SclLog::m_instance = NULL;
-
-SclLog::SclLog() : m_flog(NULL) {
- char *env = NULL;
- char *scllog = NULL;
- char log_path[128];
-
- /*
- * Use export scllog="true" to enable scllog
- */
- scllog = getenv("scllog");
- if (scllog == NULL || 0 != strcmp(scllog, "true")) {
- return;
- }
-
- env = getenv("HOME");
- if (env == NULL) {
- return;
- }
-
- snprintf(log_path, 128, "%s/scl.log", env);
- m_flog = fopen(log_path, "w+");
- if (m_flog == NULL) {
- fprintf(stderr, "Could not open file: %s", log_path);
- }
-}
-
-SclLog::~SclLog() {
- if (m_flog != NULL) {
- fclose(m_flog);
- }
-}
-
-SclLog*
-SclLog::get_instance() {
- if(m_instance == NULL) {
- m_instance = new SclLog();
- }
-
- return m_instance;
-}
-
-void
-SclLog::log(enum LOG_LEVEL level, char* fmt, ...) {
- static const char *log_message[MAX_LOG_LEVEL] = {
- "message", "warning", "debug", "error"
- };
-
- if (m_flog == NULL) {
- return;
- }
-
- char str_log[128];
- va_list ap;
- va_start(ap, fmt);
- vsprintf(str_log, fmt, ap);
- va_end(ap);
-
- /*
- * log current time
- */
- time_t now;
- struct tm *timenow;
-
- time(&now);
- timenow = localtime(&now);
-
- fprintf(m_flog, "[ %s ] %s\n", log_message[level], asctime(timenow));
- fprintf(m_flog, "\t%s\n", str_log);
-
- fflush(m_flog);
-}
-
-void
-SCLLOG(enum SclLog::LOG_LEVEL level, char* fmt, ...) {
- SclLog *log = SclLog::get_instance();
- if (log) {
- char str_log[128];
- va_list ap;
- va_start(ap, fmt);
- vsprintf(str_log, fmt, ap);
- va_end(ap);
- log->log(level, str_log);
- }
-}
-
-static struct timeval g_time_begin;
-static struct timeval g_time_end;
-void
-SCLLOG_TIME_BEGIN() {
- gettimeofday(&g_time_begin, NULL);
-}
-
-void
-SCLLOG_TIME_END(char *msg) {
- gettimeofday(&g_time_end, NULL);
-
- long diff = (g_time_end.tv_sec - g_time_begin.tv_sec) * 1000000 + g_time_end.tv_usec - g_time_begin.tv_usec;
- fprintf(stdout, "%s use %ld usec\n", msg, diff);
-}
+++ /dev/null
-/*
- * Copyright 2012-2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __SIMPLE_DEBUG_H__
-#define __SIMPLE_DEBUG_H__
-#include <stdio.h>
-
-class SclLog {
- public:
- enum LOG_LEVEL {
- MESSAGE = 0,
- WARNING,
- DEBUG,
- ERROR,
- MAX_LOG_LEVEL
- };
-
- static SclLog* get_instance();
- void log(enum LOG_LEVEL, char* fmt, ...);
- ~SclLog();
- private:
- SclLog();
- static SclLog* m_instance;
-
- FILE *m_flog;
-};
-
-
-void SCLLOG(enum SclLog::LOG_LEVEL level, char* fmt, ...);
-
-void SCLLOG_TIME_BEGIN();
-void SCLLOG_TIME_END(char *msg);
-#endif
+++ /dev/null
-/*
- * Copyright 2012-2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-/*
- * Use `g++ -I. simple_debug.cpp simple_debug_test.cpp` to compiler it
- */
-#include <simple_debug.h>
-#include <stdio.h>
-
-int main() {
- /* Test SclLog */
- SclLog *log = SclLog::get_instance();
- if (log) {
- log->log(SclLog::WARNING, "Test %d\n", 100);
- }
-
- /* Test SCLLOG */
- SCLLOG(SclLog::ERROR, "%s/%d", "SCLLOG", 100);
- return 0;
-}
sclint destWidth, sclint destHeight, sclint srcX, sclint srcY, sclint srcWidth, sclint srcHeight)
{
SCL_DEBUG();
- //printf("\n %d destX, %d destY,\n %d destWidth, %d destHeight, %d srcX, %d srcY,\n %d srcWidth, %d srcHeight\n", destX, destY, destWidth, destHeight, srcX, srcWidth, srcHeight);
/* pre-condition */
scl_assert_return(imgPath);
if (textExtents.width > width) {
int newSize = fontinfo.fontsize - (fontinfo.fontsize * (float)(textExtents.width - width)) / width - 1;
- //printf("%s , %ld %ld %ld %ld %d\n", str, (int)(textExtents.width), (int)(textExtents.x_bearing), (int)(textExtents.x_advance), (int)(width), fontinfo.fontsize);
cairo_set_font_size(cr, newSize);
cairo_text_extents(cr, str, &textExtents);
cairo_text_extents(cr, "|", &barExtents);
- //printf("%s , %ld %ld %ld %ld %d\n", str, (int)(textExtents.width), (int)(textExtents.x_bearing), (int)(textExtents.x_advance), (int)(width), newSize);
}
if (align == LABEL_ALIGN_CENTER_TOP || align == LABEL_ALIGN_CENTER_MIDDLE || align == LABEL_ALIGN_CENTER_BOTTOM) {
return FALSE;
}
if (keyindex != highlighted_key || window != highlighted_window ) {
- printf("%d != %d || %p != %p\n", keyindex, highlighted_key, window, highlighted_window);
if(layout) {
SclPoint pos = {0,};
sclfloat scale_rate_x, scale_rate_y;
if (coordinate->key_type != KEY_TYPE_NONE) {
if (context->get_tts_enabled()) {
const char *targetstr = coordinate->hint_string[shiftidx][btncontext->multikeyIdx];
- printf("coordinate->hint_string[%d][%d] : %p\n", shiftidx, btncontext->multikeyIdx, targetstr);
if (targetstr == NULL) {
targetstr = coordinate->key_value[shiftidx][btncontext->multikeyIdx];
}
- printf("coordinate->key_value[%d][%d] : %p\n", shiftidx, btncontext->multikeyIdx, targetstr);
if (targetstr == NULL) {
targetstr = coordinate->label[shiftidx][0];
}
- printf("coordinate->label[%d][0] : %p\n", shiftidx, targetstr);
/*if(state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY ||
state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY ) {
targetstr = coordinate->long_key_value;
sclres_manager->get_layout_id(sclres_input_mode_configure[popup_input_mode].layouts[display_mode]);
if (popupLayoutId == NOT_USED){
// deal with NOT_USED
- printf("popupLayoutID is not used.\n");
}
SclLayout *layout = NULL;
/* FIXME */
}
deltax = originx - startx;
deltay = originy - starty;
- //printf("DIST : %f, RECOG : %f\n", dist, direction_recog_dist);
if (dist > direction_recog_dist) {
next_drag_state = get_drag_state(deltax, deltay);
/* Disable longkey if dragging is recognized */
deltax = originx - startx;
deltay = originy - starty;
sclfloat dist_farthest = utils->get_approximate_distance(originx, originy, startx, starty);
- printf("%d %d %d %d %f, %d %d\n", originx, originy, startx, starty, dist_farthest, cur_drag_state, next_drag_state);
/* Let's see how much we are away from the last farthest point */
sclfloat diffdir_recog_dist = SCL_DIRECTION_RELATIVE_DIFFDIR_RECOG_DIST * utils->get_smallest_scale_rate();
/* If we moved certain amount from the point where direction changed, process drag state change routine */
if (drag_state_changed) {
/* When the dragging direction changes, save the current position as farthest point for future comparison */
context->set_farthest_move_point(touch_id, originx, originy);
- printf("SET_FARTHEST : %d %d %d\n", originx, originy, context->get_cur_drag_state(touch_id));
}
}
move_point.x = (move_ctx->geometry.x - popup_ctx->geometry.x) + move_point.x;
move_point.y = (move_ctx->geometry.y - popup_ctx->geometry.y) + move_point.y;
}
- printf("AUTOPOPUP : %d %d\n", move_point.x, move_point.y);
CSCLWindows *windows = CSCLWindows::get_instance();
if (windows && coordinate) {
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <stdio.h>
#include <stdlib.h>
#include "sclresourcekeys.h"
if (mPrivateKeyProperties[loop].valid == FALSE) break;
}
if (loop == MAX_PRIVATE_KEY) {
- printf("Out of buffer!! could not insert new private data into buffer \n");
+ LOGD("Out of buffer!! could not insert new private data into buffer \n");
return ret;
}
}
finished = TRUE;
}
}
-
+
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
if (sclres_manager) {
if (sclres_manager->get_nine_patch_info(buf, &ret)) {
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
+
#include "sclwindows.h"
#ifdef __WIN32__
#include "sclwindows-win32.h"
events->create_timer(SCL_TIMER_POPUP_TIMEOUT, timeout, layout);
}
- printf("create window (%p) x: %d, y:%d, width:%d, height:%d , layout:%d, popuptype:%d\n",
+ LOGD("create window (%p) x: %d, y:%d, width:%d, height:%d , layout:%d, popuptype:%d\n",
window, geometry.x, geometry.y, geometry.width, geometry.height, layout, popup_type);
events->connect_window_events(window, SCL_EVENT_MOUSE | SCL_EVENT_EXPOSE);
bool CSCLWindows::close_popup(sclwindow window)
{
- printf("close_popup window (%p) \n",window);
-
pop_window_in_Z_order_list(window);
hide_window(get_dim_window());
//get_window_context(window, TRUE);
if (window == NULL) {
- printf("Failed to create a new window. The size of window buffer has exeeded.\n");
+ LOGD("Failed to create a new window. The size of window buffer has exeeded.\n");
}
}
return window;
set_parent(parent, window);
if (window == NULL) {
- printf("Failed to create a new window. The size of window buffer has exeeded.\n");
+ LOGD("Failed to create a new window. The size of window buffer has exeeded.\n");
} else {
- printf("Magnifier Window %p created\n", window);
+ LOGD("Magnifier Window %p created\n", window);
}
}
}
if (window == NULL) {
- printf("Failed to create a new window. The size of window buffer has exeeded.\n");
+ LOGD("Failed to create a new window. The size of window buffer has exeeded.\n");
}
}
*/
} else {
impl->set_window_rotation(window, rotation);
- printf("## set_window_rotation : %d \n", rotation);
+ LOGD("## set_window_rotation : %d \n", rotation);
}
}
r = tts_get_state(tts, ¤t_state);
if (TTS_ERROR_NONE != r) {
- printf("Fail to get state from TTS : ret(%d)\n", r);
+ LOGD("Fail to get state from TTS : ret(%d)\n", r);
}
if (TTS_STATE_PLAYING == current_state) {
r = tts_stop(tts);
if (TTS_ERROR_NONE != r) {
- printf("Fail to stop TTS : ret(%d)\n", r);
+ LOGD("Fail to stop TTS : ret(%d)\n", r);
}
}
r = tts_add_text(tts, str, "en_US", TTS_VOICE_TYPE_FEMALE, TTS_SPEED_NORMAL, &utt_id);
if (TTS_ERROR_NONE == r) {
r = tts_play(tts);
if (TTS_ERROR_NONE != r) {
- printf("Fail to play TTS : ret(%d)\n", r);
+ LOGD("Fail to play TTS : ret(%d)\n", r);
}
}
}
/*r = tts_create(&tts);
if (TTS_ERROR_NONE != r) {
- printf("tts_create FAILED : result(%d)", r);
+ LOGD("tts_create FAILED : result(%d)", r);
} else {
tts_set_mode (tts, TTS_MODE_SCREEN_READER);
}
if (TTS_ERROR_NONE != r) {
- printf("tts_set_mode FAILED : result(%d)", r);
+ LOGD("tts_set_mode FAILED : result(%d)", r);
}
tts_state_e current_state;
/*
r = tts_unprepare(tts);
if (TTS_ERROR_NONE != r) {
- printf("tts_unprepare FAILED : result(%d)", r);
+ LOGD("tts_unprepare FAILED : result(%d)", r);
}
r = tts_destroy(tts);
if (TTS_ERROR_NONE != r) {
- printf("tts_destroy FAILED : result(%d)", r);
+ LOGD("tts_destroy FAILED : result(%d)", r);
}*/
return TRUE;
}
#include "xmlresource.h"
#include "binary_xmlresource.h"
#include <assert.h>
-#include "simple_debug.h"
using namespace xmlresource;
using namespace binary_xmlresource;
using namespace sclres;
-#include "put_record.h"
static sclres::SclRes *_current_parser = NULL;
void
SclResParserManager::init(const SCLParserType parser_type, const char *entry_filepath) {
if (parser_type == SCL_PARSER_TYPE_XML) {
- SCLLOG(SclLog::MESSAGE, "Use text xml\n");
_current_parser = XMLResource::get_instance();
}
else if (parser_type == SCL_PARSER_TYPE_BINARY_XML) {
- SCLLOG(SclLog::MESSAGE, "Use binary xml\n");
_current_parser = BinResource::get_instance();
}
/* Assume the directory where the main entry file exists, is the default resource directory */
_current_parser->set_resource_directory(filepath.c_str());
_current_parser->init(filename.c_str());
-#ifdef __SCL_TXT_DEBUG
- put_autopopup_configure(PARSER, *(_current_parser->get_autopopup_configure()));
- put_default_configure(PARSER, *(_current_parser->get_default_configure()));
- put_input_mode_configure_table(PARSER, _current_parser->get_input_mode_configure_table());
- put_key_coordinate_frame(PARSER, _current_parser->get_key_coordinate_pointer_frame());
- put_label_properties_frame(PARSER, _current_parser->get_label_properties_frame());
- put_layout_table(PARSER, _current_parser->get_layout_table());
- put_magnifier_wnd_configure(PARSER, *(_current_parser->get_magnifier_configure()));
- put_modifier_decoration(PARSER, _current_parser->get_modifier_decoration_table());
- //put_nine_patch_info(PARSER, _current_parser->get_nine_patch_file_list());
-#endif
}
}
metadata_handler.cpp
xml2dat.cpp
../sclres/sclres.cpp
- ../res/simple_debug.cpp
)
SET(PACKAGE ${PROJECT_NAME})
#include "encode_autopopup_configure.h"
#include "xmlresource.h"
#include "resource_storage_impl.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace xmlresource;
static void _encode_color(ResourceStorage& storage, const SclColor& color, int width) {
XMLResource *xmlresource = XMLResource::get_instance();
PSclAutoPopupConfigure autopopupConfigure = xmlresource->get_autopopup_configure();
-#ifdef __SCL_TXT_DEBUG
- put_autopopup_configure(ENCODE, *autopopupConfigure);
-
-#endif
-
Autopopup_configure_width record_width;
set_autopopup_configure_width(md_helper, record_width);
#include "resource_storage_impl.h"
using namespace xmlresource;
-#include "put_record.h"
#include "_auto_metadata.h"
static void _encode_color(ResourceStorage& storage, const SclColor& color, int width) {
if (width <= 0) return;
XMLResource *xmlresource = XMLResource::get_instance();
PSclDefaultConfigure defaultConfigure = xmlresource->get_default_configure();
-#ifdef __SCL_TXT_DEBUG
- put_default_configure(ENCODE, *defaultConfigure);
-
-#endif
Default_configure_width record_width;
set_default_configure_width(md_helper, record_width);
#include <libxml/parser.h>
#include "xmlresource.h"
#include "imetadata_helper.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace std;
using namespace xmlresource;
XMLResource *xmlresource = XMLResource::get_instance();
PSclInputModeConfigure inputModeConfigureTable = xmlresource->get_input_mode_configure_table();
int size = xmlresource->get_inputmode_size();
-#ifdef __SCL_TXT_DEBUG
- put_input_mode_configure_table(ENCODE, inputModeConfigureTable);
-
-#endif
PSclInputModeConfigure cur = inputModeConfigureTable;
//first 8 byte is the size of the block
#include "encode_key_coordinate_frame.h"
#include <string>
#include "xmlresource.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace xmlresource;
using namespace std;
#include "encode_label_properties_frame.h"
#include <string>
#include "xmlresource.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace xmlresource;
using namespace std;
XMLResource *xmlresource = XMLResource::get_instance();
PSclLabelPropertiesTable labelPropertiesFrame = xmlresource->get_label_properties_frame();
-#ifdef __SCL_TXT_DEBUG
- put_label_properties_frame(ENCODE, labelPropertiesFrame);
-
-#endif
int size = xmlresource->get_labelproperty_size();
int maxj = MAX_SIZE_OF_LABEL_FOR_ONE;
#include <string>
#include <libxml/parser.h>
#include "xmlresource.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace std;
using namespace xmlresource;
int size = xmlresource->get_layout_size();
-#ifdef __SCL_TXT_DEBUG
- put_layout_table(ENCODE, layoutTable);
-#endif
-
PSclLayout cur = layoutTable;
// data size
#include "encode_magnifier_configure.h"
#include "xmlresource.h"
#include "resource_storage_impl.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace xmlresource;
static void
XMLResource *xmlresource = XMLResource::get_instance();
PSclMagnifierWndConfigure magnifierConfigure = xmlresource->get_magnifier_configure();
-
-#ifdef __SCL_TXT_DEBUG
- put_magnifier_wnd_configure(ENCODE, *magnifierConfigure);
-
-#endif
Magnifier_configure_width record_width;
set_magnifier_configure_width(md_helper, record_width);
#include "encode_modifier_decoration.h"
#include "xmlresource.h"
#include "resource_storage_impl.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace xmlresource;
static void
XMLResource *xmlresource = XMLResource::get_instance();
PSclModifierDecoration modifierDecorationTable = xmlresource->get_modifier_decoration_table();
if (modifierDecorationTable == NULL) {
- printf("Error. modifier decoration table is NULL\n");
return 0;
}
-#ifdef __SCL_TXT_DEBUG
- put_modifier_decoration(ENCODE, modifierDecorationTable);
-
-#endif
Modifier_decoration_width record_width;
set_modifier_decoration_width(md_helper, record_width);
#include "xmlresource.h"
#include "imetadata_helper.h"
#include "resource_storage_impl.h"
-#include "put_record.h"
#include "_auto_metadata.h"
using namespace std;
using namespace xmlresource;
int init_size = storage.size();
XMLResource *xmlresource = XMLResource::get_instance();
- if (xmlresource == NULL) {
- printf("Error: failed to get xmlresource instance.\n");
- return 0;
- }
SclNinePatchInfo* ninePatchInfoTable = xmlresource->get_nine_patch_list();
if (ninePatchInfoTable == NULL) {
- printf("Warning: nine patch list is null\n");
return 0;
}
-#ifdef __SCL_TXT_DEBUG
- put_nine_patch_info(ENCODE, ninePatchInfoTable);
-
-#endif
storage.reserve(8);
storage.put<sint_t>(MAX_NINE_PATCH_FILE_LIST, 4);
#define __RESOURCE_STORAGE_IMPL_H__
#include "resource_storage.h"
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
inline ResourceStorage::
ResourceStorage() {
init();
expand_storage() {
unsigned int _new_size = (unsigned int)(m_capability + __RE_NEW_LENGTH__);
if (_new_size > __MAX_NEW_SIZE__) {
- printf("expand_storage failed: size is limited to %d\n", __MAX_NEW_SIZE__);
+ LOGD("expand_storage failed: size is limited to %d\n", __MAX_NEW_SIZE__);
return;
}
char* _p = new char[_new_size];
if(_p == NULL) {
- printf("expand_storage error");
+ LOGD("expand_storage error");
return;
}
memset(_p, 0x00, _new_size);
doc = xmlReadFile(file_name, NULL, 0);
if (doc == NULL) {
- printf("Could not load file.\n");
exit(1);
}
curNode = xmlDocGetRootElement(doc);
if (curNode == NULL) {
- printf("empty document.\n");
xmlFreeDoc(doc);
exit(1);
}
if (0 != xmlStrcmp(curNode->name, (const xmlChar*)"metadata"))
{
- printf("root name %s error!\n", curNode->name);
xmlFreeDoc(doc);
exit(1);
}
#include "encode_autopopup_configure.h"
#include "encode_nine_patch.h"
#include "xmlresource.h"
+#include <iostream>
using namespace xmlresource;
using namespace std;
String_Encoder actual_string_encoder;
IString_Encoder& string_encoder = actual_string_encoder;
-static inline void show_usage(){
- static const char* message = { "xml2binary: missing folder operand\n"
- "-------------------------------------------------------\n"
- "| Usage: xml2binary operand1 operand2 |\n"
- "| operand1: the folder where xml text files located |\n"
- "| operand2: the folder you want to place the bin file|\n"
- "------------------------------------------------------- \n"};
- printf("%s", message);
-}
-
int main(const int argc, char* argv[]) {
if (argc < 2) {
- show_usage();
+ cout<<"xml2binary: missing folder operand\n"
+ <<"-------------------------------------------------------\n"
+ <<"| Usage: xml2binary operand1 operand2 |\n"
+ <<"| operand1: the folder where xml text files located |\n"
+ <<"| operand2: the folder you want to place the bin file|\n"
+ <<"------------------------------------------------------- \n";
return -1;
}
}
XMLResource *xmlresource = XMLResource::get_instance();
- if (!xmlresource) {
- printf("Failed build xmlresource instance.\n");
- return -1;
- }
-
xmlresource->set_resource_directory(xml_text_dir);
xmlresource->init("main_entry.xml");
rs.reserve(MAX_DATATYPE * (SIZE_WIDTH + OFFSET_WIDTH));
int ret = rs.toFile(bin_file, offset);
if (ret < 0) {
- printf("error\n");
return -1;
}
}
int offset = 0;
int ret = rs.toFile(bin_file, offset);
if (ret < 0) {
- printf("error\n");
return -1;
}
}
- printf("xml2binary succesfully.\n");
+ cout<<"xml2binary succesfully.\n";
return 0;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <assert.h>
#include <string.h>
#include <libxml/parser.h>
#include "autopopup_configure_parser.h"
#include "xml_parser_utils.h"
-#include "simple_debug.h"
using namespace std;
class AutoPopupConfigureParserImpl {
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::WARNING, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s.", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::WARNING, "AutoPopupConfigParser: empty document.\n");
+ LOGD("AutoPopupConfigParser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"autopopup_configure"))
{
- SCLLOG(SclLog::WARNING, "AutoPopup_Configure: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("AutoPopup_Configure: root name error: %s\n!", (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
AutoPopupConfigParser::~AutoPopupConfigParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~AutoPopupConfigParser() has called");
+ LOGD("~AutoPopupConfigParser() has called");
delete m_impl;
m_impl = NULL;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <assert.h>
#include <string.h>
#include <libxml/parser.h>
#include "default_configure_parser.h"
#include "xml_parser_utils.h"
-#include "simple_debug.h"
using namespace std;
class DefaultConfigureParserImpl {
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "DefaultConfigParser: empty document.\n");
+ LOGD("DefaultConfigParser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"default_configure"))
{
- SCLLOG(SclLog::DEBUG, "DefaultConfigParser: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
DefaultConfigParser::~DefaultConfigParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~DefaultConfigParser() has called");
+ LOGD("~DefaultConfigParser() has called");
delete m_impl;
m_impl = NULL;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <string.h>
#include <libxml/parser.h>
#include "input_mode_configure_parser.h"
#include "xml_parser_utils.h"
-#include "simple_debug.h"
/** Example of input mode XML file :
* <?xml version="1.0"?>
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "InputModeConfigParser: empty document.\n");
+ LOGD("InputModeConfigParser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)INPUT_MODE_CONFIGURE_TABLE_TAG))
{
- SCLLOG(SclLog::DEBUG, "InputModeConfigParser: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
m_inputmode_size++;
cur_rec++;
if (m_inputmode_size >= MAX_SCL_INPUT_MODE) {
- SCLLOG(SclLog::ERROR, "No Space for input mode record.");
+ LOGD("No Space for input mode record.");
break;
}
}
if (0 == xmlStrcmp(child_node->name, (const xmlChar *)INPUT_MODE_CONFIGURE_LAYOUT_TAG) ) {
parsing_layouts(child_node, cur_rec);
} else {
- SCLLOG(SclLog::WARNING, "input_mode_configure has no such node name: %s\n", (char *)child_node->name);
+ LOGD("No such node name: %s.\n", (char *)child_node->name);
}
child_node = child_node->next;
InputModeConfigParser::~InputModeConfigParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~InputModeConfigParser() has called");
+ LOGD("~InputModeConfigParser() has called");
delete m_impl;
m_impl = NULL;
}
int
InputModeConfigParser::get_inputmode_id(const char *name) {
if (name == NULL) {
- SCLLOG(SclLog::DEBUG, "get_inputmode_id failed");
+ LOGD("get_inputmode_id failed");
return -1;
}
PSclInputModeConfigure config_table = get_input_mode_configure_table();
if (config_table == NULL) {
- SCLLOG(SclLog::DEBUG, "get_inputmode_id failed");
+ LOGD("get_inputmode_id failed");
return -1;
}
}
}
- SCLLOG(SclLog::DEBUG, "get_inputmode_id failed");
+ LOGD("get_inputmode_id failed");
return -1;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <memory.h>
#include <libxml/parser.h>
#include "label_properties_parser.h"
#include "xml_parser_utils.h"
-#include "simple_debug.h"
-#include "put_record.h"
static int
match_alignment(const char* key) {
assert(key != NULL);
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "Label_Properties_Parser: empty document.\n");
+ LOGD("Label_Properties_Parser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"label_properties_frame"))
{
- SCLLOG(SclLog::DEBUG, "Label_Properties_Parser: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
m_size++;
curTable++;
if (m_size >= MAX_SCL_LABEL_PROPERTIES) {
- SCLLOG(SclLog::ERROR, "No Space for label properties record.");
+ LOGD("No Space for label properties record.");
break;
}
}
temp_string[2] = key[2];
temp_string[3] = key[3];
if (sscanf(temp_string, "%x", &r) <= 0) {
- SCLLOG(SclLog::ERROR, "parsing_rgb() has failed.");
+ LOGD("parsing_rgb() has failed.");
}
temp_string[2] = key[4];
temp_string[3] = key[5];
if (sscanf(temp_string, "%x", &g) <= 0) {
- SCLLOG(SclLog::ERROR, "parsing_rgb() has failed.");
+ LOGD("parsing_rgb() has failed.");
}
temp_string[2] = key[6];
temp_string[3] = key[7];
if (sscanf(temp_string, "%x", &b) <= 0) {
- SCLLOG(SclLog::ERROR, "parsing_rgb() has failed.");
+ LOGD("parsing_rgb() has failed.");
}
temp_string[2] = key[8];
temp_string[3] = key[9];
if (sscanf(temp_string, "%x", &a) <= 0) {
- SCLLOG(SclLog::ERROR, "parsing_rgb() has failed.");
+ LOGD("parsing_rgb() has failed.");
}
cur_color.r = r;
LabelPropertyParser::~LabelPropertyParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~LabelPropertyParser() has called");
+ LOGD("~LabelPropertyParser() has called");
delete m_impl;
m_impl = NULL;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <algorithm>
#include <vector>
#include <malloc.h>
#include "default_configure_parser.h" /* use data in default_configure.xml */
#include "xml_parser_utils.h"
#include "layout_parser_helper.h"
-#include "put_record.h"
-#include "simple_debug.h"
using namespace std;
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::ERROR, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
exit(1);
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::ERROR, "LayoutParserImpl: empty document.\n");
+ LOGD("LayoutParserImpl: empty document.\n");
xmlFreeDoc(doc);
exit(1);
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)LAYOUT_TAG))
{
- SCLLOG(SclLog::ERROR, "LayoutParserImpl: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
exit(1);
}
string input_file = m_dir + "/" + m_layout_files[index];
doc = xmlReadFile(input_file.c_str(), NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file.c_str());
+ LOGD("Could not load file: %s\n", input_file.c_str());
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "LayoutParserImpl: empty document.\n");
+ LOGD("LayoutParserImpl: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)LAYOUT_TAG))
{
- SCLLOG(SclLog::DEBUG, "LayoutParserImpl: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
*cur_rec_coordinate = (SclLayoutKeyCoordinatePointer)malloc(sizeof(SclLayoutKeyCoordinate));
if (*cur_rec_coordinate == NULL) {
- SCLLOG(SclLog::ERROR, "LayoutParserImpl: memory malloc eror.\n");
+ LOGD("LayoutParserImpl: memory malloc eror.\n");
return;
}
memset(*cur_rec_coordinate, 0x00, sizeof(SclLayoutKeyCoordinate));
m_impl = new LayoutParserImpl;
}
LayoutParser::~LayoutParser() {
- SCLLOG(SclLog::MESSAGE, "~LayoutParser() has called");
+ LOGD("~LayoutParser() has called");
delete m_impl;
m_impl = NULL;
}
* limitations under the License.
*
*/
+
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <string.h>
#include <libxml/parser.h>
#include "magnifier_configure_parser.h"
#include <assert.h>
#include "xml_parser_utils.h"
-#include "simple_debug.h"
using namespace std;
static SCLMagnifierStyle
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "MagnifierConfigParser: empty document.\n");
+ LOGD("MagnifierConfigParser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"magnifier_configure"))
{
- SCLLOG(SclLog::DEBUG, "MagnifierConfigParser: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
MagnifierConfigParser::~MagnifierConfigParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~MagnifierConfigParser() has called");
+ LOGD("~MagnifierConfigParser() has called");
delete m_impl;
m_impl = NULL;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <assert.h>
#include <string.h>
#include <libxml/parser.h>
#include "main_entry_parser.h"
#include "xml_parser_utils.h"
-#include "simple_debug.h"
using namespace std;
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "MainEntryParser: empty document.\n");
+ LOGD("MainEntryParser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"main-entry"))
{
- SCLLOG(SclLog::DEBUG, "MainEntryParser: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
MainEntryParser::~MainEntryParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~MainEntryParser() has called");
+ LOGD("~MainEntryParser() has called");
delete m_impl;
m_impl = NULL;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <memory.h>
#include <libxml/parser.h>
#include "modifier_decoration_parser.h"
#include "xml_parser_utils.h"
-#include "simple_debug.h"
static int get_key_modifier_state_prop(const char*);
//UTILS
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "ModifierDecorationParser: empty document.\n");
+ LOGD("ModifierDecorationParser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"modifier_decoration_table"))
{
- SCLLOG(SclLog::DEBUG, "ModifierDecorationParser: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
size++;
cur_rec++;
if (size >= MAX_SCL_MODIFIER_DECORATION_NUM) {
- SCLLOG(SclLog::ERROR, "No Space for modifier decoration record.");
+ LOGD("No Space for modifier decoration record.");
break;
}
}
ModifierDecorationParser::~ModifierDecorationParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~ModifierDecorationParser() has called");
+ LOGD("~ModifierDecorationParser() has called");
delete m_impl;
m_impl = NULL;
}
ModifierDecorationParser::get_modifier_decoration_id( const char *name )
{
if (name == NULL) {
- SCLLOG(SclLog::DEBUG, "get_modifier_decoration_id() has failed");
+ LOGD("get_modifier_decoration_id() has failed");
return -1;
}
PSclModifierDecoration modifier_decoration_table = get_modifier_decoration_table();
if (modifier_decoration_table == NULL) {
- SCLLOG(SclLog::DEBUG, "get_modifier_decoration_id() has failed");
+ LOGD("get_modifier_decoration_id() has failed");
return -1;
}
for(int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
}
}
- SCLLOG(SclLog::DEBUG, "get_modifier_decoration_id() has failed");
+ LOGD("get_modifier_decoration_id() has failed");
return -1;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <memory.h>
#include <assert.h>
#include <libxml/parser.h>
#include "nine_patch_file_list_parser.h"
#include "xml_parser_utils.h"
-#include "simple_debug.h"
class NinePatchFileListParserImpl {
public:
doc = xmlReadFile(input_file, NULL, 0);
if (doc == NULL) {
- SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file);
+ LOGD("Could not load file: %s\n", input_file);
return -1;
}
cur_node = xmlDocGetRootElement(doc);
if (cur_node == NULL) {
- SCLLOG(SclLog::DEBUG, "Nine_Patch_File_Parser: empty document.\n");
+ LOGD("Nine_Patch_File_Parser: empty document.\n");
xmlFreeDoc(doc);
return -1;
}
if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"nine_patch_file_list"))
{
- SCLLOG(SclLog::DEBUG, "Nine_Patch_File_Parser: root name error: %s\n!", (char *)cur_node->name);
+ LOGD("%s: root name error: %s.\n", __FUNCTION__, (char *)cur_node->name);
xmlFreeDoc(doc);
return -1;
}
get_prop_number(cur_node, "top", &(m_nine_patch_file_list[m_size].top));
get_prop_number(cur_node, "bottom", &(m_nine_patch_file_list[m_size].bottom));
if (m_nine_patch_file_list[m_size].image_path == NULL) {
- SCLLOG(SclLog::ERROR, "NinePatchFileParser: image_path should be not NULL");
+ LOGD("NinePatchFileParser: image_path should be not NULL");
}
m_size++;
if (m_size >= MAX_NINE_PATCH_FILE_LIST) {
- SCLLOG(SclLog::ERROR, "No Space for nine patch file list record.");
+ LOGD("No Space for nine patch file list record.");
break;
}
}
NinePatchFileParser::~NinePatchFileParser() {
if (m_impl) {
- SCLLOG(SclLog::MESSAGE, "~NinePatchFileParser() has called.");
+ LOGD("~NinePatchFileParser() has called.");
delete m_impl;
m_impl = NULL;
}
bool
NinePatchFileParser::get_nine_patch_info(const char* filename, SclNinePatchInfo *info) {
if (filename == NULL) {
- SCLLOG(SclLog::DEBUG, "get_nine_patch_info() has failed.");
+ LOGD("get_nine_patch_info() has failed.");
return false;
}
SclNinePatchInfo *nine_patch_list = get_nine_patch_list();
if (nine_patch_list == NULL) {
- SCLLOG(SclLog::DEBUG, "get_nine_patch_info() has failed.");
+ LOGD("get_nine_patch_info() has failed.");
return false;
}
}
}
- SCLLOG(SclLog::DEBUG, "get_nine_patch_info() has failed.");
+ LOGD("get_nine_patch_info() has failed.");
return false;
}
*
*/
+#include <dlog.h>
+#ifndef LOG_TAG
+#define LOG_TAG "LIBSCL_UI"
+#endif
#include <libxml/parser.h>
#include <assert.h>
#include <limits.h>
#include <string.h>
#include "xmlresource.h"
-#include "simple_debug.h"
using namespace xmlresource;
}
if (empty_index == NOT_USED) {
- SCLLOG(SclLog::ERROR, "No space for new layout %s\n", cur_layout_file);
+ LOGD("No space for new layout: %s.\n", cur_layout_file);
}
if (empty_index != NOT_USED) {
snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), entry_filepath);
if ( 0 != m_main_entry_parser->init(input_file)) {
/* main entry is necessary */
- SCLLOG(SclLog::ERROR, "main entry init");
+ LOGD("main entry init");
}
}
/* get each type of xml file name */
XMLFiles& xml_files = m_main_entry_parser->get_xml_files();
- SCLLOG(SclLog::MESSAGE, "init inputmode configure\n\n");
+ LOGD("init inputmode configure\n\n");
if (m_input_mode_configure_parser == NULL) {
m_input_mode_configure_parser = InputModeConfigParser::get_instance();
char input_file[_POSIX_PATH_MAX] = {0};
snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.input_mode_configure);
if (0 != m_input_mode_configure_parser->init(input_file)) {
/* input mode configure is necessary */
- SCLLOG(SclLog::ERROR, "input mode configure init");
+ LOGD("input mode configure init");
}
}
- SCLLOG(SclLog::MESSAGE, "init default_configure\n\n");
+ LOGD("init default_configure\n\n");
if (m_default_configure_parser == NULL) {
m_default_configure_parser = DefaultConfigParser::get_instance();
char input_file[_POSIX_PATH_MAX] = {0};
if (0 != m_default_configure_parser->init(input_file)) {
/* default configure is not necessary */
- SCLLOG(SclLog::WARNING, "default configure init");
+ LOGD("default configure init");
}
}
- SCLLOG(SclLog::MESSAGE, "init modifier_decoration\n\n");
+ LOGD("init modifier_decoration\n\n");
if (m_modifier_decoration_parser == NULL) {
m_modifier_decoration_parser = ModifierDecorationParser::get_instance();
char input_file[_POSIX_PATH_MAX] = {0};
if (0 != m_modifier_decoration_parser->init(input_file)) {
/* modifier decoration is not necessary */
- SCLLOG(SclLog::WARNING, "modifier decoration init");
+ LOGD("modifier decoration init");
}
}
- SCLLOG(SclLog::MESSAGE, "init label_properties\n\n");
+ LOGD("init label_properties\n\n");
if (m_label_properties_parser == NULL) {
m_label_properties_parser = LabelPropertyParser::get_instance();
char input_file[_POSIX_PATH_MAX] = {0};
if (0 != m_label_properties_parser->init(input_file)) {
/* label properties is not necessary */
- SCLLOG(SclLog::WARNING, "label properties init");
+ LOGD("label properties init");
}
}
- SCLLOG(SclLog::MESSAGE, "init autopopup_configure\n\n");
+ LOGD("init autopopup_configure\n\n");
if (m_autopopup_configure_parser == NULL) {
m_autopopup_configure_parser = AutoPopupConfigParser::get_instance();
char input_file[_POSIX_PATH_MAX] = {0};
snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.autopopup_configure);
if (0 != m_autopopup_configure_parser->init(input_file)) {
/* autopopup configure is not necessary */
- SCLLOG(SclLog::WARNING, "autopopup configure init");
+ LOGD("autopopup configure init");
}
}
- SCLLOG(SclLog::MESSAGE, "init magnifier_configure\n\n");
+ LOGD("init magnifier_configure\n\n");
if (m_magnifier_configure_parser == NULL) {
m_magnifier_configure_parser = MagnifierConfigParser::get_instance();
char input_file[_POSIX_PATH_MAX] = {0};
if (0 != m_magnifier_configure_parser->init(input_file)) {
/* magnifier configure is not necessary */
- SCLLOG(SclLog::WARNING, "magnifier configure init");
+ LOGD("magnifier configure init");
}
}
- SCLLOG(SclLog::MESSAGE, "init nine_patch_file_list\n\n");
+ LOGD("init nine_patch_file_list\n\n");
if (m_nine_patch_file_list_parser == NULL) {
m_nine_patch_file_list_parser = NinePatchFileParser::get_instance();
char input_file[_POSIX_PATH_MAX] = {0};
if (0 != m_nine_patch_file_list_parser->init(input_file)) {
/* nine patch file list is not necessary */
- SCLLOG(SclLog::WARNING, "nine patch file list init");
+ LOGD("nine patch file list init");
}
}
- SCLLOG(SclLog::MESSAGE, "init layout\n\n");
+ LOGD("init layout\n\n");
if (m_layout_parser == NULL) {
m_layout_parser = LayoutParser::get_instance();
char **layout_files = NULL;
layout_files = (char**)malloc(sizeof(char*) * MAX_SCL_LAYOUT);
if (layout_files == NULL) {
- SCLLOG(SclLog::ERROR, "layout init");
+ LOGD("layout init");
exit(1);
}
memset(layout_files, 0, sizeof(char*) * MAX_SCL_LAYOUT);
get_layout_files(layout_files, &layout_file_size);
if ( 0 != m_layout_parser->init(get_resource_directory(), layout_files, layout_file_size)) {
/* layout is necessary */
- SCLLOG(SclLog::ERROR, "layout init");
+ LOGD("layout init");
}
for (int i = 0; i < layout_file_size; ++i) {
free(layout_files[i]);
free(layout_files);
}
- SCLLOG(SclLog::MESSAGE, "init Text XML resources OK.\n\n");
+ LOGD("init Text XML resources OK.\n\n");
}