fix naming convention
This commit is contained in:
parent
01d6ea5ad0
commit
832968e8fc
@ -219,6 +219,6 @@ func (manager *RemoteManager) GetScreenSize() *types.ScreenSize {
|
|||||||
return xorg.GetScreenSize()
|
return xorg.GetScreenSize()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (manager *RemoteManager) SetKeyboard(layout string) {
|
func (manager *RemoteManager) SetKeyboardLayout(layout string) {
|
||||||
xorg.SetKeyboard(layout)
|
xorg.SetKeyboardLayout(layout)
|
||||||
}
|
}
|
@ -22,5 +22,5 @@ type RemoteManager interface {
|
|||||||
ReadClipboard() string
|
ReadClipboard() string
|
||||||
WriteClipboard(data string)
|
WriteClipboard(data string)
|
||||||
ResetKeys()
|
ResetKeys()
|
||||||
SetKeyboard(layout string)
|
SetKeyboardLayout(layout string)
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,6 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
h.remote.SetKeyboard(payload.Layout)
|
h.remote.SetKeyboardLayout(payload.Layout)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ short XGetScreenRate() {
|
|||||||
return XRRConfigCurrentRate(conf);
|
return XRRConfigCurrentRate(conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetKeyboard(char *layout) {
|
void SetKeyboardLayout(char *layout) {
|
||||||
// TOOD: refactor, use native API.
|
// TOOD: refactor, use native API.
|
||||||
char cmd[13] = "setxkbmap ";
|
char cmd[13] = "setxkbmap ";
|
||||||
strncat(cmd, layout, 2);
|
strncat(cmd, layout, 2);
|
||||||
|
@ -211,7 +211,7 @@ func GetScreenSize() *types.ScreenSize {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetKeyboard(layout string) {
|
func SetKeyboardLayout(layout string) {
|
||||||
mu.Lock()
|
mu.Lock()
|
||||||
defer mu.Unlock()
|
defer mu.Unlock()
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ func SetKeyboard(layout string) {
|
|||||||
layoutUnsafe := C.CString(layout)
|
layoutUnsafe := C.CString(layout)
|
||||||
defer C.free(unsafe.Pointer(layoutUnsafe))
|
defer C.free(unsafe.Pointer(layoutUnsafe))
|
||||||
|
|
||||||
C.SetKeyboard(layoutUnsafe)
|
C.SetKeyboardLayout(layoutUnsafe)
|
||||||
}
|
}
|
||||||
|
|
||||||
//export goCreateScreenSize
|
//export goCreateScreenSize
|
||||||
|
@ -39,6 +39,6 @@
|
|||||||
void XDisplayClose(void);
|
void XDisplayClose(void);
|
||||||
void XDisplaySet(char *input);
|
void XDisplaySet(char *input);
|
||||||
|
|
||||||
void SetKeyboard(char *layout);
|
void SetKeyboardLayout(char *layout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user