Fixed compile-time warnings 04/34204/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 15 Oct 2014 01:15:59 +0000 (10:15 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 22 Jan 2015 05:14:05 +0000 (14:14 +0900)
Change-Id: I3a669ebbcc65483aedcb7979a68b3f6d441bfbd3

69 files changed:
binary_xmlresource/autopopup_configure_bin_parser.cpp
binary_xmlresource/binary_xmlresource.cpp
binary_xmlresource/default_configure_bin_parser.cpp
binary_xmlresource/file_storage.cpp
binary_xmlresource/include/_auto_metadata.h
binary_xmlresource/include/binary_xmlresource.h
binary_xmlresource/include/file_storage.h
binary_xmlresource/include/input_mode_configure_bin_parser.h
binary_xmlresource/input_mode_configure_bin_parser.cpp
binary_xmlresource/key_coordinate_frame_bin_parser.cpp
binary_xmlresource/label_properties_bin_parser.cpp
binary_xmlresource/layout_bin_parser.cpp
binary_xmlresource/magnifier_configure_bin_parser.cpp
binary_xmlresource/modifier_decoration_bin_parser.cpp
binary_xmlresource/nine_patch_file_list_bin_parser.cpp
scl/gwes/efl/sclanimator-efl.cpp
scl/gwes/efl/sclevents-efl.cpp
scl/gwes/efl/sclgraphics-efl.cpp
scl/gwes/efl/sclgraphics-efl.h
scl/gwes/efl/sclwindows-efl.cpp
scl/gwes/efl/sclwindows-efl.h
scl/gwes/gtk/sclevents-gtk.cpp
scl/gwes/gtk/sclevents-gtk.h
scl/gwes/gtk/sclgraphics-cairo.cpp
scl/gwes/gtk/sclgraphics-cairo.h
scl/gwes/gtk/sclgraphics-gtk.cpp
scl/gwes/gtk/sclgraphics-gtk.h
scl/gwes/gtk/sclwindows-gtk.cpp
scl/gwes/gtk/sclwindows-gtk.h
scl/include/sclcontext.h
scl/include/sclcontroller.h
scl/include/scleventcallback.h
scl/include/sclgraphics.h
scl/include/sclresourcecache.h
scl/include/sclui.h
scl/include/sclwindows.h
scl/sclanimator.cpp
scl/sclcontext.cpp
scl/sclcontroller.cpp
scl/scleventhandler.cpp
scl/sclevents.cpp
scl/sclkeyfocushandler.cpp
scl/sclresourcecache.cpp
scl/sclui.cpp
scl/scluibuilder.cpp
scl/scluiimpl.cpp
scl/sclwindows.cpp
sclres/sclres.h
sclres/sclres_manager.cpp
sclres/sclres_manager.h
sclres/sclres_type.h
xml2binary/encode_autopopup_configure.cpp
xml2binary/encode_default_configure.cpp
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_metadata.cpp
xml2binary/encode_modifier_decoration.cpp
xml2binary/encode_nine_patch.cpp
xml2binary/include/resource_storage.h
xml2binary/include/resource_storage_impl.h
xml2binary/include/string_encoder.h
xml2binary/include/xml2dat.h [deleted file]
xml2binary/metadata_handler.cpp
xml2binary/xml2dat.cpp
xmlresource/include/xmlresource.h
xmlresource/xmlresource.cpp

index f63b9cd..23dc660 100644 (file)
@@ -43,10 +43,10 @@ BinAutoPopupConfigParser::decode_color(SclColor& color, int width) {
     color.a = m_storage.get<sint_t>(width);
 }
 
-void BinAutoPopupConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
-    m_storage.set_str_provider(parser_info_provider);
+void BinAutoPopupConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
+    m_storage.set_str_provider(provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
 
     parsing_autopopup_configure();
 }
index 400e1a2..1e63b6d 100644 (file)
@@ -82,12 +82,12 @@ void BinResource::init(const char *entry_filepath) {
     }
 
     for ( int i = ALLDATA; i < MAX_DATATYPE; ++i) {
-        info[i].offset = offset_table[i];
-        info[i].size = size_table[i];
+        m_info[i].offset = offset_table[i];
+        m_info[i].size = size_table[i];
     }
 
-    String_Bin_Parser stringBinParser(storageAllData, info[STRING].offset, info[STRING].size);
-    Metadata_Bin_Parser metadataBinParser(storageAllData, info[METADATA].offset, info[METADATA].size);
+    String_Bin_Parser stringBinParser(storageAllData, m_info[STRING].offset, m_info[STRING].size);
+    Metadata_Bin_Parser metadataBinParser(storageAllData, m_info[METADATA].offset, m_info[METADATA].size);
 
     String_Provider stringProvider(&stringBinParser);
     Metadata_Provider metadataProvider(&metadataBinParser);
@@ -95,42 +95,42 @@ void BinResource::init(const char *entry_filepath) {
 
     if (m_input_mode_configure_parser == NULL) {
         m_input_mode_configure_parser = BinInputModeConfigParser::get_instance();
-        m_input_mode_configure_parser->init(storageAllData, info[INPUT_MODE_CONFIGURE].offset, info[INPUT_MODE_CONFIGURE].size, &parser_info_provider);
+        m_input_mode_configure_parser->init(storageAllData, m_info[INPUT_MODE_CONFIGURE].offset, m_info[INPUT_MODE_CONFIGURE].size, &parser_info_provider);
     }
     if (m_default_configure_parser == NULL) {
         m_default_configure_parser = BinDefaultConfigParser::get_instance();
-        m_default_configure_parser->init(storageAllData, info[DEFAULT_CONFIGURE].offset, info[DEFAULT_CONFIGURE].size, &parser_info_provider);
+        m_default_configure_parser->init(storageAllData, m_info[DEFAULT_CONFIGURE].offset, m_info[DEFAULT_CONFIGURE].size, &parser_info_provider);
     }
    if (m_key_coordinate_frame_parser == NULL) {
         m_key_coordinate_frame_parser = BinKeyCoordFrameParser::get_instance();
-        m_key_coordinate_frame_parser->init(storageAllData, info[KEY_COORDINATE_FRAME].offset, info[KEY_COORDINATE_FRAME].size, &parser_info_provider);
+        m_key_coordinate_frame_parser->init(storageAllData, m_info[KEY_COORDINATE_FRAME].offset, m_info[KEY_COORDINATE_FRAME].size, &parser_info_provider);
     }
 
    if (m_layout_parser == NULL) {
         m_layout_parser = BinLayoutParser::get_instance();
-        m_layout_parser->init(storageAllData, info[LAYOUT].offset, info[LAYOUT].size, &parser_info_provider);
+        m_layout_parser->init(storageAllData, m_info[LAYOUT].offset, m_info[LAYOUT].size, &parser_info_provider);
     }
     if (m_modifier_decoration_parser == NULL) {
         m_modifier_decoration_parser = BinModifierDecorationParser::get_instance();
-        m_modifier_decoration_parser->init(storageAllData, info[MODIFIER_DECORATION].offset, info[MODIFIER_DECORATION].size, &parser_info_provider);
+        m_modifier_decoration_parser->init(storageAllData, m_info[MODIFIER_DECORATION].offset, m_info[MODIFIER_DECORATION].size, &parser_info_provider);
     }
     if (m_label_properties_parser == NULL) {
         m_label_properties_parser = BinLabelPropertyParser::get_instance();
-        m_label_properties_parser->init(storageAllData, info[LABEL_PROPERTIES_FRAME].offset, info[LABEL_PROPERTIES_FRAME].size, &parser_info_provider);
+        m_label_properties_parser->init(storageAllData, m_info[LABEL_PROPERTIES_FRAME].offset, m_info[LABEL_PROPERTIES_FRAME].size, &parser_info_provider);
     }
 
     if (m_autopopup_configure_parser == NULL) {
         m_autopopup_configure_parser = BinAutoPopupConfigParser::get_instance();
-        m_autopopup_configure_parser->init(storageAllData, info[AUTOPOPUP_CONFIGURE].offset, info[AUTOPOPUP_CONFIGURE].size, &parser_info_provider);
+        m_autopopup_configure_parser->init(storageAllData, m_info[AUTOPOPUP_CONFIGURE].offset, m_info[AUTOPOPUP_CONFIGURE].size, &parser_info_provider);
     }
     if (m_magnifier_configure_parser == NULL) {
         m_magnifier_configure_parser = BinMagnifierConfigParser::get_instance();
-        m_magnifier_configure_parser->init(storageAllData, info[MAGNIFIER_CONFIGURE].offset, info[MAGNIFIER_CONFIGURE].size, &parser_info_provider);
+        m_magnifier_configure_parser->init(storageAllData, m_info[MAGNIFIER_CONFIGURE].offset, m_info[MAGNIFIER_CONFIGURE].size, &parser_info_provider);
     }
 
     if (m_nine_patch_file_list_parser == NULL) {
         m_nine_patch_file_list_parser = BinNinePatchFileParser::get_instance();
-        m_nine_patch_file_list_parser->init(storageAllData, info[NINE_PATCH].offset, info[NINE_PATCH].size, &parser_info_provider);
+        m_nine_patch_file_list_parser->init(storageAllData, m_info[NINE_PATCH].offset, m_info[NINE_PATCH].size, &parser_info_provider);
     }
 
     SCLLOG_TIME_END("Parsing binary XML files");
index 74bb6ca..e819107 100644 (file)
@@ -32,10 +32,10 @@ BinDefaultConfigParser* BinDefaultConfigParser::get_instance() {
     return &instance;
 }
 
-void BinDefaultConfigParser::init(const FileStorage& storage, int offset, int size,  IParserInfo_Provider* parser_info_provider) {
-    m_storage.set_str_provider(parser_info_provider);
+void BinDefaultConfigParser::init(const FileStorage& storage, int offset, int size,  IParserInfo_Provider* provider) {
+    m_storage.set_str_provider(provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
     parsing_default_configure();
 }
 void
index a43ac59..2c840c3 100644 (file)
@@ -34,7 +34,7 @@ FileStorage::~FileStorage() {
 }
 
 int FileStorage::
-offset() const {
+get_offset() const {
     return m_offset;
 }
 void FileStorage::
@@ -174,13 +174,13 @@ int FileStorage::
     return m_size;
 }
 int FileStorage::
-size()const{
+get_size() const{
     return m_size;
 }
 int FileStorage::
 get_storage(const FileStorage& storage, int offset, int block_size) {
     if (offset < 0 || block_size <= 0) return -1;
-    if (storage.size() < offset + block_size) return -1;
+    if (storage.get_size() < offset + block_size) return -1;
 
     if (m_storage != NULL) {
         delete[] m_storage;
index c766a95..0441ba5 100644 (file)
@@ -244,58 +244,60 @@ void set_layout_width(T& md_helper,
 }
 
 template <class T>
-void set_key_coordinate_record_width(Tmd_helper,
+void set_key_coordinate_record_width(T *md_helper,
        Key_coordinate_record_width & record_width) {
-       md_helper.set_current_metadata_record("key_coordinate_record");
-       memset(&record_width, 0x00, sizeof(Key_coordinate_record_width));
+       if (md_helper) {
+               md_helper->set_current_metadata_record("key_coordinate_record");
+               memset(&record_width, 0x00, sizeof(Key_coordinate_record_width));
 
-       record_width.x = md_helper.get_width("x");
-       record_width.y = md_helper.get_width("y");
-       record_width.width = md_helper.get_width("width");
-       record_width.height = md_helper.get_width("height");
-       record_width.add_hit_left = md_helper.get_width("add_hit_left");
-       record_width.add_hit_right = md_helper.get_width("add_hit_right");
-       record_width.add_hit_top = md_helper.get_width("add_hit_top");
-       record_width.add_hit_bottom = md_helper.get_width("add_hit_bottom");
-       record_width.popup_relative_x = md_helper.get_width("popup_relative_x");
-       record_width.popup_relative_y = md_helper.get_width("popup_relative_y");
-       record_width.extract_offset_x = md_helper.get_width("extract_offset_x");
-       record_width.extract_offset_y = md_helper.get_width("extract_offset_y");
-       record_width.sub_layout = md_helper.get_width("sub_layout");
-       record_width.magnifier_offset_x = md_helper.get_width("magnifier_offset_x");
-       record_width.magnifier_offset_y = md_helper.get_width("magnifier_offset_y");
-       record_width.custom_id = md_helper.get_width("custom_id");
-       record_width.button_type = md_helper.get_width("button_type");
-       record_width.key_type = md_helper.get_width("key_type");
-       record_width.popup_type = md_helper.get_width("popup_type");
-       record_width.use_magnifier = md_helper.get_width("use_magnifier");
-       record_width.use_long_key_magnifier = md_helper.get_width("use_long_key_magnifier");
-       record_width.popup_input_mode = md_helper.get_width("popup_input_mode");
-       record_width.sound_style = md_helper.get_width("sound_style");
-       record_width.vibe_style = md_helper.get_width("vibe_style");
-       record_width.is_side_button = md_helper.get_width("is_side_button");
-       record_width.label_count = md_helper.get_width("label_count");
-       record_width.label = md_helper.get_width("label");
-       record_width.label_type = md_helper.get_width("label_type");
-       record_width.image_label_path = md_helper.get_width("image_label_path");
-       record_width.image_label_type = md_helper.get_width("image_label_type");
-       record_width.bg_image_path = md_helper.get_width("bg_image_path");
-       record_width.key_value_count = md_helper.get_width("key_value_count");
-       record_width.key_value = md_helper.get_width("key_value");
-       record_width.key_event = md_helper.get_width("key_event");
-       record_width.long_key_type = md_helper.get_width("long_key_type");
-       record_width.long_key_value = md_helper.get_width("long_key_value");
-       record_width.long_key_event = md_helper.get_width("long_key_event");
-       record_width.use_repeat_key = md_helper.get_width("use_repeat_key");
-       record_width.autopopup_key_labels = md_helper.get_width("autopopup_key_labels");
-       record_width.autopopup_key_values = md_helper.get_width("autopopup_key_values");
-       record_width.autopopup_key_events = md_helper.get_width("autopopup_key_events");
-       record_width.dont_close_popup = md_helper.get_width("dont_close_popup");
-       record_width.extra_option = md_helper.get_width("extra_option");
-       record_width.multitouch_type = md_helper.get_width("multitouch_type");
-       record_width.modifier_decorator = md_helper.get_width("modifier_decorator");
-       record_width.magnifier_label = md_helper.get_width("magnifier_label");
-       record_width.hint_string = md_helper.get_width("hint_string");
+               record_width.x = md_helper->get_width("x");
+               record_width.y = md_helper->get_width("y");
+               record_width.width = md_helper->get_width("width");
+               record_width.height = md_helper->get_width("height");
+               record_width.add_hit_left = md_helper->get_width("add_hit_left");
+               record_width.add_hit_right = md_helper->get_width("add_hit_right");
+               record_width.add_hit_top = md_helper->get_width("add_hit_top");
+               record_width.add_hit_bottom = md_helper->get_width("add_hit_bottom");
+               record_width.popup_relative_x = md_helper->get_width("popup_relative_x");
+               record_width.popup_relative_y = md_helper->get_width("popup_relative_y");
+               record_width.extract_offset_x = md_helper->get_width("extract_offset_x");
+               record_width.extract_offset_y = md_helper->get_width("extract_offset_y");
+               record_width.sub_layout = md_helper->get_width("sub_layout");
+               record_width.magnifier_offset_x = md_helper->get_width("magnifier_offset_x");
+               record_width.magnifier_offset_y = md_helper->get_width("magnifier_offset_y");
+               record_width.custom_id = md_helper->get_width("custom_id");
+               record_width.button_type = md_helper->get_width("button_type");
+               record_width.key_type = md_helper->get_width("key_type");
+               record_width.popup_type = md_helper->get_width("popup_type");
+               record_width.use_magnifier = md_helper->get_width("use_magnifier");
+               record_width.use_long_key_magnifier = md_helper->get_width("use_long_key_magnifier");
+               record_width.popup_input_mode = md_helper->get_width("popup_input_mode");
+               record_width.sound_style = md_helper->get_width("sound_style");
+               record_width.vibe_style = md_helper->get_width("vibe_style");
+               record_width.is_side_button = md_helper->get_width("is_side_button");
+               record_width.label_count = md_helper->get_width("label_count");
+               record_width.label = md_helper->get_width("label");
+               record_width.label_type = md_helper->get_width("label_type");
+               record_width.image_label_path = md_helper->get_width("image_label_path");
+               record_width.image_label_type = md_helper->get_width("image_label_type");
+               record_width.bg_image_path = md_helper->get_width("bg_image_path");
+               record_width.key_value_count = md_helper->get_width("key_value_count");
+               record_width.key_value = md_helper->get_width("key_value");
+               record_width.key_event = md_helper->get_width("key_event");
+               record_width.long_key_type = md_helper->get_width("long_key_type");
+               record_width.long_key_value = md_helper->get_width("long_key_value");
+               record_width.long_key_event = md_helper->get_width("long_key_event");
+               record_width.use_repeat_key = md_helper->get_width("use_repeat_key");
+               record_width.autopopup_key_labels = md_helper->get_width("autopopup_key_labels");
+               record_width.autopopup_key_values = md_helper->get_width("autopopup_key_values");
+               record_width.autopopup_key_events = md_helper->get_width("autopopup_key_events");
+               record_width.dont_close_popup = md_helper->get_width("dont_close_popup");
+               record_width.extra_option = md_helper->get_width("extra_option");
+               record_width.multitouch_type = md_helper->get_width("multitouch_type");
+               record_width.modifier_decorator = md_helper->get_width("modifier_decorator");
+               record_width.magnifier_label = md_helper->get_width("magnifier_label");
+               record_width.hint_string = md_helper->get_width("hint_string");
+       }
 }
 
 template <class T>
index a156625..354fc1c 100644 (file)
@@ -30,7 +30,7 @@
 #include "magnifier_configure_bin_parser.h"
 #include "nine_patch_file_list_bin_parser.h"
 #include "sclres.h"
-struct info_t{
+struct resource_info_t{
     int offset;
     int size;
 };
@@ -82,12 +82,12 @@ class BinResource: public sclres::SclRes{
     int get_modifier_decoration_id(const char *name);
     bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info);
 
-    const char* name() {
+    const char* get_name() {
         return "binary_xmlparser";
     }
 
     void destroy();
-    struct info_t info[MAX_DATATYPE];
+    struct resource_info_t m_info[MAX_DATATYPE];
     private:
     BinResource();
 
index 0bc7bf6..56a5a60 100644 (file)
@@ -45,7 +45,7 @@ class FileStorage{
         FileStorage(const IString_Provider* string_provider = NULL);
     ~FileStorage();
 
-    int offset() const;
+    int get_offset() const;
     void set_str_provider(const IString_Provider*);
     template <typename T>
     T get(int width);
@@ -63,7 +63,7 @@ class FileStorage{
     int get_storage(const FileStorage&, int offset, int block_size);
 
     void advance(int bytes);
-    int size()const;
+    int get_size() const;
 
     private:
     /** brief unify get_xx method name
index a8367f2..1c49988 100644 (file)
@@ -29,7 +29,7 @@ class BinInputModeConfigParser {
     public:
         ~BinInputModeConfigParser();
         static BinInputModeConfigParser *get_instance();
-        void init(const FileStorage&, int, int, IParserInfo_Provider* parser_info_provider);
+        void init(const FileStorage&, int, int, IParserInfo_Provider* provider);
         PSclInputModeConfigure get_input_mode_configure_table();
         int get_inputmode_id(const char *name);
         const char* get_inputmode_name(int id);
index 1250de4..34b2206 100644 (file)
@@ -35,10 +35,10 @@ BinInputModeConfigParser::get_instance() {
 }
 
 void
-BinInputModeConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
+BinInputModeConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
     m_storage.set_str_provider(parser_info_provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
     parsing_input_mode_configure_table();
 }
 
index 2dfb0b2..72ce7f2 100644 (file)
@@ -63,18 +63,18 @@ load(int layout_id)
     FileStorage alldata;
     alldata.loadFile(path);
 
-    String_Bin_Parser stringBinParser(alldata, bin_xmlres->info[STRING].offset, bin_xmlres->info[STRING].size);
-    Metadata_Bin_Parser metadataBinParser(alldata, bin_xmlres->info[METADATA].offset, bin_xmlres->info[METADATA].size);
+    String_Bin_Parser stringBinParser(alldata, bin_xmlres->m_info[STRING].offset, bin_xmlres->m_info[STRING].size);
+    Metadata_Bin_Parser metadataBinParser(alldata, bin_xmlres->m_info[METADATA].offset, bin_xmlres->m_info[METADATA].size);
 
     String_Provider stringProvider(&stringBinParser);
     Metadata_Provider metadataProvider(&metadataBinParser);
-    ParserInfo_Provider parser_info_provider(&metadataProvider, &stringProvider);
-    storage.set_str_provider(&parser_info_provider);
-    this->parser_info_provider = &parser_info_provider;
+    ParserInfo_Provider provider(&metadataProvider, &stringProvider);
+    storage.set_str_provider(&provider);
+    this->parser_info_provider = &provider;
     storage.get_storage(
         alldata,
-        bin_xmlres->info[KEY_COORDINATE_FRAME].offset,
-        bin_xmlres->info[KEY_COORDINATE_FRAME].size);
+        bin_xmlres->m_info[KEY_COORDINATE_FRAME].offset,
+        bin_xmlres->m_info[KEY_COORDINATE_FRAME].size);
 
     // 4 byte (range[0-4,294,967,295))
     const int DATA_SIZE_BYTES = 4;
@@ -146,10 +146,10 @@ unload()
     }
 }
 void
-BinKeyCoordFrameParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
+BinKeyCoordFrameParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
     m_storage.set_str_provider(parser_info_provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
 }
 
 PSclLayoutKeyCoordinatePointerTable
index 1d14551..6a00d1b 100644 (file)
@@ -32,10 +32,10 @@ BinLabelPropertyParser* BinLabelPropertyParser::get_instance() {
     static BinLabelPropertyParser instance;
     return &instance;
 }
-void BinLabelPropertyParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
+void BinLabelPropertyParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
     m_storage.set_str_provider(parser_info_provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
     parsing_label_properties_frame();
 }
 const int
index 7908db4..8129b13 100644 (file)
@@ -39,10 +39,10 @@ get_instance() {
     return &instance;
 }
 void BinLayoutParser::
-init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
-    m_storage.set_str_provider(parser_info_provider);
+init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
+    m_storage.set_str_provider(provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
     parsing_layout_table();
 
 }
index ac9082c..5881159 100644 (file)
@@ -33,10 +33,10 @@ BinMagnifierConfigParser* BinMagnifierConfigParser::get_instance() {
     return &instance;
 }
 
-void BinMagnifierConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
-    m_storage.set_str_provider(parser_info_provider);
+void BinMagnifierConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
+    m_storage.set_str_provider(provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
     parsing_magnifier_configure();
 }
 
index fa0f305..98825da 100644 (file)
@@ -32,10 +32,10 @@ BinModifierDecorationParser::get_instance() {
     return &instance;
 }
 void
-BinModifierDecorationParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
-    m_storage.set_str_provider(parser_info_provider);
+BinModifierDecorationParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
+    m_storage.set_str_provider(provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
 
     parsing_modifier_decoration_table();
 }
index 78416b7..0cd7125 100644 (file)
@@ -32,10 +32,10 @@ BinNinePatchFileParser* BinNinePatchFileParser::get_instance() {
     static BinNinePatchFileParser instance;
     return &instance;
 }
-void BinNinePatchFileParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) {
-    m_storage.set_str_provider(parser_info_provider);
+void BinNinePatchFileParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* provider) {
+    m_storage.set_str_provider(provider);
     m_storage.get_storage(storage, offset, size);
-    this->parser_info_provider = parser_info_provider;
+    this->parser_info_provider = provider;
 
     parsing_nine_patch_file_list();
 }
index 470178e..3440587 100644 (file)
@@ -105,11 +105,11 @@ CSCLAnimatorImplEfl::animator_timer(SclAnimationState *state)
                             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);
                         }
-                        SclWindowContext *winctx = windows->get_window_context(windows->get_base_window());
-                        if (winctx) {
+                        SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+                        if (window_context) {
                             if (rect.x < 0) {
                                 evas_object_move(m_highlight_ui_object_alternate,
-                                    winctx->geometry.width + rect.x, rect.y);
+                                    window_context->geometry.width + rect.x, rect.y);
                                 evas_object_image_fill_set(m_highlight_ui_object_alternate,
                                     0, 0, rect.width, rect.height);
                                 evas_object_resize(m_highlight_ui_object_alternate,
@@ -117,9 +117,9 @@ CSCLAnimatorImplEfl::animator_timer(SclAnimationState *state)
                                 evas_object_raise(m_highlight_ui_object_alternate);
                                 evas_object_show(m_highlight_ui_object_alternate);
                                 circular = TRUE;
-                            } else if (rect.x + rect.width > winctx->geometry.width) {
+                            } else if (rect.x + rect.width > window_context->geometry.width) {
                                 evas_object_move(m_highlight_ui_object_alternate,
-                                    -(winctx->geometry.width - rect.x), rect.y);
+                                    -(window_context->geometry.width - rect.x), rect.y);
                                 evas_object_image_fill_set(m_highlight_ui_object_alternate,
                                     0, 0, rect.width, rect.height);
                                 evas_object_resize(m_highlight_ui_object_alternate,
@@ -156,6 +156,8 @@ CSCLAnimatorImplEfl::animator_timer(SclAnimationState *state)
                 }
             }
             break;
+            default:
+            break;
         }
     }
 }
\ No newline at end of file
index c05ad96..70cd748 100644 (file)
@@ -118,42 +118,42 @@ sclboolean get_window_rect(const sclwindow window, SclRectangle *rect)
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLContext *context = CSCLContext::get_instance();
     if (windows && context && utils && rect) {
-        SclWindowContext *winctx = windows->get_window_context(window);
+        SclWindowContext *window_context = windows->get_window_context(window);
         sclint scr_w, scr_h;
         /* get window size */
         utils->get_screen_resolution(&scr_w, &scr_h);
-        if (winctx) {
+        if (window_context) {
             switch (context->get_rotation()) {
                 case ROTATION_90_CW:
                     {
-                        rect->height = winctx->geometry.width;
-                        rect->width = winctx->geometry.height;
-                        rect->y = scr_w - rect->height - winctx->geometry.x;
-                        rect->x = winctx->geometry.y;
+                        rect->height = window_context->geometry.width;
+                        rect->width = window_context->geometry.height;
+                        rect->y = scr_w - rect->height - window_context->geometry.x;
+                        rect->x = window_context->geometry.y;
                     }
                     break;
                 case ROTATION_180:
                     {
-                        rect->width = winctx->geometry.width;
-                        rect->height = winctx->geometry.height;
-                        rect->x = scr_w - winctx->geometry.x - rect->width;
-                        rect->y = scr_h - winctx->geometry.y - rect->height;
+                        rect->width = window_context->geometry.width;
+                        rect->height = window_context->geometry.height;
+                        rect->x = scr_w - window_context->geometry.x - rect->width;
+                        rect->y = scr_h - window_context->geometry.y - rect->height;
                     }
                     break;
                 case ROTATION_90_CCW:
                     {
-                        rect->height = winctx->geometry.width;
-                        rect->width = winctx->geometry.height;
-                        rect->y = winctx->geometry.x;
-                        rect->x= scr_h - winctx->geometry.y - rect->width;
+                        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;
                     }
                     break;
                 default:
                     {
-                        rect->x = winctx->geometry.x;
-                        rect->y = winctx->geometry.y;
-                        rect->width = winctx->geometry.width;
-                        rect->height = winctx->geometry.height;
+                        rect->x = window_context->geometry.x;
+                        rect->y = window_context->geometry.y;
+                        rect->width = window_context->geometry.width;
+                        rect->height = window_context->geometry.height;
                     }
                     break;
             }
@@ -166,7 +166,7 @@ sclboolean get_window_rect(const sclwindow window, SclRectangle *rect)
 }
 
 /**  Here x and y contains "actual" x and y position relative to portrait root window,
-     and winctx->width,height contains the window's orientation dependant width and height */
+     and window_context->width,height contains the window's orientation dependant width and height */
 SclPoint get_rotated_local_coords(sclint x, sclint y, SCLRotation rotation, SclRectangle *rect) {
     SclPoint ret = {0, 0};
 
@@ -252,9 +252,9 @@ Eina_Bool mouse_press(void *data, int type, void *event_info)
         } else {
             do {
                 window = windows->get_nth_window_in_Z_order_list(index);
-                SclWindowContext *winctx = windows->get_window_context(window);
-                if (winctx) {
-                    if (winctx->is_virtual) {
+                SclWindowContext *window_context = windows->get_window_context(window);
+                if (window_context) {
+                    if (window_context->is_virtual) {
                         is_scl_window  = TRUE;
                     } else if (elm_win_xwindow_get(static_cast<Evas_Object*>(window)) == ev->window) {
                         is_scl_window = TRUE;
@@ -266,15 +266,15 @@ Eina_Bool mouse_press(void *data, int type, void *event_info)
         }
         if (!is_scl_window) return TRUE;
 
-        SclRectangle rect = {0};
+        SclRectangle rect = {0,0,0,0};
         do {
             window = windows->get_nth_window_in_Z_order_list(index);
             if (window) {
                 // Update the position of the target window
                 //windows->get_window_context(window, TRUE);
-                SclWindowContext *winctx = windows->get_window_context(window);
-                if (winctx) {
-                    windows->get_window_rect(window, &(winctx->geometry));
+                SclWindowContext *window_context = windows->get_window_context(window);
+                if (window_context) {
+                    windows->get_window_rect(window, &(window_context->geometry));
                     if (get_window_rect(window, &rect)) {
                         int adjustx = ev->root.x;
                         int adjusty = ev->root.y;
@@ -286,8 +286,7 @@ Eina_Bool mouse_press(void *data, int type, void *event_info)
                         }
                         if (default_configure) {
                             SCLDisplayMode display_mode = context->get_display_mode();
-                            CSCLErrorAdjustment *adjustment = CSCLErrorAdjustment::get_instance();
-                            if (adjustment && scl_check_arrindex(display_mode, DISPLAYMODE_MAX)) {
+                            if (scl_check_arrindex(display_mode, DISPLAYMODE_MAX)) {
                                 adjustment->apply_touch_offset(default_configure->touch_offset_level[display_mode], &adjustx, &adjusty);
                             }
                         }
@@ -367,9 +366,9 @@ Eina_Bool mouse_release (void *data, int type, void *event_info)
         sclwindow window = SCLWINDOW_INVALID;
         SclRectangle rect;
         sclboolean dimwinevent = FALSE;
-        SclWindowContext *dimctx = windows->get_window_context(windows->get_dim_window());
-        if (dimctx) {
-            if (!(dimctx->is_virtual)) {
+        SclWindowContext *dim_window_context = windows->get_window_context(windows->get_dim_window());
+        if (dim_window_context) {
+            if (!(dim_window_context->is_virtual)) {
                 if (elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_dim_window())) == ev->window) {
                     dimwinevent = TRUE;
                 }
@@ -381,9 +380,9 @@ Eina_Bool mouse_release (void *data, int type, void *event_info)
             do {
                 window = windows->get_nth_window_in_Z_order_list(index);
                 if (window) {
-                    SclWindowContext *winctx = windows->get_window_context(window);
-                    if (winctx) {
-                        windows->get_window_rect(window, &(winctx->geometry));
+                    SclWindowContext *window_context = windows->get_window_context(window);
+                    if (window_context) {
+                        windows->get_window_rect(window, &(window_context->geometry));
                         if (get_window_rect(window, &rect)) {
                             int adjustx = ev->root.x;
                             int adjusty = ev->root.y;
@@ -469,9 +468,9 @@ Eina_Bool key_pressed(void *data, int type, void *event_info)
     LOGD("=-=-=-=- ev->string(string) = %s \n",ev->string);
 
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
-    SclButtonContext *prevbtncontext = NULL;
+    SclButtonContext *prev_button_context = NULL;
     const SclLayoutKeyCoordinate *prevcoordinate = NULL;
-    SclButtonContext *btncontext = NULL;
+    SclButtonContext *button_context = NULL;
     const SclLayoutKeyCoordinate *coordinate = NULL;
 
     CSCLWindows *windows = CSCLWindows::get_instance();
@@ -490,13 +489,13 @@ Eina_Bool key_pressed(void *data, int type, void *event_info)
     } 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)) {
-        btncontext = cache->get_cur_button_context(window, current_key_index);
+        button_context = cache->get_cur_button_context(window, current_key_index);
         coordinate = cache->get_cur_layout_key_coordinate(window, current_key_index);
-        btncontext->state = BUTTON_STATE_NORMAL;
+        button_context->state = BUTTON_STATE_NORMAL;
         controller->mouse_press(window, coordinate->x, coordinate->y, TRUE);
         controller->mouse_release(window, coordinate->x, coordinate->y, TRUE);
         if (KEY_TYPE_MODECHANGE != coordinate->key_type) {
-            btncontext->state = BUTTON_STATE_PRESSED;
+            button_context->state = BUTTON_STATE_PRESSED;
             windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
         } else {
             focus_handler->init_key_index();
@@ -505,12 +504,12 @@ Eina_Bool key_pressed(void *data, int type, void *event_info)
     }
 
     if (current_key_index != key_index) {
-        btncontext = cache->get_cur_button_context(window, key_index);
-        prevbtncontext = cache->get_cur_button_context(window, current_key_index);
+        button_context = cache->get_cur_button_context(window, key_index);
+        prev_button_context = cache->get_cur_button_context(window, current_key_index);
         prevcoordinate = cache->get_cur_layout_key_coordinate(window, current_key_index);
         coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
-        prevbtncontext->state = BUTTON_STATE_NORMAL;
-        btncontext->state = BUTTON_STATE_PRESSED;
+        prev_button_context->state = BUTTON_STATE_NORMAL;
+        button_context->state = BUTTON_STATE_PRESSED;
         sclshort x,y,width,height;
         if (prevcoordinate->x < coordinate->x) {
             x = prevcoordinate->x;
@@ -582,9 +581,9 @@ Eina_Bool mouse_move (void *data, int type, void *event_info)
             do {
                 window = windows->get_nth_window_in_Z_order_list(index);
                 if (window) {
-                    SclWindowContext *winctx = windows->get_window_context(window);
-                    if (winctx) {
-                        windows->get_window_rect(window, &(winctx->geometry));
+                    SclWindowContext *window_context = windows->get_window_context(window);
+                    if (window_context) {
+                        windows->get_window_rect(window, &(window_context->geometry));
                         if (get_window_rect(window, &rect)) {
                             int adjustx = ev->root.x;
                             int adjusty = ev->root.y;
@@ -792,7 +791,7 @@ void
 CSCLEventsImplEfl::generate_mouse_event(SCLMouseEvent type, scl16 x, scl16 y)
 {
     CSCLWindows *windows = CSCLWindows::get_instance();
-    SclWindowContext *winctx = NULL;
+    SclWindowContext *window_context = NULL;
 
     static const sclint MAX_DEVICES = 100;
     static sclboolean pressed[MAX_DEVICES] = { FALSE };
@@ -806,11 +805,11 @@ CSCLEventsImplEfl::generate_mouse_event(SCLMouseEvent type, scl16 x, scl16 y)
                         pressed[loop] = TRUE;
                         Ecore_Event_Mouse_Button evt;
                         evt.window = elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window()));
-                        //winctx = windows->get_window_context(windows->get_base_window(), FALSE);
-                        winctx = windows->get_window_context(windows->get_base_window());
-                        if (winctx) {
-                            evt.root.x = x + winctx->geometry.x;
-                            evt.root.y = y + winctx->geometry.y;
+                        //window_context = windows->get_window_context(windows->get_base_window(), FALSE);
+                        window_context = windows->get_window_context(windows->get_base_window());
+                        if (window_context) {
+                            evt.root.x = x + window_context->geometry.x;
+                            evt.root.y = y + window_context->geometry.y;
                             evt.multi.device = loop;
                             mouse_press(NULL, 0, &evt);
                         }
@@ -827,11 +826,11 @@ CSCLEventsImplEfl::generate_mouse_event(SCLMouseEvent type, scl16 x, scl16 y)
                         pressed[loop] = FALSE;
                         Ecore_Event_Mouse_Button evt;
                         evt.window = elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window()));
-                        //winctx = windows->get_window_context(windows->get_base_window(), FALSE);
-                        winctx = windows->get_window_context(windows->get_base_window());
-                        if (winctx) {
-                            evt.root.x = x + winctx->geometry.x;
-                            evt.root.y = y + winctx->geometry.y;
+                        //window_context = windows->get_window_context(windows->get_base_window(), FALSE);
+                        window_context = windows->get_window_context(windows->get_base_window());
+                        if (window_context) {
+                            evt.root.x = x + window_context->geometry.x;
+                            evt.root.y = y + window_context->geometry.y;
                             evt.multi.device = loop;
                             mouse_release(NULL, 0, &evt);
                         }
@@ -847,11 +846,11 @@ CSCLEventsImplEfl::generate_mouse_event(SCLMouseEvent type, scl16 x, scl16 y)
                     if (pressed[loop] == TRUE) {
                         Ecore_Event_Mouse_Move evt;
                         evt.window = elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window()));
-                        //winctx = windows->get_window_context(windows->get_base_window(), FALSE);
-                        winctx = windows->get_window_context(windows->get_base_window());
-                        if (winctx) {
-                            evt.root.x = x + winctx->geometry.x;
-                            evt.root.y = y + winctx->geometry.y;
+                        //window_context = windows->get_window_context(windows->get_base_window(), FALSE);
+                        window_context = windows->get_window_context(windows->get_base_window());
+                        if (window_context) {
+                            evt.root.x = x + window_context->geometry.x;
+                            evt.root.y = y + window_context->geometry.y;
                             evt.multi.device = loop;
                             mouse_move(NULL, 0, &evt);
                         }
@@ -860,6 +859,8 @@ CSCLEventsImplEfl::generate_mouse_event(SCLMouseEvent type, scl16 x, scl16 y)
                 }
             }
             break;
+            default:
+            break;
         }
     }
 }
index ac19caa..e355a4a 100644 (file)
@@ -146,16 +146,16 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
-    SclWindowContext *winctx = NULL;
-    SclWindowContext *targetctx = NULL;
+    SclWindowContext *window_context = NULL;
+    SclWindowContext *target_window_context = NULL;
     if (windows && window) {
-        //winctx = windows->get_window_context(window, FALSE);
-        winctx = windows->get_window_context(window);
-        //targetctx = windows->get_window_context(draw_ctx, FALSE);
-        targetctx = windows->get_window_context(draw_ctx);
+        //window_context = windows->get_window_context(window, FALSE);
+        window_context = windows->get_window_context(window);
+        //target_window_context = windows->get_window_context(draw_ctx, FALSE);
+        target_window_context = windows->get_window_context(draw_ctx);
     }
 
-    if (winctx && targetctx && image_path && utils && cache && windows) {
+    if (window_context && target_window_context && image_path && utils && cache && windows) {
         sclboolean is_highlight_ui = FALSE;
         sclchar buf[_POSIX_PATH_MAX] = {0};
         utils->get_decomposed_path(buf, IMG_PATH_PREFIX, image_path);
@@ -222,7 +222,7 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
             EFLObject *clip_object = NULL;
             
             Evas_Object *window_object = (Evas_Object*)window;
-            if (winctx->is_virtual) {
+            if (window_context->is_virtual) {
                 window_object = static_cast<Evas_Object*>(windows->get_base_window());
             }
 
@@ -334,9 +334,11 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
                         if (is_highlight_ui) {
                             delete object;
                         } else {
-                            targetctx->etc_info = eina_list_append((Eina_List*)(targetctx->etc_info), object);
+                            target_window_context->etc_info =
+                                eina_list_append((Eina_List*)(target_window_context->etc_info), object);
                             if (clip_object) {
-                                targetctx->etc_info = eina_list_append((Eina_List*)(targetctx->etc_info), clip_object);
+                                target_window_context->etc_info =
+                                    eina_list_append((Eina_List*)(target_window_context->etc_info), clip_object);
                             }
                         }
 
@@ -348,7 +350,8 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
                         //SclRectangle rt;
                         //windows->get_window_rect(window, &rt);
                         //if (rt.width == dest_width && rt.height == dest_height) {
-                        if (winctx->geometry.width == dest_width && winctx->geometry.height == dest_height) {
+                        if (window_context->geometry.width == dest_width &&
+                            window_context->geometry.height == dest_height) {
                             //evas_object_lower(image_object);
                             evas_object_layer_set(image_object, window_layer + 0);
                         } else {
@@ -462,17 +465,17 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
     SCL_DEBUG();
 
     CSCLWindows *windows = CSCLWindows::get_instance();
-    SclWindowContext *winctx = NULL;
-    SclWindowContext *targetctx = NULL;
+    SclWindowContext *window_context = NULL;
+    SclWindowContext *target_window_context = NULL;
 
     if (windows && window) {
-        //winctx = windows->get_window_context(window, FALSE);
-        winctx = windows->get_window_context(window);
-        //targetctx = windows->get_window_context(draw_ctx, FALSE);
-        targetctx = windows->get_window_context(draw_ctx);
+        //window_context = windows->get_window_context(window, FALSE);
+        window_context = windows->get_window_context(window);
+        //target_window_context = windows->get_window_context(draw_ctx, FALSE);
+        target_window_context = windows->get_window_context(draw_ctx);
     }
 
-    if (winctx && targetctx && str && windows) {
+    if (window_context && target_window_context && str && windows) {
         if (strlen(str) > 0) {
 #ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW
             if (window == windows->get_magnifier_window()) {
@@ -542,7 +545,7 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
             if (object) {
                 object->extracted = FALSE;
                 Evas_Object *window_object = (Evas_Object*)window;
-                if (winctx->is_virtual) {
+                if (window_context->is_virtual) {
                     window_object = static_cast<Evas_Object*>(windows->get_base_window());
                 }
                 Evas *evas = evas_object_evas_get(window_object);
@@ -631,7 +634,7 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
                     object->position.y = pos_y;
                     object->position.width = width;
                     object->position.height = height;
-                    object->etc_info = (char*)str;
+                    object->etc_info = str;
                     object->data = st;
 
                     sclint calwidth, calheight;
@@ -667,7 +670,7 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
                             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);
-                        char *markup = evas_textblock_text_utf8_to_markup(text_object, str);
+                        markup = evas_textblock_text_utf8_to_markup(text_object, str);
                         if (markup) {
                             evas_object_textblock_text_markup_set(text_object, markup);
                             free(markup);
@@ -703,7 +706,8 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
                     /*evas_object_event_callback_add((Evas_Object*)text_object, EVAS_CALLBACK_MOUSE_UP, mouse_release, window);
                     evas_object_event_callback_add((Evas_Object*)text_object, EVAS_CALLBACK_MOUSE_MOVE, mouse_move, window);*/
 
-                    targetctx->etc_info = eina_list_append((Eina_List*)(targetctx->etc_info), object);
+                    target_window_context->etc_info =
+                        eina_list_append((Eina_List*)(target_window_context->etc_info), object);
 
                     sclint window_layer = 29000;
                     if (!windows->is_base_window(reinterpret_cast<sclwindow>(draw_ctx))) {
@@ -765,23 +769,23 @@ CSCLGraphicsImplEfl::draw_rectangle(sclwindow window, const scldrawctx draw_ctx,
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
-    SclWindowContext *winctx = NULL;
-    SclWindowContext *targetctx = NULL;
+    SclWindowContext *window_context = NULL;
+    SclWindowContext *target_window_context = NULL;
 
     if (windows && window) {
-        //winctx = windows->get_window_context(window, FALSE);
-        winctx = windows->get_window_context(window);
-        //targetctx = windows->get_window_context(draw_ctx, FALSE);
-        targetctx = windows->get_window_context(draw_ctx);
+        //window_context = windows->get_window_context(window, FALSE);
+        window_context = windows->get_window_context(window);
+        //target_window_context = windows->get_window_context(draw_ctx, FALSE);
+        target_window_context = windows->get_window_context(draw_ctx);
     }
 
-    if (winctx && utils && cache && windows && targetctx) {
+    if (window_context && utils && cache && windows && target_window_context) {
         EFLObject *object = new EFLObject;
         if (object) {
             Evas_Object *window_object = (Evas_Object*)window;
-            if (winctx->is_virtual) {
+            if (window_context->is_virtual) {
                 window_object = static_cast<Evas_Object*>(windows->get_base_window());
-            //    //winctx = windows->get_window_context(windows->get_base_window());
+            //    //window_context = windows->get_window_context(windows->get_base_window());
             }
 
             Evas *evas = evas_object_evas_get(window_object);
@@ -807,7 +811,8 @@ CSCLGraphicsImplEfl::draw_rectangle(sclwindow window, const scldrawctx draw_ctx,
             object->etc_info = NULL;
             object->data = NULL;
 
-            targetctx->etc_info = eina_list_append((Eina_List*)(targetctx->etc_info), object);
+            target_window_context->etc_info =
+                eina_list_append((Eina_List*)(target_window_context->etc_info), object);
 
             sclint window_layer = 29000;
             if (!windows->is_base_window(reinterpret_cast<sclwindow>(draw_ctx))) {
index 52c2bb6..469273b 100644 (file)
@@ -97,7 +97,8 @@ public :
                    SCLLabelAlignment align, sclint padding_x, sclint padding_y, sclint inner_width, sclint inner_height);
 
     void draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble pos_x, scldouble pos_y,
-                        scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color, sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha);
+                        scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color,
+                        sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha);
     scldrawctx begin_paint(const sclwindow window, const sclboolean force_draw = FALSE);
     void end_paint(const sclwindow window, scldrawctx draw_ctx);
     SclSize get_image_size(sclchar* image_path);
index 7e04c71..8164489 100644 (file)
@@ -84,11 +84,11 @@ static Eina_Bool x_event_window_show_cb (void *data, int ev_type, void *event)
     CSCLWindows *windows = CSCLWindows::get_instance();
     Evas_Object *window = (Evas_Object *)windows->get_base_window();
     Ecore_X_Event_Window_Show *e = (Ecore_X_Event_Window_Show*)event;
-    CSCLKeyFocusHandler* focus_handler = CSCLKeyFocusHandler::get_instance();
 
     if(e->win == elm_win_xwindow_get(window)) {
         LOGD("INSIDE =-=-=-=- x_event_window_show_cb, Trying to Grab Key Board : \n");
 #ifdef USING_KEY_GRAB
+        CSCLKeyFocusHandler* focus_handler = CSCLKeyFocusHandler::get_instance();
         focus_handler->grab_keyboard(windows->get_base_window());
 #endif
     }
@@ -110,15 +110,15 @@ void CSCLWindowsImplEfl::fini()
  * Create a content window and binds it into given parent window as a child
  */
 sclwindow
-CSCLWindowsImplEfl::create_base_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindowsImplEfl::create_base_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
 
     sclwindow ret = SCLWINDOW_INVALID;
 
-    if (winctx) {
-        winctx->etc_info = NULL;
-        winctx->window = parent;
+    if (window_context) {
+        window_context->etc_info = NULL;
+        window_context->window = parent;
     
     //Adding window show event handler:mrunal.s
     _candidate_show_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_SHOW, x_event_window_show_cb, NULL);
@@ -135,7 +135,7 @@ CSCLWindowsImplEfl::create_base_window(const sclwindow parent, SclWindowContext
         }
 #endif
 
-        ret = winctx->window;
+        ret = window_context->window;
     }
 
     CSCLUtils *utils = CSCLUtils::get_instance();
@@ -151,7 +151,7 @@ CSCLWindowsImplEfl::create_base_window(const sclwindow parent, SclWindowContext
  * Creates a window
  */
 sclwindow
-CSCLWindowsImplEfl::create_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindowsImplEfl::create_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
 
@@ -230,7 +230,7 @@ CSCLWindowsImplEfl::create_window(const sclwindow parent, SclWindowContext *winc
 * Creates a window
 */
 sclwindow
-CSCLWindowsImplEfl::create_magnifier_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindowsImplEfl::create_magnifier_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
 
@@ -251,8 +251,8 @@ CSCLWindowsImplEfl::create_magnifier_window(const sclwindow parent, SclWindowCon
     CSCLWindows *windows = CSCLWindows::get_instance();
     sclint scrx, scry, winx, winy;
     utils->get_screen_resolution(&scrx, &scry);
-    SclWindowContext *winctx = windows->get_window_context(windows->get_base_window());
-    evas_object_resize(win, scrx, height + winctx->height);
+    SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+    evas_object_resize(win, scrx, height + window_context->height);
 #else
     //evas_object_resize(win, width, height);
 #endif
@@ -316,7 +316,7 @@ CSCLWindowsImplEfl::create_magnifier_window(const sclwindow parent, SclWindowCon
  * Creates the dim window
  */
 sclwindow
-CSCLWindowsImplEfl::create_dim_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindowsImplEfl::create_dim_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
 
@@ -409,19 +409,19 @@ CSCLWindowsImplEfl::destroy_window(sclwindow window)
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
 
-    SclWindowContext *winctx = NULL;
+    SclWindowContext *window_context = NULL;
     if (windows && window) {
-        winctx = windows->get_window_context(window);
+        window_context = windows->get_window_context(window);
     }
 
     utils->log("WinEfl_destroywin %p %p (basewin %p mag %p)\n",
         window,
-        (winctx && !(winctx->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+        (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
         windows->get_base_window(), windows->get_magnifier_window());
 
-    if (windows && utils && winctx) {
-        if (winctx->etc_info) {
-            Eina_List *list = (Eina_List*)(winctx->etc_info);
+    if (windows && utils && 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;
             void *data = NULL;
@@ -433,9 +433,9 @@ CSCLWindowsImplEfl::destroy_window(sclwindow window)
                         Evas_Object* eo = object->object;
                         if (object->extracted) {
                             //evas_object_image_data_set(eo, NULL);
-                            void *data = evas_object_image_data_get(eo, 1);
-                            if (data) {
-                                free(data);
+                            void *image_data = evas_object_image_data_get(eo, 1);
+                            if (image_data) {
+                                free(image_data);
                             }
                         }
                         if (eo) {
@@ -468,10 +468,10 @@ CSCLWindowsImplEfl::destroy_window(sclwindow window)
                 }
                 list = eina_list_remove_list(list, iter);
             }
-            winctx->etc_info = NULL;
+            window_context->etc_info = NULL;
         }
 
-        if (!(winctx->is_virtual)) {
+        if (!(window_context->is_virtual)) {
             /* FIXME : A workaround for the bug that event on a window being hidden is delivered to
                 e17, instead of the window itself or the window right below - Should report to WM */
             if (window == windows->get_nth_popup_window(SCL_WINDOW_Z_TOP)) {
@@ -484,7 +484,7 @@ CSCLWindowsImplEfl::destroy_window(sclwindow window)
         }
         utils->log("WinEfl_destroywin %p %p (basewin %p mag %p)\n",
             window,
-            (winctx && !(winctx->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+            (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
             windows->get_base_window(), windows->get_magnifier_window());
     }
 
@@ -502,10 +502,10 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue)
     CSCLContext *context = CSCLContext::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
     if (windows && context && window) {
-        SclWindowContext *winctx = windows->get_window_context(window);
+        SclWindowContext *window_context = windows->get_window_context(window);
         if (!(context->get_hidden_state())) {
-            if (winctx) {
-                if (!(winctx->is_virtual)) {
+            if (window_context) {
+                if (!(window_context->is_virtual)) {
                     evas_object_show((Evas_Object*)window);
                 }
 #ifdef APPLY_WINDOW_MANAGER_CHANGE
@@ -551,7 +551,7 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue)
              *
              * N_SE-52548: ...and modified if() for other popup windows as well...
              */
-            if (winctx && !(winctx->is_virtual)) {
+            if (window_context && !(window_context->is_virtual)) {
                 ecore_x_icccm_transient_for_set
                     (elm_win_xwindow_get(static_cast<Evas_Object*>(window)), app_window);
                 elm_win_raise((Evas_Object *)window);
@@ -560,7 +560,7 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue)
 #endif
         utils->log("WinEfl_showwin %p %p (basewin %p mag %p)\n",
             window,
-            (winctx && !(winctx->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+            (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
             windows->get_base_window(), windows->get_magnifier_window());
     }
 }
@@ -574,7 +574,7 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
     SCL_DEBUG();
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
-    SclWindowContext *winctx = NULL;
+    SclWindowContext *window_context = NULL;
 
     if (windows && window) {
 #ifdef USING_KEY_GRAB
@@ -585,9 +585,9 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
     }
 #endif
 
-        winctx = windows->get_window_context(window);
-        if (winctx) {
-            if (!(winctx->is_virtual)) {
+        window_context = windows->get_window_context(window);
+        if (window_context) {
+            if (!(window_context->is_virtual)) {
                 Evas_Object *win = (Evas_Object*)window;
 #ifdef APPLY_WINDOW_MANAGER_CHANGE
                 if (windows->is_base_window(window)) {
@@ -612,10 +612,10 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
         // Memory optimization */
         //if (window == windows->get_magnifier_window() || TRUE) {
         if (window == windows->get_magnifier_window() || window == windows->get_dim_window()) {
-            if (winctx) {
-                if (winctx->etc_info) {
+            if (window_context) {
+                if (window_context->etc_info) {
 
-                    Eina_List *list = (Eina_List*)(winctx->etc_info);
+                    Eina_List *list = (Eina_List*)(window_context->etc_info);
                     Eina_List *iter = NULL;
                     Eina_List *iter_next = NULL;
                     void *data = NULL;
@@ -631,9 +631,9 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
                                 if (bShouldRemove) {
                                     Evas_Object* eo = object->object;
                                     if (object->extracted) {
-                                        void *data = evas_object_image_data_get(eo, 1);
-                                        if (data) {
-                                            free(data);
+                                        void *image_data = evas_object_image_data_get(eo, 1);
+                                        if (image_data) {
+                                            free(image_data);
                                         }
                                     }
                                     if (eo) {
@@ -668,7 +668,7 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
                             iIndex++;
                         }
                     }
-                    winctx->etc_info = list;
+                    window_context->etc_info = list;
 #endif
                 }
             }
@@ -681,7 +681,7 @@ CSCLWindowsImplEfl::hide_window(const sclwindow window,  sclboolean fForce)
         }
         utils->log("WinEfl_hidewin %p %p (basewin %p mag %p)\n",
             window,
-            (winctx && !(winctx->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+            (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
             windows->get_base_window(), windows->get_magnifier_window());
     }
 }
@@ -699,13 +699,13 @@ CSCLWindowsImplEfl::move_window(const sclwindow window, scl16 x, scl16 y)
     CSCLWindows *windows = CSCLWindows::get_instance();
 
     if (utils && context && windows && window) {
-        //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-        SclWindowContext *winctx = windows->get_window_context(window);
+        //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+        SclWindowContext *window_context = windows->get_window_context(window);
         unsigned short win_width = 0;
         unsigned short win_height = 0;
-        if (winctx) {
-            win_width = winctx->geometry.width;
-            win_height = winctx->geometry.height;
+        if (window_context) {
+            win_width = window_context->geometry.width;
+            win_height = window_context->geometry.height;
         }
 
         scl16 rotatex = x;
@@ -719,16 +719,16 @@ CSCLWindowsImplEfl::move_window(const sclwindow window, scl16 x, scl16 y)
 
 #ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW
         if (window == windows->get_magnifier_window()) {
-            SclWindowContext *basewinctx = windows->get_window_context(windows->get_base_window(), FALSE);
+            SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window(), FALSE);
             rotatex = orgx = 0;
             if (context->get_rotation_degree() == 90 || context->get_rotation_degree() == 270) {
-                rotatey = orgy = scr_w - basewinctx->height - win_height;
-                win_width = basewinctx->width;
-                win_height = basewinctx->height + win_height;
+                rotatey = orgy = scr_w - base_window_context->height - win_height;
+                win_width = base_window_context->width;
+                win_height = base_window_context->height + win_height;
             } else {
-                rotatey = orgy = scr_h - basewinctx->height - win_height;
-                win_width = basewinctx->width;
-                win_height = basewinctx->height + win_height;
+                rotatey = orgy = scr_h - base_window_context->height - win_height;
+                win_width = base_window_context->width;
+                win_height = base_window_context->height + win_height;
             }
             magnifierx = x;
             magnifiery = y - orgy;
@@ -757,7 +757,7 @@ CSCLWindowsImplEfl::move_window(const sclwindow window, scl16 x, scl16 y)
 
     #ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW
         if (window == windows->get_magnifier_window()) {
-            if (rotatex == winctx->x && rotatey == winctx->y) return;
+            if (rotatex == window_context->x && rotatey == windonw_context->y) return;
         }
     #endif
 
@@ -773,7 +773,7 @@ CSCLWindowsImplEfl::move_window(const sclwindow window, scl16 x, scl16 y)
 
         utils->log("WinEfl_movewin %p %p %d %d %d %d (basewin %p mag %p)\n",
             window,
-            (winctx && !(winctx->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+            (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
             x, y, rotatex, rotatey,
             windows->get_base_window(), windows->get_magnifier_window());
     }
@@ -792,15 +792,15 @@ CSCLWindowsImplEfl::resize_window(const sclwindow window, scl16 width, scl16 hei
 
 #ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW
     if (window == windows->get_magnifier_window()) {
-        SclWindowContext *winctx = windows->get_window_context(windows->get_base_window());
-        if (winctx->width != width || winctx->height != height) {
+        SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+        if (window_context->width != width || window_context->height != height) {
             CSCLUtils *utils = CSCLUtils::get_instance();
             sclint scrx, scry, winx, winy;
             utils->get_screen_resolution(&scrx, &scry);
             if (context->get_rotation_degree() == 90 || context->get_rotation_degree() == 270) {
-                evas_object_resize((Evas_Object*)window, scry, height + winctx->height);
+                evas_object_resize((Evas_Object*)window, scry, height + window_context->height);
             } else {
-                evas_object_resize((Evas_Object*)window, scrx, height + winctx->height);
+                evas_object_resize((Evas_Object*)window, scrx, height + window_context->height);
             }
         }
         return;
@@ -810,10 +810,10 @@ CSCLWindowsImplEfl::resize_window(const sclwindow window, scl16 width, scl16 hei
     Evas_Object *win = (Evas_Object*)window;
 #ifndef FULL_SCREEN_TEST
     if (windows && utils && window) {
-        SclWindowContext *winctx = windows->get_window_context(window);
+        SclWindowContext *window_context = windows->get_window_context(window);
         utils->log("WinEfl_resizewin %p %p %d %d (basewin %p mag %p)\n",
             window,
-            (winctx && !(winctx->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+            (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
             windows->get_base_window(), windows->get_magnifier_window());
     }
 #endif
@@ -880,23 +880,23 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
 
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
-    SclWindowContext *winctx = NULL;
+    SclWindowContext *window_context = NULL;
 
     if (windows && window) {
-        //winctx = windows->get_window_context(window, FALSE);
-        winctx = windows->get_window_context(window);
+        //window_context = windows->get_window_context(window, FALSE);
+        window_context = windows->get_window_context(window);
     }
-    if (windows && utils && winctx) {
-        if (winctx->is_virtual) {
-            SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-            if (basectx) {
-                updatearea.x += (winctx->geometry.x - basectx->geometry.x);
-                updatearea.y += (winctx->geometry.y - basectx->geometry.y);
+    if (windows && utils && window_context) {
+        if (window_context->is_virtual) {
+            SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+            if (base_window_context) {
+                updatearea.x += (window_context->geometry.x - base_window_context->geometry.x);
+                updatearea.y += (window_context->geometry.y - base_window_context->geometry.y);
             }
         }
-        if (winctx->etc_info) {
+        if (window_context->etc_info) {
 
-            Eina_List *list = (Eina_List*)(winctx->etc_info);
+            Eina_List *list = (Eina_List*)(window_context->etc_info);
             Eina_List *iter = NULL;
             Eina_List *iter_next = NULL;
             void *data = NULL;
@@ -925,16 +925,16 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
                             //if (object->type == EFLOBJECT_IMAGE) {
                             SCL_DEBUG_ELAPASED_TIME_START();
                             if (TRUE) {
-                                if (winctx->width != object->position.width || winctx->height != object->position.height ||
+                                if (window_context->width != object->position.width || window_context->height != object->position.height ||
                                     object->type == EFLOBJECT_TEXTBLOCK || window == windows->get_magnifier_window()) {
                                     evas_object_hide(object->object);
                                 }
                             } else {
 #else
                             if (object->extracted) {
-                                void *data = evas_object_image_data_get(eo, 1);
-                                if (data) {
-                                    free(data);
+                                void *image_data = evas_object_image_data_get(eo, 1);
+                                if (image_data) {
+                                    free(image_data);
                                 }
                             }
                             if (eo) {
@@ -980,11 +980,11 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
                     iIndex++;
                 }
             }
-            winctx->etc_info = list;
+            window_context->etc_info = list;
 
-            /*while ((Eina_List*)(winctx->etc_info))
+            /*while ((Eina_List*)(window_context->etc_info))
             {
-                EFLObject *object = (EFLObject*)eina_list_data_get((Eina_List*)(winctx->etc_info));
+                EFLObject *object = (EFLObject*)eina_list_data_get((Eina_List*)(window_context->etc_info));
                 if (object) {
                     Evas_Object* eo = object->object;
                     if (eo) {
@@ -992,10 +992,10 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
                         object->object = NULL;
                     }
                 }
-                winctx->etc_info = eina_list_remove_list((Eina_List*)(winctx->etc_info), (Eina_List*)(winctx->etc_info));
+                window_context->etc_info = eina_list_remove_list((Eina_List*)(window_context->etc_info), (Eina_List*)(winctx->etc_info));
                 delete object;
             }
-            winctx->etc_info = NULL;*/
+            window_context->etc_info = NULL;*/
         }
         CSCLUIBuilder *builder = CSCLUIBuilder::get_instance();
         builder->show_layout(window, x, y, width, height);
@@ -1085,14 +1085,14 @@ CSCLWindowsImplEfl::set_window_rotation(const sclwindow window, SCLRotation rota
     SCL_DEBUG();
 
     CSCLWindows *windows = CSCLWindows::get_instance();
-    SclWindowContext *winctx = NULL;
+    SclWindowContext *window_context = NULL;
 
     if (windows && window) {
-        //winctx = windows->get_window_context(window, FALSE);
-        winctx = windows->get_window_context(window);
+        //window_context = windows->get_window_context(window, FALSE);
+        window_context = windows->get_window_context(window);
 
-        if (winctx) {
-            if (winctx->is_virtual) {
+        if (window_context) {
+            if (window_context->is_virtual) {
                 return;
             }
         }
@@ -1115,8 +1115,8 @@ CSCLWindowsImplEfl::set_window_rotation(const sclwindow window, SCLRotation rota
         hint.flags |= USPosition;
 
         XSetWMNormalHints(dpy, win, &hint);
-        /*if (winctx) {
-          windows->resize_window(winctx->window, winctx->width, winctx->height);
+        /*if (window_context) {
+          windows->resize_window(window_context->window, window_context->width, winctx->height);
           }*/
     }
 }
@@ -1152,12 +1152,12 @@ void release_all(Evas_Object *win)
 
     CSCLWindows *windows = CSCLWindows::get_instance();
     //if (window == windows->get_magnifier_window()) {
-        //SclWindowContext *winctx = windows->get_window_context(win, FALSE);
-    SclWindowContext *winctx = windows->get_window_context(win);
-        if (winctx && win) {
-            if (winctx->etc_info) {
+        //SclWindowContext *window_context = windows->get_window_context(win, FALSE);
+    SclWindowContext *window_context = windows->get_window_context(win);
+        if (window_context && win) {
+            if (window_context->etc_info) {
 
-                Eina_List *list = (Eina_List*)(winctx->etc_info);
+                Eina_List *list = (Eina_List*)(window_context->etc_info);
                 Eina_List *iter = NULL;
                 Eina_List *iter_next = NULL;
                 void *data = NULL;
@@ -1173,9 +1173,9 @@ void release_all(Evas_Object *win)
                             if (bShouldRemove) {
                                 Evas_Object* eo = object->object;
                                 if (object->extracted) {
-                                    void *data = evas_object_image_data_get(eo, 1);
-                                    if (data) {
-                                        free(data);
+                                    void *image_data = evas_object_image_data_get(eo, 1);
+                                    if (image_data) {
+                                        free(image_data);
                                     }
                                 }
                                 if (eo) {
@@ -1210,7 +1210,7 @@ void release_all(Evas_Object *win)
                         iIndex++;
                     }
                 }
-                winctx->etc_info = list;
+                window_context->etc_info = list;
 #endif
             }
         }
index c0e8bc6..4ddd7d9 100644 (file)
@@ -36,7 +36,7 @@ typedef struct {
     EFLOBJECT_TYPE type;
     SclRectangle position;
     Evas_Object *object;
-    char *etc_info;
+    const char *etc_info;
     sclboolean extracted;
     void *data;
 } EFLObject;
@@ -49,10 +49,10 @@ public :
     void init();
     void fini();
 
-    sclwindow create_base_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
-    sclwindow create_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
-    sclwindow create_magnifier_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
-    sclwindow create_dim_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
+    sclwindow create_base_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
+    sclwindow create_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
+    sclwindow create_magnifier_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
+    sclwindow create_dim_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
     bool destroy_window(sclwindow window);
     void show_window(const sclwindow window, sclboolean queue);
     void hide_window(const sclwindow window,  sclboolean fForce = FALSE);
index 63f2b14..cb7272c 100644 (file)
@@ -86,10 +86,10 @@ mouse_press(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
     GtkWidget* magnifier = static_cast<GtkWidget*>(windows->get_magnifier_window());
     gdk_window_raise(magnifier->window);
     if (widget == windows->get_magnifier_window()) {
-        SclWindowContext *magctx = windows->get_window_context(widget, FALSE);
-        if (magctx) {
-            magpressposx = magctx->x;
-            magpressposy = magctx->y;
+        SclWindowContext *magnifier_window_context = windows->get_window_context(widget, FALSE);
+        if (magnifier_window_context) {
+            magpressposx = magnifier_window_context->x;
+            magpressposy = magnifier_window_context->y;
         }
         /* First convert the local coordinate to global coordinate */
         sclwindow window = SCLWINDOW_INVALID;
@@ -347,7 +347,7 @@ mouse_move(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
  * - show_base_layout (when the expost event has occured)
  */
 void
-CSCLEventsImplGtk::connect_window_events(const sclwindow wnd, const sclint evt)
+CSCLEventsImplGtk::connect_window_events(const sclwindow window, const sclint event)
 {
     SCL_DEBUG();
     /* pre-condition */
@@ -394,13 +394,13 @@ timer_event(gpointer data)
  * In this function, it should call timer_event of CSCLController class
  */
 void
-CSCLEventsImplGtk::create_timer(const scl16 id, const scl32 interval, scl16 value, sclboolean addToMap)
+CSCLEventsImplGtk::create_timer(const scl16 id, const scl32 interval, scl16 value, sclboolean add_to_map)
 {
     SCL_DEBUG();
     sclint data = SCL_MAKELONG(id, value);
     gint timerId = gtk_timeout_add (static_cast<guint32>(interval), timer_event, (gpointer)data);
-    if (addToMap) {
-        idMap[id] = timerId;
+    if (add_to_map) {
+        id_map[id] = timerId;
     }
 }
 
@@ -411,10 +411,10 @@ void
 CSCLEventsImplGtk::destroy_timer(const scl32 id)
 {
     SCL_DEBUG();
-    for ( std::map<int, int>::iterator idx = idMap.begin(); idx != idMap.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);
-            idMap.erase((*idx).first);
+            id_map.erase((*idx).first);
             break;
         }
     }
@@ -427,9 +427,9 @@ void
 CSCLEventsImplGtk::destroy_all_timer()
 {
     SCL_DEBUG();
-    for ( std::map<int, int>::iterator idx = idMap.begin(); idx != idMap.end(); ++idx) {
+    for ( std::map<int, int>::iterator idx = id_map.begin(); idx != id_map.end(); ++idx) {
         gtk_timeout_remove ((*idx).second);
     }
-    idMap.clear();
+    id_map.clear();
 }
 
index 03d1580..cce2fd6 100644 (file)
@@ -32,13 +32,13 @@ public :
     ~CSCLEventsImplGtk();
 
     /* Implementation about interface functions */
-    void connect_window_events(const sclwindow wnd, const sclint evt);
-    void create_timer(const scl16 id, const scl32 interval, scl16 value, sclboolean addToMap);
+    void connect_window_events(const sclwindow window, const sclint event);
+    void create_timer(const scl16 id, const scl32 interval, scl16 value, sclboolean add_to_map);
     void destroy_timer(const scl32 id);
     void destroy_all_timer();
 
 private:
-    std::map<int, int> idMap;
+    std::map<int, int> id_map;
 };
 } /* End of scl namespace */
 #endif __SCL_EVENTS_GTK_H__
index 796c9d8..962582e 100644 (file)
@@ -47,16 +47,16 @@ CSCLGraphicsImplCairo::~CSCLGraphicsImplCairo()
  * Draws the given text on cairo-surface
  */
 void
-CSCLGraphicsImplCairo::draw_text(sclwindow window, const scldrawctx drawCtx, const SclFontInfo& fontinfo, const SclColor& color,
+CSCLGraphicsImplCairo::draw_text(sclwindow window, const scldrawctx draw_ctx, const SclFontInfo& fontinfo, const SclColor& color,
                                  const sclchar *str, sclint posx, sclint posy, sclint width, sclint height,
                                  SCLLabelAlignment align, sclbyte padding)
 {
     SCL_DEBUG();
     /* pre-condition */
     scl_assert_return(str);
-    scl_assert_return(drawCtx);
+    scl_assert_return(draw_ctx);
 
-    cairo_t* cr = static_cast<cairo_t*>(drawCtx);
+    cairo_t* cr = static_cast<cairo_t*>(draw_ctx);
     cairo_identity_matrix(cr);
     cairo_set_source_rgba(cr, color.r / 256.0, color.g / 256.0, color.b / 256.0, 1.0);
     cairo_select_font_face(cr, fontinfo.fontname,
@@ -95,15 +95,15 @@ CSCLGraphicsImplCairo::draw_text(sclwindow window, const scldrawctx drawCtx, con
  * Draws the given image on cairo-surface
  */
 void
-CSCLGraphicsImplCairo::draw_image(sclwindow window, const scldrawctx drawCtx, sclchar* imgPath, sclint destX, sclint destY,
+CSCLGraphicsImplCairo::draw_image(sclwindow window, const scldrawctx draw_ctx, sclchar* imgPath, sclint destX, sclint destY,
                                   sclint destWidth, sclint destHeight, sclint srcX, sclint srcY, sclint srcWidth, sclint srcHeight)
 {
     SCL_DEBUG();
     /* pre-condition */
     scl_assert_return(imgPath);
-    scl_assert_return(drawCtx);
+    scl_assert_return(draw_ctx);
 
-    cairo_t* cr = static_cast<cairo_t*>(drawCtx);
+    cairo_t* cr = static_cast<cairo_t*>(draw_ctx);
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLImageProxy *proxy = CSCLImageProxy::get_instance();
 
@@ -142,14 +142,14 @@ CSCLGraphicsImplCairo::draw_image(sclwindow window, const scldrawctx drawCtx, sc
  * Draws a rectangle on cairo-surface
  */
 void
-CSCLGraphicsImplCairo::draw_rectangle(sclwindow window, const scldrawctx drawCtx, scldouble posx, scldouble posy,
+CSCLGraphicsImplCairo::draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble posx, scldouble posy,
                                       scldouble width, scldouble height, const scldouble lineWidth, const SclColor& lineColor, sclboolean fill, const SclColor& fillColor, scldouble radius, sclfloat alpha)
 {
     SCL_DEBUG();
     /* pre-condition */
-    scl_assert_return(drawCtx);
+    scl_assert_return(draw_ctx);
 
-    cairo_t* cr = static_cast<cairo_t*>(drawCtx);
+    cairo_t* cr = static_cast<cairo_t*>(draw_ctx);
     cairo_identity_matrix(cr);
 
     /* a custom shape that could be wrapped in a function */
@@ -294,9 +294,9 @@ CSCLGraphicsImplCairo::begin_paint(const sclwindow window, const sclboolean forc
  * Notices that drawing tasks have done.
  */
 void
-CSCLGraphicsImplCairo::end_paint(const sclwindow window, scldrawctx drawCtx)
+CSCLGraphicsImplCairo::end_paint(const sclwindow window, scldrawctx draw_ctx)
 {
-    cairo_destroy(static_cast<cairo_t*>(drawCtx));
+    cairo_destroy(static_cast<cairo_t*>(draw_ctx));
 }
 
 sclfont
index 96dfddb..5db38c3 100644 (file)
@@ -29,20 +29,22 @@ public :
     CSCLGraphicsImplCairo();
     ~CSCLGraphicsImplCairo();
 
-    void draw_image(sclwindow window, const scldrawctx drawCtx, sclchar* imgPath, sclint destX, sclint destY,
-                                  sclint destWidth, sclint destHeight, sclint srcX, sclint srcY, sclint srcWidth, sclint srcHeight);
-    void draw_text(sclwindow window, const scldrawctx drawCtx, const SclFontInfo& fontinfo, const SclColor& color,
-                   const sclchar *str, sclint posx, sclint posy, sclint width, sclint height,
+    void draw_image(sclwindow window, const scldrawctx draw_ctx, sclchar* image_path,
+                    sclint dest_x, sclint dest_y, sclint dest_width, sclint dest_height,
+                    sclint src_x, sclint src_y, sclint src_width, sclint src_height);
+    void draw_text(sclwindow window, const scldrawctx draw_ctx, const SclFontInfo& font_info, const SclColor& color,
+                   const sclchar *str, sclint pos_x, sclint pos_y, sclint width, sclint height,
                    SCLLabelAlignment align, sclbyte padding);
-    sclimage load_image(const sclchar* imgPath);
-    void unload_image(sclimage imgData);
-    scldrawctx begin_paint(const sclwindow window, const sclboolean forcedraw = FALSE);
-    void end_paint(const sclwindow window, scldrawctx drawCtx);
+    sclimage load_image(const sclchar* image_path);
+    void unload_image(sclimage image_data);
+    scldrawctx begin_paint(const sclwindow window, const sclboolean force_draw = FALSE);
+    void end_paint(const sclwindow window, scldrawctx draw_ctx);
     sclfont create_font(const SclFontInfo& info);
     void destroy_font(sclfont font);
-    void draw_rectangle(sclwindow window, const scldrawctx drawCtx, scldouble posx, scldouble posy,
-                        scldouble width, scldouble height, const scldouble lineWidth, const SclColor& lineColor, sclboolean fill, const SclColor& fillColor, scldouble radius, sclfloat alpha);
-    SclSize get_image_size(sclchar* imgPath);
+    void draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble pos_x, scldouble pos_y,
+                        scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color,
+                        sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha);
+    SclSize get_image_size(sclchar* image_path);
 private:
 };
 } /* End of scl namespace */
index 91893f1..8dbea28 100644 (file)
@@ -42,8 +42,10 @@ CSCLGraphicsImplGtk::~CSCLGraphicsImplGtk()
 
 
 void
-CSCLGraphicsImplGtk::draw_image(sclwindow window, const scldrawctx drawCtx, sclchar* imgPath, SclImageCachedInfo *cachedinfo, sclint destX, sclint destY,
-                                sclint destWidth, sclint destHeight, sclint srcX, sclint srcY, sclint srcWidth, sclint srcHeight)
+CSCLGraphicsImplGtk::draw_image(sclwindow window, const scldrawctx draw_ctx,
+                                sclchar* image_path, SclImageCachedInfo *cachedinfo,
+                                sclint dest_x, sclint dest_y, sclint dest_width, sclint dest_height,
+                                sclint src_x, sclint src_y, sclint src_width, sclint src_height)
 {
     SCL_DEBUG();
     //printf("\n %d destX, %d destY,\n %d destWidth, %d destHeight, %d srcX, %d srcY,\n %d srcWidth, %d srcHeight\n", destX, destY, destWidth, destHeight,  srcX,  srcWidth,  srcHeight);
@@ -126,7 +128,7 @@ load_pixmap(const gchar *filename)
 }
 
 sclimage
-CSCLGraphicsImplGtk::load_image(const sclchar *imgPath)
+CSCLGraphicsImplGtk::load_image(const sclchar* image_path)
 {
     SCL_DEBUG();
     GdkPixmap* imgData = NULL;
@@ -137,7 +139,7 @@ CSCLGraphicsImplGtk::load_image(const sclchar *imgPath)
 }
 
 void
-CSCLGraphicsImplGtk::unload_image(sclimage imgData)
+CSCLGraphicsImplGtk::unload_image(sclimage image_data)
 {
     SCL_DEBUG();
     /* pre-condition */
@@ -151,7 +153,7 @@ CSCLGraphicsImplGtk::unload_image(sclimage imgData)
  * This func should be called before using a drawing primitive at first.
  */
 scldrawctx
-CSCLGraphicsImplGtk::begin_paint(const sclwindow window, const sclboolean forcedraw /* = FALSE */)
+CSCLGraphicsImplGtk::begin_paint(const sclwindow window, const sclboolean force_draw /* = FALSE */)
 {
     SCL_DEBUG();
     /* pre-condition */
@@ -171,9 +173,9 @@ CSCLGraphicsImplGtk::begin_paint(const sclwindow window, const sclboolean forced
  * Notices that drawing tasks have done.
  */
 void
-CSCLGraphicsImplGtk::end_paint(const sclwindow window, scldrawctx drawCtx)
+CSCLGraphicsImplGtk::end_paint(const sclwindow window, scldrawctx draw_ctx)
 {
-    cairo_destroy(static_cast<cairo_t*>(drawCtx));
+    cairo_destroy(static_cast<cairo_t*>(draw_ctx));
 }
 
 sclfont
@@ -191,16 +193,17 @@ CSCLGraphicsImplGtk::destroy_font(sclfont font)
  * Draws the given text on cairo-surface
  */
 void
-CSCLGraphicsImplGtk::draw_text(sclwindow window, const scldrawctx drawCtx, const SclFontInfo& fontinfo, const SclColor& color,
-                               const sclchar *str, SclTextCachedInfo *cachedinfo, sclint posx, sclint posy, sclint width, sclint height,
+CSCLGraphicsImplGtk::draw_text(sclwindow window, const scldrawctx draw_ctx, const SclFontInfo& font_info,
+                               const SclColor& color, const sclchar *str, SclTextCachedInfo *cachedinfo,
+                               sclint pos_x, sclint pos_y, sclint width, sclint height,
                                SCLLabelAlignment align, sclbyte padding)
 {
     SCL_DEBUG();
     /* pre-condition */
     scl_assert_return(str);
-    scl_assert_return(drawCtx);
+    scl_assert_return(draw_ctx);
 
-    cairo_t* cr = static_cast<cairo_t*>(drawCtx);
+    cairo_t* cr = static_cast<cairo_t*>(draw_ctx);
     cairo_identity_matrix(cr);
     cairo_set_source_rgba(cr, color.r / 256.0, color.g / 256.0, color.b / 256.0, 1.0);
     cairo_select_font_face(cr, fontinfo.fontname,
@@ -249,14 +252,16 @@ CSCLGraphicsImplGtk::draw_text(sclwindow window, const scldrawctx drawCtx, const
  * Draws a rectangle on cairo-surface
  */
 void
-CSCLGraphicsImplGtk::draw_rectangle(sclwindow window, const scldrawctx drawCtx, scldouble posx, scldouble posy,
-                                    scldouble width, scldouble height, const scldouble lineWidth, const SclColor& lineColor, sclboolean fill, const SclColor& fillColor, scldouble radius, sclfloat alpha)
+CSCLGraphicsImplGtk::draw_rectangle(sclwindow window, const scldrawctx draw_ctx,
+                                    scldouble pos_x, scldouble pos_y, scldouble width, scldouble height,
+                                    const scldouble line_width, const SclColor& line_color, sclboolean fill,
+                                    const SclColor& fill_color, scldouble radius, sclfloat alpha)
 {
     SCL_DEBUG();
     /* pre-condition */
-    scl_assert_return(drawCtx);
+    scl_assert_return(draw_ctx);
 
-    cairo_t* cr = static_cast<cairo_t*>(drawCtx);
+    cairo_t* cr = static_cast<cairo_t*>(draw_ctx);
     cairo_identity_matrix(cr);
 
     /* a custom shape that could be wrapped in a function */
@@ -316,7 +321,7 @@ CSCLGraphicsImplGtk::draw_rectangle(sclwindow window, const scldrawctx drawCtx,
 }
 
 SclSize
-CSCLGraphicsImplGtk::get_image_size(sclchar* imgPath)
+CSCLGraphicsImplGtk::get_image_size(sclchar* image_path)
 {
     SCL_DEBUG();
     SclSize ret = { 0, 0 };
index 88c3c0c..aba59b5 100644 (file)
@@ -29,22 +29,24 @@ public :
     CSCLGraphicsImplGtk();
     ~CSCLGraphicsImplGtk();
 
-    void draw_image(sclwindow window, const scldrawctx drawCtx, sclchar* imgPath, SclImageCachedInfo *cachedinfo, sclint destX, sclint destY,
-                                  sclint destWidth, sclint destHeight, sclint srcX, sclint srcY, sclint srcWidth, sclint srcHeight);
-    sclimage load_image(const sclchar* imgPath);
-    void unload_image(sclimage imgData);
+    void draw_image(sclwindow window, const scldrawctx draw_ctx, sclchar* image_path,
+                    SclImageCachedInfo *cachedinfo, sclint dest_x, sclint dest_y, sclint dest_width, sclint dest_height,
+                    sclint src_x, sclint src_y, sclint src_width, sclint src_height);
+    sclimage load_image(const sclchar* image_path);
+    void unload_image(sclimage image_data);
 
     sclfont create_font(const SclFontInfo& info);
     void destroy_font(sclfont font);
-    void draw_text(sclwindow window, const scldrawctx drawCtx, const SclFontInfo& fontinfo, const SclColor& color,
-                   const sclchar *str, SclTextCachedInfo *cachedinfo, sclint posx, sclint posy, sclint width, sclint height,
+    void draw_text(sclwindow window, const scldrawctx draw_ctx, const SclFontInfo& font_info, const SclColor& color,
+                   const sclchar *str, SclTextCachedInfo *cachedinfo, sclint pos_x, sclint pos_y, sclint width, sclint height,
                    SCLLabelAlignment align, sclbyte padding);
 
-    void draw_rectangle(sclwindow window, const scldrawctx drawCtx, scldouble posx, scldouble posy,
-                        scldouble width, scldouble height, const scldouble lineWidth, const SclColor& lineColor, sclboolean fill, const SclColor& fillColor, scldouble radius, sclfloat alpha);
-    scldrawctx begin_paint(const sclwindow window, const sclboolean forcedraw = FALSE);
-    void end_paint(const sclwindow window, scldrawctx drawCtx);
-    SclSize get_image_size(sclchar* imgPath);
+    void draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble pos_x, scldouble pos_y,
+                        scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color,
+                        sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha);
+    scldrawctx begin_paint(const sclwindow window, const sclboolean force_draw = FALSE);
+    void end_paint(const sclwindow window, scldrawctx draw_ctx);
+    SclSize get_image_size(sclchar* image_path);
     SclSize get_text_size(const SclFontInfo &fontinfo, const sclchar *str);
 private:
 };
index 4e99de0..d6ad2cc 100644 (file)
@@ -74,7 +74,7 @@ make_transparent_window (GtkWidget *window)
  * Create a content window and binds it into given parent window as a child
  */
 sclwindow
-CSCLWindowsImplGtk::create_base_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindowsImplGtk::create_base_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
 
@@ -82,16 +82,16 @@ CSCLWindowsImplGtk::create_base_window(const sclwindow parent, SclWindowContext
 
     /* pre-condition */
     scl_assert(parent != NULL);
-    scl_assert(winctx != NULL);
-    scl_assert(winctx->etc_info == NULL);
+    scl_assert(window_context != NULL);
+    scl_assert(window_context->etc_info == NULL);
 
-    if (winctx->window == NULL) {
+    if (window_context->window == NULL) {
         window = (GtkWidget*)parent;
 
         if (GTK_WIDGET_TOPLEVEL(window)) {
             window = (GtkWidget*)parent;
-            winctx->etc_info = NULL;
-            winctx->window = window;
+            window_context->etc_info = NULL;
+            window_context->window = window;
             //gtk_window_set_keep_above(GTK_WINDOW(window), TRUE);
             make_transparent_window(window);
         } else {
@@ -102,30 +102,30 @@ CSCLWindowsImplGtk::create_base_window(const sclwindow parent, SclWindowContext
             gtk_box_pack_start(GTK_BOX(window), drawarea, TRUE, TRUE, 0);
             gtk_widget_show (drawarea);
             gtk_widget_show (window);
-            winctx->etc_info = static_cast<void*>(drawarea);
-            winctx->window = drawarea;
+            window_context->etc_info = static_cast<void*>(drawarea);
+            window_context->window = drawarea;
             make_transparent_window(drawarea);
         }
     }
     /* post-condition */
-    return winctx->window;
+    return window_context->window;
 }
 
 /**
  * Creates a window
  */
 sclwindow
-CSCLWindowsImplGtk::create_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindowsImplGtk::create_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
     /* pre-condition */
     scl_assert(parent);
-    scl_assert(winctx);
-    scl_assert(winctx->etc_info == NULL);
+    scl_assert(window_context);
+    scl_assert(window_context->etc_info == NULL);
 
     GtkWidget* window = NULL;
 
-    if (winctx->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);
 #ifdef NO_SOCKETPLUG
@@ -146,8 +146,8 @@ CSCLWindowsImplGtk::create_window(const sclwindow parent, SclWindowContext *winc
         gtk_widget_set_app_paintable(window, TRUE);
 #endif
         //gtk_effect_set_enable (GTK_WIDGET(window), FALSE);
-        winctx->etc_info = NULL;
-        winctx->window = window;
+        window_context->etc_info = NULL;
+        window_context->window = window;
 
 
         /* Window rotation*/
@@ -167,16 +167,16 @@ CSCLWindowsImplGtk::create_window(const sclwindow parent, SclWindowContext *winc
  * Creates the dim window
  */
 sclwindow
-CSCLWindowsImplGtk::create_dim_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindowsImplGtk::create_dim_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
     /* pre-condition */
     scl_assert(parent);
-    scl_assert(winctx);
-    scl_assert(winctx->etc_info == NULL);
+    scl_assert(window_context);
+    scl_assert(window_context->etc_info == NULL);
     GtkWidget* window = NULL;
 
-    if (winctx->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);
 #ifdef NO_SOCKETPLUG
@@ -195,8 +195,8 @@ CSCLWindowsImplGtk::create_dim_window(const sclwindow parent, SclWindowContext *
         gtk_window_set_opacity(GTK_WINDOW(window), 0.5);
         gtk_widget_realize(window);
         //gtk_effect_set_enable (GTK_WIDGET(window), FALSE);
-        winctx->etc_info = NULL;
-        winctx->window = window;
+        window_context->etc_info = NULL;
+        window_context->window = window;
     }
 
     return window;
@@ -207,7 +207,7 @@ CSCLWindowsImplGtk::create_dim_window(const sclwindow parent, SclWindowContext *
  * Caution: Currently, If we use transient_for them the ISE will occure some crash. It needs to check X11
  */
 void
-CSCLWindowsImplGtk::set_parent(const sclwindow parentWindow, const sclwindow window)
+CSCLWindowsImplGtk::set_parent(const sclwindow parent_window, const sclwindow window)
 {
     SCL_DEBUG();
     scl_assert_return(window);
@@ -283,13 +283,13 @@ CSCLWindowsImplGtk::show_window(const sclwindow window, sclboolean queue)
  * Hides the given window
  */
 void
-CSCLWindowsImplGtk::hide_window(const sclwindow window,  sclboolean fForce)
+CSCLWindowsImplGtk::hide_window(const sclwindow window,  sclboolean force)
 {
     SCL_DEBUG();
     scl_assert_return(window);
     GtkWidget* widget = static_cast<GtkWidget*>(window);
     CSCLWindows *windows = CSCLWindows::get_instance();
-    if (windows->get_magnifier_window() == window && fForce == FALSE) {
+    if (windows->get_magnifier_window() == window && force == FALSE) {
         /* Fix me : The below is a temporary code for magnifier speed enhancement */
 #ifdef NO_SOCKETPLUG
         gint root_x, root_y;
@@ -447,7 +447,7 @@ CSCLWindowsImplGtk::set_window_rotation(const sclwindow window, sclint degree) {
  * Shows a message box
  */
 void
-CSCLWindowsImplGtk::show_message_box(const sclwindow parent, scl8 msgType, sclchar* title, sclchar* msg) {
+CSCLWindowsImplGtk::show_message_box(const sclwindow parent, scl8 msg_type, sclchar* title, sclchar* msg) {
     SCL_DEBUG();
     scl_assert_return(strlen(msg) > 0);
 
@@ -488,8 +488,8 @@ CSCLWindowsImplGtk::show_message_box(const sclwindow parent, scl8 msgType, sclch
 
 
 void
-CSCLWindowsImplGtk::set_keep_above(const sclwindow window, sclboolean keepabove) {
+CSCLWindowsImplGtk::set_keep_above(const sclwindow window, sclboolean keep_above) {
     SCL_DEBUG();
 
-    gtk_window_set_keep_above(GTK_WINDOW(window), keepabove);
+    gtk_window_set_keep_above(GTK_WINDOW(window), keep_above);
 }
index 19f7cdf..1e669b9 100644 (file)
@@ -29,21 +29,21 @@ public :
     CSCLWindowsImplGtk();
     ~CSCLWindowsImplGtk();
 
-    sclwindow create_base_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
-    sclwindow create_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
-    sclwindow create_dim_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
+    sclwindow create_base_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
+    sclwindow create_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
+    sclwindow create_dim_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
     bool destroy_window(sclwindow window);
     void show_window(const sclwindow window, sclboolean queue);
-    void hide_window(const sclwindow window,  sclboolean fForce = FALSE);
+    void hide_window(const sclwindow window,  sclboolean force = FALSE);
     void move_window(const sclwindow window, scl16 x, scl16 y);
     void resize_window(const sclwindow window, scl16 width, scl16 height);
     void move_resize_window(const sclwindow window, scl16 x, scl16 y, scl16 width, scl16 height);
     void update_window(const sclwindow window, scl16 x = 0, scl16 y = 0, scl16 width = 0, scl16 height = 0);
     void set_window_rotation(const sclwindow window, sclint degree);
-    void show_message_box(const sclwindow parent, scl8 msgType, sclchar* title, sclchar* msg);
+    void show_message_box(const sclwindow parent, scl8 msg_type, sclchar* title, sclchar* msg);
     sclboolean get_window_rect(const sclwindow window, SclRectangle *rect);
-    void set_parent(const sclwindow parentWindow, const sclwindow window);
-    void set_keep_above(const sclwindow window, sclboolean keepabove);
+    void set_parent(const sclwindow parent_window, const sclwindow window);
+    void set_keep_above(const sclwindow window, sclboolean keep_above);
 };
 } /* End of scl namespace */
 #endif __SCL_WINDOWS_GTK_H__
index 37b6b4f..f9c8d34 100644 (file)
@@ -39,8 +39,8 @@ typedef struct { // A context information dependant on each multitouch events
     SclPoint cur_pressed_point;
     struct timeval cur_pressed_time;
 
-    sclwindow cur_move_window;
-    SclPoint cur_move_point;
+    sclwindow cur_moving_window;
+    SclPoint cur_moving_point;
 
     SCLDragState cur_drag_state;
     SCLKeyModifier cur_key_modifier;
@@ -51,7 +51,7 @@ typedef struct { // A context information dependant on each multitouch events
     scl8 prev_pressed_key;
     sclwindow prev_pressed_window;
 
-    SclPoint prev_move_point;
+    SclPoint prev_moving_point;
     SCLDragState prev_drag_state;
 
     scl16 event_id;
@@ -228,7 +228,7 @@ public:
         return m_cur_highlighted_window;
     }
 
-    void create_multi_touch_context(scltouchdevice touch_id, sclboolean isSubEvent = FALSE);
+    void create_multi_touch_context(scltouchdevice touch_id, sclboolean is_sub_event = FALSE);
     void destroy_multi_touch_context(scltouchdevice touch_id);
     MultiTouchContext* find_multi_touch_context(scltouchdevice touch_id);
 
@@ -246,10 +246,10 @@ public:
     void set_custom_magnifier_label(scltouchdevice touch_id, sclint index, const sclchar* label);
     const sclchar* get_custom_magnifier_label(scltouchdevice touch_id, sclint index);
 
-    SclPoint get_cur_move_point(scltouchdevice touch_id);
-    void set_cur_move_point(scltouchdevice touch_id, sclint x, sclint y);
-    sclwindow get_cur_move_window(scltouchdevice touch_id);
-    void set_cur_move_window(scltouchdevice touch_id, sclwindow window);
+    SclPoint get_cur_moving_point(scltouchdevice touch_id);
+    void set_cur_moving_point(scltouchdevice touch_id, sclint x, sclint y);
+    sclwindow get_cur_moving_window(scltouchdevice touch_id);
+    void set_cur_moving_window(scltouchdevice touch_id, sclwindow window);
     SclPoint get_farthest_move_point(scltouchdevice touch_id);
     void set_farthest_move_point(scltouchdevice touch_id, sclint x, sclint y);
     sclint get_farthest_move_dist(scltouchdevice touch_id);
@@ -264,13 +264,13 @@ public:
     sclwindow get_prev_pressed_window(scltouchdevice touch_id);
     void set_prev_pressed_window(scltouchdevice touch_id, sclwindow window);
 
-    SclPoint get_prev_move_point(scltouchdevice touch_id);
-    void set_prev_move_point(scltouchdevice touch_id, sclint x, sclint y);
+    SclPoint get_prev_moving_point(scltouchdevice touch_id);
+    void set_prev_moving_point(scltouchdevice touch_id, sclint x, sclint y);
     SCLDragState get_prev_drag_state(scltouchdevice touch_id);
     void set_prev_drag_state(scltouchdevice touch_id, SCLDragState state);
 
     sclint get_multi_touch_context_num();
-    sclboolean get_multi_touch_event(sclint seqorder, SclUIEventDesc *desc);
+    sclboolean get_multi_touch_event(sclint order, SclUIEventDesc *desc);
     sclint get_multi_touch_event_order(scltouchdevice touch_id);
 
     sclchar* get_cur_sublayout();
index 458ea76..327960f 100644 (file)
@@ -68,7 +68,7 @@ private:
         scltouchdevice touch_id, sclboolean actual_event = TRUE);
     sclboolean process_button_move_event(sclwindow window, sclint x, sclint y, sclbyte key_index,
         scltouchdevice touch_id, sclboolean actual_event = TRUE);
-    sclboolean process_button_over_event(sclwindow window, sclint x, sclint y, sclbyte keyindex);
+    sclboolean process_button_over_event(sclwindow window, sclint x, sclint y, sclbyte key_index);
     sclboolean process_button_release_event(sclwindow window, sclint x, sclint y, sclbyte key_index,
         scltouchdevice touch_id, sclboolean actual_event = TRUE);
 
@@ -81,7 +81,7 @@ private:
         sclboolean check_farthest,scltouchdevice touch_id, sclbyte extra_option);
 
 public:
-    void handle_engine_signal(SclInternalSignal signal, sclwindow skipwindow = SCLWINDOW_INVALID);
+    void handle_engine_signal(SclInternalSignal signal, sclwindow skip_window = SCLWINDOW_INVALID);
     sclboolean process_input_mode_change(const sclbyte mode);
     sclboolean process_rotation_change(const SCLRotation rotation);
 
index 06f31c3..3c9ff0c 100644 (file)
 namespace scl
 {
 
-typedef struct {
+struct SclUIEventDesc {
+    SclUIEventDesc() {
+        key_value = NULL;
+        key_event = 0;
+        key_type = KEY_TYPE_NONE;
+        key_modifier = KEY_MODIFIER_NONE;
+        touch_id = 0;
+        touch_event_order = 0;
+        event_type = EVENT_TYPE_NONE;
+    }
     const sclchar *key_value;
     sclulong key_event;
     SCLKeyType key_type;
@@ -43,7 +52,7 @@ typedef struct {
     SclPoint mouse_farthest_point;
 
     SCLEventType event_type;
-} SclUIEventDesc;
+};
 
 struct SclNotiDesc {
     SclUIEventDesc *ui_event_desc;
index 48d1677..c078c2b 100644 (file)
@@ -52,11 +52,11 @@ typedef struct _SclTextCachedInfo {
     SclSize actual_size;
 }SclTextCachedInfo;
 
-const SclColor SCLCOLOR_WHITE = {255, 255, 255};
-const SclColor SCLCOLOR_GREY = {128, 128, 128};
-const SclColor SCLCOLOR_BLACK = {0, 0, 0};
-const SclColor SCLCOLOR_RED = {255, 0, 0};
-const SclColor SCLCOLOR_BLUE = {0, 0, 255};
+const SclColor SCLCOLOR_WHITE = {255, 255, 255, 255};
+const SclColor SCLCOLOR_GREY = {128, 128, 128, 255};
+const SclColor SCLCOLOR_BLACK = {0, 0, 0, 255};
+const SclColor SCLCOLOR_RED = {255, 0, 0, 255};
+const SclColor SCLCOLOR_BLUE = {0, 0, 255, 255};
 
 /**
  * @brief The base class to work as a soft-based keyboard
index f25f62c..1da487d 100644 (file)
@@ -72,7 +72,7 @@ public:
     const sclchar* get_cur_themename();
 
     sclint set_private_key(SclPrivateKeyProperties* properties, sclboolean fRedraw, sclboolean fPendingUpdate);
-    sclint set_private_key(sclchar* custom_id, sclchar* label, sclchar* imagelabel[SCL_BUTTON_STATE_MAX], sclchar* imagebg[SCL_BUTTON_STATE_MAX], sclulong key_event, sclchar *key_value, sclboolean fRedraw, sclboolean fPendingUpdate);
+    sclint set_private_key(const sclchar* custom_id, sclchar* label, sclchar* imagelabel[SCL_BUTTON_STATE_MAX], sclchar* imagebg[SCL_BUTTON_STATE_MAX], sclulong key_event, sclchar *key_value, sclboolean fRedraw, sclboolean fPendingUpdate);
     void unset_private_key(sclshort input_mode_index, sclbyte layout_index, sclbyte key_index);
     void unset_private_key(const sclchar* custom_id);
 
index d85642c..f218126 100644 (file)
@@ -66,7 +66,6 @@ public:
 
     /**
      * @brief This API requests SCL library to hide the S/W keyboard from the screen
-     * @param[in] ctx target SCL context
      */
     void hide();
 
index 143de38..2a8e0aa 100644 (file)
@@ -57,7 +57,7 @@ typedef struct _SclWindowContext {
     sclint              timeout;
 
     SclPoint            layout_image_offset;
-    void*               etc_info;
+    const void*         etc_info;
 } SclWindowContext;
 
 /**
@@ -72,10 +72,14 @@ public :
     virtual void init() = 0;
     virtual void fini() = 0;
 
-    virtual sclwindow create_base_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height) = 0;
-    virtual sclwindow create_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height) = 0;
-    virtual sclwindow create_magnifier_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height) = 0;
-    virtual sclwindow create_dim_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height) = 0;
+    virtual sclwindow create_base_window(const sclwindow parent,
+        SclWindowContext *window_context, scl16 width, scl16 height) = 0;
+    virtual sclwindow create_window(const sclwindow parent,
+        SclWindowContext *window_context, scl16 width, scl16 height) = 0;
+    virtual sclwindow create_magnifier_window(const sclwindow parent,
+        SclWindowContext *window_context, scl16 width, scl16 height) = 0;
+    virtual sclwindow create_dim_window(const sclwindow parent,
+        SclWindowContext *window_context, scl16 width, scl16 height) = 0;
     virtual bool destroy_window(sclwindow window) = 0;
     virtual void set_parent(const sclwindow parent, const sclwindow window) = 0;
     virtual void show_window(const sclwindow window, sclboolean queue) = 0;
@@ -102,7 +106,9 @@ public :
     void init();
     void fini();
 
-    sclwindow open_popup(const SclWindowOpener opener, const SclRectangle& geometry, sclshort inputmode, sclshort layout, SCLPopupType popup_type, sclboolean is_virtual, sclboolean use_dim_window, sclint img_offset_x = 0, sclint img_offset_y = 0, sclint timeout = 0);
+    sclwindow open_popup(const SclWindowOpener opener, const SclRectangle& geometry,
+        sclshort inputmode, sclshort layout, SCLPopupType popup_type, sclboolean is_virtual,
+        sclboolean use_dim_window, sclint img_offset_x = 0, sclint img_offset_y = 0, sclint timeout = 0);
     bool close_popup(sclwindow window);
     bool close_all_popups(sclwindow skip_window = SCLWINDOW_INVALID);
 
@@ -135,7 +141,7 @@ public :
     sclwindow get_nth_popup_window(sclbyte index);
     sclbyte get_Z_order(sclwindow window);
 
-    sclwindow create_dim_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height);
+    sclwindow create_dim_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
     sclwindow get_dim_window();
 
     void set_update_pending(sclboolean pend);
@@ -144,7 +150,9 @@ public :
 protected :
     CSCLWindowsImpl* get_scl_windows_impl();
 
-    sclwindow create_window(const SclWindowOpener opener, const SclRectangle &geometry, sclshort inputmode, sclshort layout, SCLPopupType popup_type, sclboolean is_virtual, sclint img_offset_x = 0, sclint img_offset_y = 0, sclint timeout = 0);
+    sclwindow create_window(const SclWindowOpener opener, const SclRectangle &geometry,
+        sclshort inputmode, sclshort layout, SCLPopupType popup_type, sclboolean is_virtual,
+        sclint img_offset_x = 0, sclint img_offset_y = 0, sclint timeout = 0);
     bool destroy_window(sclwindow window);
 
     void push_window_in_Z_order_list(sclwindow window);
@@ -152,11 +160,11 @@ protected :
 
 private :
     CSCLWindowsImpl* m_impl;
-    SclWindowContext m_base_winctx;
-    SclWindowContext m_popup_winctx[MAX_POPUP_WINDOW];
+    SclWindowContext m_base_window_context;
+    SclWindowContext m_popup_window_context[MAX_POPUP_WINDOW];
 
-    SclWindowContext m_magnifier_winctx;
-    SclWindowContext m_dim_winctx;
+    SclWindowContext m_magnifier_window_context;
+    SclWindowContext m_dim_window_context;
 
     sclboolean m_pending_update;
     sclboolean m_initialized;
index 58011e2..9382756 100644 (file)
@@ -129,7 +129,8 @@ CSCLAnimator::destroy_animator(sclint id)
 {
     sclboolean ret = TRUE;
 
-    std::map<sclint, SclAnimationState>::iterator iter = m_animators.find(id);
+    std::map<sclint, SclAnimationState>::iterator iter;
+    iter = m_animators.find(id);
     if (iter != m_animators.end()) {
         SclAnimationState *state = &(iter->second);
         state->active = FALSE;
@@ -139,14 +140,13 @@ CSCLAnimator::destroy_animator(sclint id)
     }
 
     sclboolean destroy_timer = TRUE;
-    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);
-                if (state->active) {
-                    destroy_timer = FALSE;
-                }
+    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) {
+                destroy_timer = FALSE;
             }
+        }
     }
 
     if (destroy_timer) {
@@ -239,7 +239,8 @@ CSCLAnimator::stop_animator(sclint id)
 {
     sclboolean ret = TRUE;
 
-    std::map<sclint, SclAnimationState>::iterator iter = m_animators.find(id);
+    std::map<sclint, SclAnimationState>::iterator iter;
+    iter = m_animators.find(id);
     if (iter != m_animators.end()) {
         SclAnimationState *state = &(iter->second);
         state->active = FALSE;
@@ -249,14 +250,13 @@ CSCLAnimator::stop_animator(sclint id)
     }
 
     sclboolean destroy_timer = TRUE;
-    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);
-                if (state->active) {
-                    destroy_timer = FALSE;
-                }
+    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) {
+                destroy_timer = FALSE;
             }
+        }
     }
 
     if (destroy_timer) {
@@ -293,14 +293,14 @@ CSCLAnimator::animator_timer_highlight_ui(SclAnimationState *state)
             ((delta_height) * state->step * SCL_ANIMATION_TIMER_INTERVAL) / state->desc.length;
 
         if (state->desc.circular) {
-            SclWindowContext *base_winctx = windows->get_window_context(windows->get_base_window());
-            if (base_winctx) {
+            SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+            if (base_window_context) {
                 if (rect_from.x > rect_to.x) {
                     delta_x = rect_to.x;
-                    delta_x += (base_winctx->geometry.width - rect_from.x);
+                    delta_x += (base_window_context->geometry.width - rect_from.x);
                 } else {
                     delta_x = -(rect_from.x);
-                    delta_x -= (base_winctx->geometry.width - rect_to.x);
+                    delta_x -= (base_window_context->geometry.width - rect_to.x);
                 }
 
                 state->rect_cur.x = rect_from.x +
@@ -308,9 +308,9 @@ CSCLAnimator::animator_timer_highlight_ui(SclAnimationState *state)
 
                 if (state->rect_cur.x + state->rect_cur.width <= 0) {
                     /* Make the highlight UI come out from the right side of the window */
-                    state->rect_cur.x += base_winctx->geometry.width;
-                } else if (state->rect_cur.x > base_winctx->geometry.width) {
-                    state->rect_cur.x -= base_winctx->geometry.width;
+                    state->rect_cur.x += base_window_context->geometry.width;
+                } else if (state->rect_cur.x > base_window_context->geometry.width) {
+                    state->rect_cur.x -= base_window_context->geometry.width;
                 }
             }
         } else {
@@ -327,7 +327,6 @@ sclboolean
 CSCLAnimator::animator_timer()
 {
     sclboolean destroy_timer = TRUE;
-    SclAnimationState* cur = NULL;
     for(std::map<sclint, SclAnimationState>::iterator iter = m_animators.begin();
         iter != m_animators.end();std::advance(iter, 1)) {
             if (iter != m_animators.end()) {
@@ -349,12 +348,9 @@ CSCLAnimator::animator_timer()
                     }
 
                     if (state->active == FALSE) {
-                        CSCLWindows *windows = CSCLWindows::get_instance();
-                        if (windows) {
-                            windows->update_window(state->desc.window_to,
-                                state->desc.rect_to.x, state->desc.rect_to.y,
-                                state->desc.rect_to.width, state->desc.rect_to.height);
-                        }
+                        windows->update_window(state->desc.window_to,
+                            state->desc.rect_to.x, state->desc.rect_to.y,
+                            state->desc.rect_to.width, state->desc.rect_to.height);
                     } else {
                         destroy_timer = FALSE;
                     }
index 3892524..0c2744a 100644 (file)
@@ -89,11 +89,11 @@ CSCLContext::get_popup_layout( sclwindow window ) const
 
     sclshort ret = NOT_USED;
     CSCLWindows *windows = CSCLWindows::get_instance();
-    //SclWindowContext *ctx = windows->get_window_context(window, FALSE);
-    SclWindowContext *ctx = windows->get_window_context(window);
+    //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+    SclWindowContext *window_context = windows->get_window_context(window);
 
-    if (ctx) {
-        ret = ctx->layout;
+    if (window_context) {
+        ret = window_context->layout;
     }
 
     return ret;
@@ -105,11 +105,11 @@ CSCLContext::set_popup_layout( sclwindow window, sclshort val )
     SCL_DEBUG();
 
     CSCLWindows *windows = CSCLWindows::get_instance();
-    //SclWindowContext *ctx = windows->get_window_context(window, FALSE);
-    SclWindowContext *ctx = windows->get_window_context(window);
+    //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+    SclWindowContext *window_context = windows->get_window_context(window);
 
-    if (ctx) {
-        ctx->layout = val;
+    if (window_context) {
+        window_context->layout = val;
     }
 }
 
@@ -118,10 +118,10 @@ CSCLContext::set_base_layout( sclshort val )
 {
     SCL_DEBUG();
     CSCLWindows *windows = CSCLWindows::get_instance();
-    //SclWindowContext *ctx = windows->get_window_context(windows->get_base_window(), FALSE);
-    SclWindowContext *ctx = windows->get_window_context(windows->get_base_window());
-    if (ctx) {
-        ctx->layout = val;
+    //SclWindowContext *window_context = windows->get_window_context(windows->get_base_window(), FALSE);
+    SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+    if (window_context) {
+        window_context->layout = val;
     }
 }
 
@@ -132,10 +132,10 @@ CSCLContext::get_base_layout() const
 
     sclshort ret = NOT_USED;
     CSCLWindows *windows = CSCLWindows::get_instance();
-    //SclWindowContext *ctx = windows->get_window_context(windows->get_base_window(), FALSE);
-    SclWindowContext *ctx = windows->get_window_context(windows->get_base_window());
-    if (ctx) {
-        ret = ctx->layout;
+    //SclWindowContext *window_context = windows->get_window_context(windows->get_base_window(), FALSE);
+    SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+    if (window_context) {
+        ret = window_context->layout;
     }
 
     return ret;
@@ -145,9 +145,9 @@ scl16
 CSCLContext::get_cur_pressed_event_id(scltouchdevice touch_id)
 {
     scl16 ret = NOT_USED;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->event_id;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->event_id;
     }
     return ret;
 }
@@ -155,9 +155,9 @@ CSCLContext::get_cur_pressed_event_id(scltouchdevice touch_id)
 void
 CSCLContext::set_cur_pressed_event_id(scltouchdevice touch_id, scl16 id)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->event_id = id;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->event_id = id;
     }
 }
 
@@ -165,9 +165,9 @@ scl8
 CSCLContext::get_cur_pressed_key(scltouchdevice touch_id)
 {
     scl8 ret = NOT_USED;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_pressed_key;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->cur_pressed_key;
     }
     return ret;
 }
@@ -175,9 +175,9 @@ CSCLContext::get_cur_pressed_key(scltouchdevice touch_id)
 void
 CSCLContext::set_cur_pressed_key(scltouchdevice touch_id, scl8 val)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->cur_pressed_key = val;
+    MultiTouchContext *window_context = find_multi_touch_context(touch_id);
+    if (window_context) {
+        window_context->cur_pressed_key = val;
     }
 }
 
@@ -185,9 +185,9 @@ sclwindow
 CSCLContext::get_cur_pressed_window(scltouchdevice touch_id)
 {
     sclwindow ret = SCLWINDOW_INVALID;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_pressed_window;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->cur_pressed_window;
     }
     return ret;
 }
@@ -195,9 +195,9 @@ CSCLContext::get_cur_pressed_window(scltouchdevice touch_id)
 void
 CSCLContext::set_cur_pressed_window(scltouchdevice touch_id, sclwindow val)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->cur_pressed_window = val;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->cur_pressed_window = val;
     }
 }
 
@@ -205,9 +205,9 @@ SclPoint
 CSCLContext::get_cur_pressed_point(scltouchdevice touch_id)
 {
     SclPoint ret = {0, 0};
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_pressed_point;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->cur_pressed_point;
     }
     return ret;
 }
@@ -215,63 +215,63 @@ CSCLContext::get_cur_pressed_point(scltouchdevice touch_id)
 void
 CSCLContext::set_cur_pressed_point(scltouchdevice touch_id, sclint x, sclint y)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->cur_pressed_point.x = x;
-        ctx->cur_pressed_point.y = y;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->cur_pressed_point.x = x;
+        multi_touch_context->cur_pressed_point.y = y;
         set_farthest_move_point(touch_id, x, y); // reset farthest move point
     }
 }
 
 SclPoint
-CSCLContext::get_cur_move_point(scltouchdevice touch_id)
+CSCLContext::get_cur_moving_point(scltouchdevice touch_id)
 {
     SclPoint ret = {0, 0};
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_move_point;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->cur_moving_point;
     }
     return ret;
 }
 
 void
-CSCLContext::set_cur_move_point(scltouchdevice touch_id, sclint x, sclint y)
+CSCLContext::set_cur_moving_point(scltouchdevice touch_id, sclint x, sclint y)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->cur_move_point.x = x;
-        ctx->cur_move_point.y = y;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->cur_moving_point.x = x;
+        multi_touch_context->cur_moving_point.y = y;
     }
 }
 
 sclwindow
-CSCLContext::get_cur_move_window(scltouchdevice touch_id)
+CSCLContext::get_cur_moving_window(scltouchdevice touch_id)
 {
     sclwindow ret = SCLWINDOW_INVALID;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_move_window;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->cur_moving_window;
     }
     return ret;
 }
 
 
 void
-CSCLContext::set_cur_move_window(scltouchdevice touch_id, sclwindow window)
+CSCLContext::set_cur_moving_window(scltouchdevice touch_id, sclwindow window)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->cur_move_window = window;
+    MultiTouchContext *window_context = find_multi_touch_context(touch_id);
+    if (window_context) {
+        window_context->cur_moving_window = window;
     }
 }
 
 struct timeval
 CSCLContext::get_cur_pressed_time(scltouchdevice touch_id)
 {
-    struct timeval ret = {0};
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_pressed_time;
+    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;
     }
     return ret;
 }
@@ -279,9 +279,9 @@ CSCLContext::get_cur_pressed_time(scltouchdevice touch_id)
 void
 CSCLContext::set_cur_pressed_time(scltouchdevice touch_id)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        gettimeofday(&(ctx->cur_pressed_time), NULL);
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        gettimeofday(&(multi_touch_context->cur_pressed_time), NULL);
     }
 }
 
@@ -289,9 +289,9 @@ SclPoint
 CSCLContext::get_farthest_move_point(scltouchdevice touch_id)
 {
     SclPoint ret = {0, 0};
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->farthest_move_point;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->farthest_move_point;
     }
     return ret;
 }
@@ -299,13 +299,15 @@ CSCLContext::get_farthest_move_point(scltouchdevice touch_id)
 void
 CSCLContext::set_farthest_move_point(scltouchdevice touch_id, sclint x, sclint y)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
         CSCLUtils *utils = CSCLUtils::get_instance();
-        ctx->farthest_move_dist = utils->get_approximate_distance(x, y, ctx->cur_pressed_point.x, ctx->cur_pressed_point.y);
+        multi_touch_context->farthest_move_dist =
+            utils->get_approximate_distance(x, y,
+            multi_touch_context->cur_pressed_point.x, multi_touch_context->cur_pressed_point.y);
 
-        ctx->farthest_move_point.x = x;
-        ctx->farthest_move_point.y = y;
+        multi_touch_context->farthest_move_point.x = x;
+        multi_touch_context->farthest_move_point.y = y;
     }
 }
 
@@ -313,9 +315,9 @@ sclint
 CSCLContext::get_farthest_move_dist(scltouchdevice touch_id)
 {
     sclint ret = 0;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->farthest_move_dist;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->farthest_move_dist;
     }
     return ret;
 }
@@ -324,9 +326,9 @@ SCLDragState
 CSCLContext::get_cur_drag_state(scltouchdevice touch_id)
 {
     SCLDragState ret = SCL_DRAG_STATE_NONE;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_drag_state;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->cur_drag_state;
     }
     return ret;
 }
@@ -334,9 +336,9 @@ CSCLContext::get_cur_drag_state(scltouchdevice touch_id)
 void
 CSCLContext::set_cur_drag_state(scltouchdevice touch_id, SCLDragState state)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->cur_drag_state = state;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->cur_drag_state = state;
     }
 }
 
@@ -344,9 +346,9 @@ SCLKeyModifier
 CSCLContext::get_cur_key_modifier(scltouchdevice touch_id)
 {
     SCLKeyModifier ret = KEY_MODIFIER_NONE;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->cur_key_modifier;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->cur_key_modifier;
     }
     return ret;
 }
@@ -354,9 +356,9 @@ CSCLContext::get_cur_key_modifier(scltouchdevice touch_id)
 void
 CSCLContext::set_cur_key_modifier(scltouchdevice touch_id, SCLKeyModifier modifier)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->cur_key_modifier = modifier;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->cur_key_modifier = modifier;
     }
 }
 
@@ -364,9 +366,9 @@ scl8
 CSCLContext::get_prev_pressed_key(scltouchdevice touch_id)
 {
     scl8 ret = NOT_USED;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->prev_pressed_key;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->prev_pressed_key;
     }
     return ret;
 }
@@ -374,9 +376,9 @@ CSCLContext::get_prev_pressed_key(scltouchdevice touch_id)
 void
 CSCLContext::set_prev_pressed_key(scltouchdevice touch_id, scl8 val)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->prev_pressed_key = val;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->prev_pressed_key = val;
     }
 }
 
@@ -384,9 +386,9 @@ sclwindow
 CSCLContext::get_prev_pressed_window(scltouchdevice touch_id)
 {
     sclwindow ret = SCLWINDOW_INVALID;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->prev_pressed_window;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->prev_pressed_window;
     }
     return ret;
 }
@@ -394,30 +396,30 @@ CSCLContext::get_prev_pressed_window(scltouchdevice touch_id)
 void
 CSCLContext::set_prev_pressed_window(scltouchdevice touch_id, sclwindow val)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->prev_pressed_window = val;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->prev_pressed_window = val;
     }
 }
 
 SclPoint
-CSCLContext::get_prev_move_point(scltouchdevice touch_id)
+CSCLContext::get_prev_moving_point(scltouchdevice touch_id)
 {
     SclPoint ret = {0, 0};
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->prev_move_point;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->prev_moving_point;
     }
     return ret;
 }
 
 void
-CSCLContext::set_prev_move_point(scltouchdevice touch_id, sclint x, sclint y)
+CSCLContext::set_prev_moving_point(scltouchdevice touch_id, sclint x, sclint y)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->prev_move_point.x = x;
-        ctx->prev_move_point.y = y;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->prev_moving_point.x = x;
+        multi_touch_context->prev_moving_point.y = y;
     }
 }
 
@@ -425,9 +427,9 @@ SCLDragState
 CSCLContext::get_prev_drag_state(scltouchdevice touch_id)
 {
     SCLDragState ret = SCL_DRAG_STATE_NONE;
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ret = ctx->prev_drag_state;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        ret = multi_touch_context->prev_drag_state;
     }
     return ret;
 }
@@ -435,28 +437,28 @@ CSCLContext::get_prev_drag_state(scltouchdevice touch_id)
 void
 CSCLContext::set_prev_drag_state(scltouchdevice touch_id, SCLDragState state)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        ctx->prev_drag_state = state;
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        multi_touch_context->prev_drag_state = state;
     }
 }
 
 void
-CSCLContext::create_multi_touch_context(scltouchdevice touch_id, sclboolean isSubEvent)
-{
-    MultiTouchContext newctx;
-    memset(&newctx, 0x00, sizeof(MultiTouchContext));
-    newctx.used = TRUE;
-    newctx.cur_pressed_key = NOT_USED;
-    newctx.cur_pressed_window = SCLWINDOW_INVALID;
-    newctx.event_id = 0;
-    newctx.prev_pressed_key = NOT_USED;
-    newctx.prev_pressed_window = SCLWINDOW_INVALID;
-    newctx.cur_pressed_point.x = newctx.cur_pressed_point.y = 0;
-    newctx.cur_pressed_time.tv_sec = newctx.cur_pressed_time.tv_usec = 0;
-    newctx.cur_drag_state = SCL_DRAG_STATE_NONE;
-    newctx.is_sub_event = isSubEvent;
-    m_multi_touch_context[touch_id] = newctx;
+CSCLContext::create_multi_touch_context(scltouchdevice touch_id, sclboolean is_sub_event)
+{
+    MultiTouchContext new_multi_touch_context;
+    memset(&new_multi_touch_context, 0x00, sizeof(MultiTouchContext));
+    new_multi_touch_context.used = TRUE;
+    new_multi_touch_context.cur_pressed_key = NOT_USED;
+    new_multi_touch_context.cur_pressed_window = SCLWINDOW_INVALID;
+    new_multi_touch_context.event_id = 0;
+    new_multi_touch_context.prev_pressed_key = NOT_USED;
+    new_multi_touch_context.prev_pressed_window = SCLWINDOW_INVALID;
+    new_multi_touch_context.cur_pressed_point.x = new_multi_touch_context.cur_pressed_point.y = 0;
+    new_multi_touch_context.cur_pressed_time.tv_sec = new_multi_touch_context.cur_pressed_time.tv_usec = 0;
+    new_multi_touch_context.cur_drag_state = SCL_DRAG_STATE_NONE;
+    new_multi_touch_context.is_sub_event = is_sub_event;
+    m_multi_touch_context[touch_id] = new_multi_touch_context;
 
     m_multi_touch_seq.insert(m_multi_touch_seq.end(), touch_id);
 
@@ -472,9 +474,9 @@ CSCLContext::create_multi_touch_context(scltouchdevice touch_id, sclboolean isSu
 void
 CSCLContext::destroy_multi_touch_context(scltouchdevice touch_id)
 {
-    MultiTouchContext *ctx = find_multi_touch_context(touch_id);
-    if (ctx) {
-        memset(ctx, 0x00, sizeof(MultiTouchContext));
+    MultiTouchContext *multi_touch_context = find_multi_touch_context(touch_id);
+    if (multi_touch_context) {
+        memset(multi_touch_context, 0x00, sizeof(MultiTouchContext));
         m_multi_touch_context.erase(touch_id);
     }
 
@@ -489,13 +491,15 @@ CSCLContext::destroy_multi_touch_context(scltouchdevice touch_id)
         }
     } while (bFound);
 
+    /*
     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(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");
     }
+    */
 }
 
 MultiTouchContext*
@@ -517,47 +521,48 @@ CSCLContext::get_multi_touch_context_num()
 }
 
 sclboolean
-CSCLContext::get_multi_touch_event(sclint seqorder, SclUIEventDesc *desc)
+CSCLContext::get_multi_touch_event(sclint order, SclUIEventDesc *desc)
 {
     sclboolean ret = FALSE;
-    sclint iSeqIndex = 0;
+    sclint index = 0;
 
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
 
     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 (iSeqIndex == seqorder) {
-                MultiTouchContext *pContext = find_multi_touch_context(*list_iter);
-                if (pContext) {
+            if (index == order) {
+                MultiTouchContext *multi_touch_context = find_multi_touch_context(*list_iter);
+                if (multi_touch_context) {
                     const SclLayoutKeyCoordinate *coordinate =
-                        cache->get_cur_layout_key_coordinate(pContext->cur_pressed_window, pContext->cur_pressed_key);
+                        cache->get_cur_layout_key_coordinate(multi_touch_context->cur_pressed_window,
+                            multi_touch_context->cur_pressed_key);
 
                     if (coordinate) {
-                        SCLShiftState shiftidx = get_shift_state();
-                        if (shiftidx < 0 || shiftidx >= SCL_SHIFT_STATE_MAX) shiftidx = SCL_SHIFT_STATE_OFF;
-                        desc->key_event = coordinate->key_event[shiftidx][0];
-                        desc->key_value = coordinate->key_value[shiftidx][0];
+                        SCLShiftState shift_index = get_shift_state();
+                        if (shift_index < 0 || shift_index >= SCL_SHIFT_STATE_MAX) shift_index = SCL_SHIFT_STATE_OFF;
+                        desc->key_event = coordinate->key_event[shift_index][0];
+                        desc->key_value = coordinate->key_value[shift_index][0];
                         desc->key_type = coordinate->key_type;
                     } else {
                         desc->key_event = 0;
                         desc->key_value = NULL;
                         desc->key_type = KEY_TYPE_NONE;
                     }
-                    desc->key_modifier = pContext->cur_key_modifier;
+                    desc->key_modifier = multi_touch_context->cur_key_modifier;
 
                     desc->touch_id = (*list_iter);
-                    desc->mouse_pressed_point = pContext->cur_pressed_point;
-                    desc->mouse_current_point = pContext->cur_move_point;
-                    desc->mouse_farthest_point = pContext->farthest_move_point;
+                    desc->mouse_pressed_point = multi_touch_context->cur_pressed_point;
+                    desc->mouse_current_point = multi_touch_context->cur_moving_point;
+                    desc->mouse_farthest_point = multi_touch_context->farthest_move_point;
 
-                    desc->touch_event_order = iSeqIndex;
+                    desc->touch_event_order = index;
 
                     desc->event_type = EVENT_TYPE_NONE;
 
                     ret = TRUE;
                 }
             }
-            iSeqIndex++;
+            index++;
     }
 
     return ret;
index baa7606..4471034 100644 (file)
@@ -201,7 +201,7 @@ CSCLController::process_input_mode_change(const sclbyte mode)
 
     if (context && windows && cache && utils) {
         if (mode == context->get_input_mode() || mode == (sclbyte)NOT_USED) {
-            /* BtnContext does not get initialized if we don't call here */
+            /* ButtonContext does not get initialized if we don't call here */
             cache->recompute_layout(windows->get_base_window());
             return FALSE;
         }
@@ -216,11 +216,11 @@ CSCLController::process_input_mode_change(const sclbyte mode)
         handle_engine_signal(SCL_SIG_INPMODE_CHANGE, window);
 
 #ifdef TEST_NEWBACKEND
-        SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-        if (winctx) {
-            if (winctx->etc_info) {
+        SclWindowContext *window_context= windows->get_window_context(window, FALSE);
+        if (window_context) {
+            if (window_context->etc_info) {
 
-                Eina_List *list = (Eina_List*)(winctx->etc_info);
+                Eina_List *list = (Eina_List*)(window_context->etc_info);
                 Eina_List *iter = NULL;
                 Eina_List *iter_next = NULL;
                 void *data = NULL;
@@ -260,7 +260,7 @@ CSCLController::process_input_mode_change(const sclbyte mode)
                     }
                     iIndex++;
                 }
-                winctx->etc_info= list;
+                window_context->etc_info= list;
             }
         }
 #endif
@@ -319,21 +319,21 @@ CSCLController::check_magnifier_available(sclwindow window, sclbyte key_index, s
     CSCLContext *context = CSCLContext::get_instance();
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
     const SclLayout *layout = NULL;
-    SclButtonContext *btncontext = NULL;
+    SclButtonContext *button_context = NULL;
     const SclLayoutKeyCoordinate *coordinate = NULL;
 
     if (context && cache) {
         layout = cache->get_cur_layout(window);
-        btncontext = cache->get_cur_button_context(window, key_index);
+        button_context = cache->get_cur_button_context(window, key_index);
         coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
 
-        SCLShiftState shiftidx = context->get_shift_state();
-        if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+        SCLShiftState shift_index = context->get_shift_state();
+        if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
         if (context->get_caps_lock_mode()) {
-            shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+            shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
         }
 
-        if (layout && coordinate && btncontext && 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) {
@@ -355,13 +355,13 @@ CSCLController::check_magnifier_available(sclwindow window, sclbyte key_index, s
                         }
                     }
                     if (!custom_label) {
-                        //if (coordinate->key_value[shiftidx][btncontext->multikeyIdx] == NULL) {
-                        if (coordinate->label[shiftidx][btncontext->multikeyIdx] == NULL) {
-                            //utils->log("show_magnifier coordinate->key_value[shift][btncontext->multikeyIdx] == NULL \n");
+                        //if (coordinate->key_value[shift_index][button_context->multikeyIdx] == NULL) {
+                        if (coordinate->label[shift_index][button_context->multikeyIdx] == NULL) {
+                            //utils->log("show_magnifier coordinate->key_value[shift][button_context->multikeyIdx] == NULL \n");
                             ret = FALSE;
-                            //} else if (strlen(coordinate->key_value[shiftidx][btncontext->multikeyIdx]) == 0) {
-                        } else if (strlen(coordinate->label[shiftidx][btncontext->multikeyIdx]) == 0) {
-                            //utils->log("show_magnifier coordinate->key_value[shift][btncontext->multikeyIdx]) == 0 \n");
+                            //} else if (strlen(coordinate->key_value[shift_index][button_context->multikeyIdx]) == 0) {
+                        } else if (strlen(coordinate->label[shift_index][button_context->multikeyIdx]) == 0) {
+                            //utils->log("show_magnifier coordinate->key_value[shift][button_context->multikeyIdx]) == 0 \n");
                             ret = FALSE;
                         }
                     }
@@ -398,18 +398,15 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
     assert(sclres_input_mode_configure != NULL);
     assert(sclres_layout != NULL);
 
-    SclButtonContext *btncontext = NULL;
+    SclButtonContext *button_context = NULL;
     const SclLayoutKeyCoordinate *coordinate = NULL;
 
     if (context && cache) {
-        btncontext = cache->get_cur_button_context(window, key_index);
+        button_context = cache->get_cur_button_context(window, key_index);
         coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
     }
 
-    static sclwindow prevwin = SCLWINDOW_INVALID;
-    static sclbyte prevkey = NOT_USED;
-
-    if (context && cache && windows && events && utils && feedback && handler && btncontext && coordinate) {
+    if (context && cache && windows && events && utils && feedback && handler && button_context && coordinate) {
         /* First check if this button is enabled in current active sublayout */
         sclboolean sub_layout_match = TRUE;
         if (coordinate->sub_layout && context->get_cur_sublayout()) {
@@ -442,8 +439,9 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                     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_move_window(desc.touch_id),
-                                context->get_cur_move_point(desc.touch_id).x, context->get_cur_move_point(desc.touch_id).y,
+                            mouse_release(context->get_cur_moving_window(desc.touch_id),
+                                context->get_cur_moving_point(desc.touch_id).x,
+                                context->get_cur_moving_point(desc.touch_id).y,
                                 desc.touch_id, FALSE);
                         }
                     }
@@ -457,7 +455,7 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
             context->set_cur_pressed_key(touch_id, key_index);
             context->set_cur_pressed_window(touch_id, window);
 
-            btncontext->state = BUTTON_STATE_PRESSED;
+            button_context->state = BUTTON_STATE_PRESSED;
 
             redraw = TRUE;
             ret = TRUE;
@@ -470,7 +468,7 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
             /*CSCLGraphics *grps = CSCLGraphics::get_instance();
             CSCLUIBuilder *builder = CSCLUIBuilder::get_instance();
             scldrawctx draw_ctx = grps->begin_paint(window, TRUE);
-            builder->draw_button(window, draw_ctx, key_index, btncontext->state, TRUE);
+            builder->draw_button(window, draw_ctx, key_index, button_context->state, TRUE);
             grps->end_paint(window, draw_ctx);*/
 #endif
 
@@ -485,15 +483,15 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                 events->create_timer(SCL_TIMER_LONGKEY, m_long_key_duration, uniqId);
             }
 
-            SCLShiftState shiftidx = context->get_shift_state();
-            if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+            SCLShiftState shift_index = context->get_shift_state();
+            if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
             if (context->get_caps_lock_mode()) {
-                shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
             }
 
-            SclUIEventDesc key_event_desc = {0};
-            key_event_desc.key_value = coordinate->key_value[shiftidx][0];
-            key_event_desc.key_event = coordinate->key_event[shiftidx][0];
+            SclUIEventDesc key_event_desc;
+            key_event_desc.key_value = coordinate->key_value[shift_index][0];
+            key_event_desc.key_event = coordinate->key_event[shift_index][0];
             key_event_desc.key_type = coordinate->key_type;
             key_event_desc.key_modifier = KEY_MODIFIER_NONE;
             key_event_desc.event_type = EVENT_TYPE_PRESS;
@@ -595,7 +593,7 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                                 windows->hide_window(windows->get_magnifier_window());
                                 /* FIXME : The parent key should be turned back to NORMAL state when RELEASED,
                                     in case of POPUP_TYPE_BTN_PRESS_POPUP_DRAG type. Temporariliy setting NORMAL here. */
-                                btncontext->state = BUTTON_STATE_NORMAL;
+                                button_context->state = BUTTON_STATE_NORMAL;
                                 _play_tts_for_input_mode_name(popup_input_mode);
                             }
                         }
@@ -620,13 +618,12 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
             if (coordinate->use_magnifier) {
                 sclboolean showMagnifier = check_magnifier_available(window, key_index, touch_id);
 
-                SclResParserManager *sclres_manager = SclResParserManager::get_instance();
                 PSclMagnifierWndConfigure magnifier_configure = NULL;
                 if (sclres_manager) {
                     magnifier_configure = sclres_manager->get_magnifier_configure();
                 }
                 if (showMagnifier && magnifier_configure) {
-                    SclPoint pos = {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);
@@ -638,10 +635,10 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                     pos.y = coordinate->y - magnifier_configure->height * utils->get_custom_scale_rate_y();
 
                     /* FIXME : Temporary way of clearing magnifier window */
-                    /*SclWindowContext *winctx = windows->get_window_context(windows->get_magnifier_window(), FALSE);
+                    /*SclWindowContext *window_context = windows->get_window_context(windows->get_magnifier_window(), FALSE);
                     sclboolean clearmagwin = FALSE;
-                    if (winctx) {
-                        clearmagwin = !(winctx->hidden);
+                    if (window_context) {
+                        clearmagwin = !(window_context->hidden);
                     }
                     static int clearnum = 0;
                     if (key_index == prevkey && window == prevwin) {
@@ -667,10 +664,10 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                     */
                     windows->hide_window(windows->get_magnifier_window());
 
-                    SclWindowContext *winctx = windows->get_window_context(window);
-                    if (winctx) {
-                        pos.x += winctx->geometry.x;
-                        pos.y += winctx->geometry.y;
+                    SclWindowContext *window_context = windows->get_window_context(window);
+                    if (window_context) {
+                        pos.x += window_context->geometry.x;
+                        pos.y += window_context->geometry.y;
                     }
 
                     if (pos.x < 0 - magnifier_configure->padding_x * utils->get_custom_scale_rate_x()) {
@@ -708,20 +705,17 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
                     windows->hide_window(windows->get_magnifier_window());
                 }
             }
-
-            prevwin = window;
-            prevkey = key_index;
         } else {
             /* COMMENTED OUT FOR TESTING MULTITOUCH!! */
             ///* In case the current button is not the given key index */
-            //if (btncontext->state == BUTTON_STATE_PRESSED) {
+            //if (button_context->state == BUTTON_STATE_PRESSED) {
             //    /* Even if the press event occured outside of this button's physical area, reset its context */
-            //    btncontext->state = BUTTON_STATE_NORMAL;
+            //    button_context->state = BUTTON_STATE_NORMAL;
             //    redraw = TRUE;
             //}
             /* BUTTON_TYPE_MULTITAP type button should restore its multikey index when another button is clicked */
             if (coordinate->button_type & BUTTON_TYPE_MULTITAP) {
-                btncontext->multikeyIdx = 0;
+                button_context->multikeyIdx = 0;
             }
         }
 
@@ -730,10 +724,9 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
 #ifdef DIRECTLY_DRAW_ON_EVENTS
             CSCLUIBuilder *builder = CSCLUIBuilder::get_instance();
             if (builder) {
-                builder->draw_button(window, NULL, key_index, btncontext->state, TRUE);
+                builder->draw_button(window, NULL, key_index, button_context->state, TRUE);
             }
 #else
-            CSCLWindows *windows = CSCLWindows::get_instance();
             if (windows) {
                 windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
             }
@@ -790,9 +783,9 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                                 cache->get_cur_layout_key_coordinate(cur_pressed_window, cur_pressed_key);
                             if (cur_pressed_coordinate) {
                                 if (cur_pressed_coordinate->multitouch_type == SCL_MULTI_TOUCH_TYPE_SETTLE_PREVIOUS) {
-                                    mouse_release(context->get_cur_move_window(desc.touch_id),
-                                        context->get_cur_move_point(desc.touch_id).x,
-                                        context->get_cur_move_point(desc.touch_id).y,
+                                    mouse_release(context->get_cur_moving_window(desc.touch_id),
+                                        context->get_cur_moving_point(desc.touch_id).x,
+                                        context->get_cur_moving_point(desc.touch_id).y,
                                         desc.touch_id, FALSE);
                                 }
                             }
@@ -809,17 +802,17 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
             if (coordinate->popup_type == POPUP_TYPE_BTN_LONGPRESS_POPUP ||
                 coordinate->popup_type == POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE ) {
 
-                    SclUIEventDesc key_event_desc = {0};
+                    SclUIEventDesc key_event_desc;
                     key_event_desc.key_type = coordinate->long_key_type;
                     if (coordinate->long_key_value == NULL && coordinate->long_key_event == 0) {
-                        SCLShiftState shiftidx = context->get_shift_state();
-                        if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+                        SCLShiftState shift_index = context->get_shift_state();
+                        if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
                         if (context->get_caps_lock_mode()) {
-                            shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                            shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
                         }
 
-                        key_event_desc.key_value = coordinate->key_value[shiftidx][0];
-                        key_event_desc.key_event = coordinate->key_event[shiftidx][0];
+                        key_event_desc.key_value = coordinate->key_value[shift_index][0];
+                        key_event_desc.key_event = coordinate->key_event[shift_index][0];
                     } else {
                         key_event_desc.key_value = coordinate->long_key_value;
                         key_event_desc.key_event = coordinate->long_key_event;
@@ -829,7 +822,7 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                     key_event_desc.event_type = EVENT_TYPE_LONGPRESS;
                     key_event_desc.touch_id = touch_id;
                     key_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                    key_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                    key_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                     key_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
 
                     key_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
@@ -900,9 +893,6 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                     }
             } else if (coordinate->long_key_value) {
                 if (strlen(coordinate->long_key_value) > 0) {
-                    SclPoint ptMoving = context->get_cur_move_point(touch_id);
-                    /*if (ptMoving.x >= coordinate->x && ptMoving.x <= coordinate->x + coordinate->width &&
-                        ptMoving.y >= coordinate->y && ptMoving.y <= coordinate->y + coordinate->height) {*/
                         if (windows->is_base_window(window)) {
                             state->set_cur_action_state(ACTION_STATE_BASE_LONGKEY);
                         } else {
@@ -910,34 +900,25 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                         }
                         ret = TRUE;
 
-                        SclResParserManager *sclres_manager = SclResParserManager::get_instance();
                         PSclMagnifierWndConfigure magnifier_configure = NULL;
                         if (sclres_manager) {
                             magnifier_configure = sclres_manager->get_magnifier_configure();
                         }
                         if (coordinate->use_long_key_magnifier && magnifier_configure) {
                             CSCLUtils *utils = CSCLUtils::get_instance();
-                            SclPoint pos = {0,};
+                            SclPoint pos = {0,0};
 
                             const SclLayout* layout = cache->get_cur_layout(window);
                             if (layout) {
-                                sclfloat scale_rate_x, scale_rate_y;
-                                if (layout->display_mode == DISPLAYMODE_PORTRAIT) {
-                                    scale_rate_x = utils->get_scale_rate_x();
-                                    scale_rate_y = utils->get_scale_rate_y();
-                                } else {
-                                    scale_rate_x = utils->get_scale_rate_y();
-                                    scale_rate_y = utils->get_scale_rate_x();
-                                }
                                 sclint scnWidth, scnHeight;
                                 utils->get_screen_resolution(&scnWidth, &scnHeight);
 
-                                //SclWindowContext *winctx = windows->get_window_context(window, TRUE);
-                                SclWindowContext *winctx = windows->get_window_context(window);
-                                if (winctx) {
-                                    pos.x = winctx->geometry.x + (coordinate->x + (coordinate->width / 2)) -
+                                //SclWindowContext *window_context = windows->get_window_context(window, TRUE);
+                                SclWindowContext *window_context = windows->get_window_context(window);
+                                if (window_context) {
+                                    pos.x = window_context->geometry.x + (coordinate->x + (coordinate->width / 2)) -
                                         (magnifier_configure->width * utils->get_custom_scale_rate_x() / 2);
-                                    pos.y = winctx->geometry.y + coordinate->y -
+                                    pos.y = window_context->geometry.y + coordinate->y -
                                         magnifier_configure->height * utils->get_custom_scale_rate_y();
                                 }
                                 if (pos.x < 0 - magnifier_configure->padding_x * utils->get_custom_scale_rate_x()) {
@@ -959,7 +940,7 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                             }
                         }
 
-                        SclUIEventDesc key_event_desc = {0};
+                        SclUIEventDesc key_event_desc;
                         key_event_desc.key_type = coordinate->long_key_type;
                         key_event_desc.key_value = coordinate->long_key_value;
                         key_event_desc.key_event = coordinate->long_key_event;
@@ -968,7 +949,7 @@ CSCLController::process_button_long_pressed_event(sclwindow window, sclbyte key_
                         key_event_desc.event_type = EVENT_TYPE_LONGPRESS;
                         key_event_desc.touch_id = touch_id;
                         key_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                        key_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                        key_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                         key_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
 
                         key_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
@@ -999,10 +980,10 @@ CSCLController::process_button_repeat_pressed_event(sclwindow window, sclbyte ke
     if (context && cache && windows && handler) {
         const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
 
-        SCLShiftState shiftidx = context->get_shift_state();
-        if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+        SCLShiftState shift_index = context->get_shift_state();
+        if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
         if (context->get_caps_lock_mode()) {
-            shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+            shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
         }
 
         if (coordinate) {
@@ -1016,7 +997,7 @@ CSCLController::process_button_repeat_pressed_event(sclwindow window, sclbyte ke
                     //if (coordinate->key_type != KEY_TYPE_MODECHANGE && coordinate->key_type != KEY_TYPE_COMPOSITION) {
                     //if (coordinate->key_type != KEY_TYPE_MODECHANGE || coordinate->key_event[0][0] == MVK_BackSpace) {
                     if (coordinate->key_type != KEY_TYPE_MODECHANGE) {
-                        sclulong repeatKeyEvent = coordinate->key_event[shiftidx][0];
+                        sclulong repeatKeyEvent = coordinate->key_event[shift_index][0];
 
                         /* In case of Delete key, Change from Char deletion to Word deletion
                            when the input accelation speed is reached to Max */
@@ -1035,8 +1016,8 @@ CSCLController::process_button_repeat_pressed_event(sclwindow window, sclbyte ke
                             }
                         }
 
-                        SclUIEventDesc key_event_desc = {0};
-                        key_event_desc.key_value = coordinate->key_value[shiftidx][0];
+                        SclUIEventDesc key_event_desc;
+                        key_event_desc.key_value = coordinate->key_value[shift_index][0];
                         key_event_desc.key_event = repeatKeyEvent;
                         key_event_desc.key_type = coordinate->key_type;
                         key_event_desc.key_modifier = KEY_MODIFIER_NONE;
@@ -1044,7 +1025,7 @@ CSCLController::process_button_repeat_pressed_event(sclwindow window, sclbyte ke
                         key_event_desc.event_type = EVENT_TYPE_REPEAT;
                         key_event_desc.touch_id = touch_id;
                         key_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                        key_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                        key_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                         key_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
 
                         key_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
@@ -1080,16 +1061,16 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
     CSCLEventHandler *handler = CSCLEventHandler::get_instance();
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
 
-    SclButtonContext *btncontext = NULL;
+    SclButtonContext *button_context = NULL;
 
     const SclLayoutKeyCoordinate *coordinate = NULL;
 
     if (cache) {
         coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
-        btncontext = cache->get_cur_button_context(window, key_index);
+        button_context = cache->get_cur_button_context(window, key_index);
     }
 
-    if (btncontext && coordinate && feedback && utils && context && handler && cache && events && windows) {
+    if (button_context && coordinate && feedback && utils && context && handler && cache && events && windows) {
         /* If this key is the key previously pressed, add threshold value for avoiding unintended moving */
         sclint thresholdX = 0;
         sclint thresholdY = 0;
@@ -1112,10 +1093,10 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                 subLayoutMatch ) {
             ret = TRUE;
 
-            SCLShiftState shiftidx = context->get_shift_state();
-            if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+            SCLShiftState shift_index = context->get_shift_state();
+            if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
             if (context->get_caps_lock_mode()) {
-                shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
             }
 
             const SclLayout* layout = cache->get_cur_layout(windows->get_base_window());
@@ -1136,15 +1117,6 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
 
                 if (check_event_transition_enabled(pressed_coordinate, coordinate)) {
                     if (layout) {
-                        sclfloat scale_rate_x, scale_rate_y;
-                        if (layout->display_mode == DISPLAYMODE_PORTRAIT) {
-                            scale_rate_x = utils->get_scale_rate_x();
-                            scale_rate_y = utils->get_scale_rate_y();
-                        } else {
-                            scale_rate_x = utils->get_scale_rate_y();
-                            scale_rate_y = utils->get_scale_rate_x();
-                        }
-
                         const scl16 uniqId = utils->get_unique_id();
                         context->set_cur_pressed_event_id(touch_id, uniqId);
                         /* Special routine for autopopup */
@@ -1166,7 +1138,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,};
+                            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);
@@ -1198,7 +1170,7 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                         /* for feedback */
                         feedback->button_moved(window, key_index);
 
-                        btncontext->state = BUTTON_STATE_PRESSED;
+                        button_context->state = BUTTON_STATE_PRESSED;
                         if (pressed_context) {
                             /* But, if this button should be in pressed state in other multitouch id, do not initialize it */
                             sclboolean found = FALSE;
@@ -1206,10 +1178,11 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                                 SclUIEventDesc desc;
                                 context->get_multi_touch_event(loop, &desc);
                                 if (desc.touch_id != touch_id) {
-                                    MultiTouchContext *mulctx = context->find_multi_touch_context(desc.touch_id);
-                                    if (mulctx) {
-                                        if (mulctx->cur_pressed_window == pressed_window &&
-                                            mulctx->cur_pressed_key == pressed_key) {
+                                    MultiTouchContext *multi_touch_context =
+                                        context->find_multi_touch_context(desc.touch_id);
+                                    if (multi_touch_context) {
+                                        if (multi_touch_context->cur_pressed_window == pressed_window &&
+                                            multi_touch_context->cur_pressed_key == pressed_key) {
                                             found = TRUE;
                                         }
                                     }
@@ -1240,37 +1213,26 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
 
                         switch (coordinate->button_type) {
                         case BUTTON_TYPE_DRAG: {
-                            SclUIEventDesc key_event_desc = {0};
-                            key_event_desc.key_value = coordinate->key_value[shiftidx][0];
-                            key_event_desc.key_event = coordinate->key_event[shiftidx][0];
+                            SclUIEventDesc key_event_desc;
+                            key_event_desc.key_value = coordinate->key_value[shift_index][0];
+                            key_event_desc.key_event = coordinate->key_event[shift_index][0];
                             key_event_desc.key_type = coordinate->key_type;
                             key_event_desc.key_modifier = KEY_MODIFIER_NONE;
 
                             key_event_desc.event_type = EVENT_TYPE_MOVE;
                             key_event_desc.touch_id = touch_id;
                             key_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                            key_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                            key_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                             key_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
 
                             key_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
 
-                            SclResParserManager *sclres_manager = SclResParserManager::get_instance();
-                            PSclMagnifierWndConfigure magnifier_configure = NULL;
                             if (sclres_manager) {
                                 magnifier_configure = sclres_manager->get_magnifier_configure();
                             }
                             sclboolean processed = handler->on_event_drag_state_changed(key_event_desc);
                             if (processed && context->get_magnifier_enabled() && magnifier_configure) {
-                                SclPoint zoomwinpos = {0,};
-                                const SclLayout *layout = cache->get_cur_layout(windows->get_base_window());
-                                sclfloat scale_rate_x, scale_rate_y;
-                                if (layout->display_mode == DISPLAYMODE_PORTRAIT) {
-                                    scale_rate_x = utils->get_scale_rate_x();
-                                    scale_rate_y = utils->get_scale_rate_y();
-                                } else {
-                                    scale_rate_x = utils->get_scale_rate_y();
-                                    scale_rate_y = utils->get_scale_rate_x();
-                                }
+                                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);
@@ -1281,10 +1243,10 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
 
                                 zoomwinpos.y = coordinate->y -
                                     magnifier_configure->height * utils->get_custom_scale_rate_y();
-                                SclWindowContext *winctx = windows->get_window_context(window);
-                                if (winctx) {
-                                    zoomwinpos.x += winctx->geometry.x;
-                                    zoomwinpos.y += winctx->geometry.y;
+                                SclWindowContext *window_context = windows->get_window_context(window);
+                                if (window_context) {
+                                    zoomwinpos.x += window_context->geometry.x;
+                                    zoomwinpos.y += window_context->geometry.y;
                                 }
                                 if (zoomwinpos.x < 0 - magnifier_configure->padding_x * utils->get_custom_scale_rate_x()) {
                                     zoomwinpos.x = 0 - magnifier_configure->padding_x * utils->get_custom_scale_rate_x();
@@ -1306,12 +1268,12 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
                             handler->on_event_key_clicked(key_event_desc);
                             if (!(windows->is_base_window(window))) {
                                 /* When press event occured in popup window, reset POPUP_TIMEOUT timer */
-                                //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-                                SclWindowContext *winctx = windows->get_window_context(window);
-                                if (winctx) {
-                                    if (winctx->timeout > 0) {
+                                //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+                                SclWindowContext *window_context = windows->get_window_context(window);
+                                if (window_context) {
+                                    if (window_context->timeout > 0) {
                                         events->destroy_timer(SCL_TIMER_POPUP_TIMEOUT);
-                                        events->create_timer(SCL_TIMER_POPUP_TIMEOUT, winctx->timeout, 0, TRUE);
+                                        events->create_timer(SCL_TIMER_POPUP_TIMEOUT, window_context->timeout, 0, TRUE);
                                     }
                                 }
                             }
@@ -1333,8 +1295,8 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
 #ifdef DIRECTLY_DRAW_ON_EVENTS
                         CSCLUIBuilder *builder = CSCLUIBuilder::get_instance();
                         if (builder) {
-                            if (btncontext) {
-                                builder->draw_button(window, NULL, key_index, btncontext->state);
+                            if (button_context) {
+                                builder->draw_button(window, NULL, key_index, button_context->state);
                             }
                             if (pressedContext) {
                                 builder->draw_button(pressed_window, NULL, pressed_key, pressedContext->state, TRUE);
@@ -1343,8 +1305,6 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
 #else
                         windows->update_window(window,
                                 coordinate->x, coordinate->y, coordinate->width, coordinate->height);
-                        const SclLayoutKeyCoordinate *pressed_coordinate =
-                            cache->get_cur_layout_key_coordinate(pressed_window, pressed_key);
                         if (pressed_coordinate) {
                             windows->update_window(pressed_window, pressed_coordinate->x, pressed_coordinate->y,
                                     pressed_coordinate->width, pressed_coordinate->height);
@@ -1388,7 +1348,7 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y,
 }
 
 sclboolean
-CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y, sclbyte keyindex)
+CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y, sclbyte key_index)
 {
     SCL_DEBUG();
 
@@ -1401,15 +1361,15 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y,
     CSCLFeedback *feedback = CSCLFeedback::get_instance();
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
 
-    SclButtonContext *btncontext = NULL;
+    SclButtonContext *button_context = NULL;
 
     const SclLayoutKeyCoordinate *coordinate = NULL;
     if(cache) {
-        coordinate = cache->get_cur_layout_key_coordinate(window, keyindex);
-        btncontext = cache->get_cur_button_context(window, keyindex);
+        coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
+        button_context = cache->get_cur_button_context(window, key_index);
     }
 
-    if(btncontext && 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()) {
@@ -1424,41 +1384,32 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y,
                 subLayoutMatch ) {
             ret = TRUE;
 
-            SCLShiftState shiftidx = context->get_shift_state();
-            if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+            SCLShiftState shift_index = context->get_shift_state();
+            if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
             if (context->get_caps_lock_mode()) {
-                shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
             }
 
             const SclLayout* layout = cache->get_cur_layout(windows->get_base_window());
 
             sclwindow highlighted_window = context->get_cur_highlighted_window();
             scl8 highlighted_key = context->get_cur_highlighted_key();
-            SclButtonContext *cur_context = cache->get_cur_button_context(window, keyindex);
+            SclButtonContext *cur_context = cache->get_cur_button_context(window, key_index);
 
             if(cur_context == NULL) {
                 return FALSE;
             }
-            if (keyindex != highlighted_key || window != highlighted_window ) {
-                printf("%d != %d || %p != %p\n", keyindex, highlighted_key, window, highlighted_window);
+            if (key_index != highlighted_key || window != highlighted_window ) {
+                printf("%d != %d || %p != %p\n", key_index, highlighted_key, window, highlighted_window);
                 if(layout) {
-                    sclfloat scale_rate_x, scale_rate_y;
-                    if(layout->display_mode == DISPLAYMODE_PORTRAIT) {
-                        scale_rate_x = utils->get_scale_rate_x();
-                        scale_rate_y = utils->get_scale_rate_y();
-                    } else {
-                        scale_rate_x = utils->get_scale_rate_y();
-                        scale_rate_y = utils->get_scale_rate_x();
-                    }
-
                     if (coordinate->key_type != KEY_TYPE_NONE) {
                         if (context->get_tts_enabled()) {
-                            const sclchar *targetstr = coordinate->hint_string[shiftidx][btncontext->multikeyIdx];
+                            const sclchar *targetstr = coordinate->hint_string[shift_index][button_context->multikeyIdx];
                             if (targetstr == NULL) {
-                                targetstr = coordinate->label[shiftidx][0];
+                                targetstr = coordinate->label[shift_index][0];
                             }
                             if (targetstr == NULL) {
-                                targetstr = coordinate->key_value[shiftidx][btncontext->multikeyIdx];
+                                targetstr = coordinate->key_value[shift_index][button_context->multikeyIdx];
                             }
                             /*if(state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY ||
                                 state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY ) {
@@ -1471,7 +1422,7 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y,
                 }
 
                 context->set_cur_highlighted_window(window);
-                context->set_cur_highlighted_key(keyindex);
+                context->set_cur_highlighted_key(key_index);
             }
         }
     }
@@ -1600,17 +1551,17 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
     PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
     assert(sclres_layout != NULL);
     assert(sclres_input_mode_configure != NULL);
-    SclButtonContext *btncontext = NULL;
+    SclButtonContext *button_context = NULL;
     const SclLayoutKeyCoordinate *coordinate = NULL;
 
     if (cache) {
-        btncontext = cache->get_cur_button_context(window, key_index);
+        button_context = cache->get_cur_button_context(window, key_index);
         coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
     }
 
     const SclLayoutKeyCoordinate *targetCoordinate = NULL;
 
-    if (utils && feedback && windows && context && state && handler && cache && btncontext && coordinate) {
+    if (utils && feedback && windows && context && state && handler && cache && button_context && coordinate) {
         scl8 savedInputMode = context->get_input_mode();
 
         sclwindow pressed_window = context->get_cur_pressed_window(touch_id);
@@ -1638,8 +1589,9 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                              cache->get_cur_layout_key_coordinate(cur_pressed_window, cur_pressed_key);
                          if (cur_pressed_coordinate) {
                              if (cur_pressed_coordinate->multitouch_type == SCL_MULTI_TOUCH_TYPE_SETTLE_PREVIOUS) {
-                                 mouse_release(context->get_cur_move_window(desc.touch_id),
-                                     context->get_cur_move_point(desc.touch_id).x, context->get_cur_move_point(desc.touch_id).y,
+                                 mouse_release(context->get_cur_moving_window(desc.touch_id),
+                                     context->get_cur_moving_point(desc.touch_id).x,
+                                     context->get_cur_moving_point(desc.touch_id).y,
                                      desc.touch_id, FALSE);
                              }
                          }
@@ -1672,8 +1624,8 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
 
                     /* If the buttontype is RELATIVE_DIRECTION, get the distance from last move point */
                     if (coordinate->button_type == BUTTON_TYPE_RELATIVE_DIRECTION) {
-                        startx = context->get_prev_move_point(touch_id).x;
-                        starty = context->get_prev_move_point(touch_id).y;
+                        startx = context->get_prev_moving_point(touch_id).x;
+                        starty = context->get_prev_moving_point(touch_id).y;
                     } else {
                         startx = context->get_cur_pressed_point(touch_id).x;
                         starty = context->get_cur_pressed_point(touch_id).y;
@@ -1771,19 +1723,19 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
             /* An event occured? */
             if (fireEvt) {
                 if (targetCoordinate) {
-                    SCLShiftState shiftidx = context->get_shift_state();
-                    if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+                    SCLShiftState shift_index = context->get_shift_state();
+                    if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
                     if (context->get_caps_lock_mode()) {
-                        shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                        shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
                     }
 
-                    SclUIEventDesc key_event_desc = {0};
+                    SclUIEventDesc key_event_desc;
                     key_event_desc.key_type = targetCoordinate->key_type;
 
                     key_event_desc.event_type = EVENT_TYPE_RELEASE;
                     key_event_desc.touch_id = touch_id;
                     key_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                    key_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                    key_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                     key_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
 
                     key_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
@@ -1797,8 +1749,8 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                         SclButtonContext *pressed_context = cache->get_cur_button_context(pressed_window, pressed_key);
                         if (pressed_context) {
                             if (!(targetCoordinate->use_repeat_key) && pressed_context->state == BUTTON_STATE_PRESSED) {
-                                key_event_desc.key_value = targetCoordinate->key_value[shiftidx][0];
-                                key_event_desc.key_event = targetCoordinate->key_event[shiftidx][0];
+                                key_event_desc.key_value = targetCoordinate->key_value[shift_index][0];
+                                key_event_desc.key_event = targetCoordinate->key_event[shift_index][0];
                                 key_event_desc.key_modifier = key_modifier;
                                 handler->on_event_key_clicked(key_event_desc);
                             }
@@ -1816,21 +1768,21 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                         } else {
                             key_modifier = KEY_MODIFIER_NONE;
                         }
-                        if (btncontext->multikeyIdx < MAX_SIZE_OF_MULTITAP_CHAR) {
-                            key_event_desc.key_value = coordinate->key_value[shiftidx][btncontext->multikeyIdx];
-                            key_event_desc.key_event = coordinate->key_event[shiftidx][btncontext->multikeyIdx];
+                        if (button_context->multikeyIdx < MAX_SIZE_OF_MULTITAP_CHAR) {
+                            key_event_desc.key_value = coordinate->key_value[shift_index][button_context->multikeyIdx];
+                            key_event_desc.key_event = coordinate->key_event[shift_index][button_context->multikeyIdx];
                             key_event_desc.key_modifier = key_modifier;
                             handler->on_event_key_clicked(key_event_desc);
                         }
                         /* Check if the multikey index is in valid range, and increase by one */
-                        if (btncontext->multikeyIdx >= MAX_SIZE_OF_MULTITAP_CHAR - 1) {
-                            btncontext->multikeyIdx = 0;
+                        if (button_context->multikeyIdx >= MAX_SIZE_OF_MULTITAP_CHAR - 1) {
+                            button_context->multikeyIdx = 0;
                         } else {
-                            sclbyte orgindex = btncontext->multikeyIdx;
-                            btncontext->multikeyIdx = 0;
-                            if (targetCoordinate->key_value[shiftidx][orgindex + 1]) {
-                                if (strlen(targetCoordinate->key_value[shiftidx][orgindex + 1]) > 0) {
-                                    btncontext->multikeyIdx = orgindex + 1;
+                            sclbyte orgindex = button_context->multikeyIdx;
+                            button_context->multikeyIdx = 0;
+                            if (targetCoordinate->key_value[shift_index][orgindex + 1]) {
+                                if (strlen(targetCoordinate->key_value[shift_index][orgindex + 1]) > 0) {
+                                    button_context->multikeyIdx = orgindex + 1;
                                 }
                             }
                         }
@@ -1843,8 +1795,8 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
                         SclButtonContext *pressed_context = cache->get_cur_button_context(pressed_window, pressed_key);
                         if (pressed_context) {
                             if (!(targetCoordinate->use_repeat_key) && pressed_context->state == BUTTON_STATE_PRESSED) {
-                                key_event_desc.key_value = targetCoordinate->key_value[shiftidx][0];
-                                key_event_desc.key_event = targetCoordinate->key_event[shiftidx][0];
+                                key_event_desc.key_value = targetCoordinate->key_value[shift_index][0];
+                                key_event_desc.key_event = targetCoordinate->key_event[shift_index][0];
                                 if (pressed_context->toggled) {
                                     key_event_desc.key_modifier = KEY_MODIFIER_NONE;
                                 } else {
@@ -1968,23 +1920,23 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
             }
         } else {
             if (targetCoordinate) {
-                SCLShiftState shiftidx = context->get_shift_state();
-                if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+                SCLShiftState shift_index = context->get_shift_state();
+                if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
                 if (context->get_caps_lock_mode()) {
-                    shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                    shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
                 }
 
-                SclUIEventDesc key_event_desc = {0};
+                SclUIEventDesc key_event_desc;
                 key_event_desc.key_type = targetCoordinate->key_type;
 
-                key_event_desc.key_value = targetCoordinate->key_value[shiftidx][btncontext->multikeyIdx];
-                key_event_desc.key_event = targetCoordinate->key_event[shiftidx][btncontext->multikeyIdx];
+                key_event_desc.key_value = targetCoordinate->key_value[shift_index][button_context->multikeyIdx];
+                key_event_desc.key_event = targetCoordinate->key_event[shift_index][button_context->multikeyIdx];
                 key_event_desc.key_modifier = key_modifier;
 
                 key_event_desc.event_type = EVENT_TYPE_RELEASE;
                 key_event_desc.touch_id = touch_id;
                 key_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                key_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                key_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                 key_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
 
                 key_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
@@ -1994,23 +1946,24 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
         }
 
         /* If this button was pressed, initialize the button context regardless of event  */
-        if (btncontext->state == BUTTON_STATE_PRESSED) {
+        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++) {
                 SclUIEventDesc desc;
                 context->get_multi_touch_event(loop, &desc);
                 if (desc.touch_id != touch_id) {
-                    MultiTouchContext *mulctx = context->find_multi_touch_context(desc.touch_id);
-                    if (mulctx) {
-                        if (mulctx->cur_pressed_window == window && mulctx->cur_pressed_key == key_index) {
+                    MultiTouchContext *multi_touch_context = context->find_multi_touch_context(desc.touch_id);
+                    if (multi_touch_context) {
+                        if (multi_touch_context->cur_pressed_window == window &&
+                            multi_touch_context->cur_pressed_key == key_index) {
                             found = TRUE;
                         }
                     }
                 }
             }
             if (!found) {
-                btncontext->state = BUTTON_STATE_NORMAL;
+                button_context->state = BUTTON_STATE_NORMAL;
                 redraw = TRUE;
             }
         }
@@ -2020,14 +1973,11 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint
 #ifdef DIRECTLY_DRAW_ON_EVENTS
             CSCLUIBuilder *builder = CSCLUIBuilder::get_instance();
             if (builder) {
-                builder->draw_button(window, NULL, key_index, btncontext->state, TRUE);
+                builder->draw_button(window, NULL, key_index, button_context->state, TRUE);
             }
 #else
             if (savedInputMode == context->get_input_mode()) {
-                CSCLWindows *windows = CSCLWindows::get_instance();
-                if (windows) {
-                    windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
-                }
+                windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
             }
 
 #endif
@@ -2056,28 +2006,28 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
 
-    sclint btnIndex = NOT_USED;
-    SclWindowContext *winctx = NULL;
+    sclint button_index = NOT_USED;
+    SclWindowContext *window_context = NULL;
     if (windows) {
         const SclLayout *layout = cache->get_cur_layout(window);
         if (layout) {
             x += layout->mouse_manipulate_x;
             y += layout->mouse_manipulate_y;
         }
-        winctx = windows->get_window_context(window);
+        window_context = windows->get_window_context(window);
         /* If the dim window is virtual and currently active, let's just skip this event */
         if (windows->is_base_window(window)) {
-            SclWindowContext *dimctx = windows->get_window_context(windows->get_dim_window());
-            if (dimctx) {
-                if (dimctx->is_virtual && !(dimctx->hidden)) {
+            SclWindowContext *dim_window_context = windows->get_window_context(windows->get_dim_window());
+            if (dim_window_context) {
+                if (dim_window_context->is_virtual && !(dim_window_context->hidden)) {
                     window = windows->get_dim_window();
-                    winctx = dimctx;
+                    window_context = dim_window_context;
                 }
             }
         }
     }
 
-    if (cache && state && windows && context && winctx) {
+    if (cache && state && windows && context && window_context) {
         SCLDisplayMode display_mode = context->get_display_mode();
         SclResParserManager *sclres_manager = SclResParserManager::get_instance();
         PSclDefaultConfigure default_configure = NULL;
@@ -2106,8 +2056,8 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
         context->set_cur_pressed_window(touch_id, window);
         context->set_cur_pressed_point(touch_id, x, y);
         context->set_cur_pressed_time(touch_id);
-        context->set_cur_move_window(touch_id, window);
-        context->set_cur_move_point(touch_id, x, y);
+        context->set_cur_moving_window(touch_id, window);
+        context->set_cur_moving_point(touch_id, x, y);
         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);
@@ -2128,7 +2078,7 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
         context->set_prev_pressed_window(touch_id, SCLWINDOW_INVALID);
         context->set_prev_pressed_key(touch_id, NOT_USED);
         context->set_prev_drag_state(touch_id, SCL_DRAG_STATE_NONE);
-        context->set_prev_move_point(touch_id, x, y);
+        context->set_prev_moving_point(touch_id, x, y);
 
         /* Destroy key related timers */
         events->destroy_timer(SCL_TIMER_BUTTON_DELAY);
@@ -2141,12 +2091,12 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
         handle_engine_signal(SCL_SIG_MOUSE_PRESS, window);
 
         /* Adjust event x and y positions as relative position to the virtual window */
-        if (winctx) {
-            /*if (winctx->isVirtual) {
-                SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                if (basectx) {
-                    x -= (winctx->x - basectx->x);
-                    y -= (winctx->y - basectx->y);
+        if (window_context) {
+            /*if (window_context->isVirtual) {
+                SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                if (base_window_context) {
+                    x -= (window_context->x - base_window_context->x);
+                    y -= (window_context->y - base_window_context->y);
                 }
             }*/
         }
@@ -2157,12 +2107,12 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
                 /* Iterate all the buttons and inform the event */
                 sclboolean ended = FALSE;
                 for (int loop = 0;loop < MAX_KEY && !ended;loop++) {
-                    SclButtonContext *btncontext = cache->get_cur_button_context(window, loop);
+                    SclButtonContext *button_context = cache->get_cur_button_context(window, loop);
                     const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                    if (btncontext && coordinate) {
-                        if (!(btncontext->used)) {
+                    if (button_context && coordinate) {
+                        if (!(button_context->used)) {
                             ended = TRUE;
-                        } else if (btncontext->state != BUTTON_STATE_DISABLED &&
+                        } else if (button_context->state != BUTTON_STATE_DISABLED &&
                                     coordinate->button_type != BUTTON_TYPE_UIITEM) {
                             if (process_button_pressed_event(window, x, y, loop, touch_id, actual_event)) {
                                 if (windows->is_base_window(window)) {
@@ -2170,7 +2120,7 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
                                 } else {
                                     state->set_cur_action_state(ACTION_STATE_POPUP_PRESS);
                                 }
-                                btnIndex = loop;
+                                button_index = loop;
                                 ret = TRUE;
                             }
                         }
@@ -2180,12 +2130,12 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
                 /* For covering a missing area about 1 pixel */
                 if (!ret) {
                     for (int loop = 0;loop < MAX_KEY;loop++) {
-                        SclButtonContext *btncontext = cache->get_cur_button_context(window, loop);
+                        SclButtonContext *button_context = cache->get_cur_button_context(window, loop);
                         const SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                        if (btncontext && coordinate) {
-                            if (!(btncontext->used)) {
+                        if (button_context && coordinate) {
+                            if (!(button_context->used)) {
                                 break;
-                            } else if (btncontext->state != BUTTON_STATE_DISABLED &&
+                            } else if (button_context->state != BUTTON_STATE_DISABLED &&
                                         coordinate->button_type != BUTTON_TYPE_UIITEM) {
                                 if (process_button_pressed_event(window, x+1, y+1, loop, touch_id, actual_event)) {
                                     if (windows->is_base_window(window)) {
@@ -2193,7 +2143,7 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
                                     } else {
                                         state->set_cur_action_state(ACTION_STATE_POPUP_PRESS);
                                     }
-                                    btnIndex = loop;
+                                    button_index = loop;
                                     break;
                                 }
                             }
@@ -2205,17 +2155,18 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
 
                 if (windows->is_base_window(window)) {
                     process_finished = TRUE;
-                } else if (btnIndex != NOT_USED) {
+                } else if (button_index != NOT_USED) {
                     process_finished = TRUE;
                 } else {
                     const SclLayout *layout = cache->get_cur_layout(window);
                     if (layout) {
                         if (layout->use_sw_background && layout->bg_color.a == 0) {
                             /* If we could not find appropriate button in this popup window and the popup is transparent */
-                            SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                            if (basectx) {
-                                x = (winctx->geometry.x + x - basectx->geometry.x);
-                                y = (winctx->geometry.y + y - basectx->geometry.y);
+                            SclWindowContext *base_window_context =
+                                windows->get_window_context(windows->get_base_window());
+                            if (base_window_context) {
+                                x = (window_context->geometry.x + x - base_window_context->geometry.x);
+                                y = (window_context->geometry.y + y - base_window_context->geometry.y);
                             }
                             window = windows->get_base_window();
                         } else {
@@ -2228,9 +2179,9 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
             } while (!process_finished);
         }
 
-        sclwindow skipwindow = window;
-        if (ret && btnIndex != NOT_USED) {
-            const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, btnIndex);
+        sclwindow skip_window = window;
+        if (ret && button_index != NOT_USED) {
+            const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, button_index);
             if (coordinate) {
                 sclboolean dont_close_popup = FALSE;
                 if (coordinate->dont_close_popup) {
@@ -2240,34 +2191,34 @@ CSCLController::mouse_press(sclwindow window, sclint x, sclint y, scltouchdevice
                 if (coordinate->popup_type == POPUP_TYPE_BTN_PRESS_POPUP_DRAG) {
                     /* Check the opened popup was opened by this button */
                     sclwindow popupwin = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
-                    SclWindowContext *popupctx = windows->get_window_context(popupwin);
-                    if (popupctx) {
-                        SclWindowOpener opener = popupctx->opener;
-                        if (opener.window == window && opener.key == btnIndex) {
+                    SclWindowContext *popup_window_context = windows->get_window_context(popupwin);
+                    if (popup_window_context) {
+                        SclWindowOpener opener = popup_window_context->opener;
+                        if (opener.window == window && opener.key == button_index) {
                             dont_close_popup = TRUE;
                         }
                     }
                 }
                 if (dont_close_popup) {
-                    skipwindow = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
+                    skip_window = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
                 }
             }
         }
-        windows->close_all_popups(skipwindow);
+        windows->close_all_popups(skip_window);
 
         /* When press event occured in popup window, reset POPUP_TIMEOUT timer */
         if (!(windows->is_base_window(window))) {
-            if (winctx->timeout > 0) {
+            if (window_context->timeout > 0) {
                 events->destroy_timer(SCL_TIMER_POPUP_TIMEOUT);
-                events->create_timer(SCL_TIMER_POPUP_TIMEOUT, winctx->timeout, 0, TRUE);
+                events->create_timer(SCL_TIMER_POPUP_TIMEOUT, window_context->timeout, 0, TRUE);
             }
-        } else if (skipwindow != window) { /* Or the pressed button has dont_close_popup property, reset POPUP_TIMEOUT timer */
-            //SclWindowContext *skipwinctx = windows->get_window_context(skipwindow, FALSE);
-            SclWindowContext *skipwinctx = windows->get_window_context(skipwindow);
-            if (skipwinctx) {
-                if (skipwinctx->timeout > 0) {
+        } else if (skip_window != window) { /* Or the pressed button has dont_close_popup property, reset POPUP_TIMEOUT timer */
+            //SclWindowContext *skip_window_context = windows->get_window_context(skip_window, FALSE);
+            SclWindowContext *skip_window_context = windows->get_window_context(skip_window);
+            if (skip_window_context) {
+                if (skip_window_context->timeout > 0) {
                     events->destroy_timer(SCL_TIMER_POPUP_TIMEOUT);
-                    events->create_timer(SCL_TIMER_POPUP_TIMEOUT, skipwinctx->timeout, 0, TRUE);
+                    events->create_timer(SCL_TIMER_POPUP_TIMEOUT, skip_window_context->timeout, 0, TRUE);
                 }
             }
         }
@@ -2294,17 +2245,19 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
     CSCLWindows *windows = CSCLWindows::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
     CSCLEventHandler *handler = CSCLEventHandler::get_instance();
+    CSCLEvents *events = CSCLEvents::get_instance();
 
-    sclint btnIndex = NOT_USED;
+    sclint button_index = NOT_USED;
 
-    if (cache && state && windows && context && utils && handler && context->find_multi_touch_context(touch_id)) {
+    if (cache && state && windows && context && utils && handler && events &&
+        context->find_multi_touch_context(touch_id)) {
         const SclLayout *layout = cache->get_cur_layout(window);
         if (layout) {
             x += layout->mouse_manipulate_x;
             y += layout->mouse_manipulate_y;
         }
 
-        sclwindow skipwindow = SCLWINDOW_INVALID;
+        sclwindow skip_window = SCLWINDOW_INVALID;
         SCLDisplayMode display_mode = context->get_display_mode();
 
         SclResParserManager *sclres_manager = SclResParserManager::get_instance();
@@ -2316,28 +2269,28 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
             adjustment->apply_touch_offset(default_configure->touch_offset_level[display_mode], &x, &y);
         }
 
-        context->set_cur_move_window(touch_id, SCLWINDOW_INVALID);
+        context->set_cur_moving_window(touch_id, SCLWINDOW_INVALID);
 
         sclwindow pressed_window = context->get_cur_pressed_window(touch_id);
         scl8 pressed_key = context->get_cur_pressed_key(touch_id);
-        //SclWindowContext *winctx = windows->get_window_context(window, TRUE);
-        SclWindowContext *winctx = windows->get_window_context(window);
+        //SclWindowContext *window_context = windows->get_window_context(window, TRUE);
+        SclWindowContext *window_context = windows->get_window_context(window);
         /* Adjust event x and y positions as relative position to the virtual window */
-        if (winctx) {
-            /*if (winctx->isVirtual) {
-                SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                if (basectx) {
-                    x -= (winctx->x - basectx->x);
-                    y -= (winctx->y - basectx->y);
+        if (window_context) {
+            /*if (window_context->isVirtual) {
+                SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                if (base_window_context) {
+                    x -= (window_context->x - base_window_context->x);
+                    y -= (window_context->y - base_window_context->y);
                 }
             }*/
             /* If the dim window is virtual and currently active, consider base window's event is occured in dim window */
             if (windows->is_base_window(window)) {
-                SclWindowContext *dimctx = windows->get_window_context(windows->get_dim_window());
-                if (dimctx) {
-                    if (dimctx->is_virtual && !(dimctx->hidden)) {
+                SclWindowContext *dim_window_context = windows->get_window_context(windows->get_dim_window());
+                if (dim_window_context) {
+                    if (dim_window_context->is_virtual && !(dim_window_context->hidden)) {
                         window = windows->get_dim_window();
-                        winctx = dimctx;
+                        window_context = dim_window_context;
                     }
                 }
             }
@@ -2345,7 +2298,6 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
 
         /* Iterate all the buttons and inform the event */
         sclboolean ended = FALSE;
-        CSCLUtils *utils = CSCLUtils::get_instance();
 
         /* FIXME : The routine below seems to be removed, which was originally requested by Vodafone,
          * to slow down the speed of repeat key right before stopping repeatkey event */
@@ -2381,14 +2333,14 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
                         drag_type = DRAG_UP;
                     }
                     SclNotiGestureFlickDesc desc;
-                    SclUIEventDesc ui_event_desc = {0};
+                    SclUIEventDesc ui_event_desc;
                     ui_event_desc.key_value = NULL;
                     ui_event_desc.key_event = NOT_USED;
                     ui_event_desc.key_modifier = KEY_MODIFIER_NONE;
                     ui_event_desc.event_type = EVENT_TYPE_RELEASE;
                     ui_event_desc.touch_id = touch_id;
                     ui_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                    ui_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                    ui_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                     ui_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
                     ui_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
                     desc.ui_event_desc = &ui_event_desc;
@@ -2403,33 +2355,38 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
         /* FIXME : We should consider this kind of action in general manner, not only specific to autopopup */
         /* And also, this kind of implementation only selects button that was highlighted at least once. */
         // {
-        //SclWindowContext *pressedCtx = windows->get_window_context(pressed_window, FALSE);
-        SclWindowContext *pressedCtx = windows->get_window_context(pressed_window);
-        if (pressedCtx) {
-            utils->log("PRESSED CTX : %p %d %d\n", pressed_window, pressedCtx->geometry.x, pressedCtx->geometry.y);
+        //SclWindowContext *pressed_window_context = windows->get_window_context(pressed_window, FALSE);
+        SclWindowContext *pressed_window_context = windows->get_window_context(pressed_window);
+        if (pressed_window_context) {
+            utils->log("PRESSED CTX : %p %d %d\n", pressed_window,
+                pressed_window_context->geometry.x, pressed_window_context->geometry.y);
             //if (pressedCtx->popuptype == POPUP_TYPE_AUTO_POPUP) {
             sclboolean grab_event = FALSE;
-            const SclLayout *layout = cache->get_cur_layout(pressed_window);
-            if (layout) {
-                if (layout->style == LAYOUT_STYLE_POPUP_GRAB) {
+            const SclLayout *pressed_layout = cache->get_cur_layout(pressed_window);
+            if (pressed_layout) {
+                if (pressed_layout->style == LAYOUT_STYLE_POPUP_GRAB) {
                     grab_event = TRUE;
                 }
                 /* If the topmost window has the POPUP_GRAB style, find the nearest button to the mouse pointer */
                 if (grab_event) {
                     /* If the layout's addGrab* values are defined, process this event only if the event occured inside grab area */
                     sclboolean in_grab_area = TRUE;
-                    if (layout->add_grab_left != NOT_USED && x < (pressedCtx->geometry.x - layout->add_grab_left)) {
+                    if (pressed_layout->add_grab_left != NOT_USED &&
+                        x < (pressed_window_context->geometry.x - pressed_layout->add_grab_left)) {
                         in_grab_area = FALSE;
                     }
-                    if (layout->add_grab_right != NOT_USED &&
-                        x > (pressedCtx->geometry.x + pressedCtx->geometry.width + layout->add_grab_right)) {
+                    if (pressed_layout->add_grab_right != NOT_USED &&
+                        x > (pressed_window_context->geometry.x + pressed_window_context->geometry.width
+                        + pressed_layout->add_grab_right)) {
                         in_grab_area = FALSE;
                     }
-                    if (layout->add_grab_top != NOT_USED && y < (pressedCtx->geometry.y - layout->add_grab_top)) {
+                    if (pressed_layout->add_grab_top != NOT_USED &&
+                        y < (pressed_window_context->geometry.y - pressed_layout->add_grab_top)) {
                         in_grab_area = FALSE;
                     }
-                    if (layout->add_grab_bottom != NOT_USED &&
-                        y > (pressedCtx->geometry.y + pressedCtx->geometry.height + layout->add_grab_bottom)) {
+                    if (pressed_layout->add_grab_bottom != NOT_USED &&
+                        y > (pressed_window_context->geometry.y + pressed_window_context->geometry.height
+                        + pressed_layout->add_grab_bottom)) {
                         in_grab_area = FALSE;
                     }
                     if (in_grab_area) {
@@ -2439,12 +2396,12 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
                             y = coord->y + (coord->height / 2);
 
                             for (int loop = 0;loop < MAX_KEY && !ended;loop++) {
-                                SclButtonContext *btncontext = cache->get_cur_button_context(pressed_window, loop);
+                                SclButtonContext *button_context = cache->get_cur_button_context(pressed_window, loop);
                                 const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                                if (btncontext && coordinate) {
-                                    if (!(btncontext->used)) {
+                                if (button_context && coordinate) {
+                                    if (!(button_context->used)) {
                                         ended = TRUE;
-                                    } else if (btncontext->state != BUTTON_STATE_DISABLED &&
+                                    } else if (button_context->state != BUTTON_STATE_DISABLED &&
                                                 coordinate->button_type != BUTTON_TYPE_UIITEM) {
                                         if (process_button_release_event(pressed_window, x, y, loop, touch_id, actual_event)) {
                                             ret = TRUE;
@@ -2460,7 +2417,7 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
         }
         // }
 
-        SclButtonContext *btncontext = cache->get_cur_button_context(pressed_window, pressed_key);
+        SclButtonContext *button_context = cache->get_cur_button_context(pressed_window, pressed_key);
         const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(pressed_window, pressed_key);
 
         /* FIXME : The rule below would not be a general requirement. A policy is needed regarding this. */
@@ -2474,16 +2431,16 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
             if (windows->is_base_window(window)) {
                 ended = TRUE;
                 /* In case of direction button, the release event on other window should be processed */
-                if (coordinate && winctx && pressedCtx) {
+                if (coordinate && window_context && pressed_window_context) {
                     if (coordinate->button_type == BUTTON_TYPE_DIRECTION || coordinate->button_type == BUTTON_TYPE_RELATIVE_DIRECTION) {
-                        sclint relx = (winctx->geometry.x + x) - pressedCtx->geometry.x;
-                        sclint rely = (winctx->geometry.y + y) - pressedCtx->geometry.y;
+                        sclint relx = (window_context->geometry.x + x) - pressed_window_context->geometry.x;
+                        sclint rely = (window_context->geometry.y + y) - pressed_window_context->geometry.y;
                         if (process_button_release_event(pressed_window, relx, rely, pressed_key, touch_id, actual_event)) {
-                            btnIndex = pressed_key;
+                            button_index = pressed_key;
                             ret = TRUE;
                             x = coordinate->x + (coordinate->width / 2);
                             y = coordinate->y + (coordinate->height / 2);
-                            skipwindow = pressed_window;
+                            skip_window = pressed_window;
                         }
                     }
                 }
@@ -2492,14 +2449,14 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
 
         sclboolean process_finished = FALSE;
         do {
-            MultiTouchContext *mulctx = context->find_multi_touch_context(touch_id);
-            if (mulctx) {
-                if (!(mulctx->is_sub_event)) {
+            MultiTouchContext *multi_touch_context = context->find_multi_touch_context(touch_id);
+            if (multi_touch_context) {
+                if (!(multi_touch_context->is_sub_event)) {
                     /* First check if the event occured in pressed key's threshold area */
-                    if (btncontext && coordinate && !ended) {
-                        if (btncontext->used && btncontext->state != BUTTON_STATE_DISABLED) {
+                    if (button_context && coordinate && !ended) {
+                        if (button_context->used && button_context->state != BUTTON_STATE_DISABLED) {
                             if (process_button_release_event(pressed_window, x, y, pressed_key, touch_id, actual_event)) {
-                                btnIndex = pressed_key;
+                                button_index = pressed_key;
                                 ret = TRUE;
                                 x = coordinate->x + (coordinate->width / 2);
                                 y = coordinate->y + (coordinate->height / 2);
@@ -2507,16 +2464,16 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
                         }
                     }
                     for (int loop = 0;loop < MAX_KEY && !ended;loop++) {
-                        SclButtonContext *btncontext = cache->get_cur_button_context(window, loop);
-                        const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                        if (btncontext && coordinate) {
-                            if (!(btncontext->used)) {
+                        SclButtonContext *cur_context = cache->get_cur_button_context(window, loop);
+                        const SclLayoutKeyCoordinate *cur_coordinate = cache->get_cur_layout_key_coordinate(window, loop);
+                        if (cur_context && cur_coordinate) {
+                            if (!(cur_context->used)) {
                                 ended = TRUE;
-                            } else if (btncontext->state != BUTTON_STATE_DISABLED &&
-                                        coordinate->button_type != BUTTON_TYPE_UIITEM) {
+                            } else if (cur_context->state != BUTTON_STATE_DISABLED &&
+                                        cur_coordinate->button_type != BUTTON_TYPE_UIITEM) {
                                 if (window != pressed_window || loop != pressed_key) {
                                     if (process_button_release_event(window, x, y, loop, touch_id, actual_event)) {
-                                        btnIndex = loop;
+                                        button_index = loop;
                                         ret = TRUE;
                                     }
                                 }
@@ -2526,14 +2483,14 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
                 } else {
                     process_finished = TRUE;
 
-                    SclUIEventDesc key_event_desc = {0};
+                    SclUIEventDesc key_event_desc;
                     key_event_desc.key_value = NULL;
                     key_event_desc.key_event = NOT_USED;
                     key_event_desc.key_modifier = KEY_MODIFIER_NONE;
                     key_event_desc.event_type = EVENT_TYPE_NONE;
                     key_event_desc.touch_id = touch_id;
                     key_event_desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                    key_event_desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                    key_event_desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                     key_event_desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
 
                     key_event_desc.touch_event_order = context->get_multi_touch_event_order(touch_id);
@@ -2558,15 +2515,15 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
                 }
 
                 for (int loop = 0;loop < MAX_KEY && !ended;loop++) {
-                    SclButtonContext *btncontext = cache->get_cur_button_context(window, loop);
-                    if (btncontext && coordinate) {
-                        if (!(btncontext->used)) {
+                    SclButtonContext *cur_context = cache->get_cur_button_context(window, loop);
+                    if (cur_context && coordinate) {
+                        if (!(cur_context->used)) {
                             ended = TRUE;
                             break;
-                        } else if (btncontext->state != BUTTON_STATE_DISABLED &&
+                        } else if (cur_context->state != BUTTON_STATE_DISABLED &&
                                     coordinate->button_type != BUTTON_TYPE_UIITEM) {
                             if (process_button_release_event(window, x+1, y+1, loop, touch_id)) {
-                                btnIndex = loop;
+                                button_index = loop;
                                 ret = TRUE;
                                 break;
                             }
@@ -2576,16 +2533,15 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
             }
             if (windows->is_base_window(window)) {
                 process_finished = TRUE;
-            } else if (btnIndex != NOT_USED) {
+            } else if (button_index != NOT_USED) {
                 process_finished = TRUE;
             } else {
-                const SclLayout *layout = cache->get_cur_layout(window);
-                if (layout->use_sw_background && layout->bg_color.a == 0) {
+                if (layout && layout->use_sw_background && layout->bg_color.a == 0) {
                     /* If we could not find appropriate button in this popup window and the popup is transparent */
-                    SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                    if (basectx) {
-                        x = (winctx->geometry.x + x - basectx->geometry.x);
-                        y = (winctx->geometry.y + y - basectx->geometry.y);
+                    SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                    if (base_window_context) {
+                        x = (window_context->geometry.x + x - base_window_context->geometry.x);
+                        y = (window_context->geometry.y + y - base_window_context->geometry.y);
                     }
                     window = windows->get_base_window();
                 } else {
@@ -2601,14 +2557,13 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
         }
 
         /* Restore previously pressed button's context and redraw it */
-        if (btncontext && coordinate) {
-            btncontext->state = BUTTON_STATE_NORMAL;
+        if (button_context && coordinate) {
+            button_context->state = BUTTON_STATE_NORMAL;
             /* Commented below line to postpone some of the feedback for releasing */
             //windows->update_window(pressed_window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
         }
 
         /* If there is postponed update of button, update it now */
-        CSCLEvents *events = CSCLEvents::get_instance();
         sclwindow last_win = context->get_last_pressed_window();
         scl8 last_key = context->get_last_pressed_key();
         if (last_win != SCLWINDOW_INVALID && last_key != NOT_USED) {
@@ -2632,8 +2587,8 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
                 case POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE:
                     {
                         /* Fix me : We should consider z-order */
-                        skipwindow = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
-                        handle_engine_signal(SCL_SIG_MOUSE_RELEASE, skipwindow);
+                        skip_window = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
+                        handle_engine_signal(SCL_SIG_MOUSE_RELEASE, skip_window);
                         signaled = TRUE;
                     }
                     break;
@@ -2645,13 +2600,13 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
             }
         }
         if (!signaled) {
-            //SclWindowContext *ctx = windows->get_window_context(window, FALSE);
-            SclWindowContext *ctx = windows->get_window_context(window);
-            if (ctx) {
-                if (ctx->popup_type == POPUP_TYPE_BTN_RELEASE_POPUP ||
-                    ctx->popup_type == POPUP_TYPE_BTN_LONGPRESS_POPUP) {
+            //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+            window_context = windows->get_window_context(window);
+            if (window_context) {
+                if (window_context->popup_type == POPUP_TYPE_BTN_RELEASE_POPUP ||
+                    window_context->popup_type == POPUP_TYPE_BTN_LONGPRESS_POPUP) {
                     /* Don't close window if the clicked button is a child of ReleasePopup window */
-                    skipwindow = window;
+                    skip_window = window;
                     handle_engine_signal(SCL_SIG_MOUSE_RELEASE, window);
                     signaled = TRUE;
                 }
@@ -2664,27 +2619,27 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
         context->set_cur_pressed_key(touch_id, NOT_USED);
         context->set_cur_pressed_window(touch_id, SCLWINDOW_INVALID);
 
-        if (ret && btnIndex != NOT_USED) {
-            const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, btnIndex);
-            if (coordinate) {
-                if (coordinate->dont_close_popup) {
-                    skipwindow = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
+        if (ret && button_index != NOT_USED) {
+            const SclLayoutKeyCoordinate *cur_coordinate = cache->get_cur_layout_key_coordinate(window, button_index);
+            if (cur_coordinate) {
+                if (cur_coordinate->dont_close_popup) {
+                    skip_window = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
                 }
             }
         } else {
             if (pressed_window == windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP)) {
-                if (pressedCtx) {
-                    if (pressedCtx->popup_type != POPUP_TYPE_BTN_RELEASE_POPUP_ONCE &&
-                        pressedCtx->popup_type != POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE &&
-                        pressedCtx->popup_type != POPUP_TYPE_AUTO_POPUP &&
-                        pressedCtx->popup_type != POPUP_TYPE_BTN_PRESS_POPUP_DRAG)
+                if (pressed_window_context) {
+                    if (pressed_window_context->popup_type != POPUP_TYPE_BTN_RELEASE_POPUP_ONCE &&
+                        pressed_window_context->popup_type != POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE &&
+                        pressed_window_context->popup_type != POPUP_TYPE_AUTO_POPUP &&
+                        pressed_window_context->popup_type != POPUP_TYPE_BTN_PRESS_POPUP_DRAG)
                     {
-                        skipwindow = pressed_window;
+                        skip_window = pressed_window;
                     }
                 }
             }
         }
-        windows->close_all_popups(skipwindow);
+        windows->close_all_popups(skip_window);
 
         /* Destroy key related timers */
         events->destroy_timer(SCL_TIMER_AUTOPOPUP);
@@ -2697,14 +2652,14 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi
             /* To postpone some of the feedback for releasing */
             events->create_timer(SCL_TIMER_BUTTON_DELAY, m_button_delay_duration, 0);
         } else {
-            sclwindow last_win = context->get_last_pressed_window();
-            scl8 last_key = context->get_last_pressed_key();
+            last_win = context->get_last_pressed_window();
+            last_key = context->get_last_pressed_key();
 
             if (last_win != SCLWINDOW_INVALID && last_key != NOT_USED) {
-                const SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(last_win, last_key);
-                if (coordinate) {
+                const SclLayoutKeyCoordinate* last_coordinate = cache->get_cur_layout_key_coordinate(last_win, last_key);
+                if (last_coordinate) {
                     windows->update_window(last_win,
-                        coordinate->x, coordinate->y, coordinate->width, coordinate->height);
+                        last_coordinate->x, last_coordinate->y, last_coordinate->width, last_coordinate->height);
                 }
             }
 
@@ -2774,7 +2729,7 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
     PSclModifierDecoration sclres_modifier_decoration = sclres_manager->get_modifier_decoration_table();
     assert(sclres_modifier_decoration != NULL);
 
-    if (cache && state && windows && context && utils && adjustment) {
+    if (cache && state && windows && context && utils && adjustment && sclres_manager) {
         const SclLayout *layout = cache->get_cur_layout(window);
         if (layout) {
             x += layout->mouse_manipulate_x;
@@ -2783,32 +2738,28 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
 
         if (!(context->find_multi_touch_context(touch_id))) return FALSE;
 
-        SclResParserManager *sclres_manager = SclResParserManager::get_instance();
-        PSclDefaultConfigure default_configure = NULL;
-        if (sclres_manager) {
-            default_configure = sclres_manager->get_default_configure();
-        }
+        PSclDefaultConfigure default_configure = sclres_manager->get_default_configure();
         if (default_configure) {
             SCLDisplayMode display_mode = context->get_display_mode();
             adjustment->apply_touch_offset(default_configure->touch_offset_level[display_mode], &x, &y);
         }
 
-        //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-        SclWindowContext *winctx = windows->get_window_context(window);
+        //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+        SclWindowContext *window_context = windows->get_window_context(window);
         /* Adjust event x and y positions as relative position to the virtual window */
-        if (winctx) {
-            /*if (winctx->isVirtual) {
-                SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                if (basectx) {
-                    x -= (winctx->x - basectx->x);
-                    y -= (winctx->y - basectx->y);
+        if (window_context) {
+            /*if (window_context->isVirtual) {
+                SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                if (base_window_context) {
+                    x -= (window_context->x - base_window_context->x);
+                    y -= (window_context->y - base_window_context->y);
                 }
             }*/
             /* If the dim window is virtual and currently active, let's just skip this event */
             if (windows->is_base_window(window)) {
-                SclWindowContext *dimctx = windows->get_window_context(windows->get_dim_window());
-                if (dimctx) {
-                    if (dimctx->is_virtual && !(dimctx->hidden)) {
+                SclWindowContext *dim_window_context = windows->get_window_context(windows->get_dim_window());
+                if (dim_window_context) {
+                    if (dim_window_context->is_virtual && !(dim_window_context->hidden)) {
                         return FALSE;
                     }
                 }
@@ -2821,7 +2772,7 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
 
         sclwindow pressed_window = context->get_cur_pressed_window(touch_id);
         scl8 pressed_key = context->get_cur_pressed_key(touch_id);
-        SclButtonContext *btncontext = cache->get_cur_button_context(pressed_window, pressed_key);
+        SclButtonContext *button_context = cache->get_cur_button_context(pressed_window, pressed_key);
         const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(pressed_window, pressed_key);
 
         /* If the multitouch type is SETTLE_PREVIOUS and is not the last touch device, let's ignore move events */
@@ -2833,8 +2784,8 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
             }
         }
 
-        context->set_cur_move_point(touch_id, x, y);
-        context->set_cur_move_window(touch_id, window);
+        context->set_cur_moving_point(touch_id, x, y);
+        context->set_cur_moving_window(touch_id, window);
 
         /* If in longkey state, do not process, just return */
         if (state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY ||
@@ -2879,11 +2830,11 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
         sclint originx = x;
         sclint originy = y;
         if (pressed_window != window) {
-            //SclWindowContext *pressedwinctx = windows->get_window_context(pressed_window, FALSE);
-            SclWindowContext *pressedwinctx = windows->get_window_context(pressed_window);
-            if (winctx && pressedwinctx) {
-                originx = (winctx->geometry.x - pressedwinctx->geometry.x) + x;
-                originy = (winctx->geometry.y - pressedwinctx->geometry.y) + y;
+            //SclWindowContext *pressed_window_context = windows->get_window_context(pressed_window, FALSE);
+            SclWindowContext *pressed_window_context = windows->get_window_context(pressed_window);
+            if (window_context && pressed_window_context) {
+                originx = (window_context->geometry.x - pressed_window_context->geometry.x) + x;
+                originy = (window_context->geometry.y - pressed_window_context->geometry.y) + y;
             }
         }
         sclint startx = originx;
@@ -2895,8 +2846,7 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
             starty = context->get_cur_pressed_point(touch_id).y;
             sclint deltax = originx - startx;
             sclint deltay = originy - starty;
-            sclfloat dist = utils->get_approximate_distance(originx, originy, startx, starty);
-            CSCLUtils *utils = CSCLUtils::get_instance();
+            sclfloat approximate_dist = utils->get_approximate_distance(originx, originy, startx, starty);
 
             sclboolean update_magnifier = FALSE;
             sclboolean drag_state_changed = FALSE;
@@ -2910,7 +2860,7 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
             if (coordinate->button_type == BUTTON_TYPE_DIRECTION) {
                 /* Do not check farthest move point if current drag state is SCL_DRAG_STATE_RETURN */
                 if (context->get_cur_drag_state(touch_id) != SCL_DRAG_STATE_RETURN) {
-                    if (dist > context->get_farthest_move_dist(touch_id)) {
+                    if (approximate_dist > context->get_farthest_move_dist(touch_id)) {
                         context->set_farthest_move_point(touch_id, originx, originy);
                     }
                 }
@@ -2920,7 +2870,7 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                 } else if (cur_drag_state != SCL_DRAG_STATE_NONE) {
                     direction_recog_dist *= SCL_DRAG_RETURN_RECOG_THRESHOLD_OTHER;
                 }
-                if (dist > direction_recog_dist) {
+                if (approximate_dist > direction_recog_dist) {
                     next_drag_state = get_drag_state(deltax, deltay);
                     /* Disable longkey if dragging is recognized */
                     events->destroy_timer(SCL_TIMER_LONGKEY);
@@ -2985,17 +2935,17 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                     }
                 }
                 if (dist > direction_recog_dist) {
-                    SclUIEventDesc desc = {0};
-                    SCLShiftState shiftidx = context->get_shift_state();
+                    SclUIEventDesc desc;
+                    SCLShiftState shift_index = context->get_shift_state();
                     if (context->get_caps_lock_mode()) {
-                        shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                        shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
                     }
                     desc.key_type = coordinate->key_type;
-                    desc.key_value = coordinate->key_value[shiftidx][0];
-                    desc.key_event = coordinate->key_event[shiftidx][0];
+                    desc.key_value = coordinate->key_value[shift_index][0];
+                    desc.key_event = coordinate->key_event[shift_index][0];
                     desc.event_type = EVENT_TYPE_MOVE;
                     desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                    desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                    desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                     desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
                     desc.key_modifier = key_modifier;
 
@@ -3005,15 +2955,15 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                 }
             } else if (coordinate->button_type == BUTTON_TYPE_RELATIVE_DIRECTION) {
                 if (cur_drag_state != SCL_DRAG_STATE_NONE) {
-                    startx = context->get_prev_move_point(touch_id).x;
-                    starty = context->get_prev_move_point(touch_id).y;
-                    dist = utils->get_approximate_distance(originx, originy, startx, starty);
+                    startx = context->get_prev_moving_point(touch_id).x;
+                    starty = context->get_prev_moving_point(touch_id).y;
+                    approximate_dist = utils->get_approximate_distance(originx, originy, startx, starty);
                     direction_recog_dist = SCL_DIRECTION_RELATIVE_RECOG_DIST * utils->get_smallest_scale_rate();
                 }
                 deltax = originx - startx;
                 deltay = originy - starty;
                 //printf("DIST : %f, RECOG : %f\n", dist, direction_recog_dist);
-                if (dist > direction_recog_dist) {
+                if (approximate_dist > direction_recog_dist) {
                     next_drag_state = get_drag_state(deltax, deltay);
                     /* Disable longkey if dragging is recognized */
                     events->destroy_timer(SCL_TIMER_LONGKEY);
@@ -3061,17 +3011,17 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                             }
                         }
 
-                        SclUIEventDesc desc = {0};
-                        SCLShiftState shiftidx = context->get_shift_state();
+                        SclUIEventDesc desc;
+                        SCLShiftState shift_index = context->get_shift_state();
                         if (context->get_caps_lock_mode()) {
-                            shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+                            shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
                         }
                         desc.key_type = coordinate->key_type;
-                        desc.key_value = coordinate->key_value[shiftidx][0];
-                        desc.key_event = coordinate->key_event[shiftidx][0];
+                        desc.key_value = coordinate->key_value[shift_index][0];
+                        desc.key_event = coordinate->key_event[shift_index][0];
                         desc.event_type = EVENT_TYPE_MOVE;
                         desc.mouse_pressed_point = context->get_cur_pressed_point(touch_id);
-                        desc.mouse_current_point = context->get_cur_move_point(touch_id);
+                        desc.mouse_current_point = context->get_cur_moving_point(touch_id);
                         desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
                         desc.key_modifier = key_modifier;
 
@@ -3079,7 +3029,7 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                             update_magnifier = TRUE;
                         }
                     }
-                    context->set_prev_move_point(touch_id, originx, originy);
+                    context->set_prev_moving_point(touch_id, originx, originy);
                 }
                 if (drag_state_changed) {
                     /* When the dragging direction changes, save the current position as farthest point for future comparison */
@@ -3089,24 +3039,14 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
             }
 
             if (update_magnifier) {
-                SclResParserManager *sclres_manager = SclResParserManager::get_instance();
                 PSclMagnifierWndConfigure magnifier_configure = NULL;
                 if (sclres_manager) {
                     magnifier_configure = sclres_manager->get_magnifier_configure();
                 }
 
-                const SclLayout *layout = cache->get_cur_layout(windows->get_base_window());
-                if (layout && magnifier_configure) {
-                    sclfloat scale_rate_x, scale_rate_y;
-                    if (layout->display_mode == DISPLAYMODE_PORTRAIT) {
-                        scale_rate_x = utils->get_scale_rate_x();
-                        scale_rate_y = utils->get_scale_rate_y();
-                    } else {
-                        scale_rate_x = utils->get_scale_rate_y();
-                        scale_rate_y = utils->get_scale_rate_x();
-                    }
-
-                    SclPoint zoomwinpos = {0,};
+                const SclLayout *base_layout = cache->get_cur_layout(windows->get_base_window());
+                if (base_layout && magnifier_configure) {
+                    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);
@@ -3116,10 +3056,9 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                     utils->get_screen_resolution(&scnWidth, &scnHeight);
 
                     zoomwinpos.y =  coordinate->y - magnifier_configure->height * utils->get_custom_scale_rate_y();
-                    SclWindowContext *winctx = windows->get_window_context(window);
-                    if (winctx) {
-                        zoomwinpos.x += winctx->geometry.x;
-                        zoomwinpos.y += winctx->geometry.y;
+                    if (window_context) {
+                        zoomwinpos.x += window_context->geometry.x;
+                        zoomwinpos.y += window_context->geometry.y;
                     }
                     if (zoomwinpos.x < 0 - magnifier_configure->padding_x * utils->get_custom_scale_rate_x()) {
                         zoomwinpos.x = 0 - magnifier_configure->padding_x * utils->get_custom_scale_rate_x();
@@ -3147,51 +3086,51 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                 grab_event = TRUE;
             }
             /* If the topmost window has the POPUP_GRAB style, find the nearest button to the mouse pointer */
-            if (grab_event && winctx) {
+            if (grab_event && window_context) {
                 /* If the layout's addGrab* values are defined, process this event only if the event occured inside grab area */
                 sclboolean in_grab_area = TRUE;
                 if (layout->add_grab_left != NOT_USED && x < -(layout->add_grab_left)) {
                     in_grab_area = FALSE;
                 }
-                if (layout->add_grab_right != NOT_USED && x > (winctx->geometry.width + layout->add_grab_right)) {
+                if (layout->add_grab_right != NOT_USED && x >
+                    (window_context->geometry.width + layout->add_grab_right)) {
                     in_grab_area = FALSE;
                 }
                 if (layout->add_grab_top != NOT_USED && y < -(layout->add_grab_top)) {
                     in_grab_area = FALSE;
                 }
-                if (layout->add_grab_bottom != NOT_USED && y > (winctx->geometry.height + layout->add_grab_bottom)) {
+                if (layout->add_grab_bottom != NOT_USED && y >
+                    (window_context->geometry.height + layout->add_grab_bottom)) {
                     in_grab_area = FALSE;
                 }
                 if (in_grab_area) {
-                    CSCLResourceCache *cache = CSCLResourceCache::get_instance();
-                    if (cache) {
-                        float min_dist = (float)((unsigned int)(-1));
-                        int min_dist_index = NOT_USED;
-                        for (int loop = 0;loop < MAX_KEY && !ended && !ret;loop++) {
-                            btncontext = cache->get_cur_button_context(window, loop);
-                            const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                            if (btncontext && coordinate) {
-                                if (!(btncontext->used)) {
-                                    ended = TRUE;
-                                } else if (btncontext->state != BUTTON_STATE_DISABLED &&
-                                    coordinate->button_type != BUTTON_TYPE_UIITEM) {
-                                        const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                                        if (coordinate) {
-                                            float dist = utils->get_approximate_distance(x, y,
-                                                    coordinate->x + (coordinate->width / 2), coordinate->y + (coordinate->height / 2));
-                                            if (dist < min_dist) {
-                                                min_dist_index = loop;
-                                                min_dist = dist;
-                                            }
-                                        }
+                    float min_dist = (float)((unsigned int)(-1));
+                    int min_dist_index = NOT_USED;
+                    for (int loop = 0;loop < MAX_KEY && !ended && !ret;loop++) {
+                        button_context = cache->get_cur_button_context(window, loop);
+                        const SclLayoutKeyCoordinate *cur_coordinate = cache->get_cur_layout_key_coordinate(window, loop);
+                        if (button_context && cur_coordinate) {
+                            if (!(button_context->used)) {
+                                ended = TRUE;
+                            } else if (button_context->state != BUTTON_STATE_DISABLED &&
+                                cur_coordinate->button_type != BUTTON_TYPE_UIITEM) {
+                                float dist = utils->get_approximate_distance(x, y,
+                                        cur_coordinate->x + (cur_coordinate->width / 2),
+                                        cur_coordinate->y + (cur_coordinate->height / 2));
+                                if (dist < min_dist) {
+                                    min_dist_index = loop;
+                                    min_dist = dist;
                                 }
                             }
                         }
-                        /* When we found the nearest button, generate this event on the button */
-                        if (min_dist_index != NOT_USED) {
-                            const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, min_dist_index);
-                            x = coordinate->x + (coordinate->width / 2);
-                            y = coordinate->y + (coordinate->height / 2);
+                    }
+                    /* When we found the nearest button, generate this event on the button */
+                    if (min_dist_index != NOT_USED) {
+                        const SclLayoutKeyCoordinate *min_coordinate =
+                            cache->get_cur_layout_key_coordinate(window, min_dist_index);
+                        if (min_coordinate) {
+                            x = min_coordinate->x + (min_coordinate->width / 2);
+                            y = min_coordinate->y + (min_coordinate->height / 2);
                             if (process_button_move_event(window, x, y, min_dist_index, touch_id, actual_event)) {
                                 ret = TRUE;
                             }
@@ -3199,37 +3138,38 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
                     }
                 }
             } else {
-                MultiTouchContext *mulctx = context->find_multi_touch_context(touch_id);
-                if (mulctx) {
-                    sclint btnIndex = NOT_USED;
-                    if (!(mulctx->is_sub_event)) {
+                MultiTouchContext *multi_touch_context = context->find_multi_touch_context(touch_id);
+                if (multi_touch_context) {
+                    sclint button_index = NOT_USED;
+                    if (!(multi_touch_context->is_sub_event)) {
                         sclboolean process_finished = FALSE;
                         do {
                             /* First check if the event occured in pressed key's threshold area */
-                            if (btncontext && coordinate) {
+                            if (button_context && coordinate) {
                                 if (pressed_window == window) { // Check only when the window is the one initally pressed
-                                    if (btncontext->used && btncontext->state != BUTTON_STATE_DISABLED) {
+                                    if (button_context->used && button_context->state != BUTTON_STATE_DISABLED) {
                                         if (process_button_move_event(pressed_window, x, y, pressed_key, touch_id, actual_event)) {
                                             ret = TRUE;
                                             x = coordinate->x + (coordinate->width / 2);
                                             y = coordinate->y + (coordinate->height / 2);
-                                            btnIndex = pressed_key;
+                                            button_index = pressed_key;
                                         }
                                     }
                                 }
                             }
                             for (int loop = 0;loop < MAX_KEY && !ended && !ret;loop++) {
-                                btncontext = cache->get_cur_button_context(window, loop);
-                                const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                                if (btncontext && coordinate) {
-                                    if (!(btncontext->used)) {
+                                button_context = cache->get_cur_button_context(window, loop);
+                                const SclLayoutKeyCoordinate *cur_coordinate =
+                                    cache->get_cur_layout_key_coordinate(window, loop);
+                                if (button_context && cur_coordinate) {
+                                    if (!(button_context->used)) {
                                         ended = TRUE;
-                                    } else if (btncontext->state != BUTTON_STATE_DISABLED &&
-                                                coordinate->button_type != BUTTON_TYPE_UIITEM) {
+                                    } else if (button_context->state != BUTTON_STATE_DISABLED &&
+                                                cur_coordinate->button_type != BUTTON_TYPE_UIITEM) {
                                         if (window != pressed_window || loop != pressed_key) {
                                             if (process_button_move_event(window, x, y, loop, touch_id, actual_event)) {
                                                 ret = TRUE;
-                                                btnIndex = loop;
+                                                button_index = loop;
                                             }
                                         }
                                     }
@@ -3238,16 +3178,17 @@ CSCLController::mouse_move(sclwindow window, sclint x, sclint y, scltouchdevice
 
                             if (windows->is_base_window(window)) {
                                 process_finished = TRUE;
-                            } else if (btnIndex != NOT_USED) {
+                            } else if (button_index != NOT_USED) {
                                 process_finished = TRUE;
                             } else {
-                                const SclLayout *layout = cache->get_cur_layout(window);
-                                if (layout->use_sw_background && layout->bg_color.a == 0) {
+                                const SclLayout *cur_layout = cache->get_cur_layout(window);
+                                if (cur_layout && cur_layout->use_sw_background && cur_layout->bg_color.a == 0) {
                                     /* If we could not find appropriate button in this popup window and the popup is transparent */
-                                    SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                                    if (basectx) {
-                                        x = (winctx->geometry.x + x - basectx->geometry.x);
-                                        y = (winctx->geometry.y + y - basectx->geometry.y);
+                                    SclWindowContext *base_window_context =
+                                        windows->get_window_context(windows->get_base_window());
+                                    if (base_window_context) {
+                                        x = (window_context->geometry.x + x - base_window_context->geometry.x);
+                                        y = (window_context->geometry.y + y - base_window_context->geometry.y);
                                     }
                                     window = windows->get_base_window();
                                 } else {
@@ -3302,12 +3243,12 @@ CSCLController::mouse_over(sclwindow window, sclint x, sclint y)
         sclboolean ended = FALSE;
 
         for (int loop = 0; loop < MAX_KEY && !ended && !ret; loop++) {
-            SclButtonContext *btncontext = cache->get_cur_button_context(window, loop);
+            SclButtonContext *button_context = cache->get_cur_button_context(window, loop);
             const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-            if (btncontext && coordinate) {
-                if (!(btncontext->used)) {
+            if (button_context && coordinate) {
+                if (!(button_context->used)) {
                     ended = TRUE;
-                } else if (btncontext->state != BUTTON_STATE_DISABLED &&
+                } else if (button_context->state != BUTTON_STATE_DISABLED &&
                             coordinate->button_type != BUTTON_TYPE_UIITEM) {
                     if (process_button_over_event(window, x, y, loop)) {
                         ret = TRUE;
@@ -3361,19 +3302,18 @@ CSCLController::timer_event(const scl32 data)
             return FALSE;
         }
 
-        SclRectangle rect = {0,};
+        SclRectangle rect = {0,0,0,0};
         sclwindow window = context->get_cur_pressed_window(context->get_last_touch_device_id());
-        sclbyte keyIndex = context->get_cur_pressed_key(context->get_last_touch_device_id());
+        sclbyte key_index = context->get_cur_pressed_key(context->get_last_touch_device_id());
 
-        if (configure_autopopup_window(window, keyIndex, &rect)) {
+        if (configure_autopopup_window(window, key_index, &rect)) {
             /* Let's change out pressed button's state back to normal */
-            SclButtonContext *btncontext = cache->get_cur_button_context(window, keyIndex);
-            const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, keyIndex);
+            SclButtonContext *button_context = cache->get_cur_button_context(window, key_index);
+            const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
 
-            if (btncontext) {
-                if (btncontext->state == BUTTON_STATE_PRESSED) {
-                    btncontext->state = BUTTON_STATE_NORMAL;
-                    CSCLWindows *windows = CSCLWindows::get_instance();
+            if (button_context) {
+                if (button_context->state == BUTTON_STATE_PRESSED) {
+                    button_context->state = BUTTON_STATE_NORMAL;
                     if (windows && coordinate) {
                         windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
                     }
@@ -3392,7 +3332,7 @@ CSCLController::timer_event(const scl32 data)
                     /* Currently, window does not support virtual window */
                     SclWindowOpener opener;
                     opener.window = window;
-                    opener.key = keyIndex;
+                    opener.key = key_index;
 
                     popup_window = windows->open_popup(
                         opener,
@@ -3413,17 +3353,16 @@ CSCLController::timer_event(const scl32 data)
             windows->hide_window(windows->get_magnifier_window());
             _play_tts_for_layout_autopopup_name();
 
-            sclwindow move_window = context->get_cur_move_window(context->get_last_touch_device_id());
-            SclPoint move_point = context->get_cur_move_point(context->get_last_touch_device_id());
-            SclWindowContext *move_ctx = windows->get_window_context(move_window);
-            SclWindowContext *popup_ctx = windows->get_window_context(popup_window);
-            if (move_ctx && popup_ctx) {
-                move_point.x = (move_ctx->geometry.x - popup_ctx->geometry.x) + move_point.x;
-                move_point.y = (move_ctx->geometry.y - popup_ctx->geometry.y) + move_point.y;
+            sclwindow moving_window = context->get_cur_moving_window(context->get_last_touch_device_id());
+            SclPoint moving_point = context->get_cur_moving_point(context->get_last_touch_device_id());
+            SclWindowContext *moving_window_context = windows->get_window_context(moving_window);
+            SclWindowContext *popup_window_context = windows->get_window_context(popup_window);
+            if (moving_window_context && popup_window_context) {
+                moving_point.x = (moving_window_context->geometry.x - popup_window_context->geometry.x) + moving_point.x;
+                moving_point.y = (moving_window_context->geometry.y - popup_window_context->geometry.y) + moving_point.y;
             }
-            printf("AUTOPOPUP : %d %d\n", move_point.x, move_point.y);
+            //printf("AUTOPOPUP : %d %d\n", moving_point.x, moving_point.y);
 
-            CSCLWindows *windows = CSCLWindows::get_instance();
             if (windows && coordinate) {
                 windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
             }
@@ -3460,9 +3399,9 @@ CSCLController::timer_event(const scl32 data)
             handle_engine_signal(SCL_SIG_MOUSE_LONG_PRESS, window);
             windows->update_window(windows->get_magnifier_window());
 /*
-            SclButtonContext *btncontext = cache->get_cur_button_context(window, key_index);
-            if (btncontext->state == BUTTON_STATE_PRESSED) {
-                btncontext->state = BUTTON_STATE_NORMAL;
+            SclButtonContext *button_context = cache->get_cur_button_context(window, key_index);
+            if (button_context->state == BUTTON_STATE_PRESSED) {
+                button_context->state = BUTTON_STATE_NORMAL;
                 CSCLWindows *windows = CSCLWindows::get_instance();
                 if (windows) {
                     const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
@@ -3513,12 +3452,12 @@ CSCLController::timer_event(const scl32 data)
             return FALSE;
         }
         sclwindow window = context->get_cur_pressed_window(context->get_last_touch_device_id());
-        sclbyte keyIndex = context->get_cur_pressed_key(context->get_last_touch_device_id());
+        sclbyte key_index = context->get_cur_pressed_key(context->get_last_touch_device_id());
         scllong interval = m_repeat_key_duration - (m_key_repeated_num * SCL_REPEATKEY_ACCELERATION);
         if (interval < SCL_REPEATKEY_MIN_DURATION) {
             interval = SCL_REPEATKEY_MIN_DURATION;
         }
-        process_button_repeat_pressed_event(window, keyIndex, context->get_last_touch_device_id());
+        process_button_repeat_pressed_event(window, key_index, context->get_last_touch_device_id());
         events->destroy_timer(id);
         events->create_timer(SCL_TIMER_REPEATKEY, interval, value);
         m_key_repeated_num++;
@@ -3551,15 +3490,14 @@ CSCLController::timer_event(const scl32 data)
         desc.timed_out = TRUE;
 
         SclResParserManager *sclres_manager = SclResParserManager::get_instance();
-        CSCLWindows *windows = CSCLWindows::get_instance();
         if (windows && sclres_manager) {
             const PSclInputModeConfigure sclres_input_mode_configure =
                 sclres_manager->get_input_mode_configure_table();
             sclwindow window = windows->get_nth_popup_window(SCL_WINDOW_Z_TOP);
-            SclWindowContext *winctx = windows->get_window_context(window);
-            if (winctx && sclres_input_mode_configure) {
-                if (scl_check_arrindex(winctx->inputmode, MAX_SCL_INPUT_MODE)) {
-                    desc.input_mode = sclres_input_mode_configure[winctx->inputmode].name;
+            SclWindowContext *window_context = windows->get_window_context(window);
+            if (window_context && sclres_input_mode_configure) {
+                if (scl_check_arrindex(window_context->inputmode, MAX_SCL_INPUT_MODE)) {
+                    desc.input_mode = sclres_input_mode_configure[window_context->inputmode].name;
                 }
             }
         }
@@ -3578,8 +3516,6 @@ CSCLController::timer_event(const scl32 data)
     }
     break;
     case SCL_TIMER_AUTOTEST: {
-        CSCLResourceCache *cache = CSCLResourceCache::get_instance();
-
         sclint rnd = rand() % 100;
         sclint x = (rand() % (cache->get_cur_layout(windows->get_base_window())->width));
         sclint y = (rand() % (cache->get_cur_layout(windows->get_base_window())->height));
@@ -3758,6 +3694,8 @@ void CSCLController::handle_engine_signal( SclInternalSignal signal, sclwindow t
             break;
             case SIGACTION_INIT_INPUTMODE:
             break;
+            default:
+            break;
             }
         }
     }
@@ -3877,13 +3815,13 @@ CSCLController::configure_autopopup_window(sclwindow window, sclbyte key_index,
     }
 
     if (utils && context && windows && cache && coordinate && rect && autopopup_configure) {
-        SCLShiftState shiftidx = context->get_shift_state();
-        if (!scl_check_arrindex(shiftidx, SCL_SHIFT_STATE_MAX)) shiftidx = SCL_SHIFT_STATE_OFF;
+        SCLShiftState shift_index = context->get_shift_state();
+        if (!scl_check_arrindex(shift_index, SCL_SHIFT_STATE_MAX)) shift_index = SCL_SHIFT_STATE_OFF;
         if (context->get_caps_lock_mode()) {
-            shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+            shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
         }
 
-        if (utils->get_autopopup_window_variables(coordinate->autopopup_key_labels[shiftidx],
+        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 */
@@ -3948,11 +3886,11 @@ CSCLController::configure_autopopup_window(sclwindow window, sclbyte key_index,
  * button A gets restored to its initial state and B gets pressed instead.
  */
 sclboolean
-CSCLController::check_event_transition_enabled(const SclLayoutKeyCoordinate *btnFrom, const SclLayoutKeyCoordinate *btnTo)
+CSCLController::check_event_transition_enabled(const SclLayoutKeyCoordinate *btn_from, const SclLayoutKeyCoordinate *btn_to)
 {
     sclboolean ret = FALSE;
-    sclbyte typeFrom = BUTTON_TYPE_NORMAL; /* To enable event transition even if no button is pressed currently */
-    sclbyte typeTo = MAX_BUTTON_TYPE;
+    sclbyte type_from = BUTTON_TYPE_NORMAL; /* To enable event transition even if no button is pressed currently */
+    sclbyte type_to = MAX_BUTTON_TYPE;
 
     const sclboolean TRANSITION_TABLE[MAX_BUTTON_TYPE][MAX_BUTTON_TYPE] = {
         //     NORMAL  GRAB    SELFISH DRAG    MULTITAP        ROTATION        DIRECTION       R_DIRECTION     TOGGLE  UIITEM
@@ -3978,14 +3916,14 @@ CSCLController::check_event_transition_enabled(const SclLayoutKeyCoordinate *btn
         {      TRUE,   0,      0,              TRUE,   TRUE,           TRUE,           0,                      0,                      TRUE,           0},
     };
 
-    if (btnFrom) typeFrom = btnFrom->button_type;
-    if (btnTo) typeTo = btnTo->button_type;
+    if (btn_from) type_from = btn_from->button_type;
+    if (btn_to) type_to = btn_to->button_type;
 
-    scl_assert_return_false(typeFrom >= 0 && typeFrom < MAX_BUTTON_TYPE);
-    scl_assert_return_false(typeTo >= 0 && typeTo < MAX_BUTTON_TYPE);
+    scl_assert_return_false(type_from >= 0 && type_from < MAX_BUTTON_TYPE);
+    scl_assert_return_false(type_to >= 0 && type_to < MAX_BUTTON_TYPE);
 
-    if (typeFrom < MAX_BUTTON_TYPE && typeTo < MAX_BUTTON_TYPE) {
-        ret = TRANSITION_TABLE[typeFrom][typeTo];
+    if (type_from < MAX_BUTTON_TYPE && type_to < MAX_BUTTON_TYPE) {
+        ret = TRANSITION_TABLE[type_from][type_to];
     }
 
     return ret;
index b728321..d272eab 100644 (file)
@@ -59,7 +59,6 @@ static void handle_shift_button_click_event(SclUIEventDesc ui_event_desc)
                     /* The default next state should be LOCK state */
                     SCLShiftState next_state = SCL_SHIFT_STATE_LOCK;
                     if (context->get_shift_multi_touch_enabled()) {
-                        CSCLContext *context = CSCLContext::get_instance();
                         if (context) {
                             if (context->get_shift_multi_touch_state() == SCL_SHIFT_MULTITOUCH_ON_PRESSED) {
                                 /* If the shift multi touch state is ON_PRESSED, don't leave ON state now */
@@ -105,7 +104,6 @@ static void handle_shift_state_on_button_click_event(SclUIEventDesc ui_event_des
     }
     /* If we are in ON_PRESSED or ON_KEY_ENTERED mode of shift multi touch state, do not turn it off now */
     if (context->get_shift_multi_touch_enabled() && turn_shift_off) {
-        CSCLContext *context = CSCLContext::get_instance();
         if (context) {
             if (context->get_shift_multi_touch_state() == SCL_SHIFT_MULTITOUCH_ON_PRESSED) {
                 context->set_shift_multi_touch_state(SCL_SHIFT_MULTITOUCH_ON_KEY_ENTERED);
index b90c457..7f5eb5d 100644 (file)
@@ -91,10 +91,10 @@ void
 CSCLEvents::connect_window_events( sclwindow wnd, const sclint evt )
 {
     CSCLWindows *windows = CSCLWindows::get_instance();
-    //SclWindowContext *winctx = windows->get_window_context(wnd, FALSE);
-    SclWindowContext *winctx = windows->get_window_context(wnd);
-    if (winctx) {
-        if (!(winctx->is_virtual)) {
+    //SclWindowContext *window_context = windows->get_window_context(wnd, FALSE);
+    SclWindowContext *window_context = windows->get_window_context(wnd);
+    if (window_context) {
+        if (!(window_context->is_virtual)) {
             get_scl_events_impl()->connect_window_events(wnd, evt);
         }
     }
@@ -121,9 +121,7 @@ CSCLEvents::process_key_event(const char *key)
     LOGD("=-=-=-=- keyname(char) = %s \n",keyname);
 
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
-    SclButtonContext *prevbtncontext = NULL;
     const SclLayoutKeyCoordinate *prevcoordinate = NULL;
-    SclButtonContext *btncontext = NULL;
     const SclLayoutKeyCoordinate *coordinate = NULL;
 
     CSCLWindows *windows = CSCLWindows::get_instance();
@@ -151,13 +149,12 @@ CSCLEvents::process_key_event(const char *key)
         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)) {
-        btncontext = cache->get_cur_button_context(current_focus_window, current_key_index);
         coordinate = cache->get_cur_layout_key_coordinate(current_focus_window, current_key_index);
-        //btncontext->state = BUTTON_STATE_NORMAL;
+        //button_context->state = BUTTON_STATE_NORMAL;
         controller->mouse_press(current_focus_window, coordinate->x, coordinate->y, TRUE);
         controller->mouse_release(current_focus_window, coordinate->x, coordinate->y, TRUE);
         if (KEY_TYPE_MODECHANGE != coordinate->key_type) {
-            //btncontext->state = BUTTON_STATE_PRESSED;
+            //button_context->state = BUTTON_STATE_PRESSED;
             //windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
         } else {
             focus_handler->init_key_index();
@@ -170,8 +167,8 @@ CSCLEvents::process_key_event(const char *key)
     if (current_key_index != key_index || current_focus_window != focus_window) {
         prevcoordinate = cache->get_cur_layout_key_coordinate(current_focus_window, current_key_index);
         coordinate = cache->get_cur_layout_key_coordinate(focus_window, key_index);
-        //prevbtncontext->state = BUTTON_STATE_NORMAL;
-        //btncontext->state = BUTTON_STATE_PRESSED;
+        //prev_button_context->state = BUTTON_STATE_NORMAL;
+        //button_context->state = BUTTON_STATE_PRESSED;
         if (current_focus_window == focus_window) {
             sclshort x,y,width,height;
             if (prevcoordinate->x < coordinate->x) {
index 50bf7a9..a701dda 100644 (file)
@@ -132,11 +132,11 @@ CSCLKeyFocusHandler::popup_closed(sclwindow window)
     if (sclres_layout_key_coordinate_pointer_frame &&
         scl_check_arrindex(layout, MAX_SCL_LAYOUT) && scl_check_arrindex(m_focus_key, MAX_KEY)) {
             SclLayoutKeyCoordinatePointer cur = sclres_layout_key_coordinate_pointer_frame[layout][m_focus_key];
-            SclWindowContext *winctx = windows->get_window_context(m_focus_window);
+            SclWindowContext *window_context = windows->get_window_context(m_focus_window);
             SclRectangle cur_key_coordinate;
-            if (winctx) {
-                cur_key_coordinate.x = cur->x + winctx->geometry.x;
-                cur_key_coordinate.y = cur->y + winctx->geometry.y;
+            if (window_context) {
+                cur_key_coordinate.x = cur->x + window_context->geometry.x;
+                cur_key_coordinate.y = cur->y + window_context->geometry.y;
                 cur_key_coordinate.width = cur->width;
                 cur_key_coordinate.height = cur->height;
             }
@@ -282,11 +282,11 @@ CSCLKeyFocusHandler::get_next_candidate_key(SCLHighlightNavigationDirection dire
                         continue;
                     }
                 }
-                SclWindowContext *winctx = windows->get_window_context(window);
+                SclWindowContext *window_context = windows->get_window_context(window);
                 SclRectangle btn;
-                if (winctx) {
-                    btn.x = p->x + winctx->geometry.x;
-                    btn.y = p->y + winctx->geometry.y;
+                if (window_context) {
+                    btn.x = p->x + window_context->geometry.x;
+                    btn.y = p->y + window_context->geometry.y;
                     btn.width = p->width;
                     btn.height = p->height;
                 }
@@ -309,7 +309,7 @@ CSCLKeyFocusHandler::get_next_candidate_key(SCLHighlightNavigationDirection dire
                             }
                             /* Save for otherside */
                             otherside_candidate = loop;
-                            int temp_distance_x = calculate_distance(btn.x, btn.x + btn.width, cur.x, cur.x + cur.width);
+                            temp_distance_x = calculate_distance(btn.x, btn.x + btn.width, cur.x, cur.x + cur.width);
                             if (temp_distance_x < candidate_distance_x) {
                                 if (btn.x < cur.x) {
                                     candidate = loop;
@@ -378,7 +378,7 @@ CSCLKeyFocusHandler::get_next_candidate_key(SCLHighlightNavigationDirection dire
                     default:
                         temp_distance_y = calculate_distance(btn.y, btn.y + btn.height, cur.y, cur.y + cur.height);
                         if (temp_distance_y <= candidate_distance_y) {
-                            int temp_distance_x = calculate_distance(btn.x, btn.x + btn.width, cur.x, cur.x + cur.width);
+                            temp_distance_x = calculate_distance(btn.x, btn.x + btn.width, cur.x, cur.x + cur.width);
                             if (temp_distance_x <= candidate_distance_x) {
                                 candidate = loop;
                                 candidate_distance_x = temp_distance_x;
@@ -439,11 +439,11 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
         SclLayoutKeyCoordinatePointer cur = sclres_layout_key_coordinate_pointer_frame[layout][m_focus_key];
 
         /* To compare with buttons in popup window, let's convert to global coordinates */
-        SclWindowContext *winctx = windows->get_window_context(m_focus_window);
+        SclWindowContext *window_context = windows->get_window_context(m_focus_window);
         SclRectangle cur_key_coordinate;
-        if (winctx && cur && cache) {
-            cur_key_coordinate.x = cur->x + winctx->geometry.x;
-            cur_key_coordinate.y = cur->y + winctx->geometry.y;
+        if (window_context && cur && cache) {
+            cur_key_coordinate.x = cur->x + window_context->geometry.x;
+            cur_key_coordinate.y = cur->y + window_context->geometry.y;
             cur_key_coordinate.width = cur->width;
             cur_key_coordinate.height = cur->height;
 
@@ -461,17 +461,18 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
         sclboolean exclude_popup_covered_area = FALSE;
 
         if (!windows->is_base_window(windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP))) {
-            CSCLResourceCache *cache = CSCLResourceCache::get_instance();
-            if (cache && scl_check_arrindex(winctx->inputmode, MAX_SCL_INPUT_MODE)) {
-                const SclLayout *layout =
+            if (cache && scl_check_arrindex(window_context->inputmode, MAX_SCL_INPUT_MODE)) {
+                const SclLayout *cur_layout =
                     cache->get_cur_layout(windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP));
-                if (!(layout->use_sw_background) || layout->bg_color.a != 0) {
-                    const PSclInputModeConfigure sclres_input_mode_configure =
-                        sclres_manager->get_input_mode_configure_table();
-                    if (sclres_input_mode_configure[winctx->inputmode].use_dim_window) {
-                        search_in_base_window = FALSE;
-                    } else {
-                        exclude_popup_covered_area = TRUE;
+                if (cur_layout) {
+                    if (!(cur_layout->use_sw_background) || cur_layout->bg_color.a != 0) {
+                        const PSclInputModeConfigure sclres_input_mode_configure =
+                            sclres_manager->get_input_mode_configure_table();
+                        if (sclres_input_mode_configure[window_context->inputmode].use_dim_window) {
+                            search_in_base_window = FALSE;
+                        } else {
+                            exclude_popup_covered_area = TRUE;
+                        }
                     }
                 }
             }
@@ -508,13 +509,13 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
             SclLayoutKeyCoordinatePointer popup_key =
                 sclres_layout_key_coordinate_pointer_frame[popup_layout][popup_candidate.candidate];
 
-            SclWindowContext *base_winctx = windows->get_window_context(windows->get_base_window());
-            SclWindowContext *popup_winctx = windows->get_window_context(popup_window);
+            SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+            SclWindowContext *popup_window_context = windows->get_window_context(popup_window);
 
             SclRectangle base_key_coordinate;
-            if (base_winctx) {
-                base_key_coordinate.x = base_key->x + base_winctx->geometry.x;
-                base_key_coordinate.y = base_key->y + base_winctx->geometry.y;
+            if (base_window_context) {
+                base_key_coordinate.x = base_key->x + base_window_context->geometry.x;
+                base_key_coordinate.y = base_key->y + base_window_context->geometry.y;
                 base_key_coordinate.width = base_key->width;
                 base_key_coordinate.height = base_key->height;
 
@@ -523,9 +524,9 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
             }
 
             SclRectangle popup_key_coordinate;
-            if (popup_winctx) {
-                popup_key_coordinate.x = popup_key->x + popup_winctx->geometry.x;
-                popup_key_coordinate.y = popup_key->y + popup_winctx->geometry.y;
+            if (popup_window_context) {
+                popup_key_coordinate.x = popup_key->x + popup_window_context->geometry.x;
+                popup_key_coordinate.y = popup_key->y + popup_window_context->geometry.y;
                 popup_key_coordinate.width = popup_key->width;
                 popup_key_coordinate.height = popup_key->height;
             }
@@ -534,7 +535,7 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
                 CSCLUtils *utils = CSCLUtils::get_instance();
                 if (utils) {
                     /* If the base candidate key is covered by popup window, do not choose it */
-                    if (utils->is_rect_overlap(base_key_coordinate, popup_winctx->geometry)) {
+                    if (utils->is_rect_overlap(base_key_coordinate, popup_window_context->geometry)) {
                         base_candidate.candidate = NOT_USED;
                     }
                 }
@@ -619,11 +620,11 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
                         start_animation = TRUE;
                     }
                 } else {
-                    SclWindowContext *winctx_from = windows->get_window_context(desc.window_from);
-                    SclWindowContext *winctx_to = windows->get_window_context(desc.window_to);
-                    if (winctx_from && winctx_to) {
-                        if ((windows->is_base_window(desc.window_from) || winctx_from->is_virtual) &&
-                            (windows->is_base_window(desc.window_to) || winctx_to->is_virtual)) {
+                    SclWindowContext *window_context_from = windows->get_window_context(desc.window_from);
+                    SclWindowContext *window_context_to = windows->get_window_context(desc.window_to);
+                    if (window_context_from && window_context_to) {
+                        if ((windows->is_base_window(desc.window_from) || window_context_from->is_virtual) &&
+                            (windows->is_base_window(desc.window_to) || window_context_to->is_virtual)) {
                                 start_animation = TRUE;
                         }
                     }
@@ -660,11 +661,13 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
                             prev_rect.y += cache->get_custom_starting_coordinates().y;
                         } else {
                             /* Convert popup window coordinates relative to base window */
-                            SclWindowContext *base_winctx = windows->get_window_context(windows->get_base_window());
-                            SclWindowContext *prev_winctx = windows->get_window_context(desc.window_from);
-                            if (base_winctx && prev_winctx) {
-                                prev_rect.x += (prev_winctx->geometry.x - base_winctx->geometry.x);
-                                prev_rect.y += (prev_winctx->geometry.y - base_winctx->geometry.y);
+                            SclWindowContext *base_window_context =
+                                windows->get_window_context(windows->get_base_window());
+                            SclWindowContext *prev_window_context =
+                                windows->get_window_context(desc.window_from);
+                            if (base_window_context && prev_window_context) {
+                                prev_rect.x += (prev_window_context->geometry.x - base_window_context->geometry.x);
+                                prev_rect.y += (prev_window_context->geometry.y - base_window_context->geometry.y);
                             }
                         }
                         if (windows->is_base_window(desc.window_to)) {
@@ -672,11 +675,13 @@ CSCLKeyFocusHandler::process_navigation(SCLHighlightNavigationDirection directio
                             next_rect.y += cache->get_custom_starting_coordinates().y;
                         } else {
                             /* Convert popup window coordinates relative to base window */
-                            SclWindowContext *base_winctx = windows->get_window_context(windows->get_base_window());
-                            SclWindowContext *next_winctx = windows->get_window_context(desc.window_to);
-                            if (base_winctx && next_winctx) {
-                                next_rect.x += (next_winctx->geometry.x - base_winctx->geometry.x);
-                                next_rect.y += (next_winctx->geometry.y - base_winctx->geometry.y);
+                            SclWindowContext *base_window_context =
+                                windows->get_window_context(windows->get_base_window());
+                            SclWindowContext *next_window_context =
+                                windows->get_window_context(desc.window_to);
+                            if (base_window_context && next_window_context) {
+                                next_rect.x += (next_window_context->geometry.x - base_window_context->geometry.x);
+                                next_rect.y += (next_window_context->geometry.y - base_window_context->geometry.y);
                             }
                         }
                         /* Let's check if the navigation animation should be in circular movement */
index c4fd3ba..f88e50c 100644 (file)
@@ -324,7 +324,7 @@ CSCLResourceCache::copy_from_privatekeyproperties(const SclPrivateKeyProperties*
             for (inner_loop = 0;inner_loop < MAX_SIZE_OF_LABEL_FOR_ONE;inner_loop++) {
                 if (!(privProperties->label[loop][inner_loop].empty())) {
                     coordinate->label[loop][inner_loop] =
-                        (sclchar*)privProperties->label[loop][inner_loop].c_str();
+                        const_cast<sclchar*>(privProperties->label[loop][inner_loop].c_str());
                 }
             }
         }
@@ -332,7 +332,7 @@ CSCLResourceCache::copy_from_privatekeyproperties(const SclPrivateKeyProperties*
             for (inner_loop = 0;inner_loop < SCL_BUTTON_STATE_MAX;inner_loop++) {
                 if (!(privProperties->image_label_path[loop][inner_loop].empty())) {
                     coordinate->image_label_path[loop][inner_loop] =
-                        (sclchar*)privProperties->image_label_path[loop][inner_loop].c_str();
+                        const_cast<sclchar*>(privProperties->image_label_path[loop][inner_loop].c_str());
                 }
             }
         }
@@ -340,7 +340,7 @@ CSCLResourceCache::copy_from_privatekeyproperties(const SclPrivateKeyProperties*
             for (inner_loop = 0;inner_loop < SCL_BUTTON_STATE_MAX;inner_loop++) {
                 if (!(privProperties->bg_image_path[loop][inner_loop].empty())) {
                     coordinate->bg_image_path[loop][inner_loop] =
-                        (sclchar*)privProperties->bg_image_path[loop][inner_loop].c_str();
+                        const_cast<sclchar*>(privProperties->bg_image_path[loop][inner_loop].c_str());
                 }
             }
         }
@@ -349,7 +349,7 @@ CSCLResourceCache::copy_from_privatekeyproperties(const SclPrivateKeyProperties*
             for (inner_loop = 0;inner_loop < MAX_SIZE_OF_MULTITAP_CHAR;inner_loop++) {
                 if (!(privProperties->key_value[loop][inner_loop].empty())) {
                     coordinate->key_value[loop][inner_loop] =
-                        (sclchar*)privProperties->key_value[loop][inner_loop].c_str();
+                        const_cast<sclchar*>(privProperties->key_value[loop][inner_loop].c_str());
                 }
             }
         }
@@ -365,7 +365,7 @@ CSCLResourceCache::copy_from_privatekeyproperties(const SclPrivateKeyProperties*
             for (inner_loop = 0;inner_loop < MAX_SIZE_OF_MULTITAP_CHAR;inner_loop++) {
                 if (!(privProperties->hint_string[loop][inner_loop].empty())) {
                     coordinate->hint_string[loop][inner_loop] =
-                        (sclchar*)privProperties->hint_string[loop][inner_loop].c_str();
+                        const_cast<sclchar*>(privProperties->hint_string[loop][inner_loop].c_str());
                 }
             }
         }
@@ -751,7 +751,7 @@ CSCLResourceCache::add_private_key(SclPrivateKeyProperties* privProperties, sclb
     ret = loop;
 
     sclboolean found = FALSE;
-    for (sclint loop = 0;loop < MAX_KEY; loop++) {
+    for (loop = 0;loop < MAX_KEY; loop++) {
         if ((!(privProperties->custom_id.empty())) && mCurBaseLayoutKeyCoordinates[loop].custom_id) {
             if (privProperties->custom_id.compare(mCurBaseLayoutKeyCoordinates[loop].custom_id) == 0) {
                 /* sets the current properties to private key properties */
@@ -806,7 +806,7 @@ CSCLResourceCache::remove_private_key(sclint id)
         return FALSE;
     }
     if (scl_check_arrindex(layout, MAX_SCL_LAYOUT)) {
-        for (sclint loop = 0;loop < MAX_KEY; loop++) {
+        for (loop = 0;loop < MAX_KEY; loop++) {
             if ((!(mPrivateKeyProperties[id].custom_id.empty())) && mCurBaseLayoutKeyCoordinates[loop].custom_id) {
                 if (mPrivateKeyProperties[id].custom_id.compare(mCurBaseLayoutKeyCoordinates[loop].custom_id) == 0) {
                     SclLayoutKeyCoordinatePointer p = sclres_layout_key_coordinate_pointer_frame[layout][loop];
@@ -914,13 +914,13 @@ CSCLResourceCache::recompute_layout(sclwindow window)
 
             if (popupindex >= 0 && popupindex < MAX_POPUP_WINDOW) {
                 if (!(windows->is_base_window(window))) {
-                    SclWindowContext *winctx = windows->get_window_context(window);
-                    if (winctx) {
-                        if (winctx->inputmode != NOT_USED) {
-                            inputmode = winctx->inputmode;
+                    SclWindowContext *window_context = windows->get_window_context(window);
+                    if (window_context) {
+                        if (window_context->inputmode != NOT_USED) {
+                            inputmode = window_context->inputmode;
                         }
-                        if (winctx->layout != NOT_USED) {
-                            layout = winctx->layout;
+                        if (window_context->layout != NOT_USED) {
+                            layout = window_context->layout;
                         }
                     }
                 }
@@ -1152,12 +1152,12 @@ void CSCLResourceCache::generate_autopopup_layout( const SclLayoutKeyCoordinate
     if (utils && context && coordinate && autopopup_configure) {
         sclbyte num_keys, num_columns, num_rows;
         sclint x, y, width, height;
-        SCLShiftState shiftidx = context->get_shift_state();
-        if (shiftidx < 0 || shiftidx >= SCL_SHIFT_STATE_MAX) shiftidx = SCL_SHIFT_STATE_OFF;
+        SCLShiftState shift_index = context->get_shift_state();
+        if (shift_index < 0 || shift_index >= SCL_SHIFT_STATE_MAX) shift_index = SCL_SHIFT_STATE_OFF;
         if (context->get_caps_lock_mode()) {
-            shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+            shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
         }
-        if (utils->get_autopopup_window_variables(coordinate->autopopup_key_labels[shiftidx], &num_keys, &num_columns, &num_rows, &width, &height)) {
+        if (utils->get_autopopup_window_variables(coordinate->autopopup_key_labels[shift_index], &num_keys, &num_columns, &num_rows, &width, &height)) {
             int row = 0, column = 0;
 
             pCurLayout->use_magnifier_window = FALSE;
@@ -1384,6 +1384,8 @@ void CSCLResourceCache::generate_autopopup_layout( const SclLayoutKeyCoordinate
                                 (*pCurLayoutKeyCoordinates)[loop + decoidx].height =
                                     autopopup_configure->decoration_size * utils->get_smallest_custom_scale_rate();
                                 break;
+                            default:
+                                break;
                         }
 
                         (*pCurButtonContext)[loop + decoidx].used = TRUE;
@@ -1437,7 +1439,8 @@ CSCLResourceCache::clone_keyproperties(SclPrivateKeyProperties* priv, sclbyte in
         clear_privatekeyproperties(priv);
 
         /* gets the value of the previous key properties */
-        SclLayoutKeyCoordinate keyCoordinate = { 0 };
+        SclLayoutKeyCoordinate keyCoordinate;
+        memset(&keyCoordinate, 0x00, sizeof(keyCoordinate));
         if (scl_check_arrindex_unsigned(layout_index, MAX_SCL_LAYOUT) &&
             scl_check_arrindex_unsigned(key_index, MAX_KEY)) {
             SclLayoutKeyCoordinatePointer p = sclres_layout_key_coordinate_pointer_frame[layout_index][key_index];
@@ -1492,7 +1495,7 @@ CSCLResourceCache::set_private_key(SclPrivateKeyProperties* properties, sclboole
  * @param fRedraw If true, it will redraw the current key
  */
 sclint
-CSCLResourceCache::set_private_key(sclchar* custom_id, sclchar* label, sclchar* imagelabel[SCL_BUTTON_STATE_MAX], sclchar* imagebg[SCL_BUTTON_STATE_MAX], sclulong key_event, sclchar *key_value, sclboolean fRedraw, sclboolean fPendingUpdate)
+CSCLResourceCache::set_private_key(const sclchar* custom_id, sclchar* label, sclchar* imagelabel[SCL_BUTTON_STATE_MAX], sclchar* imagebg[SCL_BUTTON_STATE_MAX], sclulong key_event, sclchar *key_value, sclboolean fRedraw, sclboolean fPendingUpdate)
 {
     SCL_DEBUG();
 
index 97edc59..cf81dc0 100644 (file)
@@ -405,7 +405,7 @@ CSCLUI::set_custom_starting_coordinates(sclint x, sclint y)
 SclRectangle
 CSCLUI::get_main_window_rect()
 {
-    SclRectangle ret = {0};
+    SclRectangle ret = {0,0,0,0};
 
     if (m_impl) {
         ret = m_impl->get_main_window_rect();
@@ -420,7 +420,7 @@ CSCLUI::get_main_window_rect()
 SclSize
 CSCLUI::get_input_mode_size(const sclchar *input_mode, SCLDisplayMode display_mode)
 {
-    SclSize ret = {0};
+    SclSize ret = {0,0};
 
     if (m_impl) {
         ret = m_impl->get_input_mode_size(input_mode, display_mode);
index 337f7ce..ab173d9 100644 (file)
@@ -89,7 +89,8 @@ CSCLUIBuilder::init(sclwindow parent)
             mode = sclres_manager->get_inputmode_id(default_configure->input_mode);
         }
         /* Make sure these variables does not exceed the size of our array */
-        if (!scl_check_arrindex(mode, MAX_SCL_INPUT_MODE) || !scl_check_arrindex(mode, sclres_manager->get_inputmode_size())) {
+        if (!scl_check_arrindex(mode, MAX_SCL_INPUT_MODE) ||
+            !scl_check_arrindex(mode, sclres_manager->get_inputmode_size())) {
             mode = 0;
         }
         if (!scl_check_arrindex(display_mode, DISPLAYMODE_MAX)) {
@@ -179,12 +180,12 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
             /* For the magnifier window */
             ret = show_magnifier(window, draw_ctx);
         } else if (window == windows->get_dim_window()) {
-            SclWindowContext *dimctx = windows->get_window_context(window);
-            if (dimctx) {
+            SclWindowContext *dim_window_context = windows->get_window_context(window);
+            if (dim_window_context) {
                 SclSize size;
                 SclColor color;
-                size.width = dimctx->geometry.width;
-                size.height = dimctx->geometry.height;
+                size.width = dim_window_context->geometry.width;
+                size.height = dim_window_context->geometry.height;
                 color = default_configure->dim_color;
                 draw_window_bg_by_sw(window, draw_ctx, size, 0.0, color, color);
                 /*sclchar composed_path[_POSIX_PATH_MAX] = {0,};
@@ -198,16 +199,15 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
             // FIXME implement later
             // SclLayoutInfoCache *info_cache = cache->get_cur_layout_info_cache(window);
             if (layout) {
-                CSCLWindows *windows = CSCLWindows::get_instance();
-                //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-                SclWindowContext *winctx = windows->get_window_context(window);
+                //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+                SclWindowContext *window_context = windows->get_window_context(window);
                 scl_assert_return_false(layout);
 
                 if (layout->use_sw_background) {
-                    if (winctx) {
+                    if (window_context) {
                         SclSize size;
-                        size.width = winctx->geometry.width;
-                        size.height = winctx->geometry.height;
+                        size.width = window_context->geometry.width;
+                        size.height = window_context->geometry.height;
                         draw_window_bg_by_sw(window, draw_ctx, size, layout->bg_line_width, layout->bg_line_color, layout->bg_color);
                     }
                 } else if (layout->image_path[BUTTON_STATE_NORMAL]) {
@@ -215,14 +215,15 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                     sclint targetx = cache->get_custom_starting_coordinates().x;
                     sclint targety = cache->get_custom_starting_coordinates().y;
                     sclwindow targetwin = window;
-                    if (winctx) {
-                        if (winctx->is_virtual) {
-                            //SclWindowContext *basectx = windows->get_window_context(windows->get_base_window(), FALSE);
-                            SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                            if (basectx) {
+                    if (window_context) {
+                        if (window_context->is_virtual) {
+                            /*SclWindowContext *base_window_context =
+                                windows->get_window_context(windows->get_base_window(), FALSE);*/
+                            SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                            if (base_window_context) {
                                 targetwin = windows->get_base_window();
-                                targetx = winctx->geometry.x - basectx->geometry.x;
-                                targety = winctx->geometry.y - basectx->geometry.y;
+                                targetx = window_context->geometry.x - base_window_context->geometry.x;
+                                targety = window_context->geometry.y - base_window_context->geometry.y;
                             }
                         }
                         if (strlen(layout->image_path[BUTTON_STATE_NORMAL]) > 0) {
@@ -235,11 +236,11 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                             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 (winctx && (x + y + width + height == 0)) {
-                                //graphics->draw_image(targetwin, draw_ctx, composed_path, &cached_info, targetx, targety, layout->width, layout->height, winctx->layout_image_offset.x, winctx->layout_image_offset.y, -1, -1, layout->extract_background);
+                            if (window_context && (x + y + width + height == 0)) {
+                                //graphics->draw_image(targetwin, draw_ctx, composed_path, &cached_info, targetx, targety, layout->width, layout->height, window_context->layout_image_offset.x, winctx->layout_image_offset.y, -1, -1, layout->extract_background);
                                 graphics->draw_image(targetwin, draw_ctx, composed_path, NULL,
                                     targetx, targety, layout->width, layout->height,
-                                    winctx->layout_image_offset.x, winctx->layout_image_offset.y,
+                                    window_context->layout_image_offset.x, window_context->layout_image_offset.y,
                                     -1, -1, layout->extract_background);
                             }
                         }
@@ -252,12 +253,11 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                     sclint startx = 0;
                     sclint starty = 0;
 
-                    SclWindowContext *winctx = windows->get_window_context(window);
-                    SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                    if (winctx && basectx) {
-                        if (winctx->is_virtual) {
-                            startx += (winctx->geometry.x - basectx->geometry.x);
-                            starty += (winctx->geometry.y - basectx->geometry.y);
+                    SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                    if (window_context && base_window_context) {
+                        if (window_context->is_virtual) {
+                            startx += (window_context->geometry.x - base_window_context->geometry.x);
+                            starty += (window_context->geometry.y - base_window_context->geometry.y);
                         }
                     }
 
@@ -315,13 +315,13 @@ CSCLUIBuilder::draw_button_all(const sclwindow window, const scldrawctx draw_ctx
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
     CSCLUtils *utils = CSCLUtils::get_instance();
     SclLayoutKeyCoordinate* coordinate = NULL;
-    SclButtonContext* btncontext = NULL;
+    SclButtonContext* button_context = NULL;
 
     if (context && cache && utils) {
         for (sclint idx = 0; idx < MAX_KEY; idx++) {
             coordinate = cache->get_cur_layout_key_coordinate(window, idx);
-            btncontext = cache->get_cur_button_context(window, idx);
-            if (coordinate && btncontext) {
+            button_context = cache->get_cur_button_context(window, idx);
+            if (coordinate && button_context) {
                 /* First check if this button is enabled in current active sublayout */
                 sclboolean subLayoutMatch = TRUE;
                 if (coordinate->sub_layout && context->get_cur_sublayout()) {
@@ -332,8 +332,8 @@ CSCLUIBuilder::draw_button_all(const sclwindow window, const scldrawctx draw_ctx
                 if (coordinate->valid && subLayoutMatch) {
                     SclRectangle itemrect = {coordinate->x, coordinate->y, coordinate->width, coordinate->height};
                     if (drawall || utils->is_rect_overlap(itemrect, updatearea)) {
-                        SCLButtonState state = btncontext->state;
-                        if (btncontext->toggled) {
+                        SCLButtonState state = button_context->state;
+                        if (button_context->toggled) {
                             state = BUTTON_STATE_TOGGLED;
                         }
                         if (!draw_button(window, draw_ctx, idx, state)) {
@@ -364,10 +364,10 @@ CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const sc
     CSCLGraphics *graphics = CSCLGraphics::get_instance();
 
     if (cache && context && graphics) {
-        SclButtonContext* btncontext = cache->get_cur_button_context(window, key_index);
+        SclButtonContext* button_context = cache->get_cur_button_context(window, key_index);
 
-        if (btncontext) {
-            if (!btncontext->used) {
+        if (button_context) {
+            if (!button_context->used) {
                 return FALSE;
             }
 
@@ -380,8 +380,8 @@ CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const sc
 
             /* FIXME : There is a case that begin_pain fails. Inspection on the root cause is needed */
             if (draw_ctx) {
-                SCLShiftState shiftidx = context->get_shift_state();
-                if (shiftidx < 0 || shiftidx >= SCL_SHIFT_STATE_MAX) shiftidx = SCL_SHIFT_STATE_OFF;
+                SCLShiftState shift_index = context->get_shift_state();
+                if (shift_index < 0 || shift_index >= SCL_SHIFT_STATE_MAX) shift_index = SCL_SHIFT_STATE_OFF;
 
                 const SclLayout* layout = cache->get_cur_layout(window);
                 const SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
@@ -395,22 +395,22 @@ CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const sc
                         draw_button_bg_by_sw(window, draw_ctx, key_index, state);
                     } else {
                         /* check it whether uses an individual images */
-                        if (coordinate->bg_image_path[shiftidx][state]) {
-                            if (strcmp(coordinate->bg_image_path[shiftidx][state], SCL_BACKGROUND_IMAGE_STRING) != 0) {
+                        if (coordinate->bg_image_path[shift_index][state]) {
+                            if (strcmp(coordinate->bg_image_path[shift_index][state], SCL_BACKGROUND_IMAGE_STRING) != 0) {
                                 /* case 2 (uses an indivisual image) */
-                                draw_button_bg_by_img(window, draw_ctx, key_index, state, shiftidx);
+                                draw_button_bg_by_img(window, draw_ctx, key_index, state, shift_index);
                             } else {
                                 /* case 3 (uses the layout background image) */
-                                draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shiftidx);
+                                draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shift_index);
                             }
                         } else if (force_draw_bg) {
-                            draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shiftidx);
+                            draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shift_index);
                         }
                         /* case 4 (don't draw anything for button's background if image_path is NULL) */
                     }
 
                     /* 2. displaying the label of the button */
-                    draw_button_label(window, draw_ctx, key_index, state, shiftidx);
+                    draw_button_label(window, draw_ctx, key_index, state, shift_index);
                 }
             }
 
@@ -449,16 +449,16 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
         sclint targetaddx = 0;
         sclint targetaddy = 0;
         sclwindow targetwin = window;
-        //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-        SclWindowContext *winctx = windows->get_window_context(window);
-        if (winctx) {
-            if (winctx->is_virtual) {
-                //SclWindowContext *basectx = windows->get_window_context(windows->get_base_window(), FALSE);
-                SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                if (basectx) {
+        //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+        SclWindowContext *window_context = windows->get_window_context(window);
+        if (window_context) {
+            if (window_context->is_virtual) {
+                //SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window(), FALSE);
+                SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                if (base_window_context) {
                     targetwin = windows->get_base_window();
-                    targetaddx = winctx->geometry.x - basectx->geometry.x;
-                    targetaddy = winctx->geometry.y - basectx->geometry.y;
+                    targetaddx = window_context->geometry.x - base_window_context->geometry.x;
+                    targetaddy = window_context->geometry.y - base_window_context->geometry.y;
                 }
             }
         }
@@ -485,7 +485,7 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                     imgSize.height = coordinate->height;
                 }
 
-                SclPoint pos = {0,};
+                SclPoint pos = {0,0};
                 const SclLabelProperties *labelproperties = cache->get_label_properties(coordinate->image_label_type, 0);
                 if (labelproperties) {
                     SCLLabelAlignment align = labelproperties->alignment;
@@ -544,7 +544,6 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
         /* for text */
         for (int idx = 0; idx < coordinate->label_count; idx++) {
             SclFontInfo info;
-            CSCLResourceCache *cache = CSCLResourceCache::get_instance();
             const SclLabelProperties *labelproperties = cache->get_label_properties(coordinate->label_type, idx);
             if (labelproperties) {
                 const sclchar *label = coordinate->label[shift][idx];
@@ -553,10 +552,10 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                 /* If the button type is BUTTON_TYPE_ROTATION, display current keyvalue */
                 if (idx == 0) {
                     if (coordinate->button_type == BUTTON_TYPE_ROTATION) {
-                        SclButtonContext* btncontext = cache->get_cur_button_context(window, key_index);
-                        if (btncontext) {
-                            if (btncontext->multikeyIdx < MAX_SIZE_OF_MULTITAP_CHAR) {
-                                label = coordinate->key_value[shift][btncontext->multikeyIdx];
+                        SclButtonContext* button_context = cache->get_cur_button_context(window, key_index);
+                        if (button_context) {
+                            if (button_context->multikeyIdx < MAX_SIZE_OF_MULTITAP_CHAR) {
+                                label = coordinate->key_value[shift][button_context->multikeyIdx];
                             }
                         }
                     }
@@ -655,10 +654,10 @@ CSCLUIBuilder::draw_window_bg_by_sw(const sclwindow window, const scldrawctx dra
     if (graphics && windows && cache) {
         /* If the target window is virtual window, let's draw it on the base window */
         sclwindow targetwin = window;
-        //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-        SclWindowContext *winctx = windows->get_window_context(window);
-        if (winctx) {
-            if (winctx->is_virtual) {
+        //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+        SclWindowContext *window_context = windows->get_window_context(window);
+        if (window_context) {
+            if (window_context->is_virtual) {
                 targetwin = windows->get_base_window();
             }
         }
@@ -794,16 +793,16 @@ CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx dr
         sclint targetx = coordinate->x;
         sclint targety = coordinate->y;
         sclwindow targetwin = window;
-        //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-        SclWindowContext *winctx = windows->get_window_context(window);
-        if (winctx) {
-            if (winctx->is_virtual) {
-                //SclWindowContext *basectx = windows->get_window_context(windows->get_base_window(), FALSE);
-                SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                if (basectx) {
+        //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+        SclWindowContext *window_context = windows->get_window_context(window);
+        if (window_context) {
+            if (window_context->is_virtual) {
+                //SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window(), FALSE);
+                SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                if (base_window_context) {
                     targetwin = windows->get_base_window();
-                    targetx += winctx->geometry.x - basectx->geometry.x;
-                    targety += winctx->geometry.y - basectx->geometry.y;
+                    targetx += window_context->geometry.x - base_window_context->geometry.x;
+                    targety += window_context->geometry.y - base_window_context->geometry.y;
                 }
             }
         }
@@ -858,11 +857,11 @@ CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldraw
     scl_assert_return_false(state >= BUTTON_STATE_NORMAL && state < SCL_BUTTON_STATE_MAX);
 
     CSCLWindows *windows = CSCLWindows::get_instance();
-    //SclWindowContext *winctx = windows->get_window_context(window, FALSE);
-    SclWindowContext *winctx = windows->get_window_context(window);
+    //SclWindowContext *window_context = windows->get_window_context(window, FALSE);
+    SclWindowContext *window_context = windows->get_window_context(window);
 
     sclchar composed_path[_POSIX_PATH_MAX] = {0,};
-    if (context && cache && coordinate && winctx) {
+    if (context && cache && coordinate && window_context) {
         sclboolean path_composed = FALSE;
         /* Check if we need to decorate the button's drag state */
         //if (context->get_cur_drag_state(context->get_last_touch_device_id()) != SCL_DRAG_STATE_NONE &&
@@ -910,8 +909,8 @@ CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldraw
                 (sclint)coordinate->y - (sclint)coordinate->add_hit_top,
                 (sclint)coordinate->width + (sclint)coordinate->add_hit_left + (sclint)coordinate->add_hit_right,
                 (sclint)coordinate->height + (sclint)coordinate->add_hit_top + (sclint)coordinate->add_hit_bottom,
-                winctx->imgOffsetx + (sclint)coordinate->x - (sclint)coordinate->add_hit_left,
-                winctx->imgOffsety + (sclint)coordinate->y - (sclint)coordinate->add_hit_top,
+                window_context->imgOffsetx + (sclint)coordinate->x - (sclint)coordinate->add_hit_left,
+                window_context->imgOffsety + (sclint)coordinate->y - (sclint)coordinate->add_hit_top,
                 (sclint)coordinate->width + (sclint)coordinate->add_hit_left + (sclint)coordinate->add_hit_right,
                 (sclint)coordinate->height + (sclint)coordinate->add_hit_top + (sclint)coordinate->add_hit_bottom,
                 TRUE
@@ -919,11 +918,11 @@ CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldraw
         } else {*/
             sclint dest_x = coordinate->x;
             sclint dest_y = coordinate->y;
-            if (winctx->is_virtual) {
-                SclWindowContext *basectx = windows->get_window_context(windows->get_base_window());
-                if (basectx) {
-                    dest_x += (winctx->geometry.x - basectx->geometry.x);
-                    dest_y += (winctx->geometry.y - basectx->geometry.y);
+            if (window_context->is_virtual) {
+                SclWindowContext *base_window_context = windows->get_window_context(windows->get_base_window());
+                if (base_window_context) {
+                    dest_x += (window_context->geometry.x - base_window_context->geometry.x);
+                    dest_y += (window_context->geometry.y - base_window_context->geometry.y);
                 }
             }
 
@@ -936,8 +935,8 @@ CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldraw
                 dest_y,
                 (sclint)coordinate->width,
                 (sclint)coordinate->height,
-                winctx->layout_image_offset.x + (sclint)coordinate->x,
-                winctx->layout_image_offset.y + (sclint)coordinate->y,
+                window_context->layout_image_offset.x + (sclint)coordinate->x,
+                window_context->layout_image_offset.y + (sclint)coordinate->y,
                 (sclint)coordinate->width,
                 (sclint)coordinate->height,
                 TRUE
@@ -977,11 +976,11 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
     CSCLWindows *windows = CSCLWindows::get_instance();
     const SclLayout *layout = cache->get_cur_layout(windows->get_base_window());
     SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(pressed_window, pressed_key);
-    SclButtonContext* btncontext = cache->get_cur_button_context(pressed_window, pressed_key);
-    SCLShiftState shiftidx = context->get_shift_state();
-    if (shiftidx < 0 || shiftidx >= SCL_SHIFT_STATE_MAX) shiftidx = SCL_SHIFT_STATE_OFF;
+    SclButtonContext* button_context = cache->get_cur_button_context(pressed_window, pressed_key);
+    SCLShiftState shift_index = context->get_shift_state();
+    if (shift_index < 0 || shift_index >= SCL_SHIFT_STATE_MAX) shift_index = SCL_SHIFT_STATE_OFF;
     if (context->get_caps_lock_mode()) {
-        shiftidx = (shiftidx == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
+        shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
     }
 
     /* Do not show if current layout does not allow magnifier */
@@ -1003,8 +1002,8 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
         }
         /* FIXME : workaround for not showing magnifier for recent symbols */
         /* Do not show if there's nothing to show */
-        //const char *targetstr = coordinate->key_value[shiftidx][btncontext->multikeyIdx];
-        const char *targetstr = coordinate->label[shiftidx][0];
+        //const char *targetstr = coordinate->key_value[shift_index][button_context->multikeyIdx];
+        const char *targetstr = coordinate->label[shift_index][0];
         if (state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY ||
             state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY ) {
                 targetstr = coordinate->long_key_value;
@@ -1021,19 +1020,19 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
         }
         if (targetstr == NULL) {
             if (utils) {
-                utils->log("coordinate->key_value[shift][btncontext->multikeyIdx] == NULL \n");
+                utils->log("coordinate->key_value[shift][button_context->multikeyIdx] == NULL \n");
             }
             return FALSE;
         } else if (strlen(targetstr) == 0) {
             if (utils) {
-                utils->log("coordinate->key_value[shift][btncontext->multikeyIdx]) == 0 \n");
+                utils->log("coordinate->key_value[shift][button_context->multikeyIdx]) == 0 \n");
             }
             return FALSE;
         }
     }
 
 #if 0
-    SclPoint pos = {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);
 
@@ -1051,26 +1050,18 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
     }
     if (coordinate && magnifier_configure) {
         sclchar composed_path[_POSIX_PATH_MAX] = {0,};
-        sclfloat scale_rate_x, scale_rate_y;
-        if (layout->display_mode == DISPLAYMODE_PORTRAIT) {
-            scale_rate_x = m_utils->get_scale_rate_x();
-            scale_rate_y = m_utils->get_scale_rate_y();
-        } else {
-            scale_rate_x = m_utils->get_scale_rate_y();
-            scale_rate_y = m_utils->get_scale_rate_x();
-        }
         if (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,
                 magnifier_configure->width * utils->get_custom_scale_rate_x(),
                 magnifier_configure->height * utils->get_custom_scale_rate_y());
         } else {
-            if (shiftidx == SCL_SHIFT_STATE_LOCK) {
+            if (shift_index == SCL_SHIFT_STATE_LOCK) {
                 m_utils->get_composed_path(composed_path, IMG_PATH_PREFIX, magnifier_configure->bg_shift_lock_image_path);
                 m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, 0, 0,
                     magnifier_configure->width * utils->get_custom_scale_rate_x(),
                     magnifier_configure->height * utils->get_custom_scale_rate_y());
-            } else if (shiftidx == SCL_SHIFT_STATE_ON) {
+            } else if (shift_index == SCL_SHIFT_STATE_ON) {
                 m_utils->get_composed_path(composed_path, IMG_PATH_PREFIX, magnifier_configure->bg_shift_image_path);
                 m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, 0, 0,
                     magnifier_configure->width * utils->get_custom_scale_rate_x(),
@@ -1089,7 +1080,7 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
             if (labelproperties) {
                 if (labelproperties->valid) {
                     if (magnifier_configure->show_shift_label) {
-                        shiftidx = SCL_SHIFT_STATE_ON;
+                        shift_index = SCL_SHIFT_STATE_ON;
                     }
                     if ((coordinate->use_long_key_magnifier && state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY) ||
                         state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY) {
@@ -1113,12 +1104,12 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
                         const sclchar* customstr = context->get_custom_magnifier_label(context->get_last_touch_device_id(), loop);
                         if (customstr) {
                             targetstr = customstr;
-                        } else if (coordinate->magnifier_label[shiftidx][loop]) {
-                            targetstr = coordinate->magnifier_label[shiftidx][loop];
+                        } else if (coordinate->magnifier_label[shift_index][loop]) {
+                            targetstr = coordinate->magnifier_label[shift_index][loop];
                             targetstr = cache->find_substituted_string(targetstr);
                         } else if (loop == 0) {
                             /* Don't display sublabels of each buttons in magnifier window - this policy can be changed, but for now */
-                            targetstr = coordinate->label[shiftidx][btncontext->multikeyIdx];
+                            targetstr = coordinate->label[shift_index][button_context->multikeyIdx];
                             targetstr = cache->find_substituted_string(targetstr);
                         }
                         if (targetstr) {
index e2c82ab..d83c9d9 100644 (file)
@@ -259,14 +259,14 @@ CSCLUIImpl::set_popup_input_mode(sclwindow window, const sclchar *input_mode)
 
         scl8 mode = NOT_USED;
         sclshort layout = NOT_USED;
-        SclWindowContext *winctx = NULL;
+        SclWindowContext *window_context = NULL;
 
         SclResParserManager *sclres_manager = SclResParserManager::get_instance();
         if (sclres_manager && windows && context) {
             SCLDisplayMode display_mode = context->get_display_mode();
             PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
             mode = sclres_manager->get_inputmode_id(input_mode);
-            winctx = windows->get_window_context(window);
+            window_context = windows->get_window_context(window);
             if (sclres_input_mode_configure &&
                 scl_check_arrindex(mode, MAX_SCL_INPUT_MODE) &&
                 scl_check_arrindex(display_mode, DISPLAYMODE_MAX)) {
@@ -274,10 +274,10 @@ CSCLUIImpl::set_popup_input_mode(sclwindow window, const sclchar *input_mode)
             }
         }
 
-        if (cache && windows && winctx) {
-            if (mode != NOT_USED && mode != winctx->inputmode && layout != NOT_USED) {
-                winctx->inputmode = mode;
-                winctx->layout = layout;
+        if (cache && windows && window_context) {
+            if (mode != NOT_USED && mode != window_context->inputmode && layout != NOT_USED) {
+                window_context->inputmode = mode;
+                window_context->layout = layout;
                 cache->recompute_layout(window);
                 windows->update_window(window);
                 ret = TRUE;
@@ -303,10 +303,10 @@ CSCLUIImpl::get_popup_input_mode(sclwindow window)
         CSCLWindows *windows = CSCLWindows::get_instance();
         SclResParserManager *sclres_manager = SclResParserManager::get_instance();
         if (windows && sclres_manager) {
-            SclWindowContext *winctx = windows->get_window_context(window);
-            if (winctx) {
-                if (scl_check_arrindex(winctx->inputmode, MAX_SCL_INPUT_MODE)) {
-                    ret = sclres_manager->get_inputmode_name(winctx->inputmode);
+            SclWindowContext *window_context = windows->get_window_context(window);
+            if (window_context) {
+                if (scl_check_arrindex(window_context->inputmode, MAX_SCL_INPUT_MODE)) {
+                    ret = sclres_manager->get_inputmode_name(window_context->inputmode);
                 }
             }
         }
@@ -405,7 +405,7 @@ CSCLUIImpl::set_private_key(const sclchar* custom_id, sclchar* label, sclchar* i
         CSCLWindows *windows = CSCLWindows::get_instance();
         CSCLResourceCache *cache = CSCLResourceCache::get_instance();
         if (windows && cache) {
-            ret = cache->set_private_key((sclchar*)custom_id, label, imagelabel, imagebg,
+            ret = cache->set_private_key(custom_id, label, imagelabel, imagebg,
                 key_event, key_value, fRedraw, windows->get_update_pending());
         }
     }
@@ -576,14 +576,14 @@ CSCLUIImpl::reset_popup_timeout()
             sclbyte index = 0;
             sclboolean timerset = FALSE;
             sclwindow window = SCLWINDOW_INVALID;
-            SclWindowContext *winctx = NULL;
+            SclWindowContext *window_context = NULL;
             do {
                 window = windows->get_nth_window_in_Z_order_list(index);
-                //winctx = windows->get_window_context(window, FALSE);
-                winctx = windows->get_window_context(window);
-                if (winctx) {
-                    if (winctx->timeout != 0) {
-                        events->create_timer(SCL_TIMER_POPUP_TIMEOUT, winctx->timeout, 0, TRUE);
+                //window_context = windows->get_window_context(window, FALSE);
+                window_context = windows->get_window_context(window);
+                if (window_context) {
+                    if (window_context->timeout != 0) {
+                        events->create_timer(SCL_TIMER_POPUP_TIMEOUT, window_context->timeout, 0, TRUE);
                         timerset = TRUE;
                     }
                     index++;
@@ -724,19 +724,19 @@ CSCLUIImpl::set_custom_starting_coordinates(sclint x, sclint y)
 SclRectangle
 CSCLUIImpl::get_main_window_rect()
 {
-    SclRectangle ret = {0};
+    SclRectangle ret = {0,0,0,0};
 
     if (m_initialized) {
         CSCLResourceCache *cache = CSCLResourceCache::get_instance();
         CSCLWindows *windows = CSCLWindows::get_instance();
         if (cache && windows) {
             //const SclLayout *layout  = cache->get_cur_layout(windows->get_base_window());
-            SclWindowContext *winctx = windows->get_window_context(windows->get_base_window());
-            if (winctx) {
-                ret.x = winctx->geometry.x;
-                ret.y = winctx->geometry.y;
-                ret.width = winctx->geometry.width;
-                ret.height = winctx->geometry.height;
+            SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+            if (window_context) {
+                ret.x = window_context->geometry.x;
+                ret.y = window_context->geometry.y;
+                ret.width = window_context->geometry.width;
+                ret.height = window_context->geometry.height;
             }
         }
     }
@@ -750,7 +750,7 @@ CSCLUIImpl::get_main_window_rect()
 SclSize
 CSCLUIImpl::get_input_mode_size(const sclchar *input_mode, SCLDisplayMode display_mode)
 {
-    SclSize ret = {0};
+    SclSize ret = {0,0};
 
     if (m_initialized) {
         CSCLUtils *utils = CSCLUtils::get_instance();
index eac79d8..8cfff68 100644 (file)
@@ -41,10 +41,10 @@ CSCLWindows::CSCLWindows()
 
     m_impl = NULL;
 
-    memset(&m_base_winctx, 0x00, sizeof(SclWindowContext));
-    memset(&m_magnifier_winctx, 0x00, sizeof(SclWindowContext));
-    memset(&m_dim_winctx, 0x00, sizeof(SclWindowContext));
-    memset(m_popup_winctx, 0x00, sizeof(SclWindowContext) * MAX_POPUP_WINDOW);
+    memset(&m_base_window_context, 0x00, sizeof(SclWindowContext));
+    memset(&m_magnifier_window_context, 0x00, sizeof(SclWindowContext));
+    memset(&m_dim_window_context, 0x00, sizeof(SclWindowContext));
+    memset(m_popup_window_context, 0x00, sizeof(SclWindowContext) * MAX_POPUP_WINDOW);
 
     m_pending_update = FALSE;
 
@@ -83,27 +83,27 @@ void CSCLWindows::fini()
     if (impl) {
         impl->fini();
 
-        if (SCLWINDOW_INVALID != m_base_winctx.window) {
-            impl->destroy_window(m_base_winctx.window);
-            m_base_winctx.window = SCLWINDOW_INVALID;
+        if (SCLWINDOW_INVALID != m_base_window_context.window) {
+            impl->destroy_window(m_base_window_context.window);
+            m_base_window_context.window = SCLWINDOW_INVALID;
         }
 
-        if (SCLWINDOW_INVALID != m_magnifier_winctx.window) {
-            impl->destroy_window(m_magnifier_winctx.window);
-            m_magnifier_winctx.window = SCLWINDOW_INVALID;
+        if (SCLWINDOW_INVALID != m_magnifier_window_context.window) {
+            impl->destroy_window(m_magnifier_window_context.window);
+            m_magnifier_window_context.window = SCLWINDOW_INVALID;
         }
 
-        if (SCLWINDOW_INVALID != m_dim_winctx.window) {
-            impl->destroy_window(m_dim_winctx.window);
-            m_dim_winctx.window = SCLWINDOW_INVALID;
+        if (SCLWINDOW_INVALID != m_dim_window_context.window) {
+            impl->destroy_window(m_dim_window_context.window);
+            m_dim_window_context.window = SCLWINDOW_INVALID;
         }
 
         for (int loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window != SCLWINDOW_INVALID) {
-                if (!m_popup_winctx[loop].is_virtual) {
-                    impl->destroy_window(m_popup_winctx[loop].window);
+            if (m_popup_window_context[loop].window != SCLWINDOW_INVALID) {
+                if (!m_popup_window_context[loop].is_virtual) {
+                    impl->destroy_window(m_popup_window_context[loop].window);
                 }
-                m_popup_winctx[loop].window = SCLWINDOW_INVALID;
+                m_popup_window_context[loop].window = SCLWINDOW_INVALID;
             }
         }
     }
@@ -147,8 +147,8 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
 
     if (events && state && controller && cache && context && windows && utils) {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window != SCLWINDOW_INVALID) {
-                if (m_popup_winctx[loop].layout == layout) return SCLWINDOW_INVALID;
+            if (m_popup_window_context[loop].window != SCLWINDOW_INVALID) {
+                if (m_popup_window_context[loop].layout == layout) return SCLWINDOW_INVALID;
             }
         }
 
@@ -164,27 +164,27 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
         events->connect_window_events(window, SCL_EVENT_MOUSE | SCL_EVENT_EXPOSE);
         controller->handle_engine_signal(SCL_SIG_POPUP_SHOW, window);
 
-        /* Shows the dim window if it uses the dimwindow */
+        /* Shows the dim window if it uses the dim_window */
         if (use_dim_window) {
-            sclwindow dimWindow = get_dim_window();
+            sclwindow dim_window = get_dim_window();
 
             /* Currently, get_window_rect does not work normally (need to check X). So I have commented it*/
             SclRectangle rect;
             get_window_rect(get_base_window(), &rect);
-            resize_window(dimWindow, rect.width, rect.height);
-            move_window(dimWindow, rect.x, rect.y);
-            events->connect_window_events(dimWindow, SCL_EVENT_MOUSE);
+            resize_window(dim_window, rect.width, rect.height);
+            move_window(dim_window, rect.x, rect.y);
+            events->connect_window_events(dim_window, SCL_EVENT_MOUSE);
             /*If we use transient_for them the ISE will occure some crash. It needs to check X11*/
-            set_parent(opener.window, dimWindow);
-            SclWindowContext *dimctx = get_window_context(get_dim_window());
-            if (dimctx) {
-                if (dimctx->is_virtual) {
+            set_parent(opener.window, dim_window);
+            SclWindowContext *dim_window_context = get_window_context(get_dim_window());
+            if (dim_window_context) {
+                if (dim_window_context->is_virtual) {
                     set_parent(opener.window, window);
                 } else {
-                    set_parent(dimWindow, window);
+                    set_parent(dim_window, window);
                 }
             }
-            show_window(dimWindow);
+            show_window(dim_window);
         } else {
             /*If we use transient_for them the ISE will occure some crash. It needs to check X11*/
             set_parent(opener.window, window);
@@ -195,22 +195,24 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
 
         state->set_cur_action_state(ACTION_STATE_POPUP_INIT);
 
-        const SclLayout *layout = cache->get_cur_layout(window);
-        if (layout) {
+        const SclLayout *cur_layout = cache->get_cur_layout(window);
+        if (cur_layout) {
             /* If the newly opened popup window has POPUP_GRAB style, lets press the nearest button on the new window */
-            if (layout->style == LAYOUT_STYLE_POPUP_GRAB) {
+            if (cur_layout->style == LAYOUT_STYLE_POPUP_GRAB) {
                 sclwindow pressed_window = context->get_cur_pressed_window(context->get_last_touch_device_id());
                 sclbyte pressed_key = context->get_cur_pressed_key(context->get_last_touch_device_id());
 
                 const SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(pressed_window, pressed_key);
 
-                sclwindow move_window = context->get_cur_move_window(context->get_last_touch_device_id());
-                SclPoint move_point = context->get_cur_move_point(context->get_last_touch_device_id());
-                SclWindowContext *move_ctx = windows->get_window_context(move_window);
-                SclWindowContext *popup_ctx = windows->get_window_context(window);
-                if (move_ctx && popup_ctx) {
-                    move_point.x = (move_ctx->geometry.x - popup_ctx->geometry.x) + move_point.x;
-                    move_point.y = (move_ctx->geometry.y - popup_ctx->geometry.y) + move_point.y;
+                sclwindow moving_window = context->get_cur_moving_window(context->get_last_touch_device_id());
+                SclPoint moving_point = context->get_cur_moving_point(context->get_last_touch_device_id());
+                SclWindowContext *moving_window_context = windows->get_window_context(moving_window);
+                SclWindowContext *popup_window_context = windows->get_window_context(window);
+                if (moving_window_context && popup_window_context) {
+                    moving_point.x =
+                        (moving_window_context->geometry.x - popup_window_context->geometry.x) + moving_point.x;
+                    moving_point.y =
+                        (moving_window_context->geometry.y - popup_window_context->geometry.y) + moving_point.y;
                 }
 
                 /* Find the nearest button on the autopopup window */
@@ -218,17 +220,19 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
                 sclfloat min_dist = (float)((sclu32)(-1));
                 sclint min_dist_index = NOT_USED;
                 for (sclint loop = 0;loop < MAX_KEY && !ended;loop++) {
-                    SclButtonContext *popup_btncontext = cache->get_cur_button_context(window, loop);
+                    SclButtonContext *popup_button_context = cache->get_cur_button_context(window, loop);
                     const SclLayoutKeyCoordinate *popup_coordinate = cache->get_cur_layout_key_coordinate(window, loop);
-                    if (popup_btncontext && popup_coordinate) {
-                        if (!(popup_btncontext->used)) {
+                    if (popup_button_context && popup_coordinate) {
+                        if (!(popup_button_context->used)) {
                             ended = TRUE;
-                        } else if (popup_btncontext->state != BUTTON_STATE_DISABLED &&
+                        } else if (popup_button_context->state != BUTTON_STATE_DISABLED &&
                             popup_coordinate->button_type != BUTTON_TYPE_UIITEM) {
                                 if (popup_coordinate) {
-                                    float dist = utils->get_approximate_distance(move_point.x, move_point.y,
-                                        popup_coordinate->x + (popup_coordinate->width / 2) - layout->mouse_manipulate_x,
-                                        popup_coordinate->y + (popup_coordinate->height / 2) - layout->mouse_manipulate_y);
+                                    float dist = utils->get_approximate_distance(moving_point.x, moving_point.y,
+                                        popup_coordinate->x + (popup_coordinate->width / 2) -
+                                        cur_layout->mouse_manipulate_x,
+                                        popup_coordinate->y + (popup_coordinate->height / 2) -
+                                        cur_layout->mouse_manipulate_y);
                                     if (dist < min_dist) {
                                         min_dist_index = loop;
                                         min_dist = dist;
@@ -242,8 +246,10 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
                     const SclLayoutKeyCoordinate *popup_coordinate =
                         cache->get_cur_layout_key_coordinate(window, min_dist_index);
                     if (popup_coordinate) {
-                        sclint x = popup_coordinate->x + (popup_coordinate->width / 2) - layout->mouse_manipulate_x;
-                        sclint y = popup_coordinate->y + (popup_coordinate->height / 2) - layout->mouse_manipulate_y;
+                        sclint x = popup_coordinate->x + (popup_coordinate->width / 2) -
+                            cur_layout->mouse_manipulate_x;
+                        sclint y = popup_coordinate->y + (popup_coordinate->height / 2) -
+                            cur_layout->mouse_manipulate_y;
                         controller->mouse_press(window, x, y, context->get_last_touch_device_id());
                     }
                 }
@@ -251,8 +257,8 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
                 /* The below code block seems unnecessary since we already invoked mouse_press() */
                 /*context->set_cur_pressed_window(context->get_last_touch_device_id(), window);
                 context->set_cur_pressed_key(context->get_last_touch_device_id(), min_dist_index);
-                if (btncontext) {
-                    btncontext->state = BUTTON_STATE_NORMAL;
+                if (button_context) {
+                    button_context->state = BUTTON_STATE_NORMAL;
                 }*/
 
                 windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
@@ -306,23 +312,24 @@ CSCLWindows::create_base_window(const sclwindow parent, scl16 width, scl16 heigh
     SCL_DEBUG();
 
     if (m_initialized) {
-        m_base_winctx.hidden = TRUE;
-        m_base_winctx.geometry.width = width;
-        m_base_winctx.geometry.height = height;
-        m_base_winctx.is_virtual = FALSE;
-        m_base_winctx.popup_type = POPUP_TYPE_NONE;
-        m_base_winctx.opener.window = parent;
-        m_base_winctx.geometry.x = m_base_winctx.geometry.y = 0;
-        m_base_winctx.etc_info = NULL;
-        m_base_winctx.window = get_scl_windows_impl()->create_base_window(parent, &m_base_winctx, width, height);
-
-        push_window_in_Z_order_list(m_base_winctx.window);
+        m_base_window_context.hidden = TRUE;
+        m_base_window_context.geometry.width = width;
+        m_base_window_context.geometry.height = height;
+        m_base_window_context.is_virtual = FALSE;
+        m_base_window_context.popup_type = POPUP_TYPE_NONE;
+        m_base_window_context.opener.window = parent;
+        m_base_window_context.geometry.x = m_base_window_context.geometry.y = 0;
+        m_base_window_context.etc_info = NULL;
+        m_base_window_context.window =
+            get_scl_windows_impl()->create_base_window(parent, &m_base_window_context, width, height);
+
+        push_window_in_Z_order_list(m_base_window_context.window);
     }
 
     // Update the position information
     //get_window_context(parent, TRUE);
 
-    return m_base_winctx.window;
+    return m_base_window_context.window;
 }
 
 /**
@@ -347,32 +354,33 @@ CSCLWindows::create_window(const SclWindowOpener opener, const SclRectangle &geo
 
     if (impl) {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == SCLWINDOW_INVALID) {
-                m_popup_winctx[loop].hidden = TRUE;
-                m_popup_winctx[loop].opener = opener;
-                m_popup_winctx[loop].etc_info = NULL;
-                m_popup_winctx[loop].inputmode = inputmode;
-                m_popup_winctx[loop].layout = layout;
-                m_popup_winctx[loop].popup_type = popup_type;
-                m_popup_winctx[loop].is_virtual = is_virtual;
+            if (m_popup_window_context[loop].window == SCLWINDOW_INVALID) {
+                m_popup_window_context[loop].hidden = TRUE;
+                m_popup_window_context[loop].opener = opener;
+                m_popup_window_context[loop].etc_info = NULL;
+                m_popup_window_context[loop].inputmode = inputmode;
+                m_popup_window_context[loop].layout = layout;
+                m_popup_window_context[loop].popup_type = popup_type;
+                m_popup_window_context[loop].is_virtual = is_virtual;
 
-                m_popup_winctx[loop].geometry = geometry;
+                m_popup_window_context[loop].geometry = geometry;
 
-                m_popup_winctx[loop].layout_image_offset.x = img_offset_x;
-                m_popup_winctx[loop].layout_image_offset.y = img_offset_y;
+                m_popup_window_context[loop].layout_image_offset.x = img_offset_x;
+                m_popup_window_context[loop].layout_image_offset.y = img_offset_y;
 
-                m_popup_winctx[loop].timeout = timeout;
+                m_popup_window_context[loop].timeout = timeout;
 
                 if (!is_virtual) {
-                    window = impl->create_window(opener.window, &(m_popup_winctx[loop]), geometry.width, geometry.height);
+                    window = impl->create_window(opener.window,
+                        &(m_popup_window_context[loop]), geometry.width, geometry.height);
                 } else {
                     window = reinterpret_cast<sclwindow>(loop + 1);
                 }
                 if (window) {
-                    m_popup_winctx[loop].window = window;
+                    m_popup_window_context[loop].window = window;
                 }
                 //set_window_rotation(window, context->get_rotation_degree());
-                if (!m_popup_winctx[loop].is_virtual) {
+                if (!m_popup_window_context[loop].is_virtual) {
                     impl->move_window(window, geometry.x, geometry.y);
                 }
                 break;
@@ -398,17 +406,17 @@ CSCLWindows::create_magnifier_window(const sclwindow parent, scl16 x, scl16 y, s
     sclwindow window = SCLWINDOW_INVALID;
 
     if (impl && m_initialized) {
-        if (m_magnifier_winctx.window == SCLWINDOW_INVALID) {
-            window = impl->create_magnifier_window(parent, &m_magnifier_winctx, width, height);
+        if (m_magnifier_window_context.window == SCLWINDOW_INVALID) {
+            window = impl->create_magnifier_window(parent, &m_magnifier_window_context, width, height);
             impl->set_keep_above(window, TRUE);
             if (window) {
-                m_magnifier_winctx.window = window;
-                m_magnifier_winctx.geometry.width = width;
-                m_magnifier_winctx.geometry.height = height;
-                m_magnifier_winctx.hidden = TRUE;
+                m_magnifier_window_context.window = window;
+                m_magnifier_window_context.geometry.width = width;
+                m_magnifier_window_context.geometry.height = height;
+                m_magnifier_window_context.hidden = TRUE;
             }
         } else {
-            window = m_magnifier_winctx.window;
+            window = m_magnifier_window_context.window;
         }
         set_parent(parent, window);
 
@@ -429,11 +437,11 @@ sclwindow
 CSCLWindows::get_magnifier_window()
 {
     SCL_DEBUG();
-    return m_magnifier_winctx.window;
+    return m_magnifier_window_context.window;
 }
 
 sclwindow
-CSCLWindows::create_dim_window(const sclwindow parent, SclWindowContext *winctx, scl16 width, scl16 height)
+CSCLWindows::create_dim_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height)
 {
     SCL_DEBUG();
 
@@ -447,19 +455,19 @@ CSCLWindows::create_dim_window(const sclwindow parent, SclWindowContext *winctx,
     }
 
     if (impl && m_initialized && default_configure) {
-        if (m_dim_winctx.window == NULL) {
-            m_dim_winctx.hidden = TRUE;
+        if (m_dim_window_context.window == NULL) {
+            m_dim_window_context.hidden = TRUE;
             if (default_configure->use_actual_dim_window) {
-                window = impl->create_dim_window(parent, &m_dim_winctx, width, height);
+                window = impl->create_dim_window(parent, &m_dim_window_context, width, height);
             } else {
                 window = reinterpret_cast<sclwindow>(SCLWINDOW_VIRTUAL_DIM);
-                m_dim_winctx.is_virtual = TRUE;
+                m_dim_window_context.is_virtual = TRUE;
             }
             if (window) {
-                m_dim_winctx.window = window;
+                m_dim_window_context.window = window;
             }
         } else {
-            window = m_dim_winctx.window;
+            window = m_dim_window_context.window;
         }
 
         if (window == NULL) {
@@ -474,7 +482,7 @@ sclwindow
 CSCLWindows::get_dim_window()
 {
     SCL_DEBUG();
-    return m_dim_winctx.window;
+    return m_dim_window_context.window;
 }
 
 bool
@@ -486,28 +494,28 @@ CSCLWindows::destroy_window(sclwindow window)
     sclboolean ret = FALSE;
 
     if (impl) {
-        if (window == m_base_winctx.window) {
+        if (window == m_base_window_context.window) {
             impl->destroy_window(window);
-            memset(&m_base_winctx, 0x00, sizeof(SclWindowContext));
-            m_base_winctx.window = SCLWINDOW_INVALID;
+            memset(&m_base_window_context, 0x00, sizeof(SclWindowContext));
+            m_base_window_context.window = SCLWINDOW_INVALID;
             ret = TRUE;
-        } else if (window == m_magnifier_winctx.window) {
+        } else if (window == m_magnifier_window_context.window) {
             impl->destroy_window(window);
-            memset(&m_magnifier_winctx, 0x00, sizeof(SclWindowContext));
-            m_magnifier_winctx.window = SCLWINDOW_INVALID;
+            memset(&m_magnifier_window_context, 0x00, sizeof(SclWindowContext));
+            m_magnifier_window_context.window = SCLWINDOW_INVALID;
             ret = TRUE;
-        } else if (window == m_dim_winctx.window) {
+        } else if (window == m_dim_window_context.window) {
             impl->destroy_window(window);
-            memset(&m_dim_winctx, 0x00, sizeof(SclWindowContext));
-            m_dim_winctx.window = SCLWINDOW_INVALID;
+            memset(&m_dim_window_context, 0x00, sizeof(SclWindowContext));
+            m_dim_window_context.window = SCLWINDOW_INVALID;
             ret = TRUE;
         } else {
             for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-                if (m_popup_winctx[loop].window == window) {
+                if (m_popup_window_context[loop].window == window) {
                     impl->destroy_window(window);
-                    memset(&m_popup_winctx[loop], 0x00, sizeof(SclWindowContext));
+                    memset(&m_popup_window_context[loop], 0x00, sizeof(SclWindowContext));
                     ret = TRUE;
-                    m_popup_winctx[loop].window = SCLWINDOW_INVALID;
+                    m_popup_window_context[loop].window = SCLWINDOW_INVALID;
                     break;
                 }
             }
@@ -522,7 +530,7 @@ CSCLWindows::get_base_window()
 {
     SCL_DEBUG();
 
-    return m_base_winctx.window;
+    return m_base_window_context.window;
 }
 
 sclboolean
@@ -533,7 +541,7 @@ CSCLWindows::is_base_window(sclwindow window)
     sclboolean ret = FALSE;
 
     if (window != SCLWINDOW_INVALID) {
-        if (window == m_base_winctx.window) {
+        if (window == m_base_window_context.window) {
             ret = TRUE;
         }
     }
@@ -548,16 +556,16 @@ CSCLWindows::find_by_etcinfo( void* etc_info )
 
     sclwindow ret = SCLWINDOW_INVALID;
 
-    if (etc_info == m_base_winctx.etc_info) {
-        ret = m_base_winctx.window;
-    } else if (etc_info == m_magnifier_winctx.etc_info) {
-        ret = m_magnifier_winctx.window;
-    } else if (etc_info == m_dim_winctx.etc_info) {
-        ret = m_dim_winctx.window;
+    if (etc_info == m_base_window_context.etc_info) {
+        ret = m_base_window_context.window;
+    } else if (etc_info == m_magnifier_window_context.etc_info) {
+        ret = m_magnifier_window_context.window;
+    } else if (etc_info == m_dim_window_context.etc_info) {
+        ret = m_dim_window_context.window;
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (etc_info == m_popup_winctx[loop].etc_info) {
-                ret = m_popup_winctx[loop].window;
+            if (etc_info == m_popup_window_context[loop].etc_info) {
+                ret = m_popup_window_context[loop].window;
                 break;
             }
         }
@@ -574,28 +582,28 @@ CSCLWindows::get_window_context(sclwindow window)
 
     SclWindowContext* ret = NULL;
 
-    if (window == m_base_winctx.window) {
+    if (window == m_base_window_context.window) {
         /*if (geometry_update) {
             SclRectangle rect;
             get_window_rect(window, &rect);
-            m_base_winctx.geometry.x = rect.x;
-            m_base_winctx.geometry.y = rect.y;
+            m_base_window_context.geometry.x = rect.x;
+            m_base_window_context.geometry.y = rect.y;
         }*/
-        ret = &m_base_winctx;
-    } else if (window == m_magnifier_winctx.window) {
-        ret = &m_magnifier_winctx;
-    } else if (window == m_dim_winctx.window) {
-        ret = &m_dim_winctx;
+        ret = &m_base_window_context;
+    } else if (window == m_magnifier_window_context.window) {
+        ret = &m_magnifier_window_context;
+    } else if (window == m_dim_window_context.window) {
+        ret = &m_dim_window_context;
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == window) {
+            if (m_popup_window_context[loop].window == window) {
                 /*if (geometry_update) {
                     SclRectangle rect;
                     get_window_rect(window, &rect);
-                    m_popup_winctx[loop].geometry.x = rect.x;
-                    m_popup_winctx[loop].geometry.y = rect.y;
+                    m_popup_window_context[loop].geometry.x = rect.x;
+                    m_popup_window_context[loop].geometry.y = rect.y;
                 }*/
-                ret = &m_popup_winctx[loop];
+                ret = &m_popup_window_context[loop];
                 break;
             }
         }
@@ -609,12 +617,12 @@ CSCLWindows::set_window_context(sclwindow window, SclWindowContext* context)
 {
     SCL_DEBUG();
 
-    if (window == m_base_winctx.window) {
-        memcpy(&m_base_winctx,context, sizeof(SclWindowContext));
+    if (window == m_base_window_context.window) {
+        memcpy(&m_base_window_context,context, sizeof(SclWindowContext));
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == window) {
-                memcpy(&m_popup_winctx[loop], context, sizeof(SclWindowContext));
+            if (m_popup_window_context[loop].window == window) {
+                memcpy(&m_popup_window_context[loop], context, sizeof(SclWindowContext));
                 break;
             }
         }
@@ -629,7 +637,7 @@ CSCLWindows::find_popup_window_index(sclwindow window)
     scl8 ret = NOT_USED;
 
     for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-        if (m_popup_winctx[loop].window == window) {
+        if (m_popup_window_context[loop].window == window) {
             ret = loop;
             break;
         }
@@ -644,24 +652,24 @@ CSCLWindows::move_window(const sclwindow window, scl16 x, scl16 y)
     SCL_DEBUG();
 
     sclboolean is_virtual = FALSE;
-    if (window == m_base_winctx.window) {
-        m_base_winctx.geometry.x = x;
-        m_base_winctx.geometry.y = y;
-        is_virtual = m_base_winctx.is_virtual;
-    } else if (window == m_magnifier_winctx.window) {
-        m_magnifier_winctx.geometry.x = x;
-        m_magnifier_winctx.geometry.y = y;
-        is_virtual = m_magnifier_winctx.is_virtual;
-    } else if (window == m_dim_winctx.window) {
-        m_dim_winctx.geometry.x = x;
-        m_dim_winctx.geometry.y = y;
-        is_virtual = m_dim_winctx.is_virtual;
+    if (window == m_base_window_context.window) {
+        m_base_window_context.geometry.x = x;
+        m_base_window_context.geometry.y = y;
+        is_virtual = m_base_window_context.is_virtual;
+    } else if (window == m_magnifier_window_context.window) {
+        m_magnifier_window_context.geometry.x = x;
+        m_magnifier_window_context.geometry.y = y;
+        is_virtual = m_magnifier_window_context.is_virtual;
+    } else if (window == m_dim_window_context.window) {
+        m_dim_window_context.geometry.x = x;
+        m_dim_window_context.geometry.y = y;
+        is_virtual = m_dim_window_context.is_virtual;
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == window) {
-                m_popup_winctx[loop].geometry.x = x;
-                m_popup_winctx[loop].geometry.y = y;
-                is_virtual = m_popup_winctx[loop].is_virtual;
+            if (m_popup_window_context[loop].window == window) {
+                m_popup_window_context[loop].geometry.x = x;
+                m_popup_window_context[loop].geometry.y = y;
+                is_virtual = m_popup_window_context[loop].is_virtual;
                 break;
             }
         }
@@ -680,24 +688,24 @@ CSCLWindows::resize_window(const sclwindow window, scl16 width, scl16 height)
     SCL_DEBUG();
 
     sclboolean is_virtual = FALSE;
-    if (window == m_base_winctx.window) {
-        m_base_winctx.geometry.width = width;
-        m_base_winctx.geometry.height = height;
-        is_virtual = m_base_winctx.is_virtual;
-    } else if (window == m_magnifier_winctx.window) {
-        m_magnifier_winctx.geometry.width = width;
-        m_magnifier_winctx.geometry.height = height;
-        is_virtual = m_magnifier_winctx.is_virtual;
-    } else if (window == m_dim_winctx.window) {
-        m_dim_winctx.geometry.width = width;
-        m_dim_winctx.geometry.height = height;
-        is_virtual = m_dim_winctx.is_virtual;
+    if (window == m_base_window_context.window) {
+        m_base_window_context.geometry.width = width;
+        m_base_window_context.geometry.height = height;
+        is_virtual = m_base_window_context.is_virtual;
+    } else if (window == m_magnifier_window_context.window) {
+        m_magnifier_window_context.geometry.width = width;
+        m_magnifier_window_context.geometry.height = height;
+        is_virtual = m_magnifier_window_context.is_virtual;
+    } else if (window == m_dim_window_context.window) {
+        m_dim_window_context.geometry.width = width;
+        m_dim_window_context.geometry.height = height;
+        is_virtual = m_dim_window_context.is_virtual;
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == window) {
-                m_popup_winctx[loop].geometry.width = width;
-                m_popup_winctx[loop].geometry.height = height;
-                is_virtual = m_popup_winctx[loop].is_virtual;
+            if (m_popup_window_context[loop].window == window) {
+                m_popup_window_context[loop].geometry.width = width;
+                m_popup_window_context[loop].geometry.height = height;
+                is_virtual = m_popup_window_context[loop].is_virtual;
                 break;
             }
         }
@@ -716,32 +724,32 @@ CSCLWindows::move_resize_window(const sclwindow window, scl16 x, scl16 y, scl16
     SCL_DEBUG();
 
     sclboolean is_virtual = FALSE;
-    if (window == m_base_winctx.window) {
-        m_base_winctx.geometry.x = x;
-        m_base_winctx.geometry.y = y;
-        m_base_winctx.geometry.width = width;
-        m_base_winctx.geometry.height = height;
-        is_virtual = m_base_winctx.is_virtual;
-    } else if (window == m_magnifier_winctx.window) {
-        m_magnifier_winctx.geometry.x = x;
-        m_magnifier_winctx.geometry.y = y;
-        m_magnifier_winctx.geometry.width = width;
-        m_magnifier_winctx.geometry.height = height;
-        is_virtual = m_magnifier_winctx.is_virtual;
-    } else if (window == m_dim_winctx.window) {
-        m_dim_winctx.geometry.x = x;
-        m_dim_winctx.geometry.y = y;
-        m_dim_winctx.geometry.width = width;
-        m_dim_winctx.geometry.height = height;
-        is_virtual = m_dim_winctx.is_virtual;
+    if (window == m_base_window_context.window) {
+        m_base_window_context.geometry.x = x;
+        m_base_window_context.geometry.y = y;
+        m_base_window_context.geometry.width = width;
+        m_base_window_context.geometry.height = height;
+        is_virtual = m_base_window_context.is_virtual;
+    } else if (window == m_magnifier_window_context.window) {
+        m_magnifier_window_context.geometry.x = x;
+        m_magnifier_window_context.geometry.y = y;
+        m_magnifier_window_context.geometry.width = width;
+        m_magnifier_window_context.geometry.height = height;
+        is_virtual = m_magnifier_window_context.is_virtual;
+    } else if (window == m_dim_window_context.window) {
+        m_dim_window_context.geometry.x = x;
+        m_dim_window_context.geometry.y = y;
+        m_dim_window_context.geometry.width = width;
+        m_dim_window_context.geometry.height = height;
+        is_virtual = m_dim_window_context.is_virtual;
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == window) {
-                m_popup_winctx[loop].geometry.x = x;
-                m_popup_winctx[loop].geometry.y = y;
-                m_popup_winctx[loop].geometry.width = width;
-                m_popup_winctx[loop].geometry.height = height;
-                is_virtual = m_popup_winctx[loop].is_virtual;
+            if (m_popup_window_context[loop].window == window) {
+                m_popup_window_context[loop].geometry.x = x;
+                m_popup_window_context[loop].geometry.y = y;
+                m_popup_window_context[loop].geometry.width = width;
+                m_popup_window_context[loop].geometry.height = height;
+                is_virtual = m_popup_window_context[loop].is_virtual;
                 break;
             }
         }
@@ -814,7 +822,7 @@ sclwindow CSCLWindows::get_nth_popup_window( sclbyte index )
     scl_assert_return_null(index >= 0 && index < MAX_POPUP_WINDOW);
 
     if (index < MAX_POPUP_WINDOW) {
-        return m_popup_winctx[index].window;
+        return m_popup_window_context[index].window;
     }
 
     return SCLWINDOW_INVALID;
@@ -836,10 +844,10 @@ sclbyte CSCLWindows::get_Z_order(sclwindow window)
 void CSCLWindows::set_parent( const sclwindow parent, const sclwindow window )
 {
     /* Do not set parent if the window is a virtual window */
-    //SclWindowContext *winctx = get_window_context(window, FALSE);
-    SclWindowContext *winctx = get_window_context(window);
-    if (winctx) {
-        if (!(winctx->is_virtual)) {
+    //SclWindowContext *window_context = get_window_context(window, FALSE);
+    SclWindowContext *window_context = get_window_context(window);
+    if (window_context) {
+        if (!(window_context->is_virtual)) {
             CSCLWindowsImpl* impl = get_scl_windows_impl();
             if (impl) {
                 impl->set_parent(parent, window);
@@ -856,17 +864,9 @@ void CSCLWindows::set_window_rotation(const sclwindow window, SCLRotation rotati
 
     if (impl) {
         if (window == NULL) {
-            impl->set_window_rotation(m_base_winctx.window, rotation);
-            if (SCLWINDOW_INVALID != m_magnifier_winctx.window) {
+            impl->set_window_rotation(m_base_window_context.window, rotation);
+            if (SCLWINDOW_INVALID != m_magnifier_window_context.window) {
                 CSCLUtils *utils = CSCLUtils::get_instance();
-                sclfloat scale_rate_x, scale_rate_y;
-                if (rotation == ROTATION_90_CW || rotation == ROTATION_90_CCW) {
-                    scale_rate_x = utils->get_scale_rate_y();
-                    scale_rate_y = utils->get_scale_rate_x();
-                } else {
-                    scale_rate_x = utils->get_scale_rate_x();
-                    scale_rate_y = utils->get_scale_rate_y();
-                }
 
                 SclResParserManager *sclres_manager = SclResParserManager::get_instance();
                 PSclMagnifierWndConfigure magnifier_configure = NULL;
@@ -874,27 +874,27 @@ void CSCLWindows::set_window_rotation(const sclwindow window, SCLRotation rotati
                     magnifier_configure = sclres_manager->get_magnifier_configure();
                 }
                 if (magnifier_configure) {
-                    m_magnifier_winctx.geometry.width =
+                    m_magnifier_window_context.geometry.width =
                         magnifier_configure->width * utils->get_custom_scale_rate_x();
-                    m_magnifier_winctx.geometry.height =
+                    m_magnifier_window_context.geometry.height =
                         magnifier_configure->height * utils->get_custom_scale_rate_y();
 
-                    impl->set_window_rotation(m_magnifier_winctx.window, rotation);
+                    impl->set_window_rotation(m_magnifier_window_context.window, rotation);
                 }
             }
 
-            if (SCLWINDOW_INVALID != m_dim_winctx.window) {
+            if (SCLWINDOW_INVALID != m_dim_window_context.window) {
                 /* For indivisual window rotation */
-                impl->set_window_rotation(m_dim_winctx.window, rotation);
-                //resize_window(m_dim_winctx.window, m_base_winctx.width, m_base_winctx.height);
-                //move_window(m_dim_winctx.window, m_base_winctx.x, m_base_winctx.y);
-                hide_window(m_dim_winctx.window);
+                impl->set_window_rotation(m_dim_window_context.window, rotation);
+                //resize_window(m_dim_window_context.window, m_base_window_context.width, m_base_winctx.height);
+                //move_window(m_dim_window_context.window, m_base_window_context.x, m_base_winctx.y);
+                hide_window(m_dim_window_context.window);
             }
             /* For indivisual window rotation
             for (int loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-                if (m_popup_winctx[loop].window != SCLWINDOW_INVALID) {
-                    if (!m_popup_winctx[loop].isVirtual) {
-                        get_scl_windows_impl()->set_window_rotation(m_popup_winctx[loop].window, degree);
+                if (m_popup_window_context[loop].window != SCLWINDOW_INVALID) {
+                    if (!m_popup_window_context[loop].isVirtual) {
+                        get_scl_windows_impl()->set_window_rotation(m_popup_window_context[loop].window, degree);
                     }
                 }
             }
@@ -907,9 +907,9 @@ void CSCLWindows::set_window_rotation(const sclwindow window, SCLRotation rotati
 
     // Update the position information
     //get_window_context(window, TRUE);
-    SclWindowContext *winctx = get_window_context(window);
-    if (winctx) {
-        get_window_rect(window, &(winctx->geometry));
+    SclWindowContext *window_context = get_window_context(window);
+    if (window_context) {
+        get_window_rect(window, &(window_context->geometry));
     }
 }
 
@@ -919,16 +919,16 @@ CSCLWindows::show_window(const sclwindow window, sclboolean queue /*= FALSE*/)
 {
     SCL_DEBUG();
 
-    if (window == m_base_winctx.window) {
-        m_base_winctx.hidden = FALSE;
-    } else if (window == m_magnifier_winctx.window) {
-        m_magnifier_winctx.hidden = FALSE;
-    } else if (window == m_dim_winctx.window) {
-        m_dim_winctx.hidden = FALSE;
+    if (window == m_base_window_context.window) {
+        m_base_window_context.hidden = FALSE;
+    } else if (window == m_magnifier_window_context.window) {
+        m_magnifier_window_context.hidden = FALSE;
+    } else if (window == m_dim_window_context.window) {
+        m_dim_window_context.hidden = FALSE;
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == window) {
-                m_popup_winctx[loop].hidden = FALSE;
+            if (m_popup_window_context[loop].window == window) {
+                m_popup_window_context[loop].hidden = FALSE;
                 break;
             }
         }
@@ -945,16 +945,16 @@ CSCLWindows::hide_window(const sclwindow window, sclboolean force /*= FALSE*/)
 {
     SCL_DEBUG();
 
-    if (window == m_base_winctx.window) {
-        m_base_winctx.hidden = TRUE;
-    } else if (window == m_magnifier_winctx.window) {
-        m_magnifier_winctx.hidden = TRUE;
-    } else if (window == m_dim_winctx.window) {
-        m_dim_winctx.hidden = TRUE;
+    if (window == m_base_window_context.window) {
+        m_base_window_context.hidden = TRUE;
+    } else if (window == m_magnifier_window_context.window) {
+        m_magnifier_window_context.hidden = TRUE;
+    } else if (window == m_dim_window_context.window) {
+        m_dim_window_context.hidden = TRUE;
     } else {
         for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-            if (m_popup_winctx[loop].window == window) {
-                m_popup_winctx[loop].hidden = TRUE;
+            if (m_popup_window_context[loop].window == window) {
+                m_popup_window_context[loop].hidden = TRUE;
                 break;
             }
         }
@@ -980,7 +980,7 @@ CSCLWindows::set_update_pending(sclboolean pend)
 {
     m_pending_update = pend;
     if (!pend) {
-        update_window(m_base_winctx.window);
+        update_window(m_base_window_context.window);
     }
 }
 
@@ -1009,27 +1009,27 @@ CSCLWindows::get_window_rect(const sclwindow window, SclRectangle *rect) {
     sclboolean is_virtual = FALSE;
     sclboolean ret = FALSE;
     if (rect) {
-        if (window == m_base_winctx.window) {
-            is_virtual = m_base_winctx.is_virtual;
+        if (window == m_base_window_context.window) {
+            is_virtual = m_base_window_context.is_virtual;
             if (is_virtual) {
-                *rect = m_base_winctx.geometry;
+                *rect = m_base_window_context.geometry;
             }
-        } else if (window == m_magnifier_winctx.window) {
-            is_virtual = m_magnifier_winctx.is_virtual;
+        } else if (window == m_magnifier_window_context.window) {
+            is_virtual = m_magnifier_window_context.is_virtual;
             if (is_virtual) {
-                *rect = m_magnifier_winctx.geometry;
+                *rect = m_magnifier_window_context.geometry;
             }
-        } else if (window == m_dim_winctx.window) {
-            is_virtual = m_dim_winctx.is_virtual;
+        } else if (window == m_dim_window_context.window) {
+            is_virtual = m_dim_window_context.is_virtual;
             if (is_virtual) {
-                *rect = m_dim_winctx.geometry;
+                *rect = m_dim_window_context.geometry;
             }
         } else {
             for (sclint loop = 0;loop < MAX_POPUP_WINDOW;loop++) {
-                if (m_popup_winctx[loop].window == window) {
-                    is_virtual = m_popup_winctx[loop].is_virtual;
+                if (m_popup_window_context[loop].window == window) {
+                    is_virtual = m_popup_window_context[loop].is_virtual;
                     if (is_virtual) {
-                        *rect = m_popup_winctx[loop].geometry;
+                        *rect = m_popup_window_context[loop].geometry;
                     }
                     break;
                 }
index f230e70..5c17f50 100644 (file)
@@ -62,7 +62,7 @@ public: /* These are the functions need to be implemented by the descendants of
     virtual bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info) = 0;
 
     /* Function returning the name of current SclRes instance */
-    virtual const char* name() = 0;
+    virtual const char* get_name() = 0;
 
 private:
     std::string m_resource_directory;
index 1715115..aecfae9 100644 (file)
@@ -225,8 +225,8 @@ SclResParserManager::get_nine_patch_info(const char *filename, SclNinePatchInfo
 }
 
 const char*
-SclResParserManager::name() {
+SclResParserManager::get_name() {
     if (_current_parser == NULL) return NULL;
 
-    return _current_parser->name();
+    return _current_parser->get_name();
 }
index 777d063..b98a571 100644 (file)
@@ -51,7 +51,7 @@ class SclResParserManager{
         int get_modifier_decoration_id(const char *name);
         bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info);
 
-        const char* name();
+        const char* get_name();
         void destroy();
     private:
         SclResParserManager();
index 734db52..6065aaf 100644 (file)
 #include "sclstructs.h"
 #include "sclresource.h"
 
-#define MAX_SCL_INPUT_MODE 128
-#define MAX_SCL_LAYOUT 255
+#define MAX_SCL_INPUT_MODE 64
+#define MAX_SCL_LAYOUT 128
 #define MAX_SCL_LABEL_PROPERTIES 128
-#define MAX_SCL_MODIFIER_DECORATION_NUM 128
+#define MAX_SCL_MODIFIER_DECORATION_NUM 64
 
 typedef SclInputModeConfigure (*PSclInputModeConfigure);
 typedef SclLayout (*PSclLayout);
index f23d5af..c7ed81c 100644 (file)
@@ -90,7 +90,7 @@ encode_autopopup_configure_record(ResourceStorage& storage, const PSclAutoPopupC
 
 int
 encode_autopopup_configure_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-    int init_size = storage.size();
+    int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
     PSclAutoPopupConfigure autopopupConfigure = xmlresource->get_autopopup_configure();
@@ -107,10 +107,10 @@ encode_autopopup_configure_file(ResourceStorage& storage, IMetaData_Helper& md_h
 
     encode_autopopup_configure_record(storage, autopopupConfigure, record_width);
 
-    int size = storage.size() - init_size;
+    int size = storage.get_size() - init_size;
     storage.random_put<sint_t>(size, 8, init_size);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -119,7 +119,7 @@ encode_autopopup_configure_file(const char* file, IMetaData_Helper& md_helper) {
     ResourceStorage storage;
     encode_autopopup_configure_file(storage, md_helper);
     storage.toFile(file);
-    return storage.size();
+    return storage.get_size();
 }
 int
 encode_autopopup_configure_file(const char* file, int &offset, IMetaData_Helper& md_helper) {
@@ -128,5 +128,5 @@ encode_autopopup_configure_file(const char* file, int &offset, IMetaData_Helper&
     encode_autopopup_configure_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
index dc27f71..55c45da 100644 (file)
@@ -91,7 +91,7 @@ encode_default_configure_record(ResourceStorage& storage, const PSclDefaultConfi
 
 int
 encode_default_configure_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
-    int init_size = storage.size();
+    int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
     PSclDefaultConfigure defaultConfigure = xmlresource->get_default_configure();
@@ -106,9 +106,9 @@ encode_default_configure_file(ResourceStorage& storage, IMetaData_Helper& md_hel
     storage.reserve(8);
     encode_default_configure_record(storage, defaultConfigure, record_width);
 
-    int size = storage.size() - init_size;
+    int size = storage.get_size() - init_size;
     storage.random_put<sint_t>(size, 8, init_size);
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -119,7 +119,7 @@ encode_default_configure_file(const char* file, IMetaData_Helper& md_helper) {
     encode_default_configure_file(storage, md_helper);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -130,5 +130,5 @@ encode_default_configure_file(const char* file, int& offset, IMetaData_Helper& m
     encode_default_configure_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
index 66c3d79..d8a4bf7 100644 (file)
@@ -44,7 +44,7 @@ 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.size();
+    int init_size = storage.get_size();
     /*size 4bytes*/
     const int INPUT_MODE_CONFIGURE_SIZE_WIDTH = 4;
 
@@ -69,9 +69,9 @@ int encode_input_mode_configure_file(ResourceStorage& storage, IMetaData_Helper&
         cur++;
     }
 
-    int advance_size = storage.size() - init_size;
+    int advance_size = storage.get_size() - init_size;
     storage.random_put<sint_t>(advance_size, 8, init_size);
-    return storage.size();
+    return storage.get_size();
 }
 
 int encode_input_mode_configure_file(const char* file, int& offset, IMetaData_Helper& md_helper) {
@@ -81,7 +81,7 @@ int encode_input_mode_configure_file(const char* file, int& offset, IMetaData_He
     encode_input_mode_configure_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int encode_input_mode_configure_file(const char* file, IMetaData_Helper& md_helper) {
@@ -91,5 +91,5 @@ int encode_input_mode_configure_file(const char* file, IMetaData_Helper& md_help
     encode_input_mode_configure_file(storage, md_helper);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
index c13dbaf..49dde94 100644 (file)
@@ -237,7 +237,7 @@ encode_key_coordinate_frame_file(ResourceStorage& storage, IMetaData_Helper& md_
     // 2 byte (range[0-65536))
     const int KEY_COORDIANTE_REC_DATA_SIZE_BYTES = 2;
 
-    int init_size = storage.size();
+    int init_size = storage.get_size();
     // data size
     storage.reserve(DATA_SIZE_BYTES);
 
@@ -256,19 +256,19 @@ encode_key_coordinate_frame_file(ResourceStorage& storage, IMetaData_Helper& md_
     storage.reserve(KEY_COORDIANTE_REC_DATA_SIZE_BYTES);
 
     Key_coordinate_record_width record_width;
-    set_key_coordinate_record_width(md_helper, record_width);
+    set_key_coordinate_record_width(&md_helper, record_width);
 
 
     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) {
-            int pre_size = storage.size();
+            int pre_size = storage.get_size();
 
             SclLayoutKeyCoordinatePointer cur = _key_coordinate_pointer_frame[i][j];
             if (!cur) break;
             encode_key_coordinate_record(storage, cur, record_width);
 
-            int aft_size = storage.size();
+            int aft_size = storage.get_size();
             if (key_coordinate_rec_data_size == 0) {
                 key_coordinate_rec_data_size = aft_size - pre_size;
             }
@@ -278,7 +278,7 @@ encode_key_coordinate_frame_file(ResourceStorage& storage, IMetaData_Helper& md_
 
     delete[] pKey_num_array;
 
-    int advance_size = storage.size() - init_size;
+    int advance_size = storage.get_size() - init_size;
     storage.random_put<sint_t>(advance_size, DATA_SIZE_BYTES, init_size);
 
     // random put key_coordinate_rec_data_size
@@ -290,7 +290,7 @@ encode_key_coordinate_frame_file(ResourceStorage& storage, IMetaData_Helper& md_
                                 KEY_COORDIANTE_REC_DATA_SIZE_BYTES,
                                 key_coordinate_rec_data_offset);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -301,7 +301,7 @@ encode_key_coordinate_frame_file(const char* file, int& offset, IMetaData_Helper
     encode_key_coordinate_frame_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -312,5 +312,5 @@ encode_key_coordinate_frame_file(const char* file, IMetaData_Helper& md_helper)
     encode_key_coordinate_frame_file(storage, md_helper);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
index 81a0d07..7cd4472 100644 (file)
@@ -83,7 +83,7 @@ encode_label_properties_record(ResourceStorage& storage, const PSclLabelProperti
 int
 encode_label_properties_frame_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
 
-    int init_size = storage.size();
+    int init_size = storage.get_size();
 
     /*size 4bytes*/
     const int SIZE_WIDTH = 4;
@@ -112,10 +112,10 @@ encode_label_properties_frame_file(ResourceStorage& storage, IMetaData_Helper& m
         }
     }
 
-    int advance_size = storage.size() - init_size;
+    int advance_size = storage.get_size() - init_size;
     storage.random_put<sint_t>(advance_size, 8, init_size);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -127,7 +127,7 @@ encode_label_properties_frame_file(const char* file, int& offset, IMetaData_Help
     encode_label_properties_frame_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -139,5 +139,5 @@ encode_label_properties_frame_file(const char* file, IMetaData_Helper& md_helper
     encode_label_properties_frame_file(storage, md_helper);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
index e41397a..5f05bd5 100644 (file)
@@ -123,7 +123,7 @@ encode_layout_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
     // 2 byte (range[0-65536))
     const int LAYOUT_REC_DATA_SIZE_BYTES = 2;
 
-    const int init_size = storage.size();
+    const int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
     PSclLayout layoutTable = xmlresource->get_layout_table();
@@ -150,10 +150,10 @@ encode_layout_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
 
     int layout_rec_data_size = 0;
     for ( int i = 0; i < size; ++i) {
-        int pre_size = storage.size();
+        int pre_size = storage.get_size();
         encode_layout_record(storage, cur, record_width);
 
-        int aft_size = storage.size();
+        int aft_size = storage.get_size();
         if (layout_rec_data_size == 0) {
             layout_rec_data_size = aft_size - pre_size;
         }
@@ -163,7 +163,7 @@ encode_layout_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
     }
 
     // back write data size
-    int advance_size = storage.size() - init_size;
+    int advance_size = storage.get_size() - init_size;
 
     // random put advance_size
     int data_size_offset = init_size;
@@ -173,7 +173,7 @@ encode_layout_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
     int layout_rec_data_offset = init_size + DATA_SIZE_BYTES + REC_NUM_BYTES;
     storage.random_put<sint_t>(layout_rec_data_size, LAYOUT_REC_DATA_SIZE_BYTES, layout_rec_data_offset);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -185,7 +185,7 @@ encode_layout_file(const char* file, IMetaData_Helper& md_helper) {
 
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -197,5 +197,5 @@ encode_layout_file(const char* file, int& offset, IMetaData_Helper& md_helper) {
 
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
index defbf52..dbcef48 100644 (file)
@@ -64,7 +64,7 @@ encode_magnifier_configure_record(ResourceStorage& storage, const PSclMagnifierW
 int
 encode_magnifier_configure_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
 
-    int init_size = storage.size();
+    int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
     PSclMagnifierWndConfigure magnifierConfigure = xmlresource->get_magnifier_configure();
@@ -80,11 +80,11 @@ encode_magnifier_configure_file(ResourceStorage& storage, IMetaData_Helper& md_h
     storage.reserve(8);
     encode_magnifier_configure_record(storage, magnifierConfigure, record_width);
 
-    int advance_size = storage.size() - init_size;
+    int advance_size = storage.get_size() - init_size;
 
     storage.random_put<sint_t>(advance_size, 8, init_size);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -96,7 +96,7 @@ encode_magnifier_configure_file(const char* file, int& offset, IMetaData_Helper&
     encode_magnifier_configure_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -108,5 +108,5 @@ encode_magnifier_configure_file(const char* file, IMetaData_Helper& md_helper) {
     encode_magnifier_configure_file(storage, md_helper);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
index 67d2058..d0262e6 100644 (file)
@@ -36,7 +36,7 @@ encode_metadata_record(ResourceStorage& storage, const MetaData_Record& metadata
 }
 void
 encode_metadata(ResourceStorage& storage, const MetaData& metadata ) {
-    int init_size = storage.size();
+    int init_size = storage.get_size();
 
     storage.reserve(8);
     storage.put(metadata.m_version);
@@ -48,7 +48,7 @@ encode_metadata(ResourceStorage& storage, const MetaData& metadata ) {
         encode_metadata_record(storage, metadata.m_vec_metadata_record.at(i));
     }
 
-    int block_size = storage.size() - init_size;
+    int block_size = storage.get_size() - init_size;
     storage.random_put<sint_t>(block_size, 8, init_size);
 }
 
index ba51063..fe6636a 100644 (file)
@@ -35,7 +35,7 @@ encode_modifier_decoration_record(ResourceStorage& storage, const PSclModifierDe
 int
 encode_modifier_decoration_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
 
-    int init_size = storage.size();
+    int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
     PSclModifierDecoration modifierDecorationTable = xmlresource->get_modifier_decoration_table();
@@ -60,10 +60,10 @@ encode_modifier_decoration_file(ResourceStorage& storage, IMetaData_Helper& md_h
         cur++;
     }
 
-    int advance_size = storage.size() - init_size;
+    int advance_size = storage.get_size() - init_size;
     storage.random_put<sint_t>(advance_size, 8, init_size);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -75,7 +75,7 @@ encode_modifier_decoration_file(const char* file, IMetaData_Helper& md_helper) {
     encode_modifier_decoration_file(storage, md_helper);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -87,5 +87,5 @@ encode_modifier_decoration_file(const char* file, int& offset, IMetaData_Helper&
     encode_modifier_decoration_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
index 71c14dd..3749558 100644 (file)
@@ -41,7 +41,7 @@ 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.size();
+    int init_size = storage.get_size();
 
     XMLResource *xmlresource = XMLResource::get_instance();
     if (xmlresource == NULL) {
@@ -68,10 +68,10 @@ encode_nine_patch_file(ResourceStorage& storage, IMetaData_Helper& md_helper) {
         cur++;
     }
 
-    int size = storage.size() - init_size;
+    int size = storage.get_size() - init_size;
     storage.random_put<sint_t>(size, 8, init_size);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -82,7 +82,7 @@ encode_nine_patch_file(const char* file, IMetaData_Helper& md_helper) {
     encode_nine_patch_file(storage, md_helper);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int
@@ -93,5 +93,5 @@ encode_nine_patch_file(const char* file, int& offset,  IMetaData_Helper& md_help
     encode_nine_patch_file(storage, md_helper);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
index 3213f37..932885f 100644 (file)
@@ -75,7 +75,7 @@ class ResourceStorage{
         int random_put(T data, int width, int random_offset);
 
     // get the current used size
-    const int size()const;
+    const int get_size() const;
 
     // get the capability of the storage
     const int capability() const;
index 567e50a..bc3d5e7 100644 (file)
@@ -43,7 +43,7 @@ inline ResourceStorage::
 }
 
 inline const int ResourceStorage::
-size()const{
+get_size() const{
     return m_size;
 }
 
@@ -123,9 +123,9 @@ reserve(int bytes) {
 }
 inline int ResourceStorage::
 storage_cat(ResourceStorage& storage) {
-    if (storage.size() == 0) return 0;
+    if (storage.get_size() == 0) return 0;
 
-    int size = storage.size();
+    int size = storage.get_size();
     check_storage(size);
     memcpy(m_storage + m_size, storage.m_storage, size);
 
index fb8dc20..33804fc 100644 (file)
@@ -30,7 +30,7 @@ class String_Encoder:public IString_Encoder{
         }
 
         void set_path(const char* file) {
-            this->file = file;
+            this->m_file = file;
         }
 
         /* @ insert str to string vector */
@@ -55,15 +55,15 @@ class String_Encoder:public IString_Encoder{
         int encode() const{
             ResourceStorage storage;
             encode(storage);
-            storage.toFile(file);
-            return storage.size();
+            storage.toFile(m_file);
+            return storage.get_size();
         }
         int encode(int& offset) const{
             ResourceStorage storage;
             encode(storage);
-            storage.toFile(file, offset);
+            storage.toFile(m_file, offset);
 
-            return storage.size();
+            return storage.get_size();
         }
 
         int encode(ResourceStorage& storage) const{
@@ -76,11 +76,11 @@ class String_Encoder:public IString_Encoder{
                 storage.put(it->c_str());
             }
 
-            return storage.size();
+            return storage.get_size();
         }
 
     private:
         std::vector<std::string> m_vec_string;
-        const char* file;
+        const char* m_file;
 };
 #endif
diff --git a/xml2binary/include/xml2dat.h b/xml2binary/include/xml2dat.h
deleted file mode 100644 (file)
index f1f24a2..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __XML2DAT_H__
-#define __XML2DAT_H__
-extern const char* xml_file;
-extern const char* bin_file;
-void xml2dat();
-#endif
index 6fc58b3..8fcf081 100644 (file)
@@ -41,7 +41,7 @@ encode(const char* file)const{
     encode_metadata(storage, metadata);
     storage.toFile(file);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int MetaData_Handler::
@@ -50,13 +50,13 @@ encode(const char* file, int& offset)const{
     encode_metadata(storage, metadata);
     storage.toFile(file, offset);
 
-    return storage.size();
+    return storage.get_size();
 }
 
 int MetaData_Handler::
 encode(ResourceStorage& storage)const{
     encode_metadata(storage, metadata);
-    return storage.size();
+    return storage.get_size();
 }
 
 const unsigned short MetaData_Handler::
index 1efef3a..6b7d960 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <limits.h>
 #include <unistd.h>
-#include "xml2dat.h"
 #include "string_encoder.h"
 #include "metadata_handler.h"
 #include "encode_layout.h"
@@ -172,8 +171,8 @@ int main(const int argc, char* argv[]) {
             rs.put<sint_t>(offset_table[i], OFFSET_WIDTH);
         }
 
-        int offset = 0;
-        int ret = rs.toFile(bin_file, offset);
+        int bin_offset = 0;
+        int ret = rs.toFile(bin_file, bin_offset);
         if (ret < 0) {
             printf("error\n");
             return -1;
index f7d5956..3f74b23 100644 (file)
@@ -61,7 +61,7 @@ class XMLResource: public sclres::SclRes{
     int get_modifier_decoration_id(const char *name);
     bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info);
 
-    const char* name() {
+    const char* get_name() {
         return "xmlparser";
     }
 
index e441a22..53e2fab 100644 (file)
@@ -61,7 +61,7 @@ static void
 get_layout_files(PSclInputModeConfigure input_mode_table,
     size_t input_mode_size, vector<string> &vec_file) {
     vec_file.clear();
-    for (int mode = 0; mode < input_mode_size; mode++) {
+    for (unsigned int mode = 0; mode < input_mode_size; mode++) {
         SclInputModeConfigure &input_mode = input_mode_table[mode];
         for (int direct = 0; direct < DISPLAYMODE_MAX; direct++) {
             char * layout_file_path = input_mode.layouts[direct];