mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
locale: clarify internally what is xkbfile and what is xkb
Refactoring - no semantic changes. --HG-- rename : libfreerdp-locale/keyboard_xkb.c => libfreerdp-locale/keyboard_xkbfile.c rename : libfreerdp-locale/keyboard_xkb.h => libfreerdp-locale/keyboard_xkbfile.h
This commit is contained in:
parent
6c19f819e1
commit
3d57e65a65
@ -29,9 +29,9 @@ set(FREERDP_LOCALE_X11_SRCS
|
|||||||
keyboard_x11.c
|
keyboard_x11.c
|
||||||
keyboard_x11.h)
|
keyboard_x11.h)
|
||||||
|
|
||||||
set(FREERDP_LOCALE_XKB_SRCS
|
set(FREERDP_LOCALE_XKBFILE_SRCS
|
||||||
keyboard_xkb.c
|
keyboard_xkbfile.c
|
||||||
keyboard_xkb.h)
|
keyboard_xkbfile.h)
|
||||||
|
|
||||||
set(FREERDP_LOCALE_SUN_SRCS
|
set(FREERDP_LOCALE_SUN_SRCS
|
||||||
keyboard_sun.c
|
keyboard_sun.c
|
||||||
@ -53,9 +53,9 @@ if(NOT WIN32)
|
|||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
find_suggested_package(XKBFile)
|
find_suggested_package(XKBFile)
|
||||||
if(WITH_XKBFILE)
|
if(WITH_XKBFILE)
|
||||||
add_definitions(-DWITH_XKB)
|
add_definitions(-DWITH_XKBFILE)
|
||||||
include_directories(${XKBFILE_INCLUDE_DIRS})
|
include_directories(${XKBFILE_INCLUDE_DIRS})
|
||||||
set(FREERDP_LOCALE_SRCS ${FREERDP_LOCALE_SRCS} ${FREERDP_LOCALE_XKB_SRCS})
|
set(FREERDP_LOCALE_SRCS ${FREERDP_LOCALE_SRCS} ${FREERDP_LOCALE_XKBFILE_SRCS})
|
||||||
set(FREERDP_LOCALE_LINK_LIBRARIES ${FREERDP_LOCALE_LINK_LIBRARIES} ${XKBFILE_LIBRARIES})
|
set(FREERDP_LOCALE_LINK_LIBRARIES ${FREERDP_LOCALE_LINK_LIBRARIES} ${XKBFILE_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@ -73,4 +73,3 @@ set_target_properties(freerdp-locale PROPERTIES VERSION ${FREERDP_VERSION_FULL}
|
|||||||
target_link_libraries(freerdp-locale ${FREERDP_LOCALE_LINK_LIBRARIES})
|
target_link_libraries(freerdp-locale ${FREERDP_LOCALE_LINK_LIBRARIES})
|
||||||
|
|
||||||
install(TARGETS freerdp-locale DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(TARGETS freerdp-locale DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
#include "keyboard_x11.h"
|
#include "keyboard_x11.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_XKB
|
#ifdef WITH_XKBFILE
|
||||||
#include "keyboard_xkb.h"
|
#include "keyboard_xkbfile.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_SUN
|
#ifdef WITH_SUN
|
||||||
@ -244,8 +244,8 @@ uint32 freerdp_detect_keyboard(uint32 keyboardLayoutID)
|
|||||||
|
|
||||||
uint32 freerdp_keyboard_init(uint32 keyboardLayoutId)
|
uint32 freerdp_keyboard_init(uint32 keyboardLayoutId)
|
||||||
{
|
{
|
||||||
#ifdef WITH_XKB
|
#ifdef WITH_XKBFILE
|
||||||
keyboardLayoutId = freerdp_keyboard_init_xkb(keyboardLayoutId);
|
keyboardLayoutId = freerdp_keyboard_init_xkbfile(keyboardLayoutId);
|
||||||
|
|
||||||
if (keyboardLayoutId == 0)
|
if (keyboardLayoutId == 0)
|
||||||
keyboardLayoutId = freerdp_keyboard_init_x11(keyboardLayoutId);
|
keyboardLayoutId = freerdp_keyboard_init_x11(keyboardLayoutId);
|
||||||
|
@ -197,7 +197,7 @@ static const SOLARIS_KEYBOARD SOLARIS_KEYBOARD_TABLE[] =
|
|||||||
{ 6, 272, "sun(type6)", KBD_PORTUGUESE_BRAZILIAN_ABNT } /* Brazil6_usb */
|
{ 6, 272, "sun(type6)", KBD_PORTUGUESE_BRAZILIAN_ABNT } /* Brazil6_usb */
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32 freerdp_detect_keyboard_type_and_layout_solaris(char* xkbfile, int length)
|
uint32 freerdp_detect_keyboard_type_and_layout_solaris(char* keyboard_type, int length)
|
||||||
{
|
{
|
||||||
FILE* kbd;
|
FILE* kbd;
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ uint32 freerdp_detect_keyboard_type_and_layout_solaris(char* xkbfile, int length
|
|||||||
{
|
{
|
||||||
if (SOLARIS_KEYBOARD_TABLE[i].layout == layout)
|
if (SOLARIS_KEYBOARD_TABLE[i].layout == layout)
|
||||||
{
|
{
|
||||||
strncpy(xkbfile, SOLARIS_KEYBOARD_TABLE[i].xkbType, length);
|
strncpy(keyboard_type, SOLARIS_KEYBOARD_TABLE[i].xkbType, length);
|
||||||
return SOLARIS_KEYBOARD_TABLE[i].keyboardLayoutId;
|
return SOLARIS_KEYBOARD_TABLE[i].keyboardLayoutId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
#ifndef __LOCALE_KEYBOARD_SUN_H
|
#ifndef __LOCALE_KEYBOARD_SUN_H
|
||||||
#define __LOCALE_KEYBOARD_SUN_H
|
#define __LOCALE_KEYBOARD_SUN_H
|
||||||
|
|
||||||
#include "keyboard_x11.h"
|
uint32 freerdp_detect_keyboard_type_and_layout_solaris(char* keyboard_type, int length);
|
||||||
|
|
||||||
uint32 freerdp_detect_keyboard_type_and_layout_solaris(char* xkbfile, int length);
|
|
||||||
|
|
||||||
#endif /* __LOCALE_KEYBOARD_SUN_H */
|
#endif /* __LOCALE_KEYBOARD_SUN_H */
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "liblocale.h"
|
#include "liblocale.h"
|
||||||
|
|
||||||
#include "keyboard_xkb.h"
|
#include "keyboard_xkbfile.h"
|
||||||
#include "keyboard_x11.h"
|
#include "keyboard_x11.h"
|
||||||
#include <freerdp/locale/keyboard.h>
|
#include <freerdp/locale/keyboard.h>
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ void* freerdp_keyboard_xkb_init()
|
|||||||
return (void*) display;
|
return (void*) display;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 freerdp_keyboard_init_xkb(uint32 keyboardLayoutId)
|
uint32 freerdp_keyboard_init_xkbfile(uint32 keyboardLayoutId)
|
||||||
{
|
{
|
||||||
void* display;
|
void* display;
|
||||||
memset(X11_KEYCODE_TO_RDP_SCANCODE, 0, sizeof(X11_KEYCODE_TO_RDP_SCANCODE));
|
memset(X11_KEYCODE_TO_RDP_SCANCODE, 0, sizeof(X11_KEYCODE_TO_RDP_SCANCODE));
|
||||||
@ -331,11 +331,11 @@ uint32 freerdp_keyboard_init_xkb(uint32 keyboardLayoutId)
|
|||||||
|
|
||||||
if (keyboardLayoutId == 0)
|
if (keyboardLayoutId == 0)
|
||||||
{
|
{
|
||||||
keyboardLayoutId = detect_keyboard_layout_from_xkb(display);
|
keyboardLayoutId = detect_keyboard_layout_from_xkbfile(display);
|
||||||
DEBUG_KBD("detect_keyboard_layout_from_xkb: %X", keyboardLayoutId);
|
DEBUG_KBD("detect_keyboard_layout_from_xkb: %X", keyboardLayoutId);
|
||||||
}
|
}
|
||||||
|
|
||||||
freerdp_keyboard_load_map_from_xkb(display);
|
freerdp_keyboard_load_map_from_xkbfile(display);
|
||||||
|
|
||||||
XCloseDisplay(display);
|
XCloseDisplay(display);
|
||||||
|
|
||||||
@ -364,7 +364,7 @@ static char* comma_substring(char* s, int n)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 detect_keyboard_layout_from_xkb(void* display)
|
uint32 detect_keyboard_layout_from_xkbfile(void* display)
|
||||||
{
|
{
|
||||||
char* layout;
|
char* layout;
|
||||||
char* variant;
|
char* variant;
|
||||||
@ -405,7 +405,7 @@ uint32 detect_keyboard_layout_from_xkb(void* display)
|
|||||||
return keyboard_layout;
|
return keyboard_layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
int freerdp_keyboard_load_map_from_xkb(void* display)
|
int freerdp_keyboard_load_map_from_xkbfile(void* display)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
uint32 vkcode;
|
uint32 vkcode;
|
@ -31,8 +31,8 @@ struct _VIRTUAL_KEY_CODE_TO_XKB_KEY_NAME
|
|||||||
};
|
};
|
||||||
typedef struct _VIRTUAL_KEY_CODE_TO_XKB_KEY_NAME VIRTUAL_KEY_CODE_TO_XKB_KEY_NAME;
|
typedef struct _VIRTUAL_KEY_CODE_TO_XKB_KEY_NAME VIRTUAL_KEY_CODE_TO_XKB_KEY_NAME;
|
||||||
|
|
||||||
uint32 freerdp_keyboard_init_xkb(uint32 keyboardLayoutId);
|
uint32 freerdp_keyboard_init_xkbfile(uint32 keyboardLayoutId);
|
||||||
uint32 detect_keyboard_layout_from_xkb(void* display);
|
uint32 detect_keyboard_layout_from_xkbfile(void* display);
|
||||||
int freerdp_keyboard_load_map_from_xkb(void* display);
|
int freerdp_keyboard_load_map_from_xkbfile(void* display);
|
||||||
|
|
||||||
#endif /* __LOCALE_KEYBOARD_XKB_H */
|
#endif /* __LOCALE_KEYBOARD_XKB_H */
|
Loading…
Reference in New Issue
Block a user