Fix Indentation 71/55871/1
authorinhonghan <inhong1.han@samsung.com>
Wed, 30 Dec 2015 02:41:41 +0000 (11:41 +0900)
committerinhonghan <inhong1.han@samsung.com>
Wed, 30 Dec 2015 02:44:56 +0000 (11:44 +0900)
Change-Id: I09e52fb93a43c463c4f1a662f16083ca4bdf3060

85 files changed:
binary_xmlresource/binary_xmlresource.cpp
binary_xmlresource/default_configure_bin_parser.cpp
binary_xmlresource/file_storage.cpp
binary_xmlresource/include/binary_xmlresource.h
binary_xmlresource/include/interface/iparserinfo_provider.h
binary_xmlresource/include/metadata_bin_parser.h
binary_xmlresource/include/metadata_provider.h
binary_xmlresource/include/parserinfo_provider.h
binary_xmlresource/include/string_bin_parser.h
binary_xmlresource/include/string_collector.h
binary_xmlresource/include/string_provider.h
binary_xmlresource/input_mode_configure_bin_parser.cpp
binary_xmlresource/key_coordinate_frame_bin_parser.cpp
binary_xmlresource/layout_bin_parser.cpp
binary_xmlresource/modifier_decoration_bin_parser.cpp
binary_xmlresource/nine_patch_file_list_bin_parser.cpp
binary_xmlresource/string_bin_parser.cpp
res/put_record.h
scl/gwes/efl/sclanimator-efl.cpp
scl/gwes/efl/sclevents-efl.cpp
scl/gwes/efl/sclgraphics-efl.cpp
scl/gwes/efl/sclwindows-efl.cpp
scl/gwes/gtk/sclevents-gtk.cpp
scl/gwes/gtk/sclgraphics-cairo.cpp
scl/gwes/gtk/sclgraphics-gtk.cpp
scl/gwes/gtk/sclwindows-gtk.cpp
scl/include/sclanimator.h
scl/include/sclconfig.h
scl/include/sclcontext.h
scl/include/sclcontroller.h
scl/include/scldebug.h
scl/include/sclerroradjustment.h
scl/include/sclevents.h
scl/include/sclfeedback.h
scl/include/sclgwes.h
scl/include/sclkeyfocushandler.h
scl/include/sclresourcecache.h
scl/include/scluibuilder.h
scl/include/sclwindows.h
scl/sclactionstate.cpp
scl/sclanimator.cpp
scl/sclcontext.cpp
scl/sclcontroller.cpp
scl/scldebug.cpp
scl/sclerroradjustment.cpp
scl/sclevents.cpp
scl/sclkeyfocushandler.cpp
scl/sclresourcecache.cpp
scl/sclui.cpp
scl/scluibuilder.cpp
scl/scluiimpl.cpp
scl/sclutils.cpp
scl/sclwindows.cpp
scl/utils/linux/sclutils-linux.cpp
sclres/sclres.cpp
sclres/sclres.h
sclres/sclres_manager.h
xml2binary/encode_input_mode_configure.cpp
xml2binary/encode_key_coordinate_frame.cpp
xml2binary/encode_label_properties_frame.cpp
xml2binary/encode_layout.cpp
xml2binary/encode_magnifier_configure.cpp
xml2binary/encode_modifier_decoration.cpp
xml2binary/encode_nine_patch.cpp
xml2binary/include/imetadata_helper.h
xml2binary/include/imetadata_parser.h
xml2binary/include/metadata.h
xml2binary/include/metadata_handler.h
xml2binary/include/resource_storage.h
xml2binary/include/resource_storage_impl.h
xml2binary/include/string_encoder.h
xml2binary/metadata_handler.cpp
xml2binary/xml2dat.cpp
xmlresource/autopopup_configure_parser.cpp
xmlresource/default_configure_parser.cpp
xmlresource/include/xmlresource.h
xmlresource/input_mode_configure_parser.cpp
xmlresource/label_properties_parser.cpp
xmlresource/layout_parser.cpp
xmlresource/magnifier_configure_parser.cpp
xmlresource/main_entry_parser.cpp
xmlresource/modifier_decoration_parser.cpp
xmlresource/nine_patch_file_list_parser.cpp
xmlresource/xml_parser_utils.cpp
xmlresource/xmlresource.cpp

index 1e63b6d..f63ea3a 100644 (file)
@@ -64,7 +64,7 @@ void BinResource::init(const char *entry_filepath) {
     snprintf(path, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), "sclresource.bin");
 
     FileStorage storageAllData;
-    if ( storageAllData.loadFile(path) <= 0) {
+    if (storageAllData.loadFile(path) <= 0) {
         return;
     }
 
@@ -81,7 +81,7 @@ void BinResource::init(const char *entry_filepath) {
         }
     }
 
