virtualkeyboard: code style fixes

This commit is contained in:
Freeman Lou
2014-11-13 17:51:13 +01:00
committed by François Revol
parent b8fe0b588d
commit 67b3c67768
9 changed files with 33 additions and 39 deletions
@@ -87,11 +87,6 @@ private:
#endif
KeyboardLayoutView::KeyboardLayoutView(const char* name,
BInputServerDevice* dev)
:
@@ -123,7 +123,6 @@ private:
float fGap;
BInputServerDevice* fDevice;
};
@@ -46,7 +46,7 @@ print_key(char *chars, int32 offset, bool last = false)
default:
{
// 2-, 3-, or 4-byte UTF-8 character
char *str = new char[size + 1];
char* str = new char[size + 1];
strncpy(str, &chars[offset], size);
str[size] = 0;
fputs(str, stdout);
@@ -2,8 +2,8 @@
* Copyright 2014 Freeman Lou <freemanlou2430@yahoo.com>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef VKID_H
#define VKID_H
#ifndef VIRTUAL_KEYBOARD_INPUT_DEVICE_H
#define VIRTUAL_KEYBOARD_INPUT_DEVICE_H
#include <InputServerDevice.h>
@@ -28,4 +28,4 @@ private:
extern "C" BInputServerDevice* instantiate_input_device();
#endif // VKID_H
#endif // VIRTUAL_KEYBOARD_INPUT_DEVICE_H
@@ -18,7 +18,7 @@
#include "KeyboardLayoutView.h"
#include "KeymapListItem.h"
static const uint32 kMsgMenuFontChange = 'MMFC';
static const uint32 kMsgMenuFontChange = 'mMFC';
static int
compare_key_list_items(const void* a, const void* b)
@@ -40,8 +40,8 @@ VirtualKeyboardWindow::VirtualKeyboardWindow(BInputServerDevice* dev)
BScreen screen;
BRect screenRect(screen.Frame());
ResizeTo(screenRect.Width(), screenRect.Height()/3);
MoveTo(0,screenRect.Height()-screenRect.Height()/3);
ResizeTo(screenRect.Width(), screenRect.Height() / 3);
MoveTo(0,screenRect.Height() - screenRect.Height() / 3);
SetLayout(new BGroupLayout(B_VERTICAL));
@@ -161,5 +161,5 @@ VirtualKeyboardWindow::_LoadFonts()
void
VirtualKeyboardWindow::MessageReceived(BMessage* message)
{
BWindow::MessageReceived(message);
}