*/
void unset_string_substitution(const sclchar *original);
- sclint get_caps_mode();
- void set_caps_mode(sclint);
+ /**
+ * @brief This API sets the autocapital shift state flag
+ * @param[in] flag: TRUE indicates the libscl-ui will auto handle the shift state
+ * FALSE not, then the users will handle this outside the libscl-ui
+ * default is TRUE
+ */
+ void set_autocapital_shift_state(sclboolean flag);
+ /**
+ * @brief This API gets the autocapital shift state flag
+ */
+ sclint get_autocapital_shift_state();
private:
CSCLUIImpl *m_impl;
};
void set_string_substitution(const sclchar *original, const sclchar *substitute);
void unset_string_substitution(const sclchar *original);
- sclint get_caps_mode();
- void set_caps_mode(sclint caps_mode);
+ sclboolean get_autocapital_shift_state();
+ void set_autocapital_shift_state(sclboolean flag);
private:
sclboolean m_initialized;
- sclint m_caps_mode;
+ sclboolean m_autocapital_shift_state;
};
}
static void handle_shift_state_on_button_click_event(SclUIEventDesc ui_event_desc)
{
CSCLUIImpl *uiimpl = CSCLUIImpl::get_instance();
- if (uiimpl->get_caps_mode()) {
+
+ /* do not need the libscl-ui auto-captial the shift state */
+ if (FALSE == uiimpl->get_autocapital_shift_state()) {
return;
}
}
void
-CSCLUI::set_caps_mode(sclint mode) {
+CSCLUI::set_autocapital_shift_state(sclboolean flag) {
if (m_impl) {
- m_impl->set_caps_mode(mode);
+ m_impl->set_autocapital_shift_state(flag);
}
}
sclint
-CSCLUI::get_caps_mode() {
- sclint mode = 0;
+CSCLUI::get_autocapital_shift_state() {
+ sclint flag = 0;
if (m_impl) {
- mode = m_impl->get_caps_mode();
+ flag = m_impl->get_autocapital_shift_state();
}
- return mode;
+ return flag;
}
builder->init(SCLWINDOW_INVALID);
controller->init();
}*/
+ m_initialized = FALSE;
+ /* FIXME whethe need the libscl-ui autocapital the shift state */
+ /* if set to FALSE, the libscl-ui will not auto handle the shift state */
+ /* the client will handle outside the libscl-ui, default is TRUE */
+ m_autocapital_shift_state = TRUE;
}
CSCLUIImpl::~CSCLUIImpl()
}
void
-CSCLUIImpl::set_caps_mode(sclint mode) {
- m_caps_mode = mode;
- if (get_shift_state() != SCL_SHIFT_STATE_LOCK) {
- set_shift_state(mode ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF);
- }
+CSCLUIImpl::set_autocapital_shift_state(sclboolean flag) {
+ m_autocapital_shift_state = flag;
}
-sclint
-CSCLUIImpl::get_caps_mode() {
- return m_caps_mode;
+sclboolean
+CSCLUIImpl::get_autocapital_shift_state() {
+ return m_autocapital_shift_state;
}