-    for ( int i = ALLDATA; i < MAX_DATATYPE; ++i) {
+    for (int i = ALLDATA; i < MAX_DATATYPE; ++i) {
         m_info[i].offset = offset_table[i];
         m_info[i].size = size_table[i];
     }
index ae642df..5e89685 100644 (file)
@@ -50,7 +50,6 @@ BinDefaultConfigParser::decode_color(SclColor& color, int width) {
 }
 
 void BinDefaultConfigParser::parsing_default_configure() {
-
     PSclDefaultConfigure cur = &m_default_configure;
 
     Default_configure_width record_width;
index 2c840c3..26abc19 100644 (file)
@@ -82,7 +82,6 @@ get_str() {
 
 int FileStorage::
     loadFile(const char* file_name) {
-
     if (file_name == NULL) return -1;
 
     FILE* fp = fopen(file_name, "rb");
@@ -114,7 +113,7 @@ int FileStorage::
         fclose(fp);
         return -1;
     }
-    if ( 1 != fread(m_storage, size, 1, fp)) {
+    if (1 != fread(m_storage, size, 1, fp)) {
         if (m_storage) {
             delete []m_storage;
         }
@@ -174,7 +173,7 @@ int FileStorage::
     return m_size;
 }
 int FileStorage::
-get_size() const{
+get_size() const {
     return m_size;
 }
 int FileStorage::
index 354fc1c..c9c762d 100644 (file)
@@ -51,7 +51,7 @@ enum{
     STRING,
     MAX_DATATYPE
 };
-namespace binary_xmlresource{
+namespace binary_xmlresource {
 class BinResource: public sclres::SclRes{
     public:
     ~BinResource();
index a7136f2..60da595 100644 (file)
@@ -31,9 +31,8 @@
 class IParserInfo_Provider: public IString_Provider{
     public:
         virtual void set_current_metadata_record(const char* record_name) = 0;
-        virtual const int get_width(const char* field_name) const= 0;
+        virtual const int get_width(const char* field_name) const = 0;
         virtual const char* get_string_by_id(const int id) const = 0;
         virtual ~IParserInfo_Provider() {}
-
 };
 #endif
index 99f6565..219c34e 100644 (file)
@@ -25,7 +25,7 @@ class Metadata_Bin_Parser{
         static const int FIELD_NUM_WIDTH = 2;
         Metadata_Bin_Parser(const FileStorage& storage, int, int);
         ~Metadata_Bin_Parser();
-        const MetaData* get_metadata()const{
+        const MetaData* get_metadata()const {
             return &metadata;
         }
     private:
index 3e8eee2..217030b 100644 (file)
@@ -28,22 +28,21 @@ class Metadata_Provider:public IMetadata_Provider{
             curRecordIndex = -1;
         }
 
-        const int get_width(const char* field_name)const{
+        const int get_width(const char* field_name)const {
             const MetaData* metadata = m_metadataParser->get_metadata();
             const MetaData_Record& metadata_record = metadata->m_vec_metadata_record.at(curRecordIndex);
             std::vector<MetaData_Field>::const_iterator it;
-            for(it = metadata_record.vField.begin(); it != metadata_record.vField.end(); ++it) {
+            for (it = metadata_record.vField.begin(); it != metadata_record.vField.end(); ++it) {
                 if (0 == strcmp(it->m_name,  field_name)) {
                     return it->m_width;
                 }
             }
 
             return 0;
-
         }
         void set_current_metadata_record(const char*record_name) {
             assert(record_name != NULL);
-            if ( current_record_name == NULL ||0 != strcmp(current_record_name, record_name)) {
+            if (current_record_name == NULL ||0 != strcmp(current_record_name, record_name)) {
                 current_record_name = record_name;
                 curRecordIndex = (int)find_metadata_record_index(record_name);
                 if (curRecordIndex == -1) {
@@ -51,12 +50,13 @@ class Metadata_Provider:public IMetadata_Provider{
                 }
             }
         }
+
     private:
-       size_t find_metadata_record_index(const char* name)const{
+       size_t find_metadata_record_index(const char* name)const {
             if (name == NULL) return -1;
 
             const MetaData* metadata = m_metadataParser->get_metadata();
-            for ( size_t i = 0; i < metadata->m_vec_metadata_record.size(); ++i) {
+            for (size_t i = 0; i < metadata->m_vec_metadata_record.size(); ++i) {
                 const MetaData_Record& metadata_record = metadata->m_vec_metadata_record.at(i);
 
                 if (0 == strcmp(metadata_record.m_name, name)) {
index ad4280a..36593e0 100644 (file)
@@ -32,7 +32,7 @@ class ParserInfo_Provider: public IParserInfo_Provider{
                 m_metadataProvider->set_current_metadata_record(record_name);
             }
         }
-         const int get_width(const char* field_name)const{
+         const int get_width(const char* field_name)const {
             assert(m_metadataProvider != NULL);
             if (m_metadataProvider != NULL)
                 return m_metadataProvider->get_width(field_name);
@@ -40,12 +40,13 @@ class ParserInfo_Provider: public IParserInfo_Provider{
             return 0 ;
         }
 
-        const char* get_string_by_id(const int id)const{
+        const char* get_string_by_id(const int id)const {
             if (m_stringProvider != NULL) {
                 return m_stringProvider->get_string_by_id(id);
             }
             return NULL;
         }
+
     private:
         IMetadata_Provider *m_metadataProvider;
         const IString_Provider *m_stringProvider;
index 1b7197e..64c08d9 100644 (file)
@@ -24,7 +24,7 @@ class String_Bin_Parser{
     public:
     String_Bin_Parser(const FileStorage& storage, int offset, int size);
     ~String_Bin_Parser();
-    const std::vector<const char*>& get_string_depository()const{
+    const std::vector<const char*>& get_string_depository()const {
         return m_vec_str_depository;
     }
     private:
index b581b10..5473117 100644 (file)
@@ -41,8 +41,8 @@ class StringCollector: public IStringCollector{
             }
 
             m_vec_string_collection.clear();
-
         }
+
     private:
         std::vector<char*> m_vec_string_collection;
 };
index 5cd6151..a29b7b7 100644 (file)
@@ -24,7 +24,7 @@
 class String_Provider: public IString_Provider{
     public:
         String_Provider(const String_Bin_Parser* sp): m_sp(sp) {}
-        const char* get_string_by_id(int id)const{
+        const char* get_string_by_id(int id)const {
             if (m_sp == NULL) return NULL;
 
             const std::vector<const char*>& string_depository = m_sp->get_string_depository();
index a987756..2635a46 100644 (file)
@@ -47,8 +47,8 @@ int
 BinInputModeConfigParser::get_inputmode_id(const char *name) {
     if (name == NULL) return -1;
 
-    for(int i = 0; i < MAX_SCL_INPUT_MODE; ++i) {
-        if ( m_input_mode_configure_table[i].name) {
+    for (int i = 0; i < MAX_SCL_INPUT_MODE; ++i) {
+        if ( m_input_mode_configure_table[i].name ) {
             if ( 0 == strcmp(m_input_mode_configure_table[i].name, name) ) {
                 return i;
             }
@@ -74,7 +74,6 @@ BinInputModeConfigParser::get_inputmode_size() {
 
 void
 BinInputModeConfigParser::parsing_input_mode_configure_table() {
-
     // skip data_size
     m_storage.advance(8);
 
index 8a0ea77..f4d6f9e 100644 (file)
@@ -114,7 +114,7 @@ load(int layout_id)
                 m_key_coordinate_pointer_frame[i][j] = curPointer;
             }
             break;
-        }else{
+        } else {
             storage.advance(pKey_num_array[i] * key_coordinate_rec_data_size);
         }
     }
index 8129b13..faf2e35 100644 (file)
@@ -44,14 +44,13 @@ init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* pro
     m_storage.get_storage(storage, offset, size);
     this->parser_info_provider = provider;
     parsing_layout_table();
-
 }
 
 int BinLayoutParser::
 get_layout_index(const char *name) {
     int ret = NOT_USED;
     if (name) {
-        for(int loop = 0;loop < MAX_SCL_LAYOUT && ret == NOT_USED;loop++) {
+        for (int loop = 0;loop < MAX_SCL_LAYOUT && ret == NOT_USED;loop++) {
             if (m_layout_table[loop].name) {
                 if (strcmp(m_layout_table[loop].name, name) == 0) {
                     ret = loop;
@@ -108,7 +107,6 @@ parsing_layout_table() {
 #ifdef __SCL_TXT_DEBUG
     put_layout_table(DECODE, m_layout_table);
 #endif
-
 }
 
 void
index 7869af3..ad97d58 100644 (file)
@@ -75,12 +75,12 @@ BinModifierDecorationParser::parsing_modifier_decoration_table() {
 }
 
 int
-BinModifierDecorationParser::get_modifier_decoration_id( const char *name )
+BinModifierDecorationParser::get_modifier_decoration_id(const char *name )
 {
     if (name == NULL) return -1;
 
-    for(int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
-        if ( m_modifier_decoration_table[i].name) {
+    for (int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
+        if ( m_modifier_decoration_table[i].name ) {
             if ( 0 == strcmp(m_modifier_decoration_table[i].name, name) ) {
                 return i;
             }
index 0cd7125..aa00149 100644 (file)
@@ -41,7 +41,6 @@ void BinNinePatchFileParser::init(const FileStorage& storage, int offset, int si
 }
 
 void BinNinePatchFileParser::parsing_nine_patch_file_list() {
-
     Nine_patch_width record_width;
     set_nine_patch_width(*parser_info_provider, record_width);
 
@@ -74,7 +73,7 @@ bool
 BinNinePatchFileParser::get_nine_patch_info(const char* filename, SclNinePatchInfo *info) {
     if (filename == NULL) return false;
 
-    for(int i = 0; i < MAX_NINE_PATCH_FILE_LIST && i < m_size; ++i) {
+    for (int i = 0; i < MAX_NINE_PATCH_FILE_LIST && i < m_size; ++i) {
         if ( m_nine_patch_file_list[i].image_path != NULL &&
             0 == strcmp(m_nine_patch_file_list[i].image_path, filename) ) {
                 if (info) {
@@ -85,5 +84,4 @@ BinNinePatchFileParser::get_nine_patch_info(const char* filename, SclNinePatchIn
     }
 
     return false;
-
 }
index 7edb2a9..a912cdb 100644 (file)
@@ -43,6 +43,5 @@ String_Bin_Parser::parse() {
         const char* temp = m_storage.get_str();
         m_vec_str_depository.push_back(temp);
     }
-
 }
 
index 9e9b52c..b25d66a 100644 (file)
@@ -327,7 +327,6 @@ static void put_key_coordinate_record(FILE* fp, const SclLayoutKeyCoordinate& re
     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);
@@ -386,7 +385,7 @@ static void put_layout_record(FILE* fp, const SclLayout& record ) {
     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) {
+    for (int i = 0; i < SCL_BUTTON_STATE_MAX; ++i) {
         put_str(fp, record.image_path[i]);
     }
     put_seperator(fp);
@@ -448,7 +447,7 @@ put_key_coordinate_frame(int flag, const PSclLayoutKeyCoordinatePointerTable fra
     string file_name;
     if (flag == ENCODE) {
         file_name = "encode_key_coordinate_frame.txt";
-    } else if (flag == DECODE){
+    } else if (flag == DECODE) {
         file_name = "decode_key_coordinate_frame.txt";
     } else
         file_name = "sclres_key_coordinate_frame.txt";
@@ -478,7 +477,7 @@ 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){
+    } else if (flag == DECODE) {
         file_name = "decode_label_properties_frame.txt";
     } else
         file_name = "sclres_label_properties_frame.txt";
@@ -490,7 +489,7 @@ put_label_properties_frame(int flag, const PSclLabelPropertiesTable frame) {
         return;
     }
     for (int i = 0; i < MAX_SCL_LABEL_PROPERTIES; ++i) {
-        for(int j = 0; j < MAX_SIZE_OF_LABEL_FOR_ONE; ++j) {
+        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]);
         }
@@ -500,7 +499,6 @@ put_label_properties_frame(int flag, const PSclLabelPropertiesTable frame) {
 
 static void
 put_default_configure(int flag, const SclDefaultConfigure& record) {
-
     string file_name;
     if (flag == ENCODE) {
         file_name = "encode_default_configure.txt";
@@ -521,11 +519,10 @@ put_default_configure(int flag, const SclDefaultConfigure& record) {
 
 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){
+    } else if (flag == DECODE) {
         file_name = "decode_autopopup_configure.txt";
     } else
         file_name = "sclres_autopopup_configure.txt";
index 3440587..9f46731 100644 (file)
@@ -47,7 +47,6 @@ CSCLAnimatorImplEfl::~CSCLAnimatorImplEfl()
 
 void CSCLAnimatorImplEfl::init()
 {
-
 }
 
 void CSCLAnimatorImplEfl::fini()
@@ -85,7 +84,7 @@ CSCLAnimatorImplEfl::animator_timer(SclAnimationState *state)
                         Evas_Object *window_object = static_cast<Evas_Object*>(windows->get_base_window());
                         Evas *evas = evas_object_evas_get(window_object);
                         m_highlight_ui_object = evas_object_image_add(evas);
-                        sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+                        sclchar composed_path[POSIX_PATH_MAX] = {0, };
                         utils->get_composed_path(composed_path, IMG_PATH_PREFIX, SCL_HIGHLIGHT_UI_IMAGE);
                         evas_object_image_file_set(m_highlight_ui_object, composed_path, NULL);
                     }
@@ -101,7 +100,7 @@ CSCLAnimatorImplEfl::animator_timer(SclAnimationState *state)
                             Evas_Object *window_object = static_cast<Evas_Object*>(windows->get_base_window());
                             Evas *evas = evas_object_evas_get(window_object);
                             m_highlight_ui_object_alternate = evas_object_image_add(evas);
-                            sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+                            sclchar composed_path[_POSIX_PATH_MAX] = {0, };
                             utils->get_composed_path(composed_path, IMG_PATH_PREFIX, SCL_HIGHLIGHT_UI_IMAGE);
                             evas_object_image_file_set(m_highlight_ui_object_alternate, composed_path, NULL);
                         }
index 4d31036..05f9805 100755 (executable)
@@ -50,8 +50,8 @@ sclwindow pressed_window = SCLWINDOW_INVALID;
 #define MIN_XY_DIFF 14
 
 Eina_Bool mouse_press(void *data, int type, void *event_info);
-Eina_Bool mouse_move (void *data, int type, void *event_info);
-Eina_Bool mouse_release (void *data, int type, void *event_info);
+Eina_Bool mouse_move(void *data, int type, void *event_info);
+Eina_Bool mouse_release(void *data, int type, void *event_info);
 
 Eina_Bool client_message_cb(void *data, int type, void *event);
 
@@ -113,7 +113,6 @@ void CSCLEventsImplEfl::fini()
     if (m_key_pressed_handler) ecore_event_handler_del(m_key_pressed_handler);
 #endif
     m_key_pressed_handler = NULL;
-
 }
 
 sclboolean get_window_rect(const sclwindow window, SclRectangle *rect)
@@ -151,7 +150,7 @@ sclboolean get_window_rect(const sclwindow window, SclRectangle *rect)
                         rect->height = window_context->geometry.width;
                         rect->width = window_context->geometry.height;
                         rect->y = window_context->geometry.x;
-                        rect->x= scr_h - window_context->geometry.y - rect->width;
+                        rect->x = scr_h - window_context->geometry.y - rect->width;
                     }
                     break;
                 default:
@@ -234,8 +233,8 @@ Eina_Bool mouse_press(void *data, int type, void *event_info)
 
 #ifndef WAYLAND
         Ecore_X_Window inputWindow = 0;
-        Ecore_X_Atom inputAtom = ecore_x_atom_get ("DeviceMgr Input Window");
-        ecore_x_window_prop_xid_get (ecore_x_window_root_first_get(),
+        Ecore_X_Atom inputAtom = ecore_x_atom_get("DeviceMgr Input Window");
+        ecore_x_window_prop_xid_get(ecore_x_window_root_first_get(),
             inputAtom, ECORE_X_ATOM_WINDOW, &inputWindow, 1);
         if (inputWindow == 0) {
             utils->log("Error : input window NULL!");
@@ -292,7 +291,7 @@ Eina_Bool mouse_press(void *data, int type, void *event_info)
         }
         if (!is_scl_window) return TRUE;
 
-        SclRectangle rect = {0,0,0,0};
+        SclRectangle rect = {0, 0, 0, 0};
         do {
             window = windows->get_nth_window_in_Z_order_list(index);
             if (window) {
@@ -392,7 +391,7 @@ Eina_Bool mouse_press(void *data, int type, void *event_info)
 }
 
 //void mouse_release (void *data, Evas *e, Evas_Object *object, void *event_info)
-Eina_Bool mouse_release (void *data, int type, void *event_info)
+Eina_Bool mouse_release(void *data, int type, void *event_info)
 {
     SCL_DEBUG();
 
@@ -527,12 +526,12 @@ Eina_Bool key_pressed(void *data, int type, void *event_info)
     CSCLController *controller = CSCLController::get_instance();
     Ecore_Event_Key *ev = (Ecore_Event_Key *)event_info;
     const char *ckey_val = ev->key;
-    LOGD("=-=-=-=- ev->key(char) = %c \n",ev->key);
-    LOGD("=-=-=-=- ev->key(string) = %s \n",ev->key);
-    LOGD("=-=-=-=- ev->keyname(char) = %c \n",ev->keyname);
-    LOGD("=-=-=-=- ev->keyname(string) = %s \n",ev->keyname);
-    LOGD("=-=-=-=- ev->string(char) = %c \n",ev->string);
-    LOGD("=-=-=-=- ev->string(string) = %s \n",ev->string);
+    LOGD("=-=-=-=- ev->key(char) = %c \n", ev->key);
+    LOGD("=-=-=-=- ev->key(string) = %s \n", ev->key);
+    LOGD("=-=-=-=- ev->keyname(char) = %c \n", ev->keyname);
+    LOGD("=-=-=-=- ev->keyname(string) = %s \n", ev->keyname);
+    LOGD("=-=-=-=- ev->string(char) = %c \n", ev->string);
+    LOGD("=-=-=-=- ev->string(string) = %s \n", ev->string);
 
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
     SclButtonContext *prev_button_context = NULL;
@@ -555,7 +554,7 @@ Eina_Bool key_pressed(void *data, int type, void *event_info)
         key_index = focus_handler->get_next_key_index(NAVIGATE_UP);
     } else if (strcmp(ev->keyname, "Down") == 0) {
         key_index = focus_handler->get_next_key_index(NAVIGATE_DOWN);
-    } else if ((strcmp(ev->keyname, "Return") == 0)||(strcmp(ev->keyname, "Enter") == 0)) {
+    } else if ((strcmp(ev->keyname, "Return") == 0) || (strcmp(ev->keyname, "Enter") == 0)) {
         button_context = cache->get_cur_button_context(window, current_key_index);
         coordinate = cache->get_cur_layout_key_coordinate(window, current_key_index);
         button_context->state = BUTTON_STATE_NORMAL;
@@ -577,7 +576,7 @@ Eina_Bool key_pressed(void *data, int type, void *event_info)
         coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
         prev_button_context->state = BUTTON_STATE_NORMAL;
         button_context->state = BUTTON_STATE_PRESSED;
-        sclshort x,y,width,height;
+        sclshort x, y, width, height;
         if (prevcoordinate->x < coordinate->x) {
             x = prevcoordinate->x;
         } else {
@@ -611,7 +610,7 @@ Eina_Bool key_pressed(void *data, int type, void *event_info)
 #endif /*HANDLE_KEY_EVENTS*/
 
 //int mouse_move (void *data, Evas *e, Evas_Object *object, void *event_info)
-Eina_Bool mouse_move (void *data, int type, void *event_info)
+Eina_Bool mouse_move(void *data, int type, void *event_info)
 {
     SCL_DEBUG();
 
@@ -645,10 +644,10 @@ Eina_Bool mouse_move (void *data, int type, void *event_info)
             int root_x = ev->x + rect.x;
             int root_y = ev->y + rect.y;
 
-            Ecore_Wl_Window *wl_base_window = elm_win_wl_window_get (static_cast<Evas_Object*>(windows->get_base_window ()));
-            if (wl_base_window && (unsigned int)ecore_wl_window_id_get (wl_base_window) == ev->window) {
+            Ecore_Wl_Window *wl_base_window = elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_base_window()));
+            if (wl_base_window && (unsigned int)ecore_wl_window_id_get(wl_base_window) == ev->window) {
                 SclRectangle base_rect;
-                get_window_rect (windows->get_base_window (), &base_rect);
+                get_window_rect(windows->get_base_window(), &base_rect);
                 root_x = ev->x + base_rect.x;
                 root_y = ev->y + base_rect.y;
             }
@@ -793,7 +792,7 @@ client_message_cb(void *data, int type, void *event)
             Evas_Object *base_win = (Evas_Object *)windows->get_base_window();
             if (base_win == NULL) return FALSE;
 
-            if ((unsigned int)ev->data.l[0] == elm_win_xwindow_get(base_win) ) {
+            if ((unsigned int)ev->data.l[0] == elm_win_xwindow_get(base_win)) {
                 if ((unsigned int)ev->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE) {
                 // 1 finger double tap
                 controller->mouse_press(base_win, last_pos_x, last_pos_y);
@@ -881,7 +880,7 @@ void
 CSCLEventsImplEfl::destroy_all_timer()
 {
     SCL_DEBUG();
-    for ( std::map<int, Ecore_Timer*>::iterator idx = idMap.begin(); idx != idMap.end(); ++idx) {
+    for ( std::map<int, Ecore_Timer*>::iterator idx = idMap.begin(); idx != idMap.end(); ++idx ) {
         ecore_timer_del((*idx).second);
 
         CSCLUtils *utils = CSCLUtils::get_instance();
@@ -967,7 +966,7 @@ CSCLEventsImplEfl::generate_mouse_event(SCLMouseEvent type, scl16 x, scl16 y)
 #ifdef WAYLAND
                         Ecore_Wl_Window *wl_base_window;
                         wl_base_window = elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_base_window()));
-                        if(wl_base_window)
+                        if (wl_base_window)
                             evt.window = (unsigned int)ecore_wl_window_id_get(wl_base_window);
 #else
                         evt.window = elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window()));
index 2cf6973..4745ff7 100644 (file)
@@ -38,7 +38,7 @@ std::vector<TextCache> g_TextCache;
 sclint hash_string(const sclchar* str) {
     sclint ret = 0;
     sclint len = strlen(str);
-    for(sclint loop = 0;loop < len && str[loop];loop++) {
+    for (sclint loop = 0;loop < len && str[loop];loop++) {
         ret = ((loop + 1) * str[loop]);
     }
 
@@ -50,9 +50,9 @@ using namespace scl;
 
 int iNumCreate = 0;
 
-extern void mouse_press (void *data, Evas *e, Evas_Object *object, void *event_info);
-extern void mouse_release (void *data, Evas *e, Evas_Object *object, void *event_info);
-extern void mouse_move (void *data, Evas *e, Evas_Object *object, void *event_info);
+extern void mouse_press(void *data, Evas *e, Evas_Object *object, void *event_info);
+extern void mouse_release(void *data, Evas *e, Evas_Object *object, void *event_info);
+extern void mouse_move(void *data, Evas *e, Evas_Object *object, void *event_info);
 
 /**
  * Constructor
@@ -87,14 +87,14 @@ void CSCLGraphicsImplEfl::fini()
 
 Evas_Object* extract_partimage_from_fullimage(
     Evas_Object* fullimage,
-    int img_x,int img_y,
-    int cell_x,int cell_y,
+    int img_x, int img_y,
+    int cell_x, int cell_y,
     int cell_cx, int cell_cy)
 {
     unsigned int *data;
     unsigned int *t_data;
-    int i,j;
-    int w,h;
+    int i, j;
+    int w, h;
     Evas_Object *image_ob;
 
     if (fullimage == NULL) {
@@ -102,18 +102,18 @@ Evas_Object* extract_partimage_from_fullimage(
     }
     evas_object_image_size_get(fullimage, &w, &h);
 
-    data = (unsigned int*)evas_object_image_data_get(fullimage,0);
+    data = (unsigned int*)evas_object_image_data_get(fullimage, 0);
     if (data == NULL) {
         return NULL;
     }
 
-    t_data=(unsigned int*)malloc(sizeof(unsigned int)*cell_cx*cell_cy);
+    t_data = (unsigned int*)malloc(sizeof(unsigned int)*cell_cx*cell_cy);
     if (t_data == NULL) {
         return NULL;
     }
 
-    for (i=img_y; i<img_y+cell_cy; i++) {
-        for (j=img_x; j<img_x+cell_cx; j++) {
+    for (i=img_y; i < img_y+cell_cy; i++) {
+        for (j=img_x; j < img_x+cell_cx; j++) {
             t_data[(i-img_y)*cell_cx+(j-img_x)] = data[i*w+j];
         }
     }
@@ -123,10 +123,10 @@ Evas_Object* extract_partimage_from_fullimage(
         free(t_data);
         return NULL;
     }
-    evas_object_image_size_set(image_ob,cell_cx,cell_cy);
-    evas_object_image_data_set(image_ob,t_data);
-    evas_object_image_fill_set(image_ob,0,0,cell_cx,cell_cy);
-    evas_object_resize(image_ob,cell_cx,cell_cy);
+    evas_object_image_size_set(image_ob, cell_cx, cell_cy);
+    evas_object_image_data_set(image_ob, t_data);
+    evas_object_image_fill_set(image_ob, 0, 0, cell_cx, cell_cy);
+    evas_object_resize(image_ob, cell_cx, cell_cy);
 
     evas_object_show(image_ob);
 
@@ -177,7 +177,7 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
             sclint hashval = hash_string(image_path);
             /*for(std::list<ImageCache>::iterator iter = g_ImageCache.begin();
                 bFound && iter != g_ImageCache.end();std::advance(iter, 1)) {*/
-            for(sclint loop = 0;loop < g_ImageCache.size() && !bFound;loop++) {
+            for (sclint loop = 0;loop < g_ImageCache.size() && !bFound;loop++) {
                 if (
                     /*  (*iter).used &&
                         window == (*iter).window &&
@@ -286,7 +286,7 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
                             image_object = newobj;
                             evas_object_move(image_object, dest_x, dest_y);
                             if (dest_width > 0 && dest_height > 0) {
-                                evas_object_image_fill_set(image_object, 0, 0, dest_width,dest_height);
+                                evas_object_image_fill_set(image_object, 0, 0, dest_width, dest_height);
                                 evas_object_resize(image_object, dest_width, dest_height);
                             }
     #else
@@ -317,7 +317,7 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
                         } else {
                             evas_object_move(image_object, dest_x, dest_y);
                             if (dest_width > 0 && dest_height > 0) {
-                                evas_object_image_fill_set(image_object, 0, 0, dest_width,dest_height);
+                                evas_object_image_fill_set(image_object, 0, 0, dest_width, dest_height);
                                 evas_object_resize(image_object, dest_width, dest_height);
                             }
                         }
@@ -385,7 +385,7 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
                     cache.src_width = src_width;
                     cache.src_height = src_height;
                 }
-                cache.extrace_image= extrace_image;
+                cache.extrace_image = extrace_image;
                 cache.image = object->object;
                 if (clip_object) {
                     cache.clipper = clip_object->object;
@@ -395,7 +395,7 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
 
                 //g_ImageCache.insert(g_ImageCache.end(), cache);
                 sclboolean bInserted = FALSE;
-                for(sclint loop = 0;loop < g_ImageCache.size() && !bInserted;loop++) {
+                for (sclint loop = 0;loop < g_ImageCache.size() && !bInserted;loop++) {
                     if (!g_ImageCache[loop].used) {
                         g_ImageCache[loop] = cache;
                     }
@@ -496,7 +496,7 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
             sclint org_posy = pos_y;
             /*for(std::list<TextCache>::iterator iter = g_TextCache.begin();
                 bFound && iter != g_TextCache.end();std::advance(iter, 1)) {*/
-            for(sclint loop = 0;loop < g_TextCache.size() && !bFound;loop++) {
+            for (sclint loop = 0;loop < g_TextCache.size() && !bFound;loop++) {
                     if (
                         /*
                         (*iter).used &&
@@ -616,7 +616,7 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
                     snprintf(strStyle, 128,
                         "DEFAULT='font=%s font_size=%d align=%s color=#%02X%02X%02X%02X wrap=word left_margin=%d right_margin=%d'",
                             font_info.font_name, font_info.font_size,
-                            (((int)align % 3) == 1 ) ? "center" : ((((int)align % 3) == 2 ) ? "right" : "left"),
+                            (((int)align % 3) == 1) ? "center" : ((((int)align % 3) == 2) ? "right" : "left"),
                             color.r, color.g, color.b, color.a, padding_x, padding_x);
 
                     Evas_Textblock_Style *st;
@@ -672,7 +672,7 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
                             "DEFAULT='font=%s font_size=%d align=%s color=#%02X%02X%02X%02X wrap=word left_margin=%d right_margin=%d'",
                             font_info.font_name,
                             (int)(SCL_LABEL_OVERLENGTH_TEXT_RESIZE_RATE * font_info.font_size * resize_rate),
-                            (((int)align % 3) == 1 ) ? "center" : ((((int)align % 3) == 2 ) ? "right" : "left"),
+                            (((int)align % 3) == 1) ? "center" : ((((int)align % 3) == 2) ? "right" : "left"),
                             color.r, color.g, color.b, color.a, padding_x, padding_x);
                         evas_textblock_style_set(st, strStyle);
                         evas_object_textblock_style_set(text_object, st);
@@ -749,7 +749,7 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
 
                 //g_TextCache.insert(g_TextCache.end(), cache);
                 sclboolean bInserted = FALSE;
-                for(sclint loop = 0;loop < g_TextCache.size() && !bInserted;loop++) {
+                for (sclint loop = 0;loop < g_TextCache.size() && !bInserted;loop++) {
                     if (!g_TextCache[loop].used) {
                         g_TextCache[loop] = cache;
                     }
index 3969b4c..d157346 100644 (file)
@@ -87,7 +87,7 @@ CSCLWindowsImplEfl::~CSCLWindowsImplEfl()
     SCL_DEBUG();
 }
 
-static void window_show_cb (void *data, Evas *e, Evas_Object *obj, void *event)
+static void window_show_cb(void *data, Evas *e, Evas_Object *obj, void *event)
 {
     LOGD("INSIDE =-=-=-=- window_show_cb, Trying to Grab Key Board : \n");
 #ifdef USING_KEY_GRAB
@@ -101,12 +101,10 @@ static void window_show_cb (void *data, Evas *e, Evas_Object *obj, void *event)
 
 void CSCLWindowsImplEfl::init()
 {
-
 }
 
 void CSCLWindowsImplEfl::fini()
 {
-
 }
 
 /**
@@ -130,7 +128,7 @@ CSCLWindowsImplEfl::create_base_window(const sclwindow parent, SclWindowContext
 
 #ifndef APPLY_WINDOW_MANAGER_CHANGE
 #ifndef WAYLAND
-        ecore_x_icccm_name_class_set(elm_win_xwindow_get(static_cast<Evas_Object*>(parent)), "Virtual Keyboard", "ISF" );
+        ecore_x_icccm_name_class_set(elm_win_xwindow_get(static_cast<Evas_Object*>(parent)), "Virtual Keyboard", "ISF");
 #endif
 #else
         if (parent) {
@@ -178,7 +176,7 @@ CSCLWindowsImplEfl::create_window(const sclwindow parent, SclWindowContext *wind
     scl16 new_width;
     scl16 new_height;
     CSCLContext *context = CSCLContext::get_instance();
-    if(context->get_rotation() == ROTATION_90_CW || context->get_rotation() == ROTATION_90_CCW) {
+    if (context->get_rotation() == ROTATION_90_CW || context->get_rotation() == ROTATION_90_CCW) {
         new_width = height;
         new_height = width;
     } else {
@@ -257,7 +255,7 @@ CSCLWindowsImplEfl::create_magnifier_window(const sclwindow parent, SclWindowCon
 
     set_window_accepts_focus(win, FALSE);
 
-    int rots[4] = {0,90,180,270};
+    int rots[4] = {0, 90, 180, 270};
     elm_win_wm_rotation_available_rotations_set(win, rots, 4);
 
 #ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW
@@ -338,7 +336,7 @@ CSCLWindowsImplEfl::create_dim_window(const sclwindow parent, SclWindowContext *
 
     evas_object_resize(win, width, height);
 
-    int rots[4] = {0,90,180,270};
+    int rots[4] = {0, 90, 180, 270};
     elm_win_wm_rotation_available_rotations_set(win, rots, 4);
 
     set_window_accepts_focus(win, FALSE);
@@ -451,7 +449,7 @@ CSCLWindowsImplEfl::destroy_window(sclwindow window)
                                     evas_textblock_style_free(st);
                                 }
 #ifdef TEST_NEWBACKEND
-                                for(sclint loop = 0;loop < g_TextCache.size();loop++) {
+                                for (sclint loop = 0;loop < g_TextCache.size();loop++) {
                                     if (g_TextCache[loop].text == object->object) {
                                         g_TextCache[loop].used = FALSE;
                                     }
@@ -459,7 +457,7 @@ CSCLWindowsImplEfl::destroy_window(sclwindow window)
 #endif
                             } else if (object->type == EFLOBJECT_IMAGE) {
 #ifdef TEST_NEWBACKEND
-                                for(sclint loop = 0;loop < g_ImageCache.size();loop++) {
+                                for (sclint loop = 0;loop < g_ImageCache.size();loop++) {
                                     if (g_ImageCache[loop].image == object->object) {
                                         g_ImageCache[loop].used = FALSE;
                                     }
@@ -505,29 +503,29 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue)
     CSCLUtils *utils = CSCLUtils::get_instance();
     if (windows && context && window) {
 #ifdef USING_DIM_BG
-        if (window == windows->get_dim_window ()) {
-            Evas_Object *base_window = static_cast<Evas_Object*>(windows->get_base_window ());
+        if (window == windows->get_dim_window()) {
+            Evas_Object *base_window = static_cast<Evas_Object*>(windows->get_base_window());
             static Evas_Object *dim_bg = NULL;
             if (dim_bg == NULL) {
-                dim_bg = elm_bg_add (static_cast<Evas_Object*>(windows->get_base_window ()));
+                dim_bg = elm_bg_add(static_cast<Evas_Object*>(windows->get_base_window()));
                 SclColor color;
                 color.r = color.g = color.b = 0;
                 color.a = 102;
-                SclResParserManager *sclres_manager = SclResParserManager::get_instance ();
+                SclResParserManager *sclres_manager = SclResParserManager::get_instance();
                 if (sclres_manager) {
-                    PSclDefaultConfigure default_configure = sclres_manager->get_default_configure ();
+                    PSclDefaultConfigure default_configure = sclres_manager->get_default_configure();
                     if (default_configure)
                         color = default_configure->dim_color;
                 }
-                evas_object_color_set (dim_bg, color.r, color.g, color.b, color.a);
-                evas_object_data_set (base_window, "dim_bg", (void *)dim_bg);
+                evas_object_color_set(dim_bg, color.r, color.g, color.b, color.a);
+                evas_object_data_set(base_window, "dim_bg", (void *)dim_bg);
             }
             SclRectangle rect;
-            get_window_rect (windows->get_base_window (), &rect);
-            evas_object_resize (dim_bg, rect.width, rect.height);
-            evas_object_move (dim_bg, 0, 0);
-            evas_object_show (dim_bg);
-            evas_object_layer_set (dim_bg, SHRT_MAX);
+            get_window_rect(windows->get_base_window(), &rect);
+            evas_object_resize(dim_bg, rect.width, rect.height);
+            evas_object_move(dim_bg, 0, 0);
+            evas_object_show(dim_bg);
+            evas_object_layer_set(dim_bg, SHRT_MAX);
             return;
         }
 #endif
@@ -558,9 +556,9 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue)
             unsigned char   *data = NULL;
 
             Ecore_X_Window win = elm_win_xwindow_get(static_cast<Evas_Object*>(window));
-            ret = XGetWindowProperty ((Display *)ecore_x_display_get (),
-                    ecore_x_window_root_get (win),
-                    ecore_x_atom_get ("_ISF_ACTIVE_WINDOW"),
+            ret = XGetWindowProperty((Display *)ecore_x_display_get(),
+                    ecore_x_window_root_get(win),
+                    ecore_x_atom_get("_ISF_ACTIVE_WINDOW"),
                     0, G_MAXLONG, False, XA_WINDOW, &type_return,
                     &format_return, &nitems_return, &bytes_after_return,
                     &data);
@@ -569,7 +567,7 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue)
                 if ((type_return == XA_WINDOW) && (format_return == 32) && (data)) {
                     app_window = *(Window *)data;
                     if (data)
-                        XFree (data);
+                        XFree(data);
                 }
             }
         }
@@ -611,10 +609,10 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
 
     if (windows && window) {
 #ifdef USING_DIM_BG
-        if (window == windows->get_dim_window ()) {
-            Evas_Object *base_window = static_cast<Evas_Object*>(windows->get_base_window ());
-            Evas_Object *dim_bg = (Evas_Object *)evas_object_data_get (base_window, "dim_bg");
-            evas_object_hide (dim_bg);
+        if (window == windows->get_dim_window()) {
+            Evas_Object *base_window = static_cast<Evas_Object*>(windows->get_base_window());
+            Evas_Object *dim_bg = (Evas_Object *)evas_object_data_get(base_window, "dim_bg");
+            evas_object_hide(dim_bg);
             return;
         }
 #endif
@@ -653,7 +651,6 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
         if (window == windows->get_magnifier_window() || window == windows->get_dim_window()) {
             if (window_context) {
                 if (window_context->etc_info) {
-
                     Eina_List *list = (Eina_List*)(window_context->etc_info);
                     Eina_List *iter = NULL;
                     Eina_List *iter_next = NULL;
@@ -685,7 +682,7 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
                                             evas_textblock_style_free(st);
                                         }
 #ifdef TEST_NEWBACKEND
-                                        for(sclint loop = 0;loop < g_TextCache.size();loop++) {
+                                        for (sclint loop = 0;loop < g_TextCache.size();loop++) {
                                             if (g_TextCache[loop].text == object->object) {
                                                 g_TextCache[loop].used = FALSE;
                                             }
@@ -693,7 +690,7 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
 #endif
                                     } else if (object->type == EFLOBJECT_IMAGE) {
 #ifdef TEST_NEWBACKEND
-                                        for(sclint loop = 0;loop < g_ImageCache.size();loop++) {
+                                        for (sclint loop = 0;loop < g_ImageCache.size();loop++) {
                                             if (g_ImageCache[loop].image == object->object) {
                                                 g_ImageCache[loop].used = FALSE;
                                             }
@@ -928,7 +925,6 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
             }
         }
         if (window_context->etc_info) {
-
             Eina_List *list = (Eina_List*)(window_context->etc_info);
             Eina_List *iter = NULL;
             Eina_List *iter_next = NULL;
@@ -980,7 +976,7 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
                                     evas_textblock_style_free(st);
                                 }
 #ifdef TEST_NEWBACKEND
-                                for(sclint loop = 0;loop < g_TextCache.size();loop++) {
+                                for sclint loop = 0;loop < g_TextCache.size();loop++) {
                                     if (g_TextCache[loop].text == object->object) {
                                         g_TextCache[loop].used = FALSE;
                                     }
@@ -988,7 +984,7 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
 #endif
                             } else if (object->type == EFLOBJECT_IMAGE) {
 #ifdef TEST_NEWBACKEND
-                                for(sclint loop = 0;loop < g_ImageCache.size();loop++) {
+                                for (sclint loop = 0;loop < g_ImageCache.size();loop++) {
                                     if (g_ImageCache[loop].image == object->object) {
                                         g_ImageCache[loop].used = FALSE;
                                     }
@@ -1176,7 +1172,6 @@ void release_all(Evas_Object *win)
     SclWindowContext *window_context = windows->get_window_context(win);
         if (window_context && win) {
             if (window_context->etc_info) {
-
                 Eina_List *list = (Eina_List*)(window_context->etc_info);
                 Eina_List *iter = NULL;
                 Eina_List *iter_next = NULL;
@@ -1208,7 +1203,7 @@ void release_all(Evas_Object *win)
                                         evas_textblock_style_free(st);
                                     }
 #ifdef TEST_NEWBACKEND
-                                    for(sclint loop = 0;loop < g_TextCache.size();loop++) {
+                                    for (sclint loop = 0;loop < g_TextCache.size();loop++) {
                                         if (g_TextCache[loop].text == object->object) {
                                             g_TextCache[loop].used = FALSE;
                                         }
@@ -1216,7 +1211,7 @@ void release_all(Evas_Object *win)
 #endif
                                 } else if (object->type == EFLOBJECT_IMAGE) {
 #ifdef TEST_NEWBACKEND
-                                    for(sclint loop = 0;loop < g_ImageCache.size();loop++) {
+                                    for (sclint loop = 0;loop < g_ImageCache.size();loop++) {
                                         if (g_ImageCache[loop].image == object->object) {
                                             g_ImageCache[loop].used = FALSE;
                                         }
index cb7272c..aacc35c 100644 (file)
@@ -224,33 +224,33 @@ mouse_release(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
  * Generates a update window event to CSCLController class
  */
 bool
-update_window (GtkWidget *widget, GdkEventExpose *event,gpointer user_data)
+update_window(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 {
     SCL_DEBUG();
     /* pre-condition */
     CSCLGwes* gwes = CSCLGwes::get_instance();
     CSCLUIBuilder *builder = CSCLUIBuilder::get_instance();
 
-    if (gwes && builder)       {
+    if (gwes && builder) {
         sclwindow window = static_cast<sclwindow>(widget);
 
 #if 0
         /* For making the transparent window */
         cairo_t   *cr;
-        cr = gdk_cairo_create (widget->window);
+        cr = gdk_cairo_create(widget->window);
         /* Make it transparent */
-        cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
-        gdk_cairo_region (cr, event->region);
-        cairo_fill_preserve (cr);
+        cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
+        gdk_cairo_region(cr, event->region);
+        cairo_fill_preserve(cr);
         /* Make it half-transparent */
         if (gwes->mWnd->get_base_window() == window) {
-            cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.9);
+            cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 0.9);
         } else {
-            cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
+            cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 0.0);
         }
-        cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
-        cairo_fill (cr);
-        cairo_destroy (cr);
+        cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
+        cairo_fill(cr);
+        cairo_destroy(cr);
 #endif
 
         return builder->show_layout(window);
@@ -355,7 +355,7 @@ CSCLEventsImplGtk::connect_window_events(const sclwindow window, const sclint ev
 
     GtkWidget* widget = static_cast<GtkWidget*>(wnd);
 
-    gtk_widget_add_events ((GtkWidget*)widget, GDK_BUTTON_PRESS_MASK |
+    gtk_widget_add_events((GtkWidget*)widget, GDK_BUTTON_PRESS_MASK |
                            GDK_BUTTON_RELEASE_MASK |
                            GDK_BUTTON_MOTION_MASK |
                            GDK_POINTER_MOTION_HINT_MASK);
@@ -398,7 +398,7 @@ CSCLEventsImplGtk::create_timer(const scl16 id, const scl32 interval, scl16 valu
 {
     SCL_DEBUG();
     sclint data = SCL_MAKELONG(id, value);
-    gint timerId = gtk_timeout_add (static_cast<guint32>(interval), timer_event, (gpointer)data);
+    gint timerId = gtk_timeout_add(static_cast<guint32>(interval), timer_event, (gpointer)data);
     if (add_to_map) {
         id_map[id] = timerId;
     }
@@ -411,9 +411,9 @@ void
 CSCLEventsImplGtk::destroy_timer(const scl32 id)
 {
     SCL_DEBUG();
-    for ( std::map<int, int>::iterator idx = id_map.begin(); idx != id_map.end(); ++idx) {
+    for ( std::map<int, int>::iterator idx = id_map.begin(); idx != id_map.end(); ++idx ) {
         if ((*idx).first == id) {
-            gtk_timeout_remove ((*idx).second);
+            gtk_timeout_remove((*idx).second);
             id_map.erase((*idx).first);
             break;
         }
@@ -427,8 +427,8 @@ void
 CSCLEventsImplGtk::destroy_all_timer()
 {
     SCL_DEBUG();
-    for ( std::map<int, int>::iterator idx = id_map.begin(); idx != id_map.end(); ++idx) {
-        gtk_timeout_remove ((*idx).second);
+    for ( std::map<int, int>::iterator idx = id_map.begin(); idx != id_map.end(); ++idx ) {
+        gtk_timeout_remove((*idx).second);
     }
     id_map.clear();
 }
index 962582e..9005951 100644 (file)
@@ -117,8 +117,8 @@ CSCLGraphicsImplCairo::draw_image(sclwindow window, const scldrawctx draw_ctx, s
                 cairo_translate(cr, destX - srcX, destY - srcY);
 
                 if (destWidth > 0 && destHeight > 0 && srcWidth == -1) {
-                    sclint imagew = cairo_image_surface_get_width (imgSurface);
-                    sclint imageh = cairo_image_surface_get_height (imgSurface);
+                    sclint imagew = cairo_image_surface_get_width(imgSurface);
+                    sclint imageh = cairo_image_surface_get_height(imgSurface);
 
                     double scaleX = (double)destWidth / imagew;
                     double scaleY = (double)destHeight / imageh;
@@ -126,9 +126,9 @@ CSCLGraphicsImplCairo::draw_image(sclwindow window, const scldrawctx draw_ctx, s
                 }
 
                 if (srcWidth > 0) {
-                    cairo_rectangle (cr, srcX, srcY, srcWidth, srcHeight);
-                    cairo_clip (cr);
-                    cairo_new_path (cr);
+                    cairo_rectangle(cr, srcX, srcY, srcWidth, srcHeight);
+                    cairo_clip(cr);
+                    cairo_new_path(cr);
                 }
 
                 cairo_set_source_surface(cr, imgSurface, 0, 0);
@@ -155,57 +155,57 @@ CSCLGraphicsImplCairo::draw_rectangle(sclwindow window, const scldrawctx draw_ct
     /* a custom shape that could be wrapped in a function */
     //double radius = 0;//102.4;   /* and an approximate curvature radius */
 
-    double x1,y1;
+    double x1, y1;
 
-    x1=posx+width;
-    y1=posy+height;
+    x1 = posx+width;
+    y1 = posy+height;
     if (!width || !height)
         return;
-    if (width/2<radius) {
-        if (height/2<radius) {
-            cairo_move_to  (cr, posx, (posy + y1)/2);
-            cairo_curve_to (cr, posx ,posy, posx, posy, (posx + x1)/2, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, (posy + y1)/2);
-            cairo_curve_to (cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, (posy + y1)/2);
+    if (width/2 < radius) {
+        if (height/2 < radius) {
+            cairo_move_to(cr, posx, (posy + y1)/2);
+            cairo_curve_to(cr, posx, posy, posx, posy, (posx + x1)/2, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, (posy + y1)/2);
+            cairo_curve_to(cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, (posy + y1)/2);
         } else {
-            cairo_move_to  (cr, posx, posy + radius);
-            cairo_curve_to (cr, posx ,posy, posx, posy, (posx + x1)/2, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, posy + radius);
-            cairo_line_to (cr, x1 , y1 - radius);
-            cairo_curve_to (cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, y1- radius);
+            cairo_move_to(cr, posx, posy + radius);
+            cairo_curve_to(cr, posx, posy, posx, posy, (posx + x1)/2, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, posy + radius);
+            cairo_line_to(cr, x1 , y1 - radius);
+            cairo_curve_to(cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, y1- radius);
         }
     } else {
-        if (height/2<radius) {
-            cairo_move_to  (cr, posx, (posy + y1)/2);
-            cairo_curve_to (cr, posx , posy, posx , posy, posx + radius, posy);
-            cairo_line_to (cr, x1 - radius, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, (posy + y1)/2);
-            cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
-            cairo_line_to (cr, posx + radius, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, (posy + y1)/2);
+        if (height/2 < radius) {
+            cairo_move_to(cr, posx, (posy + y1)/2);
+            cairo_curve_to(cr, posx , posy, posx , posy, posx + radius, posy);
+            cairo_line_to(cr, x1 - radius, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, (posy + y1)/2);
+            cairo_curve_to(cr, x1, y1, x1, y1, x1 - radius, y1);
+            cairo_line_to(cr, posx + radius, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, (posy + y1)/2);
         } else {
-            cairo_move_to  (cr, posx, posy + radius);
-            cairo_curve_to (cr, posx , posy, posx , posy, posx + radius, posy);
-            cairo_line_to (cr, x1 - radius, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, posy + radius);
-            cairo_line_to (cr, x1 , y1 - radius);
-            cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
-            cairo_line_to (cr, posx + radius, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, y1- radius);
+            cairo_move_to(cr, posx, posy + radius);
+            cairo_curve_to(cr, posx , posy, posx , posy, posx + radius, posy);
+            cairo_line_to(cr, x1 - radius, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, posy + radius);
+            cairo_line_to(cr, x1 , y1 - radius);
+            cairo_curve_to(cr, x1, y1, x1, y1, x1 - radius, y1);
+            cairo_line_to(cr, posx + radius, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, y1- radius);
         }
     }
-    cairo_close_path (cr);
+    cairo_close_path(cr);
 
     if (fill) {
-        cairo_set_source_rgba (cr, fillColor.r / 256.0, fillColor.g / 256.0, fillColor.b / 256.0, alpha); //0.9
-        cairo_fill_preserve (cr);
+        cairo_set_source_rgba(cr, fillColor.r / 256.0, fillColor.g / 256.0, fillColor.b / 256.0, alpha); //0.9
+        cairo_fill_preserve(cr);
     }
 
-    cairo_set_source_rgb (cr, lineColor.r / 256.0, lineColor.g / 256.0, lineColor.b / 256.0); // 1  . 0
-    cairo_set_line_width (cr, lineWidth);//5.0
-    cairo_stroke (cr);
+    cairo_set_source_rgb(cr, lineColor.r / 256.0, lineColor.g / 256.0, lineColor.b / 256.0); // 1  . 0
+    cairo_set_line_width(cr, lineWidth);//5.0
+    cairo_stroke(cr);
 }
 
 
@@ -227,11 +227,9 @@ load_cairo_surface(const gchar *filename)
     rgba = gdk_screen_get_rgba_colormap(gdk_screen_get_default());
 
     pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
-    gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf,  rgba, &pixmap, &mask, 128);
+    gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf,  rgba, &pixmap, &mask, 128);
 
     return GDK_DRAWABLE_GET_CLASS (GDK_DRAWABLE (pixmap))->ref_cairo_surface (GDK_DRAWABLE (pixmap));
-
-
 }
 #else
 /**
@@ -286,7 +284,7 @@ CSCLGraphicsImplCairo::begin_paint(const sclwindow window, const sclboolean forc
     if (!GTK_WIDGET_REALIZED(widget)) {
         gtk_widget_realize(widget);
     }
-    cr = gdk_cairo_create (widget->window);
+    cr = gdk_cairo_create(widget->window);
     return static_cast<scldrawctx>(cr);
 }
 
index 8dbea28..bd37005 100644 (file)
@@ -73,8 +73,7 @@ CSCLGraphicsImplGtk::draw_image(sclwindow window, const scldrawctx draw_ctx,
                 imgdata,
                 srcX, srcY,
                 destX, destY,
-                destWidth, destHeight
-            );
+                destWidth, destHeight);
         }
     }
 }
@@ -90,12 +89,12 @@ load_pixmap(const gchar *filename)
     int width = 0;
     int height = 0;
     int stride = 0;
-    int i =0;
+    int i = 0;
 
     GdkPixmap *pixmap = NULL;
     GdkColormap *rgba;
     GdkBitmap* mask = NULL;
-    if (g_file_test(filename,G_FILE_TEST_EXISTS)) {
+    if (g_file_test(filename, G_FILE_TEST_EXISTS)) {
         pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
     } else {
         return NULL;
@@ -111,7 +110,7 @@ load_pixmap(const gchar *filename)
     width = gdk_pixbuf_get_width(pixbuf);
     height = gdk_pixbuf_get_height(pixbuf);
     pixmap = gdk_pixmap_new(NULL, width, height, 32);
-    gdk_draw_pixbuf (pixmap,
+    gdk_draw_pixbuf(pixmap,
                      NULL,
                      pixbuf,
                      0,
@@ -165,7 +164,7 @@ CSCLGraphicsImplGtk::begin_paint(const sclwindow window, const sclboolean force_
     if (!GTK_WIDGET_REALIZED(widget)) {
         gtk_widget_realize(widget);
     }
-    cr = gdk_cairo_create (widget->window);
+    cr = gdk_cairo_create(widget->window);
     return static_cast<scldrawctx>(cr);
 }
 
@@ -267,57 +266,57 @@ CSCLGraphicsImplGtk::draw_rectangle(sclwindow window, const scldrawctx draw_ctx,
     /* a custom shape that could be wrapped in a function */
     //double radius = 0;//102.4;   /* and an approximate curvature radius */
 
-    double x1,y1;
+    double x1, y1;
 
-    x1=posx+width;
-    y1=posy+height;
+    x1 = posx+width;
+    y1 = posy+height;
     if (!width || !height)
         return;
-    if (width/2<radius) {
-        if (height/2<radius) {
-            cairo_move_to  (cr, posx, (posy + y1)/2);
-            cairo_curve_to (cr, posx ,posy, posx, posy, (posx + x1)/2, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, (posy + y1)/2);
-            cairo_curve_to (cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, (posy + y1)/2);
+    if (width/2 < radius) {
+        if (height/2 < radius) {
+            cairo_move_to(cr, posx, (posy + y1)/2);
+            cairo_curve_to(cr, posx, posy, posx, posy, (posx + x1)/2, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, (posy + y1)/2);
+            cairo_curve_to(cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, (posy + y1)/2);
         } else {
-            cairo_move_to  (cr, posx, posy + radius);
-            cairo_curve_to (cr, posx ,posy, posx, posy, (posx + x1)/2, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, posy + radius);
-            cairo_line_to (cr, x1 , y1 - radius);
-            cairo_curve_to (cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, y1- radius);
+            cairo_move_to(cr, posx, posy + radius);
+            cairo_curve_to(cr, posx, posy, posx, posy, (posx + x1)/2, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, posy + radius);
+            cairo_line_to(cr, x1 , y1 - radius);
+            cairo_curve_to(cr, x1, y1, x1, y1, (x1 + posx)/2, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, y1- radius);
         }
     } else {
-        if (height/2<radius) {
-            cairo_move_to  (cr, posx, (posy + y1)/2);
-            cairo_curve_to (cr, posx , posy, posx , posy, posx + radius, posy);
-            cairo_line_to (cr, x1 - radius, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, (posy + y1)/2);
-            cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
-            cairo_line_to (cr, posx + radius, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, (posy + y1)/2);
+        if (height/2 < radius) {
+            cairo_move_to(cr, posx, (posy + y1)/2);
+            cairo_curve_to(cr, posx , posy, posx , posy, posx + radius, posy);
+            cairo_line_to(cr, x1 - radius, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, (posy + y1)/2);
+            cairo_curve_to(cr, x1, y1, x1, y1, x1 - radius, y1);
+            cairo_line_to(cr, posx + radius, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, (posy + y1)/2);
         } else {
-            cairo_move_to  (cr, posx, posy + radius);
-            cairo_curve_to (cr, posx , posy, posx , posy, posx + radius, posy);
-            cairo_line_to (cr, x1 - radius, posy);
-            cairo_curve_to (cr, x1, posy, x1, posy, x1, posy + radius);
-            cairo_line_to (cr, x1 , y1 - radius);
-            cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
-            cairo_line_to (cr, posx + radius, y1);
-            cairo_curve_to (cr, posx, y1, posx, y1, posx, y1- radius);
+            cairo_move_to(cr, posx, posy + radius);
+            cairo_curve_to(cr, posx , posy, posx , posy, posx + radius, posy);
+            cairo_line_to(cr, x1 - radius, posy);
+            cairo_curve_to(cr, x1, posy, x1, posy, x1, posy + radius);
+            cairo_line_to(cr, x1 , y1 - radius);
+            cairo_curve_to(cr, x1, y1, x1, y1, x1 - radius, y1);
+            cairo_line_to(cr, posx + radius, y1);
+            cairo_curve_to(cr, posx, y1, posx, y1, posx, y1- radius);
         }
     }
-    cairo_close_path (cr);
+    cairo_close_path(cr);
 
     if (fill) {
-        cairo_set_source_rgba (cr, fillColor.r / 256.0, fillColor.g / 256.0, fillColor.b / 256.0, alpha); //0.9
-        cairo_fill_preserve (cr);
+        cairo_set_source_rgba(cr, fillColor.r / 256.0, fillColor.g / 256.0, fillColor.b / 256.0, alpha); //0.9
+        cairo_fill_preserve(cr);
     }
 
-    cairo_set_source_rgb (cr, lineColor.r / 256.0, lineColor.g / 256.0, lineColor.b / 256.0); // 1  . 0
-    cairo_set_line_width (cr, lineWidth);//5.0
-    cairo_stroke (cr);
+    cairo_set_source_rgb(cr, lineColor.r / 256.0, lineColor.g / 256.0, lineColor.b / 256.0); // 1  . 0
+    cairo_set_line_width(cr, lineWidth);//5.0
+    cairo_stroke(cr);
 }
 
 SclSize
@@ -326,7 +325,7 @@ CSCLGraphicsImplGtk::get_image_size(sclchar* image_path)
     SCL_DEBUG();
     SclSize ret = { 0, 0 };
     GdkPixbuf *pixbuf = NULL;
-    if (g_file_test(imgPath,G_FILE_TEST_EXISTS)) {
+    if (g_file_test(imgPath, G_FILE_TEST_EXISTS)) {
         pixbuf = gdk_pixbuf_new_from_file(imgPath, NULL);
     } else {
         return ret;
index d6ad2cc..308bba1 100644 (file)
@@ -44,27 +44,27 @@ CSCLWindowsImplGtk::~CSCLWindowsImplGtk()
  * Make a transparent window
  */
 static void
-make_transparent_window (GtkWidget *window)
+make_transparent_window(GtkWidget *window)
 {
     SCL_DEBUG();
     GdkScreen *screen;
     GdkColormap *colormap;
 
-    screen = gtk_widget_get_screen (window);
+    screen = gtk_widget_get_screen(window);
     if (!screen) {
-        g_warning ("failed to get window's screen");
+        g_warning("failed to get window's screen");
         return;
     }
 
-    colormap = gdk_screen_get_rgba_colormap (screen);
+    colormap = gdk_screen_get_rgba_colormap(screen);
     if (!colormap) {
-        g_warning ("failed to get RGBA colormap");
+        g_warning("failed to get RGBA colormap");
         return;
     }
 
-    gtk_widget_set_colormap (window, colormap);
-    gtk_widget_set_app_paintable (window, TRUE);
-    gtk_widget_realize (window);
+    gtk_widget_set_colormap(window, colormap);
+    gtk_widget_set_app_paintable(window, TRUE);
+    gtk_widget_realize(window);
     //gdk_gc_set_alpha(window->style->bg_gc[GTK_STATE_NORMAL], 0);
     //gdk_window_set_alpha(window->window, 0);
 }
@@ -100,8 +100,8 @@ CSCLWindowsImplGtk::create_base_window(const sclwindow parent, SclWindowContext
             gtk_widget_set_size_request(window, width, height);
             gtk_widget_set_size_request(drawarea, width, height);
             gtk_box_pack_start(GTK_BOX(window), drawarea, TRUE, TRUE, 0);
-            gtk_widget_show (drawarea);
-            gtk_widget_show (window);
+            gtk_widget_show(drawarea);
+            gtk_widget_show(window);
             window_context->etc_info = static_cast<void*>(drawarea);
             window_context->window = drawarea;
             make_transparent_window(drawarea);
@@ -126,8 +126,8 @@ CSCLWindowsImplGtk::create_window(const sclwindow parent, SclWindowContext *wind
     GtkWidget* window = NULL;
 
     if (window_context->window == NULL) {
-        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-        gtk_window_set_type_hint(GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_UTILITY);
+        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+        gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_UTILITY);
 #ifdef NO_SOCKETPLUG
         //gtk_window_set_type_hint(GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_NOTIFICATION);
         //gtk_window_set_keep_above(GTK_WINDOW(window), TRUE);
@@ -178,7 +178,7 @@ CSCLWindowsImplGtk::create_dim_window(const sclwindow parent, SclWindowContext *
 
     if (window_context->window == NULL) {
         window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-        gtk_window_set_type_hint(GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_UTILITY);
+        gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_UTILITY);
 #ifdef NO_SOCKETPLUG
         //gtk_window_set_type_hint(GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_NOTIFICATION);
 #endif
@@ -293,9 +293,8 @@ CSCLWindowsImplGtk::hide_window(const sclwindow window,  sclboolean force)
         /* Fix me : The below is a temporary code for magnifier speed enhancement */
 #ifdef NO_SOCKETPLUG
         gint root_x, root_y;
-        gtk_window_get_position (GTK_WINDOW(widget), &root_x, &root_y);
+        gtk_window_get_position(GTK_WINDOW(widget), &root_x, &root_y);
         if (GTK_WIDGET_MAPPED(widget)) {
-
             /* Window rotation*/
             CSCLContext* context = CSCLContext::get_instance();
             if (context->get_display() == DISPLAY_LANDSCAPE) {
@@ -390,7 +389,6 @@ CSCLWindowsImplGtk::get_window_rect(const sclwindow window, SclRectangle *rect)
     sclboolean ret = FALSE;
     GtkWidget* widget = static_cast<GtkWidget*>(window);
     if (rect && GTK_WIDGET_REALIZED(widget)) {
-
 #if 0
         /* FIXME : We need to get appropriate position of the base window somehow */
         // {
@@ -405,7 +403,7 @@ CSCLWindowsImplGtk::get_window_rect(const sclwindow window, SclRectangle *rect)
         CSCLContext *context = CSCLContext::get_instance();
         CSCLWindows *windows = CSCLWindows::get_instance();
         if (context->get_display() == DISPLAY_LANDSCAPE) {
-            gdk_window_get_root_origin (GDK_WINDOW(gtk_widget_get_toplevel(widget)->window),  &(rect->x), &(rect->y));
+            gdk_window_get_root_origin(GDK_WINDOW(gtk_widget_get_toplevel(widget)->window),  &(rect->x), &(rect->y));
             if (window == windows->get_base_window()) {
                 CSCLUtils *utils = CSCLUtils::get_instance();
                 CSCLResourceCache *cache = CSCLResourceCache::get_instance();
@@ -415,7 +413,7 @@ CSCLWindowsImplGtk::get_window_rect(const sclwindow window, SclRectangle *rect)
                 rect->y = scnWidth - cache->get_cur_layout(window)->height;
             }
         } else {
-            gdk_window_get_root_origin (GDK_WINDOW(gtk_widget_get_toplevel(widget)->window),  &(rect->x), &(rect->y));
+            gdk_window_get_root_origin(GDK_WINDOW(gtk_widget_get_toplevel(widget)->window),  &(rect->x), &(rect->y));
             if (window == windows->get_base_window()) {
                 CSCLUtils *utils = CSCLUtils::get_instance();
                 CSCLResourceCache *cache = CSCLResourceCache::get_instance();
@@ -425,7 +423,7 @@ CSCLWindowsImplGtk::get_window_rect(const sclwindow window, SclRectangle *rect)
                 rect->y = scnHeight - cache->get_cur_layout(window)->height;
             }
         }
-        gtk_window_get_size (GTK_WINDOW(gtk_widget_get_toplevel(widget)), &(rect->width), &(rect->height));
+        gtk_window_get_size(GTK_WINDOW(gtk_widget_get_toplevel(widget)), &(rect->width), &(rect->height));
 
         ret = TRUE;
     }
index 323ed74..7ecf655 100644 (file)
@@ -74,7 +74,6 @@ class CSCLAnimatorImpl
 
     friend class CSCLAnimator;
 private:
-
 };
 
 class CSCLAnimator
index 6bceff6..f1609b8 100644 (file)
@@ -91,7 +91,7 @@ typedef enum _SCLKeyType {
 }SCLKeyType;
 
 /**@brief Key Event Type definition */
-typedef enum _SCLEventType{
+typedef enum _SCLEventType {
     EVENT_TYPE_NONE = 0,       /**< none */
     EVENT_TYPE_PRESS,          /**< button press event */
     EVENT_TYPE_MOVE,           /**< button move event */
index f9c8d34..366e5eb 100644 (file)
@@ -65,7 +65,7 @@ typedef struct { // A struct for identifying Magnifier custom label information
 } MagnifierCustomLabelIdx;
 class MagnifierCustomLabelIdxCompare { // Comparison class for MagnifierCustomLabelIdx
 public:
-    bool operator()(const MagnifierCustomLabelIdx x ,const MagnifierCustomLabelIdx y) {
+    bool operator()(const MagnifierCustomLabelIdx xconst MagnifierCustomLabelIdx y) {
         if (x.touch_id != y.touch_id) {
             return x.touch_id > y.touch_id;
         } else {
index 327960f..8f2246d 100644 (file)
@@ -78,7 +78,7 @@ private:
     sclboolean check_magnifier_available(sclwindow window, sclbyte key_index, scltouchdevice touch_id);
 
     SCLKeyModifier get_drag_key_modifier(sclint deltax, sclint deltay, sclfloat dist,
-        sclboolean check_farthest,scltouchdevice touch_id, sclbyte extra_option);
+        sclboolean check_farthest, scltouchdevice touch_id, sclbyte extra_option);
 
 public:
     void handle_engine_signal(SclInternalSignal signal, sclwindow skip_window = SCLWINDOW_INVALID);
index 4f61329..c43ffc7 100644 (file)
@@ -31,12 +31,12 @@ extern "C"
     /* Definition for debug message trace */
 #define scldebugc(m_code)                                              "\x1b[" # m_code
 #define scldebug_sync()                                                        (void)fflush(stdout)
-#define scldebug_puts(m_code)                                  (void)fputs(m_code,stdout)
+#define scldebug_puts(m_code)                                  (void)fputs(m_code, stdout)
 #define scldebug_clear_screen()                                        scldebug_puts(scldebugc(H) scldebugc(J))
-#define scldebug_move(m_x,m_y)                                 scldebug_puts(scldebugc(m_y;m_x ## H))
+#define scldebug_move(m_x, m_y)                                        scldebug_puts(scldebugc(m_y;m_x ## H))
 #define scldebug_move_x(m_y)                                   scldebug_puts(scldebugc(;m_y ## H))
 #define scldebug_move_y(m_y)                                   scldebug_puts(scldebugc(m_y ## d))
-#define scldebug_puts_xy(m_x,m_y,m_message)    scldebug_puts(scldebugc(m_y;m_x ## H) m_message)
+#define scldebug_puts_xy(m_x, m_y, m_message)  scldebug_puts(scldebugc(m_y;m_x ## H) m_message)
 #define mc_normal              scldebugc(0m)
 #define mc_black               scldebugc(1;30m)
 #define mc_red                 scldebugc(1;31m)
index 16a26f2..ddb7643 100644 (file)
@@ -43,7 +43,6 @@ public:
     static CSCLErrorAdjustment* get_instance();
 
 private:
-
 public:
     void enable_touch_offset(sclboolean enable);
     sclboolean apply_touch_offset(SCLTouchOffsetLevel level, sclint *x, sclint *y);
index 83acaa4..61c9bec 100644 (file)
@@ -63,7 +63,6 @@ public :
     virtual void destroy_all_timer() = 0;
 
     virtual void generate_mouse_event(SCLMouseEvent type, scl16 x, scl16 y) = 0;
-
 };
 
 class CSCLEvents
index 1bbfccd..5400b6e 100644 (file)
@@ -51,9 +51,7 @@ public:
     sclboolean button_pressed(sclwindow window, sclbyte key_index);
     sclboolean button_moved(sclwindow window, sclbyte key_index);
     sclboolean button_released(sclwindow window, sclbyte key_index);
-
 protected:
-
 };
 
 }
index 345babf..67b47b4 100644 (file)
@@ -50,7 +50,6 @@ public :
     static CSCLGwes* get_instance();
 
 private:
-
 public:
     void init(sclwindow parent, scl16 width, scl16 height);
     void fini();
index a13acde..f8ba3f6 100644 (file)
@@ -121,7 +121,7 @@ private:
 #ifdef USING_KEY_GRAB
     bool m_keyboard_grabbed;
 #endif
-    bool sub_layout_match(sclchar *layout1,sclchar *layout2);
+    bool sub_layout_match(sclchar *layout1, sclchar *layout2);
 
     CSCLKeyFocusHandler();
 #ifdef TARGET_EMULATOR
@@ -129,7 +129,6 @@ private:
     void create_sniffer_window(void);
     void set_window_accepts_focus(const sclwindow window, sclboolean acceptable);
 #endif
-
 };
 
 }
index c99e71a..3c6e034 100644 (file)
@@ -100,7 +100,6 @@ private:
                                    SclButtonContext (*pCurButtonContext)[MAX_KEY]);
 
 protected:
-
     SclLayout mCurBaseLayout;
     SclLayoutKeyCoordinate mCurBaseLayoutKeyCoordinates[MAX_KEY];
 
index 3b41ee4..52e04fb 100644 (file)
@@ -66,7 +66,6 @@ private:
     sclboolean draw_magnifier_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 label_index, const sclchar* label);
 
 protected:
-
     /* Backend Primitive */
     CSCLGwes *m_gwes;
     CSCLUtils *m_utils;
index 2a8e0aa..07668e8 100644 (file)
@@ -32,7 +32,7 @@
 namespace scl
 {
 #define MAX_POPUP_WINDOW 1
-#define MAX_ZORDER_NUM ( MAX_POPUP_WINDOW + 1 ) /* Popup + Base */
+#define MAX_ZORDER_NUM (MAX_POPUP_WINDOW + 1 ) /* Popup + Base */
 
 #define SCL_WINDOW_Z_TOP 0
 
index 17cbde9..5b7a133 100644 (file)
@@ -51,5 +51,4 @@ CSCLActionState::reset()
 void
 CSCLActionState::clear_action_buf()
 {
-
 }
index 9382756..6bb04ce 100644 (file)
@@ -140,7 +140,7 @@ CSCLAnimator::destroy_animator(sclint id)
     }
 
     sclboolean destroy_timer = TRUE;
-    for(iter = m_animators.begin();iter != m_animators.end();std::advance(iter, 1)) {
+    for (iter = m_animators.begin();iter != m_animators.end();std::advance(iter, 1)) {
         if (iter != m_animators.end()) {
             SclAnimationState *state = &(iter->second);
             if (state->active) {
@@ -164,7 +164,7 @@ CSCLAnimator::find_animator_by_type(SCLAnimationType type)
 {
     sclint ret = NOT_USED;
 
-    for(std::map<sclint, SclAnimationState>::iterator iter = m_animators.begin();
+    for (std::map<sclint, SclAnimationState>::iterator iter = m_animators.begin();
         iter != m_animators.end();std::advance(iter, 1)) {
             if (iter != m_animators.end()) {
                 SclAnimationState *state = &(iter->second);
@@ -250,7 +250,7 @@ CSCLAnimator::stop_animator(sclint id)
     }
 
     sclboolean destroy_timer = TRUE;
-    for(iter = m_animators.begin();iter != m_animators.end();std::advance(iter, 1)) {
+    for (iter = m_animators.begin();iter != m_animators.end();std::advance(iter, 1)) {
         if (iter != m_animators.end()) {
             SclAnimationState *state = &(iter->second);
             if (state->active) {
@@ -327,7 +327,7 @@ sclboolean
 CSCLAnimator::animator_timer()
 {
     sclboolean destroy_timer = TRUE;
-    for(std::map<sclint, SclAnimationState>::iterator iter = m_animators.begin();
+    for (std::map<sclint, SclAnimationState>::iterator iter = m_animators.begin();
         iter != m_animators.end();std::advance(iter, 1)) {
             if (iter != m_animators.end()) {
                 CSCLWindows *windows = CSCLWindows::get_instance();
index f328dbe..050517a 100644 (file)
@@ -87,7 +87,7 @@ CSCLContext::reset()
 }
 
 sclshort
-CSCLContext::get_popup_layout( sclwindow window ) const
+CSCLContext::get_popup_layout(sclwindow window) const
 {
     SCL_DEBUG();
 
@@ -104,7 +104,7 @@ CSCLContext::get_popup_layout( sclwindow window ) const
 }
 
 void
-CSCLContext::set_popup_layout( sclwindow window, sclshort val )
+CSCLContext::set_popup_layout(clwindow window, sclshort val )
 {
     SCL_DEBUG();
 
@@ -118,7 +118,7 @@ CSCLContext::set_popup_layout( sclwindow window, sclshort val )
 }
 
 void
-CSCLContext::set_base_layout( sclshort val )
+CSCLContext::set_base_layout(sclshort val )
 {
     SCL_DEBUG();
     CSCLWindows *windows = CSCLWindows::get_instance();
@@ -272,7 +272,7 @@ CSCLContext::set_cur_moving_window(scltouchdevice touch_id, sclwindow window)
 struct timeval
 CSCLContext::get_cur_pressed_time(scltouchdevice touch_id)
 {
-    struct timeval ret = {0,0};
+    struct timeval ret = {0, 0};
     MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
     if (multi_touch_context) {
         ret = multi_touch_context->cur_pressed_time;
@@ -468,7 +468,7 @@ CSCLContext::create_multi_touch_context(scltouchdevice touch_id, sclboolean is_s
 
     CSCLUtils *utils = CSCLUtils::get_instance();
     if (utils) {
-        for(std::list<scltouchdevice>::iterator iter = m_multi_touch_seq.begin();iter != m_multi_touch_seq.end();std::advance(iter, 1)) {
+        for (std::list<scltouchdevice>::iterator iter = m_multi_touch_seq.begin();iter != m_multi_touch_seq.end();std::advance(iter, 1)) {
             utils->log("LIST : %d\n", *iter);
         }
         utils->log("\n");
@@ -532,7 +532,7 @@ CSCLContext::get_multi_touch_event(sclint order, SclUIEventDesc *desc)
 
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
 
-    for(std::list<scltouchdevice>::iterator list_iter = m_multi_touch_seq.begin();
+    for (std::list<scltouchdevice>::iterator list_iter = m_multi_touch_seq.begin();
         !ret && list_iter != m_multi_touch_seq.end();std::advance(list_iter, 1)) {
             if (index == order) {
                 MultiTouchContext *multi_touch_context = find_multi_touch_context(*list_iter);
@@ -578,7 +578,7 @@ CSCLContext::get_multi_touch_event_order(scltouchdevice touch_id)
     sclint ret = -1;
     sclint iSeqIndex = 0;
 
-    for(std::list<scltouchdevice>::iterator list_iter = m_multi_touch_seq.begin();
+    for (std::list<scltouchdevice>::iterator list_iter = m_multi_touch_seq.begin();
         (ret == -1) && list_iter != m_multi_touch_seq.end();std::advance(list_iter, 1)) {
             if (touch_id == (*list_iter)) {
                 ret = iSeqIndex;
index 63203b8..5d67bd7 100644 (file)
@@ -217,10 +217,9 @@ CSCLController::process_input_mode_change(const sclbyte mode)
         handle_engine_signal(SCL_SIG_INPMODE_CHANGE, window);
 
 #ifdef TEST_NEWBACKEND
-        SclWindowContext *window_context= windows->get_window_context(window, FALSE);
+        SclWindowContext *window_context = windows->get_window_context(window, FALSE);
         if (window_context) {
             if (window_context->etc_info) {
-
                 Eina_List *list = (Eina_List*)(window_context->etc_info);
                 Eina_List *iter = NULL;
                 Eina_List *iter_next = NULL;
@@ -240,12 +239,12 @@ CSCLController::process_input_mode_change(const sclbyte mode)
                             }
 
                             sclint loop;
-                            for(loop = 0;loop < g_ImageCache.size();loop++) {
+                            for (loop = 0;loop < g_ImageCache.size();loop++) {
                                 if (g_ImageCache[loop].image == object->object) {
                                     g_ImageCache[loop].used = FALSE;
                                 }
                             }
-                            for(loop = 0;loop < g_TextCache.size();loop++) {
+                            for (loop = 0;loop < g_TextCache.size();loop++) {
                                 if (g_TextCache[loop].text == object->object) {
                                     g_TextCache[loop].used = FALSE;
                                 }
@@ -261,7 +260,7 @@ CSCLController::process_input_mode_change(const sclbyte mode)
                     }
                     iIndex++;
                 }
-                window_context->etc_info= list;
+                window_context->etc_info = list;
             }
         }
 #endif
@@ -334,11 +333,10 @@ CSCLController::check_magnifier_available(sclwindow window, sclbyte key_index, s
             shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
         }
 
-        if (layout && coordinate && button_context && context->get_magnifier_enabled() ) {
+        if (layout && coordinate && button_context && context->get_magnifier_enabled()) {
             if (coordinate->key_type != KEY_TYPE_CONTROL &&
                 coordinate->key_type != KEY_TYPE_MODECHANGE &&
                 coordinate->key_type != KEY_TYPE_NONE) {
-
                     ret = TRUE;
 
                     /* Do not show if current layout does not allow magnifier */
@@ -349,7 +347,7 @@ CSCLController::check_magnifier_available(sclwindow window, sclbyte key_index, s
 
                     /* Do not show if there's nothing to show */
                     const sclchar* custom_label = NULL;
-                    for(sclint label_index = 0;label_index < MAX_SIZE_OF_LABEL_FOR_ONE && !custom_label;label_index++) {
+                    for (sclint label_index = 0;label_index < MAX_SIZE_OF_LABEL_FOR_ONE && !custom_label;label_index++) {
                         const sclchar *temp_label = context->get_custom_magnifier_label(touch_id, label_index);
                         if (temp_label) {
                             custom_label = temp_label;
@@ -432,12 +430,12 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                     sclint loop = 0;
                     sclint multi_touch_context_num = context->get_multi_touch_context_num();
                     std::vector<SclUIEventDesc> multi_touch_events;
-                    for(loop = 0;loop < multi_touch_context_num;loop++) {
+                    for (loop = 0;loop < multi_touch_context_num;loop++) {
                         SclUIEventDesc desc;
                         context->get_multi_touch_event(loop, &desc);
                         multi_touch_events.push_back(desc);
                     }
-                    for(loop = 0;loop < multi_touch_context_num;loop++) {
+                    for (loop = 0;loop < multi_touch_context_num;loop++) {
                         SclUIEventDesc desc = multi_touch_events[loop];
                         if (desc.touch_id != touch_id) {
                             mouse_release(context->get_cur_moving_window(desc.touch_id),
@@ -566,7 +564,7 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                                 //popupRect.width = utils->get_scale_x(layout->width);
                                 //popupRect.height= utils->get_scale_y(layout->height);
                                 popupRect.width = layout->width;
-                                popupRect.height= layout->height;
+                                popupRect.height = layout->height;
                                 windows->close_all_popups();
 
                                 SclWindowOpener opener;
@@ -582,8 +580,7 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                                     sclres_input_mode_configure[popup_input_mode].use_dim_window,
                                     coordinate->extract_offset_x,
                                     coordinate->extract_offset_y,
-                                    sclres_input_mode_configure[popup_input_mode].timeout
-                                    );
+                                    sclres_input_mode_configure[popup_input_mode].timeout);
 
                                 SclNotiPopupOpenedDesc opened_desc;
                                 opened_desc.ui_event_desc = &key_event_desc;
@@ -624,7 +621,7 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                     magnifier_configure = sclres_manager->get_magnifier_configure();
                 }
                 if (showMagnifier && magnifier_configure) {
-                    SclPoint pos = {0,0};
+                    SclPoint pos = {0, 0};
                     /* calculates x position to be set */
                     pos.x = (coordinate->x + (coordinate->width / 2)) -
                         (magnifier_configure->width * utils->get_custom_scale_rate_x() / 2);
@@ -802,7 +799,6 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
         if (coordinate) {
             if (coordinate->popup_type == POPUP_TYPE_BTN_LONGPRESS_POPUP ||
                 coordinate->popup_type == POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE ) {
-
                     SclUIEventDesc key_event_desc;
                     key_event_desc.key_type = coordinate->long_key_type;
                     if (coordinate->long_key_value == NULL && coordinate->long_key_event == 0) {
@@ -860,7 +856,7 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                                     //popupRect.width = utils->get_scale_x(layout->width);
                                     //popupRect.height= utils->get_scale_y(layout->height);
                                     popupRect.width = layout->width;
-                                    popupRect.height= layout->height;
+                                    popupRect.height = layout->height;
 
                                     SclWindowOpener opener;
                                     opener.window = window;
@@ -876,8 +872,7 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                                         sclres_input_mode_configure[popup_input_mode].use_dim_window,
                                         coordinate->extract_offset_x,
                                         coordinate->extract_offset_y,
-                                        sclres_input_mode_configure[popup_input_mode].timeout
-                                        );
+                                        sclres_input_mode_configure[popup_input_mode].timeout);
 
                                     SclNotiPopupOpenedDesc opened_desc;
                                     opened_desc.ui_event_desc = &key_event_desc;
@@ -907,7 +902,7 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                         }
                         if (coordinate->use_long_key_magnifier && magnifier_configure) {
                             CSCLUtils *utils = CSCLUtils::get_instance();
-                            SclPoint pos = {0,0};
+                            SclPoint pos = {0, 0};
 
                             const SclLayout* layout = cache->get_cur_layout(window);
                             if (layout) {
@@ -937,7 +932,7 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                                 pos.y += coordinate->magnifier_offset_y;
                                 windows->move_window(windows->get_magnifier_window(), pos.x, pos.y);
                                 windows->update_window(windows->get_magnifier_window());
-                                windows->show_window(windows->get_magnifier_window(),TRUE);
+                                windows->show_window(windows->get_magnifier_window(), TRUE);
                             }
                         }
 
@@ -1112,7 +1107,7 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                 return FALSE;
             }
 
-            if (key_index != pressed_key || window != pressed_window ) {
+            if (key_index != pressed_key || window != pressed_window) {
                 /* When the focus has moved to another button, destroy all the timers */
                 events->destroy_all_timer();
 
@@ -1139,7 +1134,7 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                             magnifier_configure = sclres_manager->get_magnifier_configure();
                         }
                         if (showMagnifier && magnifier_configure) {
-                            SclPoint pos = {0,0};
+                            SclPoint pos = {0, 0};
                             /* calculates x position to be set */
                             pos.x = (coordinate->x + (coordinate->width / 2)) -
                                 (magnifier_configure->width * utils->get_custom_scale_rate_x() / 2);
@@ -1175,7 +1170,7 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                         if (pressed_context) {
                             /* But, if this button should be in pressed state in other multitouch id, do not initialize it */
                             sclboolean found = FALSE;
-                            for(sclint loop = 0;loop < context->get_multi_touch_context_num() && !found;loop++) {
+                            for (sclint loop = 0;loop < context->get_multi_touch_context_num() && !found;loop++) {
                                 SclUIEventDesc desc;
                                 context->get_multi_touch_event(loop, &desc);
                                 if (desc.touch_id != touch_id) {
@@ -1233,7 +1228,7 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                             }
                             sclboolean processed = handler->on_event_drag_state_changed(key_event_desc);
                             if (processed && context->get_magnifier_enabled() && magnifier_configure) {
-                                SclPoint zoomwinpos = {0,0};
+                                SclPoint zoomwinpos = {0, 0};
                                 /* calculates x position to be set */
                                 zoomwinpos.x = (coordinate->x + (coordinate->width / 2)) -
                                     (magnifier_configure->width * utils->get_custom_scale_rate_x() / 2);
@@ -1365,12 +1360,12 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y,
     SclButtonContext *button_context = NULL;
 
     const SclLayoutKeyCoordinate *coordinate = NULL;
-    if(cache) {
+    if (cache) {
         coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
         button_context = cache->get_cur_button_context(window, key_index);
     }
 
-    if(button_context && coordinate && feedback && utils && context && cache && events && windows) {
+    if (button_context && coordinate && feedback && utils && context && cache && events && windows) {
        /* If this key is the key previously pressed, add threshold value for avoiding unintended moving */
         sclboolean subLayoutMatch = TRUE;
         if (coordinate->sub_layout && context->get_cur_sublayout()) {
@@ -1397,12 +1392,12 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y,
             scl8 highlighted_key = context->get_cur_highlighted_key();
             SclButtonContext *cur_context = cache->get_cur_button_context(window, key_index);
 
-            if(cur_context == NULL) {
+            if (cur_context == NULL) {
                 return FALSE;
             }
-            if (key_index != highlighted_key || window != highlighted_window ) {
+            if (key_index != highlighted_key || window != highlighted_window) {
                 SECURE_LOGD("%d != %d || %p != %p", key_index, highlighted_key, window, highlighted_window);
-                if(layout) {
+                if (layout) {
                     if (coordinate->key_type != KEY_TYPE_NONE) {
                         if (context->get_tts_enabled()) {
                             const sclchar *targetstr = coordinate->hint_string[shift_index][button_context->multikeyIdx];
@@ -1576,12 +1571,12 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                  sclint loop = 0;
                  sclint multi_touch_context_num = context->get_multi_touch_context_num();
                  std::vector<SclUIEventDesc> multi_touch_events;
-                 for(loop = 0;loop < multi_touch_context_num;loop++) {
+                 for (loop = 0;loop < multi_touch_context_num;loop++) {
                      SclUIEventDesc desc;
                      context->get_multi_touch_event(loop, &desc);
                      multi_touch_events.push_back(desc);
                  }
-                 for(loop = 0;loop < multi_touch_context_num && !finished;loop++) {
+                 for (loop = 0;loop < multi_touch_context_num && !finished;loop++) {
                      SclUIEventDesc desc = multi_touch_events[loop];
                      if (desc.touch_id != touch_id) {
                          sclwindow cur_pressed_window = context->get_cur_pressed_window(desc.touch_id);
@@ -1812,7 +1807,6 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                     case BUTTON_TYPE_UIITEM: break;
                     case MAX_BUTTON_TYPE: break;
                     default: break;
-
                     }
                     switch (coordinate->popup_type) {
                     case POPUP_TYPE_BTN_RELEASE_POPUP:
@@ -1841,7 +1835,7 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                                 scl_check_arrindex(display_mode, DISPLAYMODE_MAX)) {
                                 sclshort popupLayoutId =
                                     sclres_manager->get_layout_id(sclres_input_mode_configure[popup_input_mode].layouts[display_mode]);
-                                if (popupLayoutId == NOT_USED){
+                                if (popupLayoutId == NOT_USED) {
                                     // deal with NOT_USED
                                     LOGD("popupLayoutID is not used.");
                                 }
@@ -1861,7 +1855,7 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                                     //popupRect.width = utils->get_scale_x(layout->width);
                                     //popupRect.height= utils->get_scale_y(layout->height);
                                     popupRect.width = layout->width;
-                                    popupRect.height= layout->height;
+                                    popupRect.height = layout->height;
 
                                     /* Let's make sure this popup window does not go beyond the screen area */
                                     sclint scr_w, scr_h;
@@ -1888,8 +1882,7 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                                         sclres_input_mode_configure[popup_input_mode].use_dim_window,
                                         coordinate->extract_offset_x,
                                         coordinate->extract_offset_y,
-                                        sclres_input_mode_configure[popup_input_mode].timeout
-                                        );
+                                        sclres_input_mode_configure[popup_input_mode].timeout);
 
                                     SclNotiPopupOpenedDesc opened_desc;
                                     opened_desc.ui_event_desc = &key_event_desc;
@@ -1950,7 +1943,7 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
         if (button_context->state == BUTTON_STATE_PRESSED) {
             /* But, if this button should be in pressed state in other multitouch id, do not initialize */
             sclboolean found = FALSE;
-            for(sclint loop = 0;loop < context->get_multi_touch_context_num() && !found;loop++) {
+            for (sclint loop = 0;loop < context->get_multi_touch_context_num() && !found;loop++) {
                 SclUIEventDesc desc;
                 context->get_multi_touch_event(loop, &desc);
                 if (desc.touch_id != touch_id) {
@@ -2020,7 +2013,7 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
         if (windows->is_base_window(window)) {
             SclWindowContext *dim_window_context = windows->get_window_context(windows->get_dim_window());
             if (dim_window_context) {
-                LOGD ("dim window is_virtual:%d, hidden:%d", dim_window_context->is_virtual, dim_window_context->hidden);
+                LOGD("dim window is_virtual:%d, hidden:%d", dim_window_context->is_virtual, dim_window_context->hidden);
                 if (/*dim_window_context->is_virtual &&*/ !(dim_window_context->hidden)) {
                     window = windows->get_dim_window();
                     window_context = dim_window_context;
@@ -2064,7 +2057,7 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
         context->set_last_touch_device_id(touch_id);
         context->set_cur_drag_state(touch_id, SCL_DRAG_STATE_NONE);
         context->set_cur_key_modifier(touch_id, KEY_MODIFIER_NONE);
-        for(sclint labelidx = 0;labelidx < MAX_SIZE_OF_LABEL_FOR_ONE;labelidx++) {
+        for (sclint labelidx = 0;labelidx < MAX_SIZE_OF_LABEL_FOR_ONE;labelidx++) {
             context->set_custom_magnifier_label(touch_id, labelidx, NULL);
         }
 
@@ -3049,7 +3042,7 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
 
                 const SclLayout *base_layout = cache->get_cur_layout(windows->get_base_window());
                 if (base_layout && magnifier_configure) {
-                    SclPoint zoomwinpos = {0,0};
+                    SclPoint zoomwinpos = {0, 0};
                     /* calculates x position to be set */
                     zoomwinpos.x = (coordinate->x + (coordinate->width / 2)) -
                         (magnifier_configure->width * utils->get_custom_scale_rate_x() / 2);
@@ -3214,7 +3207,7 @@ CSCLController::mouse_over(sclwindow window, sclint x, sclint y)
     SCL_DEBUG();
     sclboolean ret = FALSE;
 
-    if(m_input_events_disabled)
+    if (m_input_events_disabled)
         return FALSE;
 
     /* Adjust x,y coordinate by touch offset */
@@ -3308,7 +3301,7 @@ CSCLController::timer_event(const scl32 data)
             return FALSE;
         }
 
-        SclRectangle rect = {0,0,0,0};
+        SclRectangle rect = {0, 0, 0, 0};
         sclwindow window = context->get_cur_pressed_window(context->get_last_touch_device_id());
         sclbyte key_index = context->get_cur_pressed_key(context->get_last_touch_device_id());
 
@@ -3346,8 +3339,7 @@ CSCLController::timer_event(const scl32 data)
                         NOT_USED,
                         SCL_LAYOUT_AUTOPOPUP, POPUP_TYPE_AUTO_POPUP,
                         FALSE,
-                        FALSE
-                        );
+                        FALSE);
 
                     SclNotiPopupOpenedDesc opened_desc;
                     opened_desc.ui_event_desc = NULL;
@@ -3565,7 +3557,7 @@ CSCLController::timer_event(const scl32 data)
 }
 
 /* Handles signals to manage contexts mainly focusing on resetting variables and cleaning up states */
-void CSCLController::handle_engine_signal( SclInternalSignal signal, sclwindow targetWindow )
+void CSCLController::handle_engine_signal(SclInternalSignal signal, sclwindow targetWindow )
 {
     SCL_DEBUG();
 
@@ -3686,7 +3678,6 @@ void CSCLController::handle_engine_signal( SclInternalSignal signal, sclwindow t
             case SIGACTION_UNSET_SHIFT: {
                 CSCLEventHandler *handler = CSCLEventHandler::get_instance();
                 if (handler) {
-
                     SclNotiShiftStateChangeDesc desc;
                     desc.ui_event_desc = NULL;
                     desc.shift_state = SCL_SHIFT_STATE_OFF;
@@ -3831,7 +3822,6 @@ CSCLController::configure_autopopup_window(sclwindow window, sclbyte key_index,
 
         if (utils->get_autopopup_window_variables(coordinate->autopopup_key_labels[shift_index],
                 &num_keys, &num_columns, &num_rows, &rect->width, &rect->height)) {
-
             /* There is no need for an autopopup window if number of keys are equal to or less than 0 */
             if (!(num_keys > 0)) {
                 ret = FALSE;
index 38f982c..3c60eb2 100644 (file)
@@ -76,7 +76,7 @@ float SCL_DEBUG_ELAPASED_TIME(const char* fileStr, int line, const char* str, in
         gettimeofday(&s_tv2, NULL);
         s_end_line = line;
         char printStr[100];
-        sprintf(printStr,"%s(Line:%d~%d)", str, s_start_line, s_end_line);
+        sprintf(printStr, "%s(Line:%d~%d)", str, s_start_line, s_end_line);
         _SCL_DEBUG_ELAPASED_TIME(printStr, s_tv1, s_tv2);
     }
 }
index 34d1392..5b83ada 100644 (file)
@@ -65,7 +65,7 @@ CSCLErrorAdjustment::apply_touch_offset(SCLTouchOffsetLevel level, sclint *x, sc
     pos = events->get_touch_event_offset();
 
     if (m_enabled) {
-        if (level == TOUCH_OFFSET_LEVEL_1 ) {
+        if (level == TOUCH_OFFSET_LEVEL_1) {
             *x = *x + utils->get_scaled_x(pos->x);
         } else if (level == TOUCH_OFFSET_LEVEL_2) {
             *x = *x + utils->get_scaled_x(pos->x);
index 98f072d..2e28f47 100644 (file)
@@ -88,7 +88,7 @@ CSCLEvents* CSCLEvents::get_instance()
 }
 
 void
-CSCLEvents::connect_window_events( sclwindow wnd, const sclint evt )
+CSCLEvents::connect_window_events(sclwindow wnd, const sclint evt )
 {
     CSCLWindows *windows = CSCLWindows::get_instance();
     //SclWindowContext *window_context = windows->get_window_context(wnd, FALSE);
@@ -118,7 +118,7 @@ CSCLEvents::process_key_event(const char *key)
     const char *keyname = key;
     LOGD("=-=-=-=- key_pressed \n");
     CSCLController *controller = CSCLController::get_instance();
-    LOGD("=-=-=-=- keyname(char) = %s \n",keyname);
+    LOGD("=-=-=-=- keyname(char) = %s \n", keyname);
 
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
     const SclLayoutKeyCoordinate *prevcoordinate = NULL;
@@ -148,7 +148,7 @@ CSCLEvents::process_key_event(const char *key)
         focus_handler->process_navigation(HIGHLIGHT_NAVIGATE_DOWN);
         focus_window = focus_handler->get_current_focus_window();
         key_index = focus_handler->get_current_focus_key();
-    } else if ((strcmp(keyname, "Return") == 0)||(strcmp(keyname, "Enter") == 0)) {
+    } else if ((strcmp(keyname, "Return") == 0) || (strcmp(keyname, "Enter") == 0)) {
         coordinate = cache->get_cur_layout_key_coordinate(current_focus_window, current_key_index);
         //button_context->state = BUTTON_STATE_NORMAL;
         if (coordinate && controller) {
@@ -175,7 +175,7 @@ CSCLEvents::process_key_event(const char *key)
         //button_context->state = BUTTON_STATE_PRESSED;
         if (coordinate && prevcoordinate) {
             if (current_focus_window == focus_window) {
-                sclshort x,y,width,height;
+                sclshort x, y, width, height;
                 if (prevcoordinate->x < coordinate->x) {
                     x = prevcoordinate->x;
                 } else {
index 2c83d1b..6f6c87e 100644 (file)
@@ -104,7 +104,7 @@ CSCLKeyFocusHandler::ungrab_keyboard(const sclwindow parent)
     Display *x_display = (Display *)ecore_x_display_get();
     int grab_result;
     grab_result = utilx_ungrab_key(x_display, x_window, "Return");
-    if(0 == grab_result) {
+    if (0 == grab_result) {
         LOGD("Return Key UnGrabbed successfully\n");
     } else {
         LOGD("Failed to UnGrab Return key\n");
@@ -119,7 +119,6 @@ CSCLKeyFocusHandler::ungrab_keyboard(const sclwindow parent)
 void
 CSCLKeyFocusHandler::popup_opened(sclwindow window)
 {
-
 }
 
 void
@@ -171,7 +170,7 @@ CSCLKeyFocusHandler::reset_key_navigation_info(sclwindow window)
  * Compares the sub-layout values
  */
 inline bool
-CSCLKeyFocusHandler::sub_layout_match(sclchar *layout1,sclchar *layout2)
+CSCLKeyFocusHandler::sub_layout_match(sclchar *layout1, sclchar *layout2)
 {
     if (layout1) {
         if (layout2) {
@@ -193,7 +192,6 @@ CSCLKeyFocusHandler::sub_layout_match(sclchar *layout1,sclchar *layout2)
 void
 CSCLKeyFocusHandler::update_key_navigation_info(sclwindow window, scl8 index, SclLayoutKeyCoordinatePointer p_next_key)
 {
-
 }
 
 /**
@@ -202,7 +200,6 @@ CSCLKeyFocusHandler::update_key_navigation_info(sclwindow window, scl8 index, Sc
 void
 CSCLKeyFocusHandler::finalize_key_navigation_info(sclwindow window)
 {
-
 }
 
 /**
@@ -211,7 +208,6 @@ CSCLKeyFocusHandler::finalize_key_navigation_info(sclwindow window)
 void
 CSCLKeyFocusHandler::init_key_index()
 {
-
 }
 
 /**
@@ -233,10 +229,10 @@ CSCLKeyFocusHandler::get_current_focus_window(void)
 }
 
 #ifndef min
-#define min(a,b)    (((a) < (b)) ? (a) : (b))
+#define min(a, b)    (((a) < (b)) ? (a) : (b))
 #endif
 #ifndef max
-#define max(a,b)    (((a) > (b)) ? (a) : (b))
+#define max(a, b)    (((a) > (b)) ? (a) : (b))
 #endif
 /* If 2 lines overlap, this will return minus value of overlapping length,
     and return positive distance value otherwise */
@@ -304,7 +300,7 @@ CSCLKeyFocusHandler::get_next_candidate_key(SCLHighlightNavigationDirection dire
                 int temp_distance_x;
                 int temp_distance_y;
 
-                switch(direction) {
+                switch (direction) {
                     case HIGHLIGHT_NAVIGATE_LEFT:
                         temp_distance_y = calculate_distance(btn.y, btn.y + btn.height, cur.y, cur.y + cur.height);
                         //if (temp_distance_y <= candidate_distance_y) {
@@ -622,7 +618,7 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
             if (animator) {
                 sclboolean start_animation = FALSE;
                 if (windows->is_base_window(desc.window_to) && windows->is_base_window(desc.window_from)) {
-                    if(desc.key_to != desc.key_from) {
+                    if (desc.key_to != desc.key_from) {
                         start_animation = TRUE;
                     }
                 } else {
@@ -659,8 +655,8 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
 
                         SclRectangle prev_rect;
                         SclRectangle next_rect;
-                        copy_rectangle( prev_coordinate, &(prev_rect) );
-                        copy_rectangle( next_coordinate, &(next_rect) );
+                        copy_rectangle(prev_coordinate, &(prev_rect));
+                        copy_rectangle(next_coordinate, &(next_rect));
 
                         if (windows->is_base_window(desc.window_from)) {
                             prev_rect.x += cache->get_custom_starting_coordinates().x;
@@ -753,7 +749,7 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
 /**
  * callback for window show event (sniffer window)
  */
-static void sniffer_window_show_cb (void *data, Evas *e, Evas_Object *obj, void *event)
+static void sniffer_window_show_cb(void *data, Evas *e, Evas_Object *obj, void *event)
 {
     LOGD("INSIDE =-=-=-=- x_event_sniffer_window_show_cb, Trying to Grab Key Board : \n");
 #ifndef WAYLAND
@@ -781,7 +777,7 @@ CSCLKeyFocusHandler::create_sniffer_window(void)
     elm_win_borderless_set(win, EINA_TRUE);
     elm_win_alpha_set(win, EINA_FALSE);
     elm_win_title_set(win, "KEY_SNIFFER");
-    elm_win_fullscreen_set(win,EINA_FALSE);
+    elm_win_fullscreen_set(win, EINA_FALSE);
     set_window_accepts_focus(win, FALSE);
     evas_object_show(win);
     evas_object_resize(win, 100, 100);
index c156dfb..62b5164 100644 (file)
@@ -269,7 +269,7 @@ CSCLResourceCache::resize_resource_elements_by_resolution()
             /* FIXME */
             //for (loop = 0;loop < MODIFIER_DECORATION_NUM;loop++) {
             for (loop = 0;loop < MAX_SCL_MODIFIER_DECORATION_NUM;loop++) {
-                for(innerLoop = 0;innerLoop < KEY_MODIFIER_MAX;innerLoop++) {
+                for (innerLoop = 0;innerLoop < KEY_MODIFIER_MAX;innerLoop++) {
                     sclchar *temp;
                     temp = sclres_modifier_decoration[loop].bg_image_path[0][innerLoop];
                     sclres_modifier_decoration[loop].bg_image_path[0][innerLoop] = sclres_modifier_decoration[loop].bg_image_path[1][innerLoop];
@@ -818,7 +818,6 @@ CSCLResourceCache::remove_private_key(sclint id)
                     SclLayoutKeyCoordinatePointer the_key = mCurBaseLayoutKeyCoordinates + loop;
                     assert(the_key != NULL);
                     memcpy(the_key, p, sizeof(SclLayoutKeyCoordinate));
-
                 }
             }
         }
@@ -1088,7 +1087,7 @@ CSCLResourceCache::get_label_properties(sclchar *label_type, sclbyte index) cons
     if (sclres_label_properties && label_type) {
         /* FIXME */
         //if (scl_check_arrindex(labeltype, MAX_LABEL_PROPERTIES) && scl_check_arrindex(index, MAX_SIZE_OF_LABEL_FOR_ONE)) {
-        for(sclshort labeltype = 0;
+        for (sclshort labeltype = 0;
             labeltype < MAX_SCL_LABEL_PROPERTIES && labeltype < sclres_manager->get_labelproperty_size();
             labeltype++) {
                 if (sclres_label_properties[labeltype][0].label_type) {
@@ -1135,7 +1134,7 @@ CSCLResourceCache::get_cur_button_context(sclwindow window, sclbyte key_index)
 }
 
 /* Generate and fill autopopup layout data */
-void CSCLResourceCache::generate_autopopup_layout( const SclLayoutKeyCoordinate *coordinate,
+void CSCLResourceCache::generate_autopopup_layout(const SclLayoutKeyCoordinate *coordinate,
         SclLayout *pCurLayout, SclLayoutKeyCoordinate (*pCurLayoutKeyCoordinates)[MAX_KEY],
         SclButtonContext (*pCurButtonContext)[MAX_KEY] )
 {
@@ -1410,7 +1409,7 @@ void CSCLResourceCache::generate_autopopup_layout( const SclLayoutKeyCoordinate
 * Sets the current theme name
 */
 sclboolean
-CSCLResourceCache::set_cur_themename( const sclchar *themename )
+CSCLResourceCache::set_cur_themename(const sclchar *themename)
 {
     if (themename) {
         strncpy(mCurThemename, themename, _POSIX_PATH_MAX - 1);
@@ -1573,7 +1572,7 @@ CSCLResourceCache::unset_private_key(const sclchar* custom_id)
 {
     int loop;
     if (custom_id) {
-        for(loop = 0;loop < MAX_PRIVATE_KEY;loop++) {
+        for (loop = 0;loop < MAX_PRIVATE_KEY;loop++) {
             if (mPrivateKeyProperties[loop].valid &&
                 mPrivateKeyProperties[loop].custom_id.compare(custom_id) == 0) {
                 remove_private_key(loop);
index 286d8f3..8755ebf 100644 (file)
@@ -416,7 +416,7 @@ CSCLUI::set_custom_starting_coordinates_option(SCLStartingCoordinatesOption opti
 SclRectangle
 CSCLUI::get_main_window_rect()
 {
-    SclRectangle ret = {0,0,0,0};
+    SclRectangle ret = {0, 0, 0, 0};
 
     if (m_impl) {
         ret = m_impl->get_main_window_rect();
@@ -431,7 +431,7 @@ CSCLUI::get_main_window_rect()
 SclSize
 CSCLUI::get_input_mode_size(const sclchar *input_mode, SCLDisplayMode display_mode)
 {
-    SclSize ret = {0,0};
+    SclSize ret = {0, 0};
 
     if (m_impl) {
         ret = m_impl->get_input_mode_size(input_mode, display_mode);
index d5ddf27..da95e1d 100644 (file)
@@ -104,8 +104,7 @@ CSCLUIBuilder::init(sclwindow parent)
         }
         m_gwes->init(parent,
                     m_utils->get_scaled_x(sclres_layout[layout].width),
-                    m_utils->get_scaled_y(sclres_layout[layout].height)
-                   );
+                    m_utils->get_scaled_y(sclres_layout[layout].height));
 
         CSCLContext *context = CSCLContext::get_instance();
         context->set_display_mode(display_mode);
@@ -239,7 +238,7 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                             cached_info.nine_patch_top = info_cache->bg_image_path[BUTTON_STATE_NORMAL].top;
                             cached_info.nine_patch_bottom = info_cache->bg_image_path[BUTTON_STATE_NORMAL].bottom;*/
 
-                            sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+                            sclchar composed_path[_POSIX_PATH_MAX] = {0, };
                             m_utils->get_composed_path(composed_path, IMG_PATH_PREFIX, layout->image_path[BUTTON_STATE_NORMAL]);
                             // Temporary testing for EFL backend.. Otherwise the background image covers other buttons
                             if (window_context && (x + y + width + height == 0)) {
@@ -282,7 +281,7 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                     }
 
                     if (draw_highlight_ui && context->get_highlight_ui_enabled()) {
-                        sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+                        sclchar composed_path[_POSIX_PATH_MAX] = {0, };
                         const SclLayoutKeyCoordinate *coordinate = NULL;
                         scl8 current_key_index = focus_handler->get_current_focus_key();
                         coordinate = cache->get_cur_layout_key_coordinate(window, current_key_index);
@@ -472,7 +471,7 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
         /* for image label  */
         if (coordinate->image_label_path[shift][state]) {
             if (strlen(coordinate->image_label_path[shift][state]) > 0) {
-                sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+                sclchar composed_path[_POSIX_PATH_MAX] = {0, };
                 m_utils->get_composed_path(composed_path, IMG_PATH_PREFIX, coordinate->image_label_path[shift][state]);
 
                 SclSize imgSize = m_gwes->m_graphics->get_image_size(composed_path);
@@ -491,7 +490,7 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                     imgSize.height = coordinate->height;
                 }
 
-                SclPoint pos = {0,0};
+                SclPoint pos = {0, 0};
                 const SclLabelProperties *labelproperties = cache->get_label_properties(coordinate->image_label_type, 0);
                 if (labelproperties) {
                     SCLLabelAlignment align = labelproperties->alignment;
@@ -542,8 +541,7 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                     pos.x + targetaddx,
                     pos.y + targetaddy,
                     imgSize.width,
-                    imgSize.height
-                );
+                    imgSize.height);
             }
         }
 
@@ -613,8 +611,7 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                             labelproperties->padding_x * utils->get_custom_scale_rate_x(),
                             labelproperties->padding_y * utils->get_custom_scale_rate_y(),
                             labelproperties->inner_width * utils->get_custom_scale_rate_x(),
-                            labelproperties->inner_height * utils->get_custom_scale_rate_y()
-                        );
+                            labelproperties->inner_height * utils->get_custom_scale_rate_y());
                     }
                     graphics->draw_text(
                         targetwin,
@@ -631,8 +628,7 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                         labelproperties->padding_x * utils->get_custom_scale_rate_x(),
                         labelproperties->padding_y * utils->get_custom_scale_rate_y(),
                         labelproperties->inner_width * utils->get_custom_scale_rate_x(),
-                        labelproperties->inner_height * utils->get_custom_scale_rate_y()
-                    );
+                        labelproperties->inner_height * utils->get_custom_scale_rate_y());
                 }
             }
         }
@@ -753,7 +749,7 @@ CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx dr
 
     scl_assert_return_false(state >= BUTTON_STATE_NORMAL && state < SCL_BUTTON_STATE_MAX);
 
-    sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+    sclchar composed_path[_POSIX_PATH_MAX] = {0, };
 
     if (context && graphics && cache && coordinate) {
         sclboolean path_composed = FALSE;
@@ -832,8 +828,7 @@ CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx dr
                 (sclint)targetx,
                 (sclint)targety,
                 (sclint)coordinate->width,
-                (sclint)coordinate->height
-                );
+                (sclint)coordinate->height);
         //}
     }
 
@@ -866,7 +861,7 @@ CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldraw
     //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
     SclWindowContext *window_context = windows->get_window_context(window);
 
-    sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+    sclchar composed_path[_POSIX_PATH_MAX] = {0, };
     if (context && cache && coordinate && window_context) {
         sclboolean path_composed = FALSE;
         /* Check if we need to decorate the button's drag state */
@@ -945,8 +940,7 @@ CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldraw
                 window_context->layout_image_offset.y + (sclint)coordinate->y,
                 (sclint)coordinate->width,
                 (sclint)coordinate->height,
-                TRUE
-            );
+                TRUE);
         //}
     }
     return TRUE;
@@ -1019,7 +1013,7 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
             }
         }
         const sclchar* customstr = NULL;
-        for(sclint label_index = 0;label_index < MAX_SIZE_OF_LABEL_FOR_ONE && !customstr;label_index++) {
+        for (sclint label_index = 0;label_index < MAX_SIZE_OF_LABEL_FOR_ONE && !customstr;label_index++) {
             const sclchar *tempstr = context->get_custom_magnifier_label(context->get_last_touch_device_id(), label_index);
             if (tempstr) {
                 customstr = tempstr;
@@ -1042,7 +1036,7 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
     }
 
 #if 0
-    SclPoint pos = {0,0};
+    SclPoint pos = {0, 0};
     /* calculates x position to be set */
     pos.x = (coordinate->x + (coordinate->width / 2)) - (utils->get_scale_x(scl_magnifier_configure.width) / 2);
 
@@ -1059,7 +1053,7 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
         magnifier_configure = sclres_manager->get_magnifier_configure();
     }
     if (coordinate && magnifier_configure) {
-        sclchar composed_path[_POSIX_PATH_MAX] = {0,};
+        sclchar composed_path[_POSIX_PATH_MAX] = {0, };
         if (state && state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY) {
             m_utils->get_composed_path(composed_path, IMG_PATH_PREFIX, magnifier_configure->bg_long_key_image_path);
             m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, 0, 0,
@@ -1085,7 +1079,7 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
         }
 
         sclboolean ended = FALSE;
-        for(int loop = 0;loop < MAX_SIZE_OF_LABEL_FOR_ONE && !ended;loop++) {
+        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);
             if (labelproperties) {
                 if (labelproperties->valid) {
@@ -1136,7 +1130,6 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
     }
 
     return TRUE;
-
 }
 
 
@@ -1197,8 +1190,7 @@ CSCLUIBuilder::draw_magnifier_label(const sclwindow window, const scldrawctx dra
                     labelproperties->padding_x * utils->get_custom_scale_rate_x(),
                     labelproperties->padding_y * utils->get_custom_scale_rate_y(),
                     labelproperties->inner_width * utils->get_custom_scale_rate_x(),
-                    labelproperties->inner_height * utils->get_custom_scale_rate_y()
-                );
+                    labelproperties->inner_height * utils->get_custom_scale_rate_y());
             }
         }
     }
index 90f34ea..ca9f97b 100644 (file)
@@ -738,7 +738,7 @@ CSCLUIImpl::set_custom_starting_coordinates_option(SCLStartingCoordinatesOption
 SclRectangle
 CSCLUIImpl::get_main_window_rect()
 {
-    SclRectangle ret = {0,0,0,0};
+    SclRectangle ret = {0, 0, 0, 0};
 
     if (m_initialized) {
         CSCLResourceCache *cache = CSCLResourceCache::get_instance();
@@ -764,7 +764,7 @@ CSCLUIImpl::get_main_window_rect()
 SclSize
 CSCLUIImpl::get_input_mode_size(const sclchar *input_mode, SCLDisplayMode display_mode)
 {
-    SclSize ret = {0,0};
+    SclSize ret = {0, 0};
 
     if (m_initialized) {
         CSCLUtils *utils = CSCLUtils::get_instance();
index e33b54a..fd54ac1 100644 (file)
@@ -400,7 +400,7 @@ CSCLUtils::is_rect_overlap(SclRectangle rect1, SclRectangle rect2)
 }
 
 sclfloat
-CSCLUtils::get_distance( sclint x1, sclint y1, sclint x2, sclint y2 )
+CSCLUtils::get_distance(sclint x1, sclint y1, sclint x2, sclint y2)
 {
     sclint dx = x1 - x2;
     sclint dy = y1 - y2;
@@ -408,13 +408,13 @@ CSCLUtils::get_distance( sclint x1, sclint y1, sclint x2, sclint y2 )
 }
 
 sclfloat
-CSCLUtils::get_distance( SclPoint pt1, SclPoint pt2 )
+CSCLUtils::get_distance(SclPoint pt1, SclPoint pt2)
 {
     return get_distance(pt1.x, pt1.y, pt2.x, pt2.y);
 }
 
 sclfloat
-CSCLUtils::get_approximate_distance( sclint x1, sclint y1, sclint x2, sclint y2 )
+CSCLUtils::get_approximate_distance(sclint x1, sclint y1, sclint x2, sclint y2)
 {
     sclint dx = abs(x1 - x2);
     sclint dy = abs(y1 - y2);
@@ -422,7 +422,7 @@ CSCLUtils::get_approximate_distance( sclint x1, sclint y1, sclint x2, sclint y2
 }
 
 sclfloat
-CSCLUtils::get_approximate_distance( SclPoint pt1, SclPoint pt2 )
+CSCLUtils::get_approximate_distance(SclPoint pt1, SclPoint pt2)
 {
     return get_approximate_distance(pt1.x, pt1.y, pt2.x, pt2.y);
 }
@@ -445,7 +445,6 @@ CSCLUtils::get_nine_patch_info(const sclchar *image_path)
             finished = TRUE;
         }
     }
-    
     SclResParserManager *sclres_manager = SclResParserManager::get_instance();
     if (sclres_manager) {
         if (sclres_manager->get_nine_patch_info(buf, &ret)) {
index ddb6998..801e960 100644 (file)
@@ -274,7 +274,7 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
 
 bool CSCLWindows::close_popup(sclwindow window)
 {
-    LOGD("close_popup window (%p)",window);
+    LOGD("close_popup window (%p)", window);
 
     CSCLKeyFocusHandler *focus_handler = CSCLKeyFocusHandler::get_instance();
     if (focus_handler) {
@@ -557,7 +557,7 @@ CSCLWindows::is_base_window(sclwindow window)
 }
 
 sclwindow
-CSCLWindows::find_by_etcinfo( void* etc_info )
+CSCLWindows::find_by_etcinfo(void* etc_info)
 {
     SCL_DEBUG();
 
@@ -625,7 +625,7 @@ CSCLWindows::set_window_context(sclwindow window, SclWindowContext* context)
     SCL_DEBUG();
 
     if (window == m_base_window_context.window) {
-        memcpy(&m_base_window_context,context, sizeof(SclWindowContext));
+        memcpy(&m_base_window_context, context, sizeof(SclWindowContext));
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
             if (m_popup_window_context[loop].window == window) {
@@ -822,7 +822,7 @@ sclwindow CSCLWindows::get_nth_window_in_Z_order_list(sclbyte index)
     return SCLWINDOW_INVALID;
 }
 
-sclwindow CSCLWindows::get_nth_popup_window( sclbyte index )
+sclwindow CSCLWindows::get_nth_popup_window(sclbyte index)
 {
     SCL_DEBUG();
 
@@ -848,7 +848,7 @@ sclbyte CSCLWindows::get_Z_order(sclwindow window)
     return NOT_USED;
 }
 
-void CSCLWindows::set_parent( const sclwindow parent, const sclwindow window )
+void CSCLWindows::set_parent(const sclwindow parent, const sclwindow window)
 {
     /* Do not set parent if the window is a virtual window */
     //SclWindowContext *window_context = get_window_context(window, FALSE);
index 7e9af51..c9a3853 100644 (file)
@@ -42,7 +42,7 @@ using namespace scl;
 
 static tts_h tts = NULL;
 #ifndef WAYLAND
-static Eina_Bool _get_default_zone_geometry_info (Ecore_X_Window root, scluint *x, scluint *y, scluint *w, scluint *h)
+static Eina_Bool _get_default_zone_geometry_info(Ecore_X_Window root, scluint *x, scluint *y, scluint *w, scluint *h)
 {
     Ecore_X_Atom zone_geometry_atom;
     Ecore_X_Window* zone_lists;
@@ -76,7 +76,7 @@ static Eina_Bool _get_default_zone_geometry_info (Ecore_X_Window root, scluint *
 
     if (zone_lists) {
         /* We must free zone_lists */
-        free (zone_lists);
+        free(zone_lists);
     }
 
     return ret;
@@ -96,7 +96,7 @@ static void accessibility_changed_cb(keynode_t *key, void* data)
                 if (TTS_ERROR_NONE != r) {
                     LOGD("tts_create FAILED : result(%d)", r);
                 } else {
-                    r = tts_set_mode (tts, TTS_MODE_SCREEN_READER);
+                    r = tts_set_mode(tts, TTS_MODE_SCREEN_READER);
                 }
                 if (TTS_ERROR_NONE != r) {
                     LOGD("tts_set_mode FAILED : result(%d)", r);
index 95f0022..c6abfd0 100644 (file)
@@ -26,7 +26,6 @@ SclRes::SclRes()
 
 SclRes::~SclRes()
 {
-
 }
 
 void
index 5c17f50..4a63588 100644 (file)
@@ -20,7 +20,7 @@
 #include "sclres_type.h"
 #include <string>
 
-namespace sclres{
+namespace sclres {
 class SclRes{
 public:
     SclRes();
@@ -32,7 +32,6 @@ public:
     virtual const char* get_resource_directory();
 
 public: /* These are the functions need to be implemented by the descendants of SclRes */
-
     /* Initialize SclRes, with the given entry file that exists under the resource directory */
     virtual void init(const char *entry_filename) = 0;
 
index b98a571..f128b25 100644 (file)
@@ -53,6 +53,7 @@ class SclResParserManager{
 
         const char* get_name();
         void destroy();
+
     private:
         SclResParserManager();
         bool m_initialized;
index d8a4bf7..da43390 100644 (file)
@@ -43,7 +43,6 @@ encode_input_mode_configure_record(ResourceStorage& storage, const PSclInputMode
 }
 
 int encode_input_mode_configure_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-
     int init_size = storage.get_size();
     /*size 4bytes*/
     const int INPUT_MODE_CONFIGURE_SIZE_WIDTH = 4;
@@ -64,7 +63,7 @@ int encode_input_mode_configure_file(ResourceStorage& storage, IMetaData_Helper&
 
     Input_mode_configure_width record_width;
     set_input_mode_configure_width(md_helper, record_width);
-    for ( int i = 0; i < size; ++i) {
+    for ( int i = 0; i < size; ++i ) {
         encode_input_mode_configure_record(storage, cur, record_width);
         cur++;
     }
index 49dde94..c966e3f 100644 (file)
@@ -186,7 +186,7 @@ encode_key_coordinate_record(ResourceStorage& storage, const PSclLayoutKeyCoordi
 const int get_layout_num(const PSclLayoutKeyCoordinatePointerTable keyCoordinatePointerFrame) {
     assert(keyCoordinatePointerFrame != NULL);
     int layout_num = MAX_SCL_LAYOUT;
-    for ( int i = 0; i < MAX_SCL_LAYOUT; ++i) {
+    for ( int i = 0; i < MAX_SCL_LAYOUT; ++i ) {
         // NULL is the end flag
         if (keyCoordinatePointerFrame[i][0] == NULL) {
             layout_num = i;
@@ -215,7 +215,6 @@ const int get_key_num(const PSclLayoutKeyCoordinatePointerTable keyCoordinatePoi
 
 int
 encode_key_coordinate_frame_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-
     XMLResource *xmlresource = XMLResource::get_instance();
 
     int layout_num = xmlresource->get_layout_size();
@@ -260,8 +259,8 @@ encode_key_coordinate_frame_file(ResourceStorage& storage, IMetaData_Helper& md_
 
 
     int key_coordinate_rec_data_size = 0;
-    for ( int i = 0; i < layout_num; ++i) {
-        for ( int j = 0; j < pKey_num_array[i]; ++j) {
+    for ( int i = 0; i < layout_num; ++i ) {
+        for ( int j = 0; j < pKey_num_array[i]; ++j ) {
             int pre_size = storage.get_size();
 
             SclLayoutKeyCoordinatePointer cur = _key_coordinate_pointer_frame[i][j];
index 7cd4472..418e3a3 100644 (file)
@@ -82,7 +82,6 @@ encode_label_properties_record(ResourceStorage& storage, const PSclLabelProperti
 
 int
 encode_label_properties_frame_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-
     int init_size = storage.get_size();
 
     /*size 4bytes*/
@@ -105,8 +104,8 @@ encode_label_properties_frame_file(ResourceStorage& storage, IMetaData_Helper& m
 
     Label_properties_record_width record_width;
     set_label_properties_record_width(md_helper, record_width);
-    for ( int i = 0; i < size; ++i) {
-        for ( int j = 0; j < maxj; ++j) {
+    for ( int i = 0; i < size; ++i ) {
+        for ( int j = 0; j < maxj; ++j ) {
             SclLabelProperties cur = labelPropertiesFrame[i][j];
             encode_label_properties_record(storage, &cur, record_width);
         }
index 5f05bd5..e557947 100644 (file)
@@ -149,7 +149,7 @@ encode_layout_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
     set_layout_width(md_helper, record_width);
 
     int layout_rec_data_size = 0;
-    for ( int i = 0; i < size; ++i) {
+    for ( int i = 0; i < size; ++i ) {
         int pre_size = storage.get_size();
         encode_layout_record(storage, cur, record_width);
 
index dbcef48..779346b 100644 (file)
@@ -63,7 +63,6 @@ encode_magnifier_configure_record(ResourceStorage& storage, const PSclMagnifierW
 
 int
 encode_magnifier_configure_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-
     int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
index cd1449d..a5c0dfb 100644 (file)
@@ -36,7 +36,6 @@ encode_modifier_decoration_record(ResourceStorage& storage, const PSclModifierDe
 
 int
 encode_modifier_decoration_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-
     int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
index af0b684..de94026 100644 (file)
@@ -42,7 +42,6 @@ encode_nine_patch_info(ResourceStorage& storage, const SclNinePatchInfo* cur, co
 
 int
 encode_nine_patch_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-
     int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
@@ -65,7 +64,7 @@ encode_nine_patch_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
     Nine_patch_width record_width;
     set_nine_patch_width(md_helper, record_width);
     SclNinePatchInfo* cur = ninePatchInfoTable;
-    for (int i = 0; i < MAX_NINE_PATCH_FILE_LIST; ++i ) {
+    for (int i = 0; i < MAX_NINE_PATCH_FILE_LIST; ++i) {
         encode_nine_patch_info(storage, cur, record_width);
         cur++;
     }
index 281857b..22765a9 100644 (file)
@@ -20,7 +20,7 @@
 class IMetaData_Helper{
     public:
         virtual void set_current_metadata_record(const char* record_name) = 0;
-        virtual const unsigned short get_width(const char* field_name) const= 0;
+        virtual const unsigned short get_width(const char* field_name) const = 0;
         virtual ~IMetaData_Helper() {}
 };
 #endif
index 45fd818..99bef9d 100644 (file)
@@ -20,7 +20,7 @@
 #include "metadata.h"
 class IMetaData_Parser{
     public:
-        virtual const MetaData* get_metadata() const= 0;
+        virtual const MetaData* get_metadata() const = 0;
         virtual ~IMetaData_Parser() {}
 };
 #endif
index 71e9ebb..ff24b3d 100644 (file)
@@ -37,7 +37,7 @@ class MetaData_Field{
        MetaData_Field(const char*name, const char* type, const int width) {
             assert(name);
             assert(type);
-            assert(width >= 0 );
+            assert(width >= 0);
 
             memset(m_name, 0, FIELD_NAME_WIDTH);
             memset(m_type, 0, FIELD_TYPE_WIDTH);
index 8f767ba..68987eb 100644 (file)
 #include "imetadata_helper.h"
 class MetaData_Handler:private IMetaData_Encoder, IMetaData_Parser, public IMetaData_Helper{
     private:
-        typedef struct __Metadata_Width{
+        typedef struct __Metadata_Width {
             int string_id_width;
         }MetaData_Width;
+
     public:
         MetaData_Handler(const char* file);
         void set_current_metadata_record(const char* record_name);
@@ -44,6 +45,7 @@ class MetaData_Handler:private IMetaData_Encoder, IMetaData_Parser, public IMeta
         int encode(ResourceStorage& storage)const;
 
         const unsigned short get_width(const char* field_name) const;
+
     private:
         const unsigned short
             get_width(const char* name, const MetaData_Record& metadata_record) const;
@@ -53,6 +55,7 @@ class MetaData_Handler:private IMetaData_Encoder, IMetaData_Parser, public IMeta
         int parsing_metadata_type(const xmlNodePtr curNode, MetaData_Width& metadataWidth);
         void parsing_metadata();
         const MetaData* get_metadata()const;
+
     private:
         MetaData metadata;
         int m_current_metadata_record_id;
index 932885f..56e997d 100644 (file)
@@ -46,6 +46,7 @@ class ResourceStorage{
     static const int __NEW_LENGTH__ = 0x10000;/*64k*/
     static const int __RE_NEW_LENGTH__ = 0x10000;/*64k*/
     static const int __MAX_NEW_SIZE__ = 0x2000000;/*32M*/
+
     public:
     ResourceStorage();
     ~ResourceStorage();
@@ -93,18 +94,19 @@ class ResourceStorage{
     // put the storage array to a big storage
     // return size that put
     int storage_cat(ResourceStorage& storage);
+
     private:
     void init();
 
     /*template <typename T>
     void put_primitive_data(T data, MetaType type, bool ignore = false);*/
 
-    // This function is used to check whether the 
+    // This function is used to check whether the
     // storage is enough
     // the para "width" is the size of request to use
     void check_storage(int width);
 
-    // If the space is not enough, use this function to 
+    // If the space is not enough, use this function to
     // new a new storage
     void expand_storage();
 
index c792666..465361d 100644 (file)
@@ -44,7 +44,7 @@ inline ResourceStorage::
 }
 
 inline const int ResourceStorage::
-get_size() const{
+get_size() const {
     return m_size;
 }
 
@@ -69,7 +69,7 @@ put(const char* str) {
 }
 
 inline const int ResourceStorage::
-capability() const{
+capability() const {
     return m_capability;
 }
 
@@ -136,7 +136,6 @@ storage_cat(ResourceStorage& storage) {
 
 inline void ResourceStorage::
 check_storage(int width) {
-
     if (m_size + width > m_capability) {
         expand_storage();
     }
@@ -150,7 +149,7 @@ expand_storage() {
     }
 
     char* _p = new char[_new_size];
-    if(_p == NULL) {
+    if (_p == NULL) {
         LOGW("expand_storage error");
         return;
     }
index 33804fc..40e053e 100644 (file)
@@ -52,13 +52,13 @@ class String_Encoder:public IString_Encoder{
             m_vec_string.push_back(str_temp);
             return m_vec_string.size() -1;
         }
-        int encode() const{
+        int encode() const {
             ResourceStorage storage;
             encode(storage);
             storage.toFile(m_file);
             return storage.get_size();
         }
-        int encode(int& offset) const{
+        int encode(int& offset) const {
             ResourceStorage storage;
             encode(storage);
             storage.toFile(m_file, offset);
@@ -66,7 +66,7 @@ class String_Encoder:public IString_Encoder{
             return storage.get_size();
         }
 
-        int encode(ResourceStorage& storage) const{
+        int encode(ResourceStorage& storage) const {
             /* record the strings' num*/
             storage.put<sint_t>(m_vec_string.size(), MAX_NUM_WIDTH);
 
index efa7add..dededfe 100644 (file)
@@ -36,7 +36,7 @@ set_current_metadata_record(const char* record_name) {
 }
 
 int MetaData_Handler::
-encode(const char* file)const{
+encode(const char* file)const {
     ResourceStorage storage;
     encode_metadata(storage, metadata);
     storage.toFile(file);
@@ -45,7 +45,7 @@ encode(const char* file)const{
 }
 
 int MetaData_Handler::
-encode(const char* file, int& offset)const{
+encode(const char* file, int& offset)const {
     ResourceStorage storage;
     encode_metadata(storage, metadata);
     storage.toFile(file, offset);
@@ -54,13 +54,13 @@ encode(const char* file, int& offset)const{
 }
 
 int MetaData_Handler::
-encode(ResourceStorage& storage)const{
+encode(ResourceStorage& storage)const {
     encode_metadata(storage, metadata);
     return storage.get_size();
 }
 
 const unsigned short MetaData_Handler::
-get_width(const char* field_name) const{
+get_width(const char* field_name) const {
     if (field_name == NULL) return 0;
 
     int idx = m_current_metadata_record_id;
@@ -74,10 +74,10 @@ get_width(const char* field_name) const{
 }
 
 const unsigned short MetaData_Handler::
-get_width(const char* name, const MetaData_Record& metadata_record) const{
+get_width(const char* name, const MetaData_Record& metadata_record) const {
     assert(name);
     for (size_t i = 0; i < metadata_record.vField.size(); ++i) {
-        if ( 0 == strcmp(name, metadata_record.vField.at(i).m_name)) {
+        if (0 == strcmp(name, metadata_record.vField.at(i).m_name)) {
             return metadata_record.vField.at(i).m_width;
         }
     }
@@ -85,10 +85,10 @@ get_width(const char* name, const MetaData_Record& metadata_record) const{
 }
 
 const int MetaData_Handler::
-find_metadata_record_index(const char* name)const{
+find_metadata_record_index(const char* name)const {
     assert(name);
 
-    for ( size_t i = 0; i < metadata.m_vec_metadata_record.size(); ++i) {
+    for (size_t i = 0; i < metadata.m_vec_metadata_record.size(); ++i) {
         const MetaData_Record& metadata_record = metadata.m_vec_metadata_record.at(i);
 
         if (0 == strcmp(metadata_record.m_name, name)) {
@@ -97,7 +97,6 @@ find_metadata_record_index(const char* name)const{
     }
 
     return -1;
-
 }
 
 int MetaData_Handler::
@@ -122,28 +121,28 @@ parsing_field(const xmlNodePtr node, MetaData_Field& data, const MetaData_Width&
         strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
         data.m_type[sizeof(data.m_type) - 1] = '\0';
         data.m_width = metadataWidth.string_id_width;
-    } else if ( 0 == xmlStrcmp(type, (const xmlChar*)"int8")) {
+    } else if (0 == xmlStrcmp(type, (const xmlChar*)"int8")) {
         strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
         data.m_type[sizeof(data.m_type) - 1] = '\0';
         data.m_width = 1;
-    } else if ( 0 == xmlStrcmp(type, (const xmlChar*)"int16")) {
+    } else if (0 == xmlStrcmp(type, (const xmlChar*)"int16")) {
         strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
         data.m_type[sizeof(data.m_type) - 1] = '\0';
         data.m_width = 2;
-    } else if ( 0 == xmlStrcmp(type, (const xmlChar*)"int32")) {
+    } else if (0 == xmlStrcmp(type, (const xmlChar*)"int32")) {
         strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
         data.m_type[sizeof(data.m_type) - 1] = '\0';
         data.m_width = 4;
-    } else if ( 0 == xmlStrcmp(type, (const xmlChar*)"float32")) {
+    } else if (0 == xmlStrcmp(type, (const xmlChar*)"float32")) {
         strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
         data.m_type[sizeof(data.m_type) - 1] = '\0';
         data.m_width = 4;
-    } else if ( 0 == xmlStrcmp(type, (const xmlChar*)"float64")) {
+    } else if (0 == xmlStrcmp(type, (const xmlChar*)"float64")) {
         strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
         data.m_type[sizeof(data.m_type) - 1] = '\0';
         data.m_width = 8;
     }
-    else{
+    else {
         ret = -1;
     }
 
@@ -194,7 +193,7 @@ parsing_metadata_type(const xmlNodePtr curNode, MetaData_Width& metadataWidth) {
             /*FIXME how to assume that the atoi will get the correct num*/
             int width = atoi((const char*)xmlwidth);
 
-            if ( 0 == xmlStrcmp(xmlname, (const xmlChar*)"string_id")) {
+            if (0 == xmlStrcmp(xmlname, (const xmlChar*)"string_id")) {
                 metadataWidth.string_id_width = width;
             }
 
@@ -245,7 +244,7 @@ parsing_metadata() {
         if (0 == xmlStrcmp(curNode->name, (const xmlChar*)"metadata_type")) {
             parsing_metadata_type(curNode, metadataWidth);
         }
-        else if ( 0 == xmlStrcmp(curNode->name, (const xmlChar*)"record")) {
+        else if (0 == xmlStrcmp(curNode->name, (const xmlChar*)"record")) {
             MetaData_Record metadataRecord;
             int ret = parsing_record(curNode, metadataRecord, metadataWidth);
             if (ret != -1) {
@@ -255,10 +254,9 @@ parsing_metadata() {
         curNode = curNode->next;
     }
     xmlFreeDoc(doc);
-
 }
 
 inline const MetaData* MetaData_Handler::
-get_metadata()const{
+get_metadata()const {
     return &metadata;
 }
index 6b7d960..ba9c546 100644 (file)
@@ -35,7 +35,7 @@ using namespace std;
 String_Encoder actual_string_encoder;
 IString_Encoder& string_encoder = actual_string_encoder;
 
-static inline void show_usage(){
+static inline void show_usage() {
     static const char* message = {  "xml2binary: missing folder operand\n"
                                     "-------------------------------------------------------\n"
                                     "|  Usage: xml2binary operand1 operand2                |\n"
@@ -52,7 +52,7 @@ int main(const int argc, char* argv[]) {
     }
 
     char* xml_text_dir = argv[1];
-    if ( 0 != access(xml_text_dir, R_OK)) {
+    if (0 != access(xml_text_dir, R_OK)) {
         perror(xml_text_dir);
         return -1;
     }
@@ -64,7 +64,7 @@ int main(const int argc, char* argv[]) {
         xml_bin_dir = argv[2];
     }
 
-    if ( 0 != access(xml_bin_dir, W_OK)) {
+    if (0 != access(xml_bin_dir, W_OK)) {
         perror(xml_bin_dir);
         return -1;
     }
@@ -80,7 +80,7 @@ int main(const int argc, char* argv[]) {
     xmlresource->init("main_entry.xml");
 
     static const char* metadata_path = "/usr/share/libscl-ui/metadata.xml";
-    if ( 0 != access(metadata_path, R_OK)) {
+    if (0 != access(metadata_path, R_OK)) {
         perror(metadata_path);
         return -1;
     }
index 2376889..3d65475 100644 (file)
@@ -32,19 +32,19 @@ class AutoPopupConfigureParserImpl {
             m_autopopup_configure.add_grab_left = NOT_USED;
             m_autopopup_configure.add_grab_right = NOT_USED;
             m_autopopup_configure.add_grab_top = NOT_USED;
-            m_autopopup_configure.add_grab_bottom= NOT_USED;
+            m_autopopup_configure.add_grab_bottom = NOT_USED;
         }
 
         ~AutoPopupConfigureParserImpl() {
             /* Let's create de-initializing function for this resource releasement */
             sclint loop;
-            for(loop = 0;loop < SCL_BUTTON_STATE_MAX;loop++) {
+            for (loop = 0;loop < SCL_BUTTON_STATE_MAX;loop++) {
                 if (m_autopopup_configure.button_image_path[loop]) {
                     xmlFree(m_autopopup_configure.button_image_path[loop]);
                     m_autopopup_configure.button_image_path[loop] = NULL;
                 }
             }
-            for(loop = 0;loop < MAX_WND_DECORATOR;loop++) {
+            for (loop = 0;loop < MAX_WND_DECORATOR;loop++) {
                 if (m_autopopup_configure.decoration_image_path[loop]) {
                     xmlFree(m_autopopup_configure.decoration_image_path[loop]);
                     m_autopopup_configure.decoration_image_path[loop] = NULL;
@@ -54,7 +54,6 @@ class AutoPopupConfigureParserImpl {
                 xmlFree(m_autopopup_configure.label_type);
                 m_autopopup_configure.label_type = NULL;
             }
-
         }
 
         int parsing_autopopup_configure(const char* input_file) {
@@ -130,46 +129,44 @@ class AutoPopupConfigureParserImpl {
             }
             xmlFreeDoc(doc);
             return 0;
-
         }
         void parsing_background_color(const xmlNodePtr cur_node) {
             assert(cur_node != NULL);
 
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
-            while (child_node!=NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"r") ) {
+            while (child_node != NULL) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"r")) {
                     m_autopopup_configure.bg_color.r = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"g") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"g")) {
                     m_autopopup_configure.bg_color.g = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"b") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"b")) {
                     m_autopopup_configure.bg_color.b = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"a") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"a")) {
                     m_autopopup_configure.bg_color.a = get_content_int(child_node);
                 }
 
                 child_node = child_node->next;
             }
-
         }
 
         void parsing_background_line_color(const xmlNodePtr cur_node) {
             assert(cur_node != NULL);
 
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
-            while (child_node!=NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"r") ) {
+            while (child_node != NULL) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"r")) {
                     m_autopopup_configure.bg_line_color.r = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"g") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"g")) {
                     m_autopopup_configure.bg_line_color.g = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"b") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"b")) {
                     m_autopopup_configure.bg_line_color.b = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"a") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"a")) {
                     m_autopopup_configure.bg_line_color.a = get_content_int(child_node);
                 }
 
@@ -183,7 +180,7 @@ class AutoPopupConfigureParserImpl {
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
             while (child_node != NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"image") ) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"image")) {
                     int button_state = get_button_state_prop(child_node);
                     if (button_state >= 0 && button_state < SCL_BUTTON_STATE_MAX) {
                         m_autopopup_configure.button_image_path[button_state] = (sclchar*)xmlNodeGetContent(child_node);
@@ -191,21 +188,19 @@ class AutoPopupConfigureParserImpl {
                 }
                 child_node = child_node->next;
             }
-
         }
         void parsing_button_size(const xmlNodePtr cur_node) {
             assert(cur_node != NULL);
 
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
-            while (child_node!=NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"width") ) {
+            while (child_node != NULL) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"width")) {
                     m_autopopup_configure.button_width = get_content_int(child_node);
-                } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"height") ) {
+                } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"height")) {
                     m_autopopup_configure.button_height = get_content_int(child_node);
                 }
                 child_node = child_node->next;
             }
-
         }
 
         void parsing_window_decorator_image_path(const xmlNodePtr cur_node) {
@@ -214,7 +209,7 @@ class AutoPopupConfigureParserImpl {
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
             while (child_node != NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"image") ) {
+                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);;
                     }
@@ -242,29 +237,27 @@ class AutoPopupConfigureParserImpl {
                 }
                 child_node = child_node->next;
             }
-
         }
 
         void parsing_grab_area(const xmlNodePtr cur_node) {
             assert(cur_node != NULL);
 
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
-            while (child_node!=NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"left") ) {
+            while (child_node != NULL) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"left")) {
                     m_autopopup_configure.add_grab_left = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"right") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"right")) {
                     m_autopopup_configure.add_grab_right = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"top") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"top")) {
                     m_autopopup_configure.add_grab_top = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"bottom") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"bottom")) {
                     m_autopopup_configure.add_grab_bottom = get_content_int(child_node);
                 }
                 child_node = child_node->next;
             }
-
         }
 
         int get_button_state_prop(const xmlNodePtr cur_node) {
@@ -281,7 +274,6 @@ class AutoPopupConfigureParserImpl {
                 button_state = BUTTON_STATE_TOGGLED;
             }
             return button_state;
-
         }
         SCLDisplayMode get_content_displaymode(const xmlNodePtr cur_node) {
             assert(cur_node != NULL);
@@ -297,7 +289,6 @@ class AutoPopupConfigureParserImpl {
             }
 
             return display_mode;
-
         }
         SclAutoPopupConfigure m_autopopup_configure;
 };
index ec52c6e..6322534 100644 (file)
@@ -43,7 +43,6 @@ class DefaultConfigureParserImpl {
                 xmlFree(m_default_configure.image_file_base_path);
                 m_default_configure.image_file_base_path = NULL;
             }
-
         }
 
         int parsing_default_configure(const char* input_file) {
@@ -126,30 +125,29 @@ class DefaultConfigureParserImpl {
             xmlFreeDoc(doc);
 
             return 0;
-
         }
 
         void parsing_touch_offset(const xmlNodePtr cur_node) {
             assert(cur_node != NULL);
 
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
-            while (child_node!=NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"portrait") ) {
+            while (child_node != NULL) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"portrait")) {
                     xmlNodePtr grandChildNode = child_node->xmlChildrenNode;
-                    while (grandChildNode!=NULL) {
-                        if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"x") ) {
+                    while (grandChildNode != NULL) {
+                        if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"x")) {
                             m_default_configure.touch_offset[DISPLAYMODE_PORTRAIT].x = get_content_int(grandChildNode);
-                        } else if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"y") ) {
+                        } else if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"y")) {
                             m_default_configure.touch_offset[DISPLAYMODE_PORTRAIT].y = get_content_int(grandChildNode);
                         }
                         grandChildNode = grandChildNode->next;
                     }
-                } else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"landscape") ) {
+                } else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"landscape")) {
                     xmlNodePtr grandChildNode = child_node->xmlChildrenNode;
-                    while (grandChildNode!=NULL) {
-                        if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"x") ) {
+                    while (grandChildNode != NULL) {
+                        if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"x")) {
                             m_default_configure.touch_offset[DISPLAYMODE_LANDSCAPE].x = get_content_int(grandChildNode);
-                        } else if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"y") ) {
+                        } else if (0 == xmlStrcmp(grandChildNode->name, (const xmlChar*)"y")) {
                             m_default_configure.touch_offset[DISPLAYMODE_LANDSCAPE].y = get_content_int(grandChildNode);
                         }
                         grandChildNode = grandChildNode->next;
@@ -158,30 +156,28 @@ class DefaultConfigureParserImpl {
 
                 child_node = child_node->next;
             }
-
         }
 
         void parsing_dim_color(const xmlNodePtr cur_node) {
             assert(cur_node != NULL);
 
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
-            while (child_node!=NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"r") ) {
+            while (child_node != NULL) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"r")) {
                     m_default_configure.dim_color.r = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"g") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"g")) {
                     m_default_configure.dim_color.g = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"b") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"b")) {
                     m_default_configure.dim_color.b = get_content_int(child_node);
                 }
-                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"a") ) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"a")) {
                     m_default_configure.dim_color.a = get_content_int(child_node);
                 }
 
                 child_node = child_node->next;
             }
-
         }
 
         SCLDisplayMode get_content_display_mode(const xmlNodePtr cur_node) {
index 3f74b23..90c1127 100644 (file)
@@ -29,7 +29,7 @@
 #include "nine_patch_file_list_parser.h"
 #include "sclres.h"
 
-namespace xmlresource{
+namespace xmlresource {
 class XMLResource: public sclres::SclRes{
     public:
     ~XMLResource();
@@ -66,6 +66,7 @@ class XMLResource: public sclres::SclRes{
     }
 
     void destroy();
+
     private:
     XMLResource();
 
index 8ab7a58..5063d13 100644 (file)
@@ -55,7 +55,7 @@ class InputModeConfigureParserImpl {
         }
 
         ~InputModeConfigureParserImpl() {
-            for(int input_mode = 0; input_mode < MAX_SCL_INPUT_MODE; ++input_mode) {
+            for (int input_mode = 0; input_mode < MAX_SCL_INPUT_MODE; ++input_mode) {
                 SclInputModeConfigure& cur_rec = m_input_mode_configure_table[input_mode];
                 if (cur_rec.name) {
                     xmlFree(cur_rec.name);
@@ -115,11 +115,10 @@ class InputModeConfigureParserImpl {
             xmlFreeDoc(doc);
 
             return 0;
-
         }
 
         void set_input_mode_configure_default_record(const PSclInputModeConfigure cur_rec) {
-            cur_rec->name=NULL;
+            cur_rec->name = NULL;
             cur_rec->layouts[DISPLAYMODE_PORTRAIT] = NULL;
             cur_rec->layouts[DISPLAYMODE_LANDSCAPE] = NULL;
             cur_rec->use_virtual_window = FALSE;
@@ -138,12 +137,12 @@ class InputModeConfigureParserImpl {
             cur_rec->name = (sclchar *)temp;
 
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
-            while (child_node!=NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"text") ) {
+            while (child_node != NULL) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"text")) {
                     child_node = child_node->next;
                     continue;
                 }
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar *)INPUT_MODE_CONFIGURE_LAYOUT_TAG) ) {
+                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);
@@ -213,8 +212,8 @@ InputModeConfigParser::get_inputmode_id(const char *name) {
         return -1;
     }
 
-    for(int i = 0; i < get_inputmode_size(); ++i) {
-        if ( config_table[i].name) {
+    for (int i = 0; i < get_inputmode_size(); ++i) {
+        if (config_table[i].name) {
             if ( 0 == strcmp(config_table[i].name, name) ) {
                 return i;
             }
index 15dbe7b..71a3c4f 100644 (file)
@@ -25,7 +25,7 @@ static int
 match_alignment(const char* key) {
   assert(key != NULL);
 
-    typedef struct _match_table_t{
+    typedef struct _match_table_t {
         int value;
         const char* key;
     }Match_table_t;
@@ -45,7 +45,7 @@ match_alignment(const char* key) {
 
     int value = LABEL_ALIGN_LEFT_TOP;
 
-    for(size_t i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) {
+    for (size_t i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) {
         if (0 == strcmp(key, table[i].key))
         {
             value = table[i].value;
@@ -58,7 +58,7 @@ static int
 match_shadow_direction(const char* key) {
   assert(key != NULL);
 
-    typedef struct _match_table_t{
+    typedef struct _match_table_t {
         int value;
         const char* key;
     }Match_table_t;
@@ -80,7 +80,7 @@ match_shadow_direction(const char* key) {
 
     int value = SHADOW_DIRECTION_NONE;
 
-    for(size_t i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) {
+    for (size_t i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) {
         if (0 == strcmp(key, table[i].key))
         {
             value = table[i].value;
@@ -97,8 +97,8 @@ class LabelPropertiesParserImpl {
         }
 
         ~LabelPropertiesParserImpl() {
-            for(int i = 0; i < MAX_SCL_LABEL_PROPERTIES && i < m_size; ++i) {
-                for(int j = 0; j < MAX_SIZE_OF_LABEL_FOR_ONE; ++j) {
+            for (int i = 0; i < MAX_SCL_LABEL_PROPERTIES && i < m_size; ++i) {
+                for (int j = 0; j < MAX_SIZE_OF_LABEL_FOR_ONE; ++j) {
                     if (m_label_properties_frame[i][j].font_name)
                         delete m_label_properties_frame[i][j].font_name;
                     m_label_properties_frame[i][j].font_name = NULL;
@@ -108,7 +108,6 @@ class LabelPropertiesParserImpl {
                 }
             }
             m_size = 0;
-
         }
 
         int parsing_label_properties_frame(const char* input_file) {
@@ -140,7 +139,7 @@ class LabelPropertiesParserImpl {
             PSclLabelPropertiesTable curTable = m_label_properties_frame;
             while (cur_node != NULL) {
                 if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"label_properties_table")) {
-                    parsing_label_properties_table( cur_node, curTable);
+                    parsing_label_properties_table(cur_node, curTable);
                     xmlChar* key = xmlGetProp(cur_node, (const xmlChar*)"label_type");
                     PSclLabelProperties cur_rec = (PSclLabelProperties)curTable;
                     cur_rec->label_type = (sclchar *)key;
@@ -157,7 +156,6 @@ class LabelPropertiesParserImpl {
             xmlFreeDoc(doc);
 
             return 0;
-
         }
         void parsing_label_properties_table(const xmlNodePtr cur_node, const PSclLabelPropertiesTable curTable) {
             assert(cur_node != NULL);
@@ -174,7 +172,6 @@ class LabelPropertiesParserImpl {
 
                 child_node = child_node->next;
             }
-
         }
         void parsing_label_properties_record(const xmlNodePtr cur_node, const PSclLabelProperties cur_rec) {
             assert(cur_node != NULL);
@@ -210,9 +207,9 @@ class LabelPropertiesParserImpl {
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
             while (child_node != NULL) {
-                if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)"font_color_record")) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"font_color_record")) {
                     parsing_font_color_record(child_node, cur_rec);
-                } else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)"shadow_color_record")) {
+                } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"shadow_color_record")) {
                     parsing_shadow_color_record(child_node, cur_rec);
                 }
 
@@ -224,8 +221,8 @@ class LabelPropertiesParserImpl {
         cur_rec->valid = true;
         cur_rec->font_name = NULL;
         cur_rec->font_size = 0;
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; ++shift_state) {
-            for(int button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; ++shift_state) {
+            for (int button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
                 cur_rec->font_color[shift_state][button_state].r = 0;
                 cur_rec->font_color[shift_state][button_state].g = 0;
                 cur_rec->font_color[shift_state][button_state].b = 0;
@@ -241,14 +238,13 @@ class LabelPropertiesParserImpl {
 
         cur_rec->shadow_direction = SHADOW_DIRECTION_NONE;
 
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; ++shift_state) {
-            for(int button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; ++shift_state) {
+            for (int button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
                 cur_rec->shadow_color[shift_state][button_state].r = 0;
                 cur_rec->shadow_color[shift_state][button_state].g = 0;
                 cur_rec->shadow_color[shift_state][button_state].b = 0;
             }
         }
-
     }
 
     void parsing_font_color_record(const xmlNodePtr cur_node, const PSclLabelProperties cur_rec) {
@@ -258,15 +254,15 @@ class LabelPropertiesParserImpl {
         xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
         while (child_node != NULL) {
-            if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"color") ) {
+            if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"color")) {
                 SclColor font_color = {0x00, 0x00, 0x00, 0xFF};
                 parsing_rgb(child_node, font_color);
 
                 int shift_state = get_shift_state_prop(child_node);
                 int button_state = get_button_state_prop(child_node);
 
-                for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
-                    for(int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
+                for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                    for (int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
                         if ((shift_state == shift_loop || shift_state == -1) &&
                                 (button_state == button_loop || button_state == -1)) {
                             cur_rec->font_color[shift_loop][button_loop] = font_color;
@@ -285,10 +281,10 @@ class LabelPropertiesParserImpl {
         xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
         while (child_node != NULL) {
-            if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"color") ) {
+            if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"color")) {
                 int shift_state = get_shift_state_prop(child_node);
                 int button_state = get_button_state_prop(child_node);
-                if (shift_state != -1 && button_state != -1 ) {
+                if (shift_state != -1 && button_state != -1) {
                     parsing_rgb(child_node, cur_rec->shadow_color[shift_state][button_state]);
                 }
             }
index 5967189..b3df9cd 100644 (file)
@@ -321,7 +321,7 @@ LayoutParserImpl::add_layout_string(xmlChar* newstr) {
 
 void
 LayoutParserImpl::release_layout_strings() {
-    for(size_t loop = 0; loop < m_vec_layout_strings.size(); loop++) {
+    for (size_t loop = 0; loop < m_vec_layout_strings.size(); loop++) {
         if (m_vec_layout_strings[loop]) {
             xmlFree(m_vec_layout_strings[loop]);
         }
@@ -338,7 +338,7 @@ LayoutParserImpl::add_key_string(xmlChar* newstr) {
 
 void
 LayoutParserImpl::release_key_strings() {
-    for(size_t loop = 0; loop < m_vec_key_strings.size(); loop++) {
+    for (size_t loop = 0; loop < m_vec_key_strings.size(); loop++) {
         if (m_vec_key_strings[loop]) {
             xmlFree(m_vec_key_strings[loop]);
         }
@@ -420,20 +420,20 @@ LayoutParserImpl::parsing_background(
     assert(cur_layout != NULL);
 
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
-    while ( child_node != NULL) {
-        if ( 0 == xmlStrcmp(child_node->name, (const xmlChar* )LAYOUT_BACKGROUND_NORMAL_TAG) ) {
+    while (child_node != NULL) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_BACKGROUND_NORMAL_TAG)) {
             xmlChar *key = xmlNodeGetContent(child_node);
             cur_layout->image_path[BUTTON_STATE_NORMAL] = (char *)key;
             add_layout_string(key);
-        } else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar* )LAYOUT_BACKGROUND_PRESSED_TAG) ) {
+        } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_BACKGROUND_PRESSED_TAG)) {
             xmlChar *key = xmlNodeGetContent(child_node);
             cur_layout->image_path[BUTTON_STATE_PRESSED] = (char *)key;
             add_layout_string(key);
-        } else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar* )LAYOUT_BACKGROUND_DISABLED_TAG ) ) {
+        } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_BACKGROUND_DISABLED_TAG )) {
             xmlChar *key = xmlNodeGetContent(child_node);
             cur_layout->image_path[BUTTON_STATE_DISABLED] = (char *)key;
             add_layout_string(key);
-        } else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar* )LAYOUT_BACKGROUND_TOGGLED_TAG ) ) {
+        } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_BACKGROUND_TOGGLED_TAG )) {
             xmlChar *key = xmlNodeGetContent(child_node);
             cur_layout->image_path[BUTTON_STATE_TOGGLED] = (char *)key;
             add_layout_string(key);
@@ -451,12 +451,12 @@ LayoutParserImpl::parsing_key_background(
     assert(cur_layout != NULL);
 
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
-    while ( child_node != NULL) {
-        if ( 0 == xmlStrcmp(child_node->name, (const xmlChar* )"rec") ) {
+    while (child_node != NULL) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
             int shift_state = get_shift_state_prop(child_node);
             int button_state = get_button_state_prop(child_node);
-            for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
-                for(int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
+            for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                for (int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
                     if ((shift_state == shift_loop || shift_state == -1) &&
                         (button_state == button_loop || button_state == -1)) {
                             xmlChar* key = xmlNodeGetContent(child_node);
@@ -539,8 +539,8 @@ LayoutParserImpl::set_default_row_value(
         row->label_type = cur_rec_layout->label_type;
         row->vibe_style = cur_rec_layout->vibe_style;
         row->sound_style = cur_rec_layout->sound_style;
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            forint button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
                 row->bg_image_path[shift_state][button_state] = cur_rec_layout->key_background_image[shift_state][button_state];
             }
         }
@@ -565,7 +565,7 @@ LayoutParserImpl::set_default_key_coordinate_value(
         cur_rec_coordinate->use_magnifier = (sclboolean)true;
         cur_rec_coordinate->use_long_key_magnifier = (sclboolean)false;
         //cur_rec_coordinate->enabled =(sclboolean) TRUE;
-        for(loop = 0;loop < SCL_DRAG_STATE_MAX;loop++) {
+        for (loop = 0;loop < SCL_DRAG_STATE_MAX;loop++) {
             cur_rec_coordinate->popup_input_mode[loop] = NULL;
         }
         cur_rec_coordinate->sound_style = row->sound_style;
@@ -586,30 +586,30 @@ LayoutParserImpl::set_default_key_coordinate_value(
         cur_rec_coordinate->image_label_type = NULL;
 
         cur_rec_coordinate->label_count = 0;
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            for( int label_for_one = 0; label_for_one < MAX_SIZE_OF_LABEL_FOR_ONE; ++ label_for_one) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int label_for_one = 0; label_for_one < MAX_SIZE_OF_LABEL_FOR_ONE; ++label_for_one) {
                 cur_rec_coordinate->label[shift_state][label_for_one] = NULL;
             }
         }
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            forint button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
                 cur_rec_coordinate->image_label_path[shift_state][button_state] = NULL;
             }
         }
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            forint button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
-                //cur_rec_coordinate->bg_image_path[shift_state][button_state] = NULL;
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int button_state = 0; button_state < SCL_BUTTON_STATE_MAX; ++button_state) {
+                //cur_rec_coordinate->bg_image_path[shift_state]![button_state] = NULL;
                 cur_rec_coordinate->bg_image_path[shift_state][button_state] = row->bg_image_path[shift_state][button_state];
-            }
+            }!
         }
         cur_rec_coordinate->key_value_count = 0;
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            forint multitap_state = 0; multitap_state < MAX_SIZE_OF_MULTITAP_CHAR; ++multitap_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int multitap_state = 0; multitap_state < MAX_SIZE_OF_MULTITAP_CHAR; ++multitap_state) {
                 cur_rec_coordinate->key_value[shift_state][multitap_state] = NULL;
             }
         }
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            forint multitap_state = 0; multitap_state < MAX_SIZE_OF_MULTITAP_CHAR; ++multitap_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int multitap_state = 0; multitap_state < MAX_SIZE_OF_MULTITAP_CHAR; ++multitap_state) {
                 cur_rec_coordinate->key_event[shift_state][multitap_state] = 0;
             }
         }
@@ -619,8 +619,8 @@ LayoutParserImpl::set_default_key_coordinate_value(
         cur_rec_coordinate->long_key_event = 0;
 
         cur_rec_coordinate->use_repeat_key = false;
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            forint autopopup_state = 0; autopopup_state < MAX_SIZE_OF_AUTOPOPUP_STRING; ++autopopup_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int autopopup_state = 0; autopopup_state < MAX_SIZE_OF_AUTOPOPUP_STRING; ++autopopup_state) {
                 cur_rec_coordinate->autopopup_key_labels[shift_state][autopopup_state] = NULL;
                 cur_rec_coordinate->autopopup_key_events[shift_state][autopopup_state] = 0;
                 cur_rec_coordinate->autopopup_key_values[shift_state][autopopup_state] = NULL;
@@ -630,8 +630,8 @@ LayoutParserImpl::set_default_key_coordinate_value(
         cur_rec_coordinate->extra_option = NOT_USED;
         cur_rec_coordinate->multitouch_type = SCL_MULTI_TOUCH_TYPE_EXCLUSIVE;
         cur_rec_coordinate->modifier_decorator = NULL;
-        for(int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
-            forint multitap_state = 0; multitap_state < MAX_SIZE_OF_MULTITAP_CHAR; ++multitap_state) {
+        for (int shift_state = 0; shift_state < SCL_SHIFT_STATE_MAX; shift_state++) {
+            for (int multitap_state = 0; multitap_state < MAX_SIZE_OF_MULTITAP_CHAR; ++multitap_state) {
                 cur_rec_coordinate->hint_string[shift_state][multitap_state] = NULL;
             }
         }
@@ -646,18 +646,18 @@ LayoutParserImpl::parsing_grab_area(
     assert(cur_node != NULL);
 
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
-    while (child_node!=NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_LEFT_TAG) ) {
+    while (child_node != NULL) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_LEFT_TAG)) {
             cur_rec_layout->add_grab_left = get_content_int(child_node);
         }
-        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_RIGHT_TAG) ) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_RIGHT_TAG)) {
             cur_rec_layout->add_grab_right = get_content_int(child_node);
         }
-        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_TOP_TAG) ) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_TOP_TAG)) {
             cur_rec_layout->add_grab_top = get_content_int(child_node);
         }
-        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_BOTTOM_TAG) ) {
-            cur_rec_layout->add_grab_bottom= get_content_int(child_node);
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ADD_GRAB_BOTTOM_TAG)) {
+            cur_rec_layout->add_grab_bottom = get_content_int(child_node);
         }
         child_node = child_node->next;
     }
@@ -729,13 +729,12 @@ 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)) {
+        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_KEY_BACKGROUND_TAG)) {
+        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)) {
@@ -760,7 +759,7 @@ LayoutParserImpl::loading_coordinate_resources(
     if (*cur_key == NULL) {
         xmlNodePtr child_node = cur_node->xmlChildrenNode;
         while (child_node != NULL) {
-            if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_TAG)) {
+            if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_TAG)) {
                 parsing_layout_row_node(child_node, cur_rec_layout, &row_y, &cur_key);
             }
 
@@ -796,7 +795,7 @@ LayoutParserImpl::parsing_layout_row_node(
 
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
     while (child_node != NULL) {
-        if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_TAG)) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_TAG)) {
             parsing_key_coordinate_record_node(child_node, &row, *cur_key);
             (*cur_key)++;
         }
@@ -813,7 +812,7 @@ LayoutParserImpl::parsing_layout_row_node(
 int
 LayoutParserImpl::get_drag_state_prop(const xmlNodePtr cur_node) {
     assert(cur_node != NULL);
-    typedef struct _Match_Struct{
+    typedef struct _Match_Struct {
         int value;
         const char* key;
     }Match_Struct;
@@ -832,7 +831,7 @@ LayoutParserImpl::get_drag_state_prop(const xmlNodePtr cur_node) {
 
     int drag_state = SCL_DRAG_STATE_NONE;
 
-    for(size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) {
+    for (size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) {
         if (0 == strcmp((const char*)key, table[i].key))
         {
             drag_state = table[i].value;
@@ -879,7 +878,7 @@ LayoutParserImpl::get_button_state_prop(const xmlNodePtr cur_node) {
 int
 LayoutParserImpl::get_multitouch_type_prop(const xmlNodePtr cur_node) {
     assert(cur_node != NULL);
-    typedef struct _Match_Struct{
+    typedef struct _Match_Struct {
         int value;
         const char* key;
     }Match_Struct;
@@ -895,7 +894,7 @@ LayoutParserImpl::get_multitouch_type_prop(const xmlNodePtr cur_node) {
 
     int type = SCL_MULTI_TOUCH_TYPE_EXCLUSIVE;
 
-    for(size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) {
+    for (size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) {
         if (0 == strcmp((const char*)key, table[i].key))
         {
             type = table[i].value;
@@ -911,7 +910,7 @@ int
 LayoutParserImpl::get_extra_option_prop(
         const xmlNodePtr cur_node) {
     assert(cur_node != NULL);
-    typedef struct _Match_Struct{
+    typedef struct _Match_Struct {
         int value;
         const char* key;
     }Match_Struct;
@@ -930,7 +929,7 @@ LayoutParserImpl::get_extra_option_prop(
 
     int type = DIRECTION_EXTRA_OPTION_4_DIRECTIONS;
 
-    for(size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) {
+    for (size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) {
         if (0 == strcmp((const char*)key, table[i].key))
         {
             type = table[i].value;
@@ -953,7 +952,7 @@ LayoutParserImpl::parsing_label_record_node(
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
     while (child_node != NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec") ) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
             int shift_state = get_shift_state_prop(child_node);
 
             int label_for_one_state = 0;
@@ -966,7 +965,7 @@ LayoutParserImpl::parsing_label_record_node(
             get_prop_bool(child_node, "auto_upper", &auto_upper);
 
             if (label_for_one_state >= 0 && label_for_one_state < MAX_SIZE_OF_LABEL_FOR_ONE) {
-                for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
                     if ((shift_state == shift_loop || shift_state == -1)) {
                         xmlChar* key = xmlNodeGetContent(child_node);
                         cur_rec->label[shift_loop][label_for_one_state] = (sclchar*)key;
@@ -1001,14 +1000,14 @@ LayoutParserImpl::parsing_magnifier_label_record_node(
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
     while (child_node != NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec") ) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
             int shift_state = get_shift_state_prop(child_node);
 
             int label_for_one_state = 0;
             get_prop_number(child_node, "multi", &label_for_one_state);
 
             if (label_for_one_state >= 0 && label_for_one_state < MAX_SIZE_OF_LABEL_FOR_ONE) {
-                for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
                     if ((shift_state == shift_loop || shift_state == -1)) {
                         xmlChar* key = xmlNodeGetContent(child_node);
                         cur_rec->magnifier_label[shift_loop][label_for_one_state] = (sclchar*)key;
@@ -1031,13 +1030,13 @@ LayoutParserImpl::parsing_hint_string_record_node(
         xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
         while (child_node != NULL) {
-            if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec") ) {
+            if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
                 int shift_state = get_shift_state_prop(child_node);
                 int multichar_state = 0;
                 get_prop_number(child_node, "multichar_state", &multichar_state);
 
                 if (multichar_state >= 0 && multichar_state < MAX_SIZE_OF_MULTITAP_CHAR) {
-                    for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                    for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
                         if ((shift_state == shift_loop || shift_state == -1)) {
                             xmlChar* key = xmlNodeGetContent(child_node);
                             cur_rec->hint_string[shift_loop][multichar_state] = (sclchar*)key;
@@ -1060,11 +1059,11 @@ LayoutParserImpl::parsing_label_image_record_node(
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
     while (child_node != NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec") ) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
             int shift_state = get_shift_state_prop(child_node);
             int button_state = get_button_state_prop(child_node);
-            for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
-                for(int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
+            for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                for (int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
                     if ((shift_state == shift_loop || shift_state == -1) &&
                         (button_state == button_loop || button_state == -1)) {
                             xmlChar* key = xmlNodeGetContent(child_node);
@@ -1088,11 +1087,11 @@ LayoutParserImpl::parsing_background_image_record_node(
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
     while (child_node != NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec") ) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
             int shift_state = get_shift_state_prop(child_node);
             int button_state = get_button_state_prop(child_node);
-            for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
-                for(int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
+            for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                for (int button_loop = 0;button_loop < SCL_BUTTON_STATE_MAX;button_loop++) {
                     if ((shift_state == shift_loop || shift_state == -1) &&
                         (button_state == button_loop || button_state == -1)) {
                             xmlChar* key = xmlNodeGetContent(child_node);
@@ -1116,7 +1115,7 @@ LayoutParserImpl::parsing_key_value_record_node(
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
     while (child_node != NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec") ) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
             int shift_state = get_shift_state_prop(child_node);
             int multichar_state = 0;
             get_prop_number(child_node, "multichar_state", &multichar_state);
@@ -1125,7 +1124,7 @@ LayoutParserImpl::parsing_key_value_record_node(
             get_prop_bool(child_node, "auto_upper", &auto_upper);
 
             if (multichar_state >= 0 && multichar_state < MAX_SIZE_OF_MULTITAP_CHAR) {
-                for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
                     if ((shift_state == shift_loop || shift_state == -1)) {
                         xmlChar* key = xmlNodeGetContent(child_node);
                         cur_rec->key_value[shift_loop][multichar_state] = (sclchar*)key;
@@ -1154,13 +1153,13 @@ LayoutParserImpl::parsing_key_event_record_node(
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
     while (child_node != NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec") ) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"rec")) {
             int shift_state = get_shift_state_prop(child_node);
             int multichar_state = 0;
             get_prop_number(child_node, "multichar_state", &multichar_state);
 
             if (multichar_state >= 0 && multichar_state < MAX_SIZE_OF_MULTITAP_CHAR) {
-                for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+                for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
                     if ((shift_state == shift_loop || shift_state == -1)) {
                         cur_rec->key_event[shift_loop][multichar_state] = (sclulong)get_content_dex_string_int(child_node);
                     }
@@ -1189,10 +1188,10 @@ LayoutParserImpl::parsing_auto_popup_keys_record_node(
         get_prop_bool(child_node, "auto_upper", &auto_upper);
 
         if (autopopup_state >= 0 && autopopup_state < MAX_SIZE_OF_AUTOPOPUP_STRING) {
-            for(int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
+            for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
                 if ((shift_state == shift_loop || shift_state == -1)) {
                     xmlChar* key = xmlNodeGetContent(child_node);
-                    if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"label") ) {
+                    if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"label")) {
                         if (auto_upper) {
                             if (xmlStrlen(key) == 1 && shift_loop != SCL_SHIFT_STATE_OFF) {
                                 /* Let's manipulate the string for auto_upper */
@@ -1204,9 +1203,9 @@ LayoutParserImpl::parsing_auto_popup_keys_record_node(
                         if (cur_rec->autopopup_key_values[shift_loop][autopopup_state] == NULL) {
                             cur_rec->autopopup_key_values[shift_loop][autopopup_state] = (sclchar*)key;
                         }
-                    } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"value") ) {
+                    } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"value")) {
                         cur_rec->autopopup_key_values[shift_loop][autopopup_state] = (sclchar*)key;
-                    } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"event") ) {
+                    } else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"event")) {
                         cur_rec->autopopup_key_events[shift_loop][autopopup_state] = atoi((sclchar*)key);
                     }
                     add_key_string(key);
@@ -1350,39 +1349,39 @@ LayoutParserImpl::parsing_key_coordinate_record_node(
 
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
     while (child_node != NULL) {
-        if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_LABEL_TAG)) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_LABEL_TAG)) {
             parsing_label_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_IMAGE_LABEL_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_IMAGE_LABEL_TAG)) {
             parsing_label_image_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_BACKGROUND_IMAGE_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_BACKGROUND_IMAGE_TAG)) {
             parsing_background_image_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_KEY_VALUE_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_KEY_VALUE_TAG)) {
             parsing_key_value_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_KEY_EVENT_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_KEY_EVENT_TAG)) {
             parsing_key_event_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_AUTOPOPUP_KEYS_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_AUTOPOPUP_KEYS_TAG)) {
             parsing_auto_popup_keys_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_POPUP_INPUTMODE_RECORD_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_POPUP_INPUTMODE_RECORD_TAG)) {
             parsing_popup_input_mode_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_MAGNIFIER_LABEL_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_MAGNIFIER_LABEL_TAG)) {
             parsing_magnifier_label_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
-        else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_HINT_STRING_TAG)) {
+        else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_HINT_STRING_TAG)) {
             parsing_hint_string_record_node(child_node, (*cur_rec_coordinate));
             (*cur_rec_coordinate)->valid = TRUE;
         }
@@ -1405,7 +1404,7 @@ LayoutParserImpl::parsing_popup_input_mode_record_node(
     xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
     while (child_node != NULL) {
-        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_POPUP_INPUTMODE_RECORD_INPUTMODE_TAG) ) {
+        if (0 == xmlStrcmp(child_node->name, (const xmlChar*)LAYOUT_ROW_KEY_POPUP_INPUTMODE_RECORD_INPUTMODE_TAG)) {
             int drag_state = get_drag_state_prop(child_node);
             assert(drag_state >=0);
             assert(drag_state < SCL_DRAG_STATE_MAX);
index d3f0e34..f68a2bf 100644 (file)
@@ -68,7 +68,6 @@ class MagnifierConfigureParserImpl {
             xmlFree(m_magnifier_configure.label_type);
             m_magnifier_configure.label_type = NULL;
         }
-
     }
 
     int parsing_magnifier_configure(const char* input_file) {
@@ -136,17 +135,17 @@ class MagnifierConfigureParserImpl {
         assert(cur_node != NULL);
 
         xmlNodePtr child_node = cur_node->xmlChildrenNode;
-        while (child_node!=NULL) {
-            if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"left") ) {
+        while (child_node != NULL) {
+            if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"left")) {
                 m_magnifier_configure.label_area_rect.left = get_content_int(child_node);
             }
-            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"top") ) {
+            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"top")) {
                 m_magnifier_configure.label_area_rect.top = get_content_int(child_node);
             }
-            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"right") ) {
+            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"right")) {
                 m_magnifier_configure.label_area_rect.right = get_content_int(child_node);
             }
-            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"bottom") ) {
+            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"bottom")) {
                 m_magnifier_configure.label_area_rect.bottom = get_content_int(child_node);
             }
 
@@ -157,8 +156,8 @@ class MagnifierConfigureParserImpl {
         assert(cur_node != NULL);
 
         xmlNodePtr child_node = cur_node->xmlChildrenNode;
-        while (child_node!=NULL) {
-            if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"image") ) {
+        while (child_node != NULL) {
+            if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"image")) {
                 if (equal_prop(child_node, "state", "normal")) {
                     xmlChar* temp = xmlNodeGetContent(child_node);
                     m_magnifier_configure.bg_image_path = (sclchar *)temp;
@@ -184,17 +183,16 @@ class MagnifierConfigureParserImpl {
         assert(cur_node != NULL);
 
         xmlNodePtr child_node = cur_node->xmlChildrenNode;
-        while (child_node!=NULL) {
-            if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"x") ) {
+        while (child_node != NULL) {
+            if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"x")) {
                 m_magnifier_configure.padding_x = get_content_int(child_node);
             }
-            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"y") ) {
+            else if (0 == xmlStrcmp(child_node->name, (const xmlChar *)"y")) {
                 m_magnifier_configure.padding_y = get_content_int(child_node);
             }
 
             child_node = child_node->next;
         }
-
     }
     SclMagnifierWndConfigure m_magnifier_configure;
 };
index 7e122ba..763e7c7 100644 (file)
@@ -52,7 +52,6 @@ class MainEntryParserImpl {
             xmlFreeDoc(doc);
 
             return 0;
-
         }
         void make_xml_files(const xmlNodePtr p_node) {
             assert(p_node != NULL);
@@ -63,7 +62,6 @@ class MainEntryParserImpl {
                 }
                 node = node->next;
             }
-
         }
 
         void parsing_files_node(const xmlNodePtr p_node) {
@@ -97,7 +95,6 @@ class MainEntryParserImpl {
                 }
                 node = node->next;
             }
-
         }
         XMLFiles m_xml_files;
 };
index 16febf3..58d9730 100644 (file)
 
 static int get_key_modifier_state_prop(const char*);
 //UTILS
-typedef struct _Modifier_decoration_state_match_table{
+typedef struct _Modifier_decoration_state_match_table {
     int modifier_decoration_state;
     const char* key;
 }Modifier_decoration_state_match_table_t;
 
-typedef struct _Key_modifier_state_match_table{
+typedef struct _Key_modifier_state_match_table {
     int key_modifier_state;
     const char* key;
 }Key_modifier_state_match_table_t;
@@ -80,7 +80,7 @@ get_key_modifier_state_prop(const char* key ) {
 
     int key_modifier_state = KEY_MODIFIER_NONE;
 
-    for(size_t i = 0; i < sizeof(table)/sizeof(Key_modifier_state_match_table_t); ++i) {
+    for (size_t i = 0; i < sizeof(table)/sizeof(Key_modifier_state_match_table_t); ++i) {
         if (0 == strcmp(key, table[i].key) )
         {
             key_modifier_state = table[i].key_modifier_state;
@@ -97,16 +97,15 @@ class ModifierDecorationParserImpl {
         }
 
         ~ModifierDecorationParserImpl() {
-            for(int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
+            for (int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
                 SclModifierDecoration& cur_rec = m_modifier_decoration_table[i];
-                for (int display_state = 0; display_state < DISPLAYMODE_MAX; ++display_state ) {
-                    forint key_modifier_state = 0; key_modifier_state < KEY_MODIFIER_MAX; ++key_modifier_state) {
+                for (int display_state = 0; display_state < DISPLAYMODE_MAX; ++display_state) {
+                    for (int key_modifier_state = 0; key_modifier_state < KEY_MODIFIER_MAX; ++key_modifier_state) {
                         if (cur_rec.bg_image_path[display_state][key_modifier_state])
                             delete cur_rec.bg_image_path[display_state][key_modifier_state];
                         cur_rec.bg_image_path[display_state][key_modifier_state] = NULL;
                     }
                 }
-
             }
         }
 
@@ -127,10 +126,10 @@ class ModifierDecorationParserImpl {
             }
             if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"modifier_decoration_table"))
             {
-                SCLLOG(SclLog::DEBUG, "ModifierDecorationParser: root name error: %s\n!", (char *)cur_node->name);
+                SCLLOG(SclLog::DEBUG!, "ModifierDecorationParser: root name error: %s\n!", (char *)cur_node->name);
                 xmlFreeDoc(doc);
                 return -1;
-            }
+            }!
 
             cur_node = cur_node->xmlChildrenNode;
 
@@ -154,7 +153,6 @@ class ModifierDecorationParserImpl {
             xmlFreeDoc(doc);
 
             return 0;
-
         }
 
         void parsing_modifier_decoration_record(const xmlNodePtr cur_node, const PSclModifierDecoration cur_rec) {
@@ -166,30 +164,29 @@ class ModifierDecorationParserImpl {
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
             while (child_node != NULL) {
-                if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)"name")) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"name")) {
                     xmlChar* temp = xmlNodeGetContent(child_node);
                     cur_rec->name = (sclchar *)temp;
                     cur_rec->valid = TRUE;
                 }
-                else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)"display_part_background")) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"display_part_background")) {
                     cur_rec->extract_background = get_content_bool(child_node);
                     cur_rec->valid = TRUE;
                 }
-                else if ( 0 == xmlStrcmp(child_node->name, (const xmlChar*)"background_image_path")) {
+                else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"background_image_path")) {
                     parsing_background_image_record_node(child_node, cur_rec);
                     cur_rec->valid = TRUE;
                 }
                 child_node = child_node->next;
             }
-
         }
 
         void set_modifier_decoration_default_record(const PSclModifierDecoration cur_rec) {
             cur_rec->valid = FALSE;
             cur_rec->extract_background = false;
             cur_rec->name = NULL;
-            for (int display_state = 0; display_state < DISPLAYMODE_MAX; ++display_state ) {
-                forint key_modifier_state = 0; key_modifier_state < KEY_MODIFIER_MAX; ++key_modifier_state) {
+            for (int display_state = 0; display_state < DISPLAYMODE_MAX; ++display_state) {
+                for (int key_modifier_state = 0; key_modifier_state < KEY_MODIFIER_MAX; ++key_modifier_state) {
                     cur_rec->bg_image_path[display_state][key_modifier_state] = NULL;
                 }
             }
@@ -202,7 +199,7 @@ class ModifierDecorationParserImpl {
             xmlNodePtr child_node = cur_node->xmlChildrenNode;
 
             while (child_node != NULL) {
-                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"image") ) {
+                if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"image")) {
                     /* FIXME */
                     int display_state = DISPLAYMODE_PORTRAIT;
                     xmlChar* display_state_xml = xmlGetProp(child_node, (const xmlChar*)"display_state");
@@ -220,7 +217,7 @@ class ModifierDecorationParserImpl {
                         xmlFree(key_modifier_state_xml);
                     }
 
-                    if (display_state != -1 && key_modifier_state != -1 ) {
+                    if (display_state != -1 && key_modifier_state != -1) {
                         sclchar* key = (sclchar*)xmlNodeGetContent(child_node);
                         cur_rec->bg_image_path[display_state][key_modifier_state] = key;
                         //Warning:: Donot xmlFree key
@@ -263,7 +260,7 @@ ModifierDecorationParser::get_modifier_decoration_table() {
 }
 
 int
-ModifierDecorationParser::get_modifier_decoration_id( const char *name )
+ModifierDecorationParser::get_modifier_decoration_id(const char *name)
 {
     if (name == NULL) {
         SCLLOG(SclLog::DEBUG, "get_modifier_decoration_id() has failed");
@@ -275,9 +272,9 @@ ModifierDecorationParser::get_modifier_decoration_id( const char *name )
         SCLLOG(SclLog::DEBUG, "get_modifier_decoration_id() has failed");
         return -1;
     }
-    for(int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
-        if ( modifier_decoration_table[i].name) {
-            if ( 0 == strcmp(modifier_decoration_table[i].name, name) ) {
+    for (int i = 0; i < MAX_SCL_MODIFIER_DECORATION_NUM; ++i) {
+        if (modifier_decoration_table[i].name) {
+            if (0 == strcmp(modifier_decoration_table[i].name, name)) {
                 return i;
             }
         }
index 13e444e..a5c7ab0 100644 (file)
@@ -30,7 +30,7 @@ class NinePatchFileListParserImpl {
             memset(m_nine_patch_file_list, 0x00, sizeof(SclNinePatchInfo) * MAX_NINE_PATCH_FILE_LIST);
         }
         ~NinePatchFileListParserImpl() {
-            for(int i = 0; i < m_size; ++i) {
+            for (int i = 0; i < m_size; ++i) {
                 if (m_nine_patch_file_list[i].image_path)
                     delete m_nine_patch_file_list[i].image_path;
                 m_nine_patch_file_list[i].image_path = NULL;
@@ -89,11 +89,9 @@ class NinePatchFileListParserImpl {
             xmlFreeDoc(doc);
 
             return 0;
-
         }
         SclNinePatchInfo m_nine_patch_file_list[MAX_NINE_PATCH_FILE_LIST];
         int m_size;
-
 };
 
 NinePatchFileParser::NinePatchFileParser() {
@@ -131,7 +129,7 @@ NinePatchFileParser::get_nine_patch_info(const char* filename, SclNinePatchInfo
         return false;
     }
 
-    for(int i = 0; i < MAX_NINE_PATCH_FILE_LIST && i < m_impl->m_size; ++i) {
+    for (int i = 0; i < MAX_NINE_PATCH_FILE_LIST && i < m_impl->m_size; ++i) {
         if ( nine_patch_list[i].image_path != NULL &&
             0 == strcmp(nine_patch_list[i].image_path, filename) ) {
                 if (info) {
@@ -143,7 +141,6 @@ NinePatchFileParser::get_nine_patch_info(const char* filename, SclNinePatchInfo
 
     SCLLOG(SclLog::DEBUG, "get_nine_patch_info() has failed.");
     return false;
-
 }
 
 SclNinePatchInfo*
index 045ca9a..3d40a0b 100644 (file)
@@ -30,7 +30,7 @@ get_content_int(const xmlNodePtr cur_node) {
         if (0 == strcmp("NOT_USED", (const char*)key)) {
             num = -1;
         } else {
-            num = atoi( (const char*)key );
+            num = atoi((const char*)key);
         }
         xmlFree(key);
     }
@@ -96,7 +96,7 @@ dex_string_to_int(const char* str) {
     assert(str != NULL);
 
     int val = -1;
-    sscanf(str, "%x",&val);
+    sscanf(str, "%x", &val);
 
     return val;
 }
index 53e2fab..446228b 100644 (file)
@@ -86,7 +86,7 @@ XMLResource::init(const char *entry_filepath) {
         m_main_entry_parser = MainEntryParser::get_instance();
         char input_file[_POSIX_PATH_MAX] = {0};
         snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), entry_filepath);
-        if ( 0 != m_main_entry_parser->init(input_file)) {
+        if (0 != m_main_entry_parser->init(input_file)) {
             /* main entry is necessary */
             SCLLOG(SclLog::ERROR, "main entry init");
         }