// [int] vconf GET
int system_setting_get_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
{
- printf("system_setting_get_font_size \n");
int vconf_value;
if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
// [int] vconf GET
int system_setting_get_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
{
- printf("system_setting_get_font_type\n");
- //int vconf_value;
-
char* font_name = _get_cur_font();
-
- #if 0
- if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_FONT_TYPE_INT, &vconf_value)) {
- return SYSTEM_SETTINGS_ERROR_IO_ERROR;
- }
- //*value = (void*)vconf_value;
- #endif
*value = (void*)font_name;
return SYSTEM_SETTINGS_ERROR_NONE;
int system_setting_set_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
{
- printf(" mock --> real system_setting_set_incoming_call_ringtone \n");
char* vconf_value;
vconf_value = (char*)value;
if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, vconf_value)) {
int system_setting_set_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
{
- printf(" mock --> real system_setting_set_email_alert_ringtone \n");
char* vconf_value;
vconf_value = (char*)value;
if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, vconf_value)) {
int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
{
- printf(" mock --> real system_setting_set_wallpaper_home_screen \n");
-
char* vconf_value;
vconf_value = (char*)value;
int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
{
- printf(" mock --> real system_setting_set_wallpaper_lock_screen \n");
-
char* vconf_value;
vconf_value = (char*)value;
int system_setting_set_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
{
- printf(" real system_setting_set_font_size \n");
int* vconf_value;
vconf_value = (int*)value;
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
}
font_size_set();
-
- printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>. system_setting_set_font_size called \n");
-
return SYSTEM_SETTINGS_ERROR_NONE;
}
/**
*/
void *font_conf_doc_parse(char *doc_name, char *font_name)
{
- //setting_retvm_if(doc_name == NULL, NULL, "Param data is NULL");
- //setting_retvm_if(font_name == NULL, NULL, "Param data is NULL");
xmlDocPtr doc = NULL;
xmlNodePtr cur = NULL;
xmlNodePtr cur2 = NULL;
xmlChar *key = NULL;
doc = xmlParseFile(doc_name);
- //setting_retvm_if(doc == NULL, NULL, "Document not parsed successfully.");
cur = xmlDocGetRootElement(doc);
if (cur == NULL) {
- //SETTING_TRACE_DEBUG("empty document");
xmlFreeDoc(doc);
doc = NULL;
return NULL;
}
if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
- //SETTING_TRACE_DEBUG("document of the wrong type, root node != fontconfig");
xmlFreeDoc(doc);
doc = NULL;
return NULL;
if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit")))
{
xmlChar *name = xmlGetProp(cur2, (const xmlChar *)"name");
- //SETTING_TRACE_DEBUG("name is: %s", name);
/* if name is not 'family', break */
if (xmlStrcmp(name, (const xmlChar *)"family"))
{
{
xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
- //SETTING_TRACE_DEBUG("after changed, string is: %s", key);
+ //printf("after changed, string is: %s \n", key);
xmlFree(key);
key = NULL;
is_changed = EINA_TRUE;
{
xmlNodeSetContent(cur2->xmlChildrenNode, (const xmlChar *)font_name);
key = xmlNodeListGetString(doc, cur2->xmlChildrenNode, 1);
- //SETTING_TRACE_DEBUG("after changed, string is: %s", key);
+ //printf("after changed, string is: %s\n", key);
xmlFree(key);
key = NULL;
is_changed = EINA_TRUE;
{
xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
- //SETTING_TRACE_DEBUG("after changed, string is: %s", key);
xmlFree(key);
key = NULL;
is_changed = EINA_TRUE;
int system_setting_set_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
{
- printf(" real system_setting_set_font_type \n");
char* font_name = NULL;
font_name = (char*)value;
- printf(">>>>>>>>>>>>> font name = %s \n", font_name);
-
font_config_set(font_name);
font_config_set_notification();
xmlSaveFormatFile(SETTING_FONT_CONF_FILE, doc, 0);
xmlFreeDoc(doc);
doc = NULL;
- printf(">>>>>>>>>>>>> SUCCESSED : saving font name = %s \n", font_name);
- } else {
- printf(">>>>>>>>>>>>> FAILED : saving font name = %s \n", font_name);
- }
+ }
return SYSTEM_SETTINGS_ERROR_NONE;
}
int system_setting_set_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
{
- printf(" mock --> real system_setting_set_motion_activation \n");
-
bool* vconf_value;
vconf_value = (bool*)value;
if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, *vconf_value)) {
// TODO : 2th argument, callback, is not in use.
int system_setting_set_changed_callback_motion_activation(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
{
- printf("system_setting_set_changed_callback_motion_activation \n");
return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, 3);
}
int system_setting_unset_changed_callback_motion_activation(system_settings_key_e key)
{
- printf("system_setting_unset_changed_callback_motion_activation \n");
return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, 3);
}
static char* _get_cur_font()
{
- printf("get current font \n");
-
xmlDocPtr doc = NULL;
xmlNodePtr cur = NULL;
xmlNodePtr cur2 = NULL;
cur = xmlDocGetRootElement(doc);
if(cur == NULL) {
- printf("empty document");
xmlFreeDoc(doc);
doc = NULL;
return NULL;
}
if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
- printf("document of the wrong type, root node != fontconfig");
xmlFreeDoc(doc);
doc = NULL;
return NULL;
if((!xmlStrcmp(cur3->name, (const xmlChar *)"string")))
{
key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
- //printf("string is: %s", key);
+ //printf("string is: %s\n", key);
font_name = g_strdup((char *)key);
xmlFree(key);
{
/* notification */
Ecore_X_Window ecore_win = ecore_x_window_root_first_get();
- printf("FONT CHANGE NOTIFICATION >>>>>>>>>> : %d \n", (unsigned int)ecore_win);
Ecore_X_Atom atom = ecore_x_atom_get("FONT_TYPE_change");
ecore_x_window_prop_string_set(ecore_win, atom, "tizen");
}
char *font_name = _get_cur_font();
if (font_size == -1) {
- //SETTING_TRACE_DEBUG("failed to call font_size_get");
return;
- } else {
- printf(">> font name = %s, font size = %d \n", font_name, font_size);
- }
+ }
text_classes = elm_config_text_classes_list_get();
elm_config_save();
elm_config_text_classes_list_free(text_classes);
text_classes = NULL;
- //G_FREE(font_name);
g_free(font_name);
- printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>. font_size_set called \n");
}
static int __font_size_get()
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
- printf("assigned getter \n");
system_setting_getter = system_setting_item->get_value_cb;
if (system_setting_getter == NULL)
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
- printf("assigned setter \n");
system_setting_setter = system_setting_item->set_value_cb;
if (system_setting_setter == NULL)
// typedef int (*system_setting_set_value_cb) (system_settings_key_e key, system_setting_data_type_e data_type, void* value);
int system_settings_set_value_int(system_settings_key_e key, int value)
{
- printf("[MOCK] system_settings_set_value_int - value = %d \n", value);
-
// TODO: make sure the value is inside of enum.
int* ptr = &value;
return system_settings_set_value(key, SYSTEM_SETTING_DATA_TYPE_INT,(void*)ptr);
int system_settings_set_value_bool(system_settings_key_e key, bool value)
{
- printf("[MOCK] system_settings_set_value_bool - value = %d \n", value);
bool* ptr = &value;
return system_settings_set_value(key, SYSTEM_SETTING_DATA_TYPE_BOOL,(void*)ptr);
}
int system_settings_set_value_double(system_settings_key_e key, double value)
{
- printf("[MOCK] system_settings_set_value_double - value = %f \n", value);
double* ptr = &value;
return system_settings_set_value(key, SYSTEM_SETTING_DATA_TYPE_DOUBLE,(void*)ptr);
}
int system_settings_set_value_string(system_settings_key_e key, const char *value)
{
- printf("[MOCK] system_settings_set_value_string - input string : %s \n", value);
return system_settings_set_value(key, SYSTEM_SETTING_DATA_TYPE_STRING,(void*)value);
}
/*PUBLIC*/
int system_settings_set_changed_cb(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
{
- printf("system_settings_set_changed_cb \n");
-
system_setting_h system_setting_item;
system_setting_set_changed_callback_cb system_setting_set_changed_cb;
int system_settings_unset_changed_cb(system_settings_key_e key)
{
- printf("system_settings_unset_changed_cb \n");
-
system_setting_h system_setting_item;
system_setting_unset_changed_callback_cb system_setting_unset_changed_cb;