FreeRDP
keyboard_layout.c File Reference
#include <freerdp/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/path.h>
#include <winpr/json.h>
#include "liblocale.h"
#include <freerdp/types.h>
#include <freerdp/scancode.h>
#include <freerdp/locale/keyboard.h>
#include <freerdp/log.h>

Macros

#define TAG   FREERDP_TAG("locale.keyboard.layouts")
 

Functions

static BOOL reallocate_keyboard_layouts (RDP_KEYBOARD_LAYOUT **layouts, size_t *pcount, size_t to_add)
 
static BOOL load_layout_file (void)
 
static UINT32 rdp_keyboard_layout_by_name (const char *name)
 
static UINT32 rdp_keyboard_variant_by_name (const char *name)
 
static UINT32 rdp_keyboard_ime_by_name (const char *name)
 
static const char * rdp_keyboard_layout_by_id (UINT32 id)
 
static const char * rdp_keyboard_variant_by_id (UINT32 id)
 
static const char * rdp_keyboard_ime_by_id (UINT32 id)
 
static BOOL rdp_keyboard_layout_clone_append (RDP_KEYBOARD_LAYOUT **layouts, size_t *pcount)
 
static BOOL rdp_keyboard_variant_clone_append (RDP_KEYBOARD_LAYOUT **layouts, size_t *pcount)
 
static BOOL rdp_keyboard_ime_clone_append (RDP_KEYBOARD_LAYOUT **layouts, size_t *pcount)
 
void freerdp_keyboard_layouts_free (RDP_KEYBOARD_LAYOUT *layouts, size_t count)
 
RDP_KEYBOARD_LAYOUTfreerdp_keyboard_get_layouts (DWORD types, size_t *count)
 
const char * freerdp_keyboard_get_layout_name_from_id (DWORD keyboardLayoutID)
 
DWORD freerdp_keyboard_get_layout_id_from_name (const char *name)
 
static void copy (const struct LanguageIdentifier *id, RDP_CODEPAGE *cp)
 
static BOOL copyOnMatch (DWORD column, const char *filter, const struct LanguageIdentifier *cur, RDP_CODEPAGE *dst)
 
RDP_CODEPAGEfreerdp_keyboard_get_matching_codepages (DWORD column, const char *filter, size_t *count)
 
void freerdp_codepages_free (RDP_CODEPAGE *pages)
 

Variables

static const struct LanguageIdentifier language_identifiers []
 
static const RDP_KEYBOARD_LAYOUT sRDP_KEYBOARD_LAYOUT_TABLE []
 
static const size_t sRDP_KEYBOARD_LAYOUT_TABLE_len = ARRAYSIZE(sRDP_KEYBOARD_LAYOUT_TABLE)
 
static const RDP_KEYBOARD_LAYOUT_VARIANT sRDP_KEYBOARD_LAYOUT_VARIANT_TABLE []
 
static const size_t sRDP_KEYBOARD_LAYOUT_VARIANT_TABLE_len
 
static const RDP_KEYBOARD_IME sRDP_KEYBOARD_IME_TABLE []
 
static const size_t sRDP_KEYBOARD_IME_TABLE_len = ARRAYSIZE(sRDP_KEYBOARD_IME_TABLE)
 

Macro Definition Documentation

◆ TAG

#define TAG   FREERDP_TAG("locale.keyboard.layouts")

FreeRDP: A Remote Desktop Protocol Implementation Keyboard Layouts

Copyright 2009-2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ copy()

static void copy ( const struct LanguageIdentifier *  id,
RDP_CODEPAGE cp 
)
static
Here is the caller graph for this function:

◆ copyOnMatch()

