
Go to the source code of this file.
Defines | |
| #define | CONFIGSCREEN_ITEM_SPACING 11 |
| #define | CONFIGSCREEN_INTER_SPACING 0 |
| #define | CONFIGSCREEN_INTRA_PADDING 5 |
| #define | CONFIGSCREEN_INTER_PADDING 15 |
| #define | LANGUAGE_BUTTONS_PER_LINE 4 |
Functions | |
| GtkWidget * | iLiad_config_create (void) |
| void | iLiad_config_set_text (void) |
| void | iLiad_config_set_language (const gchar *locale) |
| const gchar * | iLiad_config_get_language (void) |
| void | iLiad_config_set_keys (guint timeout) |
| guint | iLiad_config_get_keys (void) |
| void | iLiad_config_set_volume (guint volume) |
| guint | iLiad_config_get_volume (void) |
| void | iLiad_config_set_keybuffering (guint volume) |
| guint | iLiad_config_get_keybuffering (void) |
| void | iLiad_config_set_flipbar_direction (gboolean left) |
| gboolean | iLiad_config_get_flipbar_direction (void) |
Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.
<File description>="">
Definition in file iLiadConfigScreen.h.
| #define CONFIGSCREEN_INTER_PADDING 15 |
Definition at line 41 of file iLiadConfigScreen.h.
| #define CONFIGSCREEN_INTER_SPACING 0 |
Definition at line 39 of file iLiadConfigScreen.h.
| #define CONFIGSCREEN_INTRA_PADDING 5 |
Definition at line 40 of file iLiadConfigScreen.h.
| #define CONFIGSCREEN_ITEM_SPACING 11 |
Definition at line 38 of file iLiadConfigScreen.h.
| #define LANGUAGE_BUTTONS_PER_LINE 4 |
Definition at line 48 of file iLiadConfigScreen.h.
| GtkWidget* iLiad_config_create | ( | void | ) |
Definition at line 122 of file iLiadConfigScreen.c.
00123 { 00124 g_locale_installed_num = find_installed_locales(&g_locale_installed_tbl); 00125 00126 g_vbox = gtk_vbox_new(FALSE, CONFIGSCREEN_ITEM_SPACING); 00127 00128 g_sound_item = create_sound_item(); 00129 gtk_box_pack_start(GTK_BOX(g_vbox), GTK_WIDGET(g_sound_item), FALSE, FALSE, 0); 00130 00131 g_keybuffering_item = create_keybuffering_item(); 00132 gtk_box_pack_start(GTK_BOX(g_vbox), GTK_WIDGET(g_keybuffering_item), FALSE, FALSE, 0); 00133 00134 g_keys_item = create_keys_item(); 00135 gtk_box_pack_start(GTK_BOX(g_vbox), GTK_WIDGET(g_keys_item), FALSE, FALSE, 0); 00136 00137 g_flipbar_direction_item = create_flipbar_direction_item(); 00138 gtk_box_pack_start(GTK_BOX(g_vbox), GTK_WIDGET(g_flipbar_direction_item), FALSE, FALSE, 0); 00139 00140 g_calibration_item = create_calibration_item(); 00141 //TODO implement Wacom calibration 00142 //TODO gtk_box_pack_start(GTK_BOX(g_vbox), GTK_WIDGET(g_calibration_item), FALSE, FALSE, 0); 00143 00144 g_language_item = create_language_item(); 00145 gtk_box_pack_start(GTK_BOX(g_vbox), GTK_WIDGET(g_language_item), FALSE, FALSE, 0); 00146 00147 gtk_widget_show(g_vbox); 00148 00149 return g_vbox; 00150 }

| gboolean iLiad_config_get_flipbar_direction | ( | void | ) |
Definition at line 694 of file iLiadConfigScreen.c.
00695 { 00696 gint currentDirection = 0; 00697 gboolean returnValue = 0; 00698 00699 ergtk_selection_group_get_selected_buttons(ERGTK_SELECTION_GROUP(g_flipbar_direction_selection), ¤tDirection, 1); 00700 00701 switch (currentDirection) 00702 { 00703 case e_flipbar_direction_left: 00704 ST_LOGPRINTF("Flipbar Left"); 00705 returnValue = TRUE; 00706 break; 00707 case e_flipbar_direction_right: 00708 ST_LOGPRINTF("Flipbar Right"); 00709 returnValue = FALSE; 00710 break; 00711 default: 00712 ST_ERRORPRINTF("invalid flipbarDirection ID %d", currentDirection); 00713 g_assert_not_reached(); 00714 } 00715 return returnValue; 00716 }

| guint iLiad_config_get_keybuffering | ( | void | ) |
Definition at line 656 of file iLiadConfigScreen.c.
00657 { 00658 gint currentBuffering = 0; 00659 guint returnValue = 0; 00660 00661 ergtk_selection_group_get_selected_buttons(ERGTK_SELECTION_GROUP(g_keybuffering_selection), ¤tBuffering, 1); 00662 00663 switch (currentBuffering) 00664 { 00665 case e_keybuffering_on: 00666 ST_LOGPRINTF("KeyBuffering on"); 00667 returnValue = 1; 00668 break; 00669 case e_keybuffering_off: 00670 ST_LOGPRINTF("KeyBuffering off"); 00671 returnValue = 0; 00672 break; 00673 default: 00674 ST_ERRORPRINTF("invalid keyBuffering ID %d", currentBuffering); 00675 g_assert_not_reached(); 00676 } 00677 return returnValue; 00678 }

| guint iLiad_config_get_keys | ( | void | ) |
Definition at line 572 of file iLiadConfigScreen.c.
00573 { 00574 gint currentTimeOut = 0; 00575 guint returnValue = 500; 00576 00577 ergtk_selection_group_get_selected_buttons(ERGTK_SELECTION_GROUP(g_keys_selection), ¤tTimeOut, 1); 00578 00579 switch (currentTimeOut) 00580 { 00581 case e_keys_0_5_sec: 00582 ST_LOGPRINTF("zero_point_five_sec"); 00583 returnValue = 500; 00584 break; 00585 case e_keys_1_0_sec: 00586 ST_LOGPRINTF("one_sec"); 00587 returnValue = 1000; 00588 break; 00589 case e_keys_1_5_sec: 00590 ST_LOGPRINTF("one_point_five_sec"); 00591 returnValue = 1500; 00592 break; 00593 case e_keys_2_0_sec: 00594 ST_LOGPRINTF("two_sec"); 00595 returnValue = 2000; 00596 break; 00597 default: 00598 ST_ERRORPRINTF("invalid keys ID %d", currentTimeOut); 00599 g_assert_not_reached(); 00600 } 00601 return returnValue; 00602 }

| const gchar* iLiad_config_get_language | ( | void | ) |
Definition at line 534 of file iLiadConfigScreen.c.
00535 { 00536 gint currentLanguage; 00537 const gchar *returnValue = DEFAULT_LOCALE; 00538 00539 ergtk_selection_group_get_selected_buttons(ERGTK_SELECTION_GROUP(g_language_selection), ¤tLanguage, 1); 00540 if (currentLanguage >= 0 && currentLanguage < g_locale_installed_num) 00541 { 00542 returnValue = g_locale_installed_tbl[currentLanguage].code; 00543 } 00544 00545 return returnValue; 00546 }

| guint iLiad_config_get_volume | ( | void | ) |
Definition at line 618 of file iLiadConfigScreen.c.
00619 { 00620 gint current_sound = 0; 00621 guint returnValue = 0; 00622 00623 ergtk_selection_group_get_selected_buttons(ERGTK_SELECTION_GROUP(g_sound_selection), ¤t_sound, 1); 00624 00625 switch (current_sound) 00626 { 00627 case e_sound_off: 00628 ST_LOGPRINTF("sound off"); 00629 returnValue = 0; 00630 break; 00631 case e_sound_on: 00632 ST_LOGPRINTF("sound on"); 00633 returnValue = 1; 00634 break; 00635 default: 00636 ST_ERRORPRINTF("invalid sound ID %d", current_sound); 00637 g_assert_not_reached(); 00638 } 00639 return returnValue; 00640 }

| void iLiad_config_set_flipbar_direction | ( | gboolean | left | ) |
Definition at line 680 of file iLiadConfigScreen.c.
00681 { 00682 if (left) 00683 { 00684 ST_LOGPRINTF("Flipbar Left"); 00685 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_flipbar_direction_buttons[e_flipbar_direction_left]), TRUE); 00686 } 00687 else 00688 { 00689 ST_LOGPRINTF("Flipbar Right"); 00690 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_flipbar_direction_buttons[e_flipbar_direction_right]), TRUE); 00691 } 00692 }
| void iLiad_config_set_keybuffering | ( | guint | volume | ) |
Definition at line 642 of file iLiadConfigScreen.c.
00643 { 00644 if (volume == 0) 00645 { 00646 ST_LOGPRINTF("KeyBuffering off"); 00647 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_keybuffering_buttons[e_keybuffering_off]), TRUE); 00648 } 00649 else 00650 { 00651 ST_LOGPRINTF("KeyBuffering on"); 00652 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_keybuffering_buttons[e_keybuffering_on]), TRUE); 00653 } 00654 }
| void iLiad_config_set_keys | ( | guint | timeout | ) |
Definition at line 548 of file iLiadConfigScreen.c.
00549 { 00550 if (timeout <= 500) 00551 { 00552 ST_LOGPRINTF("zero_point_five_sec"); 00553 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_keys_buttons[e_keys_0_5_sec]), TRUE); 00554 } 00555 else if (timeout <= 1000) 00556 { 00557 ST_LOGPRINTF("one_sec"); 00558 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_keys_buttons[e_keys_1_0_sec]), TRUE); 00559 } 00560 else if (timeout <= 1500) 00561 { 00562 ST_LOGPRINTF("one_point_five_sec"); 00563 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_keys_buttons[e_keys_1_5_sec]), TRUE); 00564 } 00565 else 00566 { 00567 ST_LOGPRINTF("two_sec_sec"); 00568 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_keys_buttons[e_keys_2_0_sec]), TRUE); 00569 } 00570 }
| void iLiad_config_set_language | ( | const gchar * | locale | ) |
Definition at line 509 of file iLiadConfigScreen.c.
00510 { 00511 gint i; 00512 00513 for (i = 0 ; i < g_locale_installed_num ; i++) 00514 { 00515 if (strcmp(locale, g_locale_installed_tbl[i].code) == 0) 00516 { 00517 // found 00518 break; // exit for 00519 } 00520 } 00521 if (i == g_locale_installed_num) 00522 { 00523 // not found 00524 iLiad_config_set_language(DEFAULT_LOCALE); 00525 } 00526 else 00527 { 00528 // found 00529 ST_LANGUAGEPRINTF("%s %s", locale, g_locale_installed_tbl[i].name); 00530 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_language_buttons[i]), TRUE); 00531 } 00532 }

| void iLiad_config_set_text | ( | void | ) |
Definition at line 447 of file iLiadConfigScreen.c.
00448 { 00449 ST_LANGUAGEPRINTF("entry"); 00450 00451 // sound 00452 if (g_sound_item) 00453 { 00454 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_sound_item), _("Sound")); 00455 gtk_settingitem_set_info_text(GTK_SETTINGITEM(g_sound_item), 00456 _("With this function you can enable or disable the sound of your iLiad.")); 00457 gtk_button_set_label(GTK_BUTTON(g_sound_buttons[e_sound_on ]), _("On" )); 00458 gtk_button_set_label(GTK_BUTTON(g_sound_buttons[e_sound_off]), _("Off")); 00459 } 00460 00461 // keybuffering 00462 if (g_keybuffering_item) 00463 { 00464 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_keybuffering_item), _("Key buffering")); 00465 gtk_settingitem_set_info_text(GTK_SETTINGITEM(g_keybuffering_item), 00466 _("When you enable key buffering, the iLiad will remember the keys pressed and process them when the device is ready.")); 00467 gtk_button_set_label(GTK_BUTTON(g_keybuffering_buttons[e_keybuffering_on ]), _("On" )); 00468 gtk_button_set_label(GTK_BUTTON(g_keybuffering_buttons[e_keybuffering_off]), _("Off")); 00469 } 00470 00471 // keys 00472 if (g_keys_item) 00473 { 00474 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_keys_item), _("Keys")); 00475 gtk_settingitem_set_info_text(GTK_SETTINGITEM(g_keys_item), 00476 _("With this function you can set the minimum duration for a long keypress.")); 00477 gtk_button_set_label(GTK_BUTTON(g_keys_buttons[e_keys_0_5_sec]), _("0.5 seconds")); 00478 gtk_button_set_label(GTK_BUTTON(g_keys_buttons[e_keys_1_0_sec]), _("1 second") ); 00479 gtk_button_set_label(GTK_BUTTON(g_keys_buttons[e_keys_1_5_sec]), _("1.5 seconds")); 00480 gtk_button_set_label(GTK_BUTTON(g_keys_buttons[e_keys_2_0_sec]), _("2 seconds") ); 00481 } 00482 00483 // flipbar direction 00484 if (g_flipbar_direction_item) 00485 { 00486 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_flipbar_direction_item), _("Flipbar direction")); 00487 gtk_settingitem_set_info_text(GTK_SETTINGITEM(g_flipbar_direction_item), 00488 _("With this function you choose how to move the flipbar for advancing in a document.")); 00489 gtk_button_set_label(GTK_BUTTON(g_flipbar_direction_buttons[e_flipbar_direction_left ]), _("Left") ); 00490 gtk_button_set_label(GTK_BUTTON(g_flipbar_direction_buttons[e_flipbar_direction_right]), _("Right")); 00491 } 00492 00493 // wacom 00494 if (g_calibration_item) 00495 { 00496 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_calibration_item), _("Pen interface")); 00497 gtk_button_set_label(GTK_BUTTON(g_calibration_button), _("Calibration")); 00498 } 00499 00500 // language 00501 if (g_language_item) 00502 { 00503 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_language_item), _("Languages")); 00504 gtk_settingitem_set_info_text(GTK_SETTINGITEM(g_language_item), 00505 _("With this function you can set the language of the iLiad.")); 00506 } 00507 }

| void iLiad_config_set_volume | ( | guint | volume | ) |
Definition at line 604 of file iLiadConfigScreen.c.
00605 { 00606 if (0 == volume) 00607 { 00608 ST_LOGPRINTF("Sound off"); 00609 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_sound_buttons[e_sound_off]), TRUE); 00610 } 00611 else 00612 { 00613 ST_LOGPRINTF("Sound on"); 00614 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_sound_buttons[e_sound_on]), TRUE); 00615 } 00616 }
1.5.6