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
keyboard_x11.c
keyboard_x11.h)
-set(FREERDP_LOCALE_XKB_SRCS
- keyboard_xkb.c
- keyboard_xkb.h)
+set(FREERDP_LOCALE_XKBFILE_SRCS
+ keyboard_xkbfile.c
+ keyboard_xkbfile.h)
set(FREERDP_LOCALE_SUN_SRCS
keyboard_sun.c
if(NOT APPLE)
find_suggested_package(XKBFile)
if(WITH_XKBFILE)
- add_definitions(-DWITH_XKB)
+ add_definitions(-DWITH_XKBFILE)
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})
endif()
endif()
target_link_libraries(freerdp-locale ${FREERDP_LOCALE_LINK_LIBRARIES})
install(TARGETS freerdp-locale DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
#include "keyboard_x11.h"
#endif
-#ifdef WITH_XKB
-#include "keyboard_xkb.h"
+#ifdef WITH_XKBFILE
+#include "keyboard_xkbfile.h"
#endif
#ifdef WITH_SUN
uint32 freerdp_keyboard_init(uint32 keyboardLayoutId)
{
-#ifdef WITH_XKB
- keyboardLayoutId = freerdp_keyboard_init_xkb(keyboardLayoutId);
+#ifdef WITH_XKBFILE
+ keyboardLayoutId = freerdp_keyboard_init_xkbfile(keyboardLayoutId);
if (keyboardLayoutId == 0)
keyboardLayoutId = freerdp_keyboard_init_x11(keyboardLayoutId);
{ 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;
{
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;
}
}
#ifndef __LOCALE_KEYBOARD_SUN_H
#define __LOCALE_KEYBOARD_SUN_H
-#include "keyboard_x11.h"
-
-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);
#endif /* __LOCALE_KEYBOARD_SUN_H */
#include "liblocale.h"
-#include "keyboard_xkb.h"
+#include "keyboard_xkbfile.h"
#include "keyboard_x11.h"
#include <freerdp/locale/keyboard.h>
return (void*) display;
}
-uint32 freerdp_keyboard_init_xkb(uint32 keyboardLayoutId)
+uint32 freerdp_keyboard_init_xkbfile(uint32 keyboardLayoutId)
{
void* display;
memset(X11_KEYCODE_TO_RDP_SCANCODE, 0, sizeof(X11_KEYCODE_TO_RDP_SCANCODE));
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);
}
- freerdp_keyboard_load_map_from_xkb(display);
+ freerdp_keyboard_load_map_from_xkbfile(display);
XCloseDisplay(display);
return s;
}
-uint32 detect_keyboard_layout_from_xkb(void* display)
+uint32 detect_keyboard_layout_from_xkbfile(void* display)
{
char* layout;
char* variant;
return keyboard_layout;
}
-int freerdp_keyboard_load_map_from_xkb(void* display)
+int freerdp_keyboard_load_map_from_xkbfile(void* display)
{
int i, j;
uint32 vkcode;
};
typedef struct _VIRTUAL_KEY_CODE_TO_XKB_KEY_NAME VIRTUAL_KEY_CODE_TO_XKB_KEY_NAME;
-uint32 freerdp_keyboard_init_xkb(uint32 keyboardLayoutId);
-uint32 detect_keyboard_layout_from_xkb(void* display);
-int freerdp_keyboard_load_map_from_xkb(void* display);
+uint32 freerdp_keyboard_init_xkbfile(uint32 keyboardLayoutId);
+uint32 detect_keyboard_layout_from_xkbfile(void* display);
+int freerdp_keyboard_load_map_from_xkbfile(void* display);
#endif /* __LOCALE_KEYBOARD_XKB_H */