static BOOL copyOnMatch ( DWORD  column,
const char *  filter,
const struct LanguageIdentifier *  cur,
RDP_CODEPAGE dst 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_codepages_free()

void freerdp_codepages_free ( RDP_CODEPAGE pages)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_keyboard_get_layout_id_from_name()

DWORD freerdp_keyboard_get_layout_id_from_name ( const char *  name)
Here is the call graph for this function:

◆ freerdp_keyboard_get_layout_name_from_id()

const char* freerdp_keyboard_get_layout_name_from_id ( DWORD  keyboardLayoutID)
Here is the call graph for this function:

◆ freerdp_keyboard_get_layouts()

RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts ( DWORD  types,
size_t *  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_keyboard_get_matching_codepages()

RDP_CODEPAGE* freerdp_keyboard_get_matching_codepages ( DWORD  column,
const char *  filter,
size_t *  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_keyboard_layouts_free()

void freerdp_keyboard_layouts_free ( RDP_KEYBOARD_LAYOUT layouts,
size_t  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_layout_file()

static BOOL load_layout_file ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_ime_by_id()

static const char* rdp_keyboard_ime_by_id ( UINT32  id)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_ime_by_name()

static UINT32 rdp_keyboard_ime_by_name ( const char *  name)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_ime_clone_append()

static BOOL rdp_keyboard_ime_clone_append ( RDP_KEYBOARD_LAYOUT **  layouts,
size_t *  pcount 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_layout_by_id()

static const char* rdp_keyboard_layout_by_id ( UINT32  id)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_layout_by_name()

static UINT32 rdp_keyboard_layout_by_name ( const char *  name)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_layout_clone_append()

static BOOL rdp_keyboard_layout_clone_append ( RDP_KEYBOARD_LAYOUT **  layouts,
size_t *  pcount 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_variant_by_id()

static const char* rdp_keyboard_variant_by_id ( UINT32  id)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_variant_by_name()

static UINT32 rdp_keyboard_variant_by_name ( const char *  name)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_keyboard_variant_clone_append()

static BOOL rdp_keyboard_variant_clone_append ( RDP_KEYBOARD_LAYOUT **  layouts,
size_t *  pcount 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reallocate_keyboard_layouts()

static BOOL reallocate_keyboard_layouts ( RDP_KEYBOARD_LAYOUT **  layouts,
size_t *  pcount,
size_t  to_add 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ language_identifiers

const struct LanguageIdentifier language_identifiers[]
static

◆ sRDP_KEYBOARD_IME_TABLE

const RDP_KEYBOARD_IME sRDP_KEYBOARD_IME_TABLE[]
static
Initial value:
= {
{ KBD_CHINESE_TRADITIONAL_PHONETIC, "phon.ime", "Chinese (Traditional) - Phonetic" },
{ KBD_JAPANESE_INPUT_SYSTEM_MS_IME2002, "imjp81.ime", "Japanese Input System (MS-IME2002)" },
{ KBD_KOREAN_INPUT_SYSTEM_IME_2000, "imekr61.ime", "Korean Input System (IME 2000)" },
{ KBD_CHINESE_SIMPLIFIED_QUANPIN, "winpy.ime", "Chinese (Simplified) - QuanPin" },
{ KBD_CHINESE_TRADITIONAL_CHANGJIE, "chajei.ime", "Chinese (Traditional) - ChangJie" },
{ KBD_CHINESE_SIMPLIFIED_SHUANGPIN, "winsp.ime", "Chinese (Simplified) - ShuangPin" },
{ KBD_CHINESE_TRADITIONAL_QUICK, "quick.ime", "Chinese (Traditional) - Quick" },
{ KBD_CHINESE_SIMPLIFIED_ZHENGMA, "winzm.ime", "Chinese (Simplified) - ZhengMa" },
{ KBD_CHINESE_TRADITIONAL_BIG5_CODE, "winime.ime", "Chinese (Traditional) - Big5 Code" },
{ KBD_CHINESE_TRADITIONAL_ARRAY, "winar30.ime", "Chinese (Traditional) - Array" },
{ KBD_CHINESE_SIMPLIFIED_NEIMA, "wingb.ime", "Chinese (Simplified) - NeiMa" },
{ KBD_CHINESE_TRADITIONAL_DAYI, "dayi.ime", "Chinese (Traditional) - DaYi" },
{ KBD_CHINESE_TRADITIONAL_UNICODE, "unicdime.ime", "Chinese (Traditional) - Unicode" },
"Chinese (Traditional) - New Phonetic" },
"Chinese (Traditional) - New ChangJie" },
"Chinese (Traditional) - Microsoft Pinyin IME 3.0" },
{ KBD_CHINESE_TRADITIONAL_ALPHANUMERIC, "romanime.ime", "Chinese (Traditional) - Alphanumeric" }
}
#define KBD_CHINESE_TRADITIONAL_BIG5_CODE
Definition: keyboard.h:209
#define KBD_CHINESE_TRADITIONAL_ARRAY
Definition: keyboard.h:210
#define KBD_CHINESE_SIMPLIFIED_SHUANGPIN
Definition: keyboard.h:206
#define KBD_CHINESE_TRADITIONAL_QUICK
Definition: keyboard.h:207
#define KBD_CHINESE_TRADITIONAL_PHONETIC
Definition: keyboard.h:201
#define KBD_CHINESE_SIMPLIFIED_QUANPIN
Definition: keyboard.h:204
#define KBD_CHINESE_TRADITIONAL_NEW_PHONETIC
Definition: keyboard.h:214
#define KBD_KOREAN_INPUT_SYSTEM_IME_2000
Definition: keyboard.h:203
#define KBD_CHINESE_TRADITIONAL_CHANGJIE
Definition: keyboard.h:205
#define KBD_JAPANESE_INPUT_SYSTEM_MS_IME2002
Definition: keyboard.h:202
#define KBD_CHINESE_TRADITIONAL_UNICODE
Definition: keyboard.h:213
#define KBD_CHINESE_TRADITIONAL_ALPHANUMERIC
Definition: keyboard.h:217
#define KBD_CHINESE_SIMPLIFIED_ZHENGMA
Definition: keyboard.h:208
#define KBD_CHINESE_TRADITIONAL_MICROSOFT_PINYIN_IME_3
Definition: keyboard.h:216
#define KBD_CHINESE_TRADITIONAL_DAYI
Definition: keyboard.h:212
#define KBD_CHINESE_TRADITIONAL_NEW_CHANGJIE
Definition: keyboard.h:215
#define KBD_CHINESE_SIMPLIFIED_NEIMA
Definition: keyboard.h:211

◆ sRDP_KEYBOARD_IME_TABLE_len

const size_t sRDP_KEYBOARD_IME_TABLE_len = ARRAYSIZE(sRDP_KEYBOARD_IME_TABLE)
static

◆ sRDP_KEYBOARD_LAYOUT_TABLE

const RDP_KEYBOARD_LAYOUT sRDP_KEYBOARD_LAYOUT_TABLE[]
static

◆ sRDP_KEYBOARD_LAYOUT_TABLE_len

const size_t sRDP_KEYBOARD_LAYOUT_TABLE_len = ARRAYSIZE(sRDP_KEYBOARD_LAYOUT_TABLE)
static

◆ sRDP_KEYBOARD_LAYOUT_VARIANT_TABLE

const RDP_KEYBOARD_LAYOUT_VARIANT sRDP_KEYBOARD_LAYOUT_VARIANT_TABLE[]
static

◆ sRDP_KEYBOARD_LAYOUT_VARIANT_TABLE_len

const size_t sRDP_KEYBOARD_LAYOUT_VARIANT_TABLE_len
static
Initial value:
=
static const RDP_KEYBOARD_LAYOUT_VARIANT sRDP_KEYBOARD_LAYOUT_VARIANT_TABLE[]
Definition: keyboard_layout.c:752
#define ARRAYSIZE(A)
Definition: spec.h:935