"Fossies" - the Fresh Open Source Software Archive

Member "klavaro-3.13/src/keyboard.h" (18 Apr 2021, 4476 Bytes) of package /linux/privat/klavaro-3.13.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "keyboard.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.12_vs_3.13.

    1 /**************************************************************************/
    2 /*  Klavaro - a flexible touch typing tutor                               */
    3 /*  Copyright (C) 2005-2021 Felipe Emmanuel Ferreira de Castro            */
    4 /*                                                                        */
    5 /*  This file is part of Klavaro, which is a free software: you can       */
    6 /*  redistribute it and/or modify it under the terms of the GNU General   */
    7 /*  Public License as published by the Free Software Foundation, either   */
    8 /*  version 3 of the License, or (at your option) any later version.      */
    9 /*                                                                        */
   10 /*  Klavaro is distributed in the hope that it will be useful,            */
   11 /*  but WITHOUT ANY WARRANTY; without even the implied warranty of        */
   12 /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         */
   13 /*  GNU General Public License for more details (in the file COPYING).    */
   14 /*  You should have received a copy of the GNU General Public License     */
   15 /*  along with Klavaro.  If not, see <https://www.gnu.org/licenses/>      */
   16 /**************************************************************************/
   17 
   18 #define KEYB_AUTO_SAVE "tmp_auto"
   19 
   20 #define MAX_KEYBOARDS 200
   21 #define KEY_LINE_LEN (14 + 1)   /* 14 keys + 1 NULL char */
   22 
   23 #define UPSYM ((gunichar) 182)
   24 #define URDU_STOP ((gunichar) 0x06D4)
   25 #define URDU_COMMA ((gunichar) 0x060C)
   26 #define DEVANAGARI_STOP ((gunichar) 0x0964)
   27 #define TIBETAN_WORD_DELIMITER ((gunichar) 0x0F0B)
   28 #define TIBETAN_STOP ((gunichar) 0x0F0D)
   29 #define TIBETAN_COMMA ((gunichar) L' ')
   30 #define BO_NARO ((gunichar) 0x0F7C)
   31 
   32 /* Pretty colors
   33  */
   34 #define KEYB_GREEN "#aaeebb"
   35 #define KEYB_RED "#eeaaaa"
   36 #define KEYB_BLUE "#bbbbff"
   37 #define KEYB_YELLOW "#eeee88"
   38 #define KEYB_ORANGE "#ffcc77" /* "#ffdd88" */
   39 #define KEYB_PURPLE "#ccaacc"
   40 #define KEYB_BLACK "#000000"
   41 
   42 typedef struct _KEYBLAYOUT
   43 {
   44     gchar *name;
   45     gchar *country;
   46     gchar *variant;
   47 } KeybLayout;
   48 
   49 /*
   50  * Interface
   51  */
   52 gchar *keyb_get_name (void);
   53 
   54 gchar * keyb_get_name_last (void);
   55 
   56 void keyb_set_name (const gchar * name);
   57 
   58 void keyb_init_name (const gchar * name);
   59 
   60 gunichar keyb_get_lochars (gint i, gint j);
   61 
   62 gunichar keyb_get_upchars (gint i, gint j);
   63 
   64 gboolean keyb_get_modified_status (void);
   65 
   66 void keyb_set_modified_status (gboolean new_status);
   67 
   68 /*
   69  * Auxiliar
   70  */
   71 void keyb_create_virtual_keys (void);
   72 
   73 void keyb_set_chars (void);
   74 
   75 gboolean keyb_is_vowel (gunichar chr);
   76 
   77 gboolean keyb_is_diacritic (gunichar chr);
   78 
   79 gboolean keyb_is_inset (gunichar chr);
   80 
   81 gint keyb_get_vowels (gunichar * vows);
   82 
   83 gint keyb_get_consonants (gunichar * consonants);
   84 
   85 gint keyb_get_symbols (gunichar * symbols);
   86 
   87 gint keyb_get_altnums (gunichar * altnums);
   88 
   89 gunichar keyb_unichar_toupper (gunichar uchar);
   90 
   91 void keyb_save_new_layout (void);
   92 
   93 void keyb_remove_user_layout (void);
   94 
   95 void keyb_update_virtual_layout (void);
   96 
   97 gchar * keyb_get_country_code (const gchar *kbd);
   98 
   99 gchar * keyb_get_country (const gchar *kbd);
  100 
  101 gchar * keyb_get_variant (const gchar *kbd);
  102 
  103 void keyb_set_keyboard_layouts (void);
  104 
  105 void keyb_update_from_variant (gchar *cmb_country, gchar *cmb_variant);
  106 
  107 void keyb_set_combo_kbd_variant (gchar *cmb_country, gchar *cmb_variant);
  108 
  109 void keyb_set_combo_kbd (gchar *cmb_country, gchar *cmb_variant);
  110 
  111 void keyb_update_combos (gchar *cmb_country, gchar *cmb_variant);
  112 
  113 void keyb_intro_step_next (void);
  114 
  115 void keyb_intro_step_previous (void);
  116 
  117 void keyb_intro_step (gint step);
  118 
  119 gchar * keyb_mode_get_name (void);
  120 
  121 void keyb_mode_intro (void);
  122 
  123 void keyb_mode_hint (void);
  124 
  125 void keyb_mode_edit (void);
  126 
  127 void keyb_set_sensitive (gboolean state);
  128 
  129 gboolean keyb_button_match (GtkButton * button);
  130 
  131 void keyb_edit_button (GtkButton * button);
  132 
  133 void keyb_edit_none (void);
  134 
  135 gboolean keyb_edit_next (void);
  136 
  137 void keyb_change_key (gunichar real_key);
  138 
  139 gchar *keyb_get_utf8_paragraph_symbol (void);
  140 
  141 gboolean keyb_force_edit_tab (gpointer data);
  142 
  143 /*
  144  * Hints
  145  */
  146 void hints_init (void);
  147 
  148 gchar * hints_color_from_charcode (gchar charcode);
  149 
  150 gchar * hints_string_from_charcode (gchar charcode);
  151 
  152 void hints_set_tips (void);
  153 
  154 void hints_set_colors (void);
  155 
  156 void hints_get_from_char (gchar *file_name, gunichar character);
  157 
  158 void hints_update_from_char (gunichar character);
  159 
  160 void hints_update_from_button (GtkButton * button);
  161 
  162 gboolean hints_demo_fingers_move (gpointer data);
  163 
  164 void hints_demo_fingers (guint msec);
  165 
  166 gchar * hints_finger_name_from_char (gunichar uch);