m_autopopup_configure_parser = NULL;
m_magnifier_configure_parser = NULL;
m_nine_patch_file_list_parser = NULL;
+
+ memset(m_info, 0x00, sizeof(m_info));
}
BinResource::~BinResource() {
class IMetadata_Provider{
public:
virtual void set_current_metadata_record(const char* record_name) = 0;
- virtual const int get_width(const char* fieldName)const = 0;
+ virtual int get_width(const char* fieldName)const = 0;
virtual ~IMetadata_Provider() {}
};
#endif
class IParserInfo_Provider: public IString_Provider{
public:
virtual void set_current_metadata_record(const char* record_name) = 0;
- virtual const int get_width(const char* field_name) const = 0;
+ virtual int get_width(const char* field_name) const = 0;
virtual const char* get_string_by_id(const int id) const = 0;
virtual ~IParserInfo_Provider() {}
};
static BinLabelPropertyParser *get_instance();
void init(const FileStorage& storage, int, int, IParserInfo_Provider*);
PSclLabelPropertiesTable get_label_properties_frame();
- const int get_size();
+ int get_size();
private:
BinLabelPropertyParser();
curRecordIndex = -1;
}
- const int get_width(const char* field_name)const {
+ int get_width(const char* field_name)const {
const MetaData* metadata = m_metadataParser->get_metadata();
const MetaData_Record& metadata_record = metadata->m_vec_metadata_record.at(curRecordIndex);
std::vector<MetaData_Field>::const_iterator it;
m_metadataProvider->set_current_metadata_record(record_name);
}
}
- const int get_width(const char* field_name)const {
+ int get_width(const char* field_name)const {
assert(m_metadataProvider != NULL);
if (m_metadataProvider != NULL)
return m_metadataProvider->get_width(field_name);
this->parser_info_provider = provider;
parsing_label_properties_frame();
}
-const int
+int
BinLabelPropertyParser::get_size() {
return m_size;
}
}
void
-SclLog::log(enum LOG_LEVEL level, char* fmt, ...) {
+SclLog::log(enum LOG_LEVEL level, const char* fmt, ...) {
static const char *log_message[MAX_LOG_LEVEL] = {
"message", "warning", "debug", "error"
};
}
void
-SCLLOG(enum SclLog::LOG_LEVEL level, char* fmt, ...) {
+SCLLOG(enum SclLog::LOG_LEVEL level, const char* fmt, ...) {
SclLog *log = SclLog::get_instance();
if (log) {
char str_log[128];
}
void
-SCLLOG_TIME_END(char *msg) {
+SCLLOG_TIME_END(const char *msg) {
gettimeofday(&g_time_end, NULL);
long diff = (g_time_end.tv_sec - g_time_begin.tv_sec) * 1000000 + g_time_end.tv_usec - g_time_begin.tv_usec;
};
static SclLog* get_instance();
- void log(enum LOG_LEVEL, char* fmt, ...);
+ void log(enum LOG_LEVEL, const char* fmt, ...);
~SclLog();
private:
SclLog();
};
-void SCLLOG(enum SclLog::LOG_LEVEL level, char* fmt, ...);
+void SCLLOG(enum SclLog::LOG_LEVEL level, const char* fmt, ...);
void SCLLOG_TIME_BEGIN();
-void SCLLOG_TIME_END(char *msg);
+void SCLLOG_TIME_END(const char *msg);
#endif
(elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_magnifier_window())));
if (wl_base_window && (unsigned int)ecore_wl_window_id_get(wl_base_window) == ev->window) {
SclRectangle base_rect;
- get_window_rect(windows->get_base_window(), &base_rect);
- root_x = ev->x + base_rect.x;
- root_y = ev->y + base_rect.y;
+ if (get_window_rect(windows->get_base_window(), &base_rect)) {
+ root_x = ev->x + base_rect.x;
+ root_y = ev->y + base_rect.y;
+ }
} else if (wl_magnifier_window && (unsigned int)ecore_wl_window_id_get(wl_magnifier_window) == ev->window) {
SclRectangle magnifier_rect = { 0, 0, 0, 0 };
if (get_window_rect(windows->get_magnifier_window(), &magnifier_rect)) {
SCL_DEBUG();
memset(mCurThemename, 0x00, sizeof(mCurThemename));
- memset(&mCurBaseLayout, 0x00, sizeof(SclLayout));
+
+ memset(&mCurBaseLayout, 0x00, sizeof(mCurBaseLayout));
+ memset(mCurPopupLayout, 0x00, sizeof(mCurPopupLayout));
+
+ memset(mCurBaseLayoutKeyCoordinates, 0x00, sizeof(mCurBaseLayoutKeyCoordinates));
+ memset(mCurPopupLayoutKeyCoordinates, 0x00, sizeof(mCurPopupLayoutKeyCoordinates));
+
+ memset(mCurBaseButtonContext, 0x00, sizeof(mCurBaseButtonContext));
+ memset(mCurPopupButtonContext, 0x00, sizeof(mCurPopupButtonContext));
mCurStartingCoordinates.x = 0;
mCurStartingCoordinates.y = 0;
}
}
-const int get_layout_num(const PSclLayoutKeyCoordinatePointerTable keyCoordinatePointerFrame) {
+int get_layout_num(const PSclLayoutKeyCoordinatePointerTable keyCoordinatePointerFrame) {
assert(keyCoordinatePointerFrame != NULL);
int layout_num = MAX_SCL_LAYOUT;
for ( int i = 0; i < MAX_SCL_LAYOUT; ++i ) {
return layout_num;
}
-const int get_key_num(const PSclLayoutKeyCoordinatePointerTable keyCoordinatePointerFrame, const int layout_no) {
+int get_key_num(const PSclLayoutKeyCoordinatePointerTable keyCoordinatePointerFrame, const int layout_no) {
assert(keyCoordinatePointerFrame != NULL);
int key_num = MAX_KEY;
class IMetaData_Helper{
public:
virtual void set_current_metadata_record(const char* record_name) = 0;
- virtual const unsigned short get_width(const char* field_name) const = 0;
+ virtual unsigned short get_width(const char* field_name) const = 0;
virtual ~IMetaData_Helper() {}
};
#endif
class ResourceStorage;
class IString_Encoder{
public:
- virtual const int add(const char*) = 0;
+ virtual int add(const char*) = 0;
virtual int encode() const = 0;
virtual int encode(int& offset) const = 0;
virtual int encode(ResourceStorage&) const = 0;
// encode all strings and output to storage
int encode(ResourceStorage& storage)const;
- const unsigned short get_width(const char* field_name) const;
+ unsigned short get_width(const char* field_name) const;
private:
- const unsigned short
- get_width(const char* name, const MetaData_Record& metadata_record) const;
- const int find_metadata_record_index(const char* name)const;
+ unsigned short get_width(const char* name, const MetaData_Record& metadata_record) const;
+ int find_metadata_record_index(const char* name) const;
int parsing_field(const xmlNodePtr node, MetaData_Field& data, const MetaData_Width& metadataWidth);
int parsing_record(const xmlNodePtr curNode, MetaData_Record& metadataRecord, const MetaData_Width& metadataWidth);
int parsing_metadata_type(const xmlNodePtr curNode, MetaData_Width& metadataWidth);
int random_put(T data, int width, int random_offset);
// get the current used size
- const int get_size() const;
+ int get_size() const;
// get the capability of the storage
- const int capability() const;
+ int capability() const;
// put the storage array to file
// the fileName assigned
m_capability = 0;
}
-inline const int ResourceStorage::
+inline int ResourceStorage::
get_size() const {
return m_size;
}
m_size += 1;
}
-inline const int ResourceStorage::
+inline int ResourceStorage::
capability() const {
return m_capability;
}
/* @ insert str to string vector */
/* @ return the ID of the str */
- const int add(const char* str) {
+ int add(const char* str) {
if (str == NULL) return -1;
std::string str_temp = std::string(str);
return storage.get_size();
}
-const unsigned short MetaData_Handler::
+unsigned short MetaData_Handler::
get_width(const char* field_name) const {
if (field_name == NULL) return 0;
return width;
}
-const unsigned short MetaData_Handler::
+unsigned short MetaData_Handler::
get_width(const char* name, const MetaData_Record& metadata_record) const {
assert(name);
for (size_t i = 0; i < metadata_record.vField.size(); ++i) {
return 0;
}
-const int MetaData_Handler::
+int MetaData_Handler::
find_metadata_record_index(const char* name)const {
assert(name);
static const std::string pcLandscape;
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class PopStyleHelper{
public:
static const std::string pcPopup;
static const std::string pcPopup_Grab;
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class ButtonTypeHelper{
public:
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class ShiftStateHelper{
public:
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class ButtonStateHelper{
public:
static const std::string pcPressed;
static const std::string pcDisabled ;
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class KeyTypeHelper{
public:
static const std::string pcUser;
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class PopupTypeHelper {
public:
static const std::string pcAuto_Popup;
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class DragStateHelper{
public:
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class ExtraOptionHelper {
public:
static const std::string pcOption_4_directions_return_curve;
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class MultitouchTypeHelper{
static const std::string pcGrab_Sub_Events;
static const std::string toString(const int val);
- static const int Int(const std::string str);
+ static int Int(const std::string str);
};
class BOOLTypeHelper{
static const std::string pcFalse;
static const std::string toString(const bool val);
- static const int Bool(const std::string str);
+ static int Bool(const std::string str);
};
class INTTypeHelper{
public:
static const int DEFAULT = 0;
static const std::string dextoString(const int val);
static const std::string toString(const int val);
- static const int Int(const std::string str);
- static const int dexInt(const std::string str);
+ static int Int(const std::string str);
+ static int dexInt(const std::string str);
};
#endif
return pcLandscape;
}
}
-const int RotationHelper::Int(const string str) {
+int RotationHelper::Int(const string str) {
if (str == pcPortrait) {
return PORTRAIT;
} else if (str == pcLandscape) {
}
}
-const int PopStyleHelper::Int(const string str) {
+int PopStyleHelper::Int(const string str) {
if (str == pcBase) {
return BASE;
} else if (str == pcPopup) {
}
}
-const int ButtonTypeHelper::Int(const string str) {
+int ButtonTypeHelper::Int(const string str) {
if (str == pcNormal) {
return NORMAL;
} else if (str == pcGrab) {
}
}
-const int ShiftStateHelper::Int(const string str) {
+int ShiftStateHelper::Int(const string str) {
if (str == pcOn) {
return ON;
} else if (str == pcOff) {
return pcNormal;
}
}
-const int ButtonStateHelper::Int(const string str) {
+int ButtonStateHelper::Int(const string str) {
if (str == pcNormal) {
return NORMAL;
} else if (str == pcPressed) {
}
}
-const int KeyTypeHelper::Int(const string str) {
+int KeyTypeHelper::Int(const string str) {
if (str == pcNone) {
return NONE;
} else if (str == pcChar) {
return pcNone;
}
}
-const int PopupTypeHelper::Int(const string str) {
+int PopupTypeHelper::Int(const string str) {
if (str == pcNone) {
return NONE;
} else if (str == pcBtn_Release_Popup) {
}
}
-const int DragStateHelper::Int(const string str) {
+int DragStateHelper::Int(const string str) {
if (str == pcNone) {
return NONE;
} else if (str == pcLeft) {
return pcOption_4_directions;
}
}
-const int ExtraOptionHelper::Int(const string str) {
+int ExtraOptionHelper::Int(const string str) {
if (str == pcOption_4_directions) {
return OPTION_4_DIRECTIONS;
} else if (str == pcOption_8_directions) {
return pcExclusive;
}
}
-const int MultitouchTypeHelper::Int(const string str) {
+int MultitouchTypeHelper::Int(const string str) {
if (str == pcExclusive) {
return EXCLUSIVE;
} else if (str == pcCooperative) {
if (val) return pcTrue;
return pcFalse;
}
-const int BOOLTypeHelper::Bool(const string str) {
+int BOOLTypeHelper::Bool(const string str) {
if (str == pcFalse) {
return false;
} else if (str == pcTrue) {
snprintf(temp, sizeof(temp), "%d", val);
return string(temp);
}
-const int INTTypeHelper::Int(const string str) {
+int INTTypeHelper::Int(const string str) {
int val = 0;
stringstream convertor(str);
return val;
}
-const int INTTypeHelper::dexInt(const string str) {
+int INTTypeHelper::dexInt(const string str) {
int val = 0;
stringstream convertor(str);