24 #include <InterfaceKit.h>
25 #include <LocaleRoster.h>
27 #include <OpenGLKit.h>
30 #include "../../video/haiku/SDL_bkeyboard.h"
37 #include "../../SDL_internal.h"
42 #include "../../events/SDL_events_c.h"
43 #include "../../video/haiku/SDL_bframebuffer.h"
157 case B_LOCALE_CHANGED:
166 BApplication::MessageReceived(
message);
230 msg->FindInt32(
"x", &
x) != B_OK ||
231 msg->FindInt32(
"y", &
y) != B_OK
239 int winWidth, winHeight, winPosX, winPosY;
242 int dx =
x - (winWidth / 2);
243 int dy =
y - (winHeight / 2);
245 set_mouse_position((winPosX + winWidth / 2), (winPosY + winHeight / 2));
246 if (!be_app->IsCursorHidden())
247 be_app->HideCursor();
251 be_app->ShowCursor();
264 msg->FindInt32(
"button-id", &
button) != B_OK ||
265 msg->FindInt32(
"button-state", &
state) != B_OK
276 int32 xTicks, yTicks;
279 msg->FindInt32(
"xticks", &xTicks) != B_OK ||
280 msg->FindInt32(
"yticks", &yTicks) != B_OK
289 int32 scancode,
state;
291 msg->FindInt32(
"key-state", &
state) != B_OK ||
292 msg->FindInt32(
"key-scancode", &scancode) != B_OK
307 if (msg->FindData(
"key-utf8", B_INT8_TYPE, (
const void**)&keyUtf8, &
count) == B_OK) {
322 msg->FindBool(
"focusGained", &bSetFocus) != B_OK
341 msg->FindBool(
"focusGained", &bSetFocus) != B_OK
361 msg->FindInt32(
"window-x", &xPos) != B_OK ||
362 msg->FindInt32(
"window-y", &yPos) != B_OK
377 msg->FindInt32(
"window-w", &
w) != B_OK ||
378 msg->FindInt32(
"window-h", &
h) != B_OK
387 return msg->FindInt32(
"window-id", winID) == B_OK;
@ BAPP_WINDOW_CLOSE_REQUESTED
int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
int8 HAIKU_GetKeyState(int32 bkey)
void HAIKU_SetKeyState(int32 bkey, int8 state)
SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey)
#define SDL_GetWindowSize
#define SDL_GetKeyboardFocus
#define SDL_GetMouseFocus
#define SDL_GetWindowPosition
int SDL_SendLocaleChangedEvent(void)
#define SDL_TEXTINPUTEVENT_TEXT_SIZE
void SDL_SetKeyboardFocus(SDL_Window *window)
int SDL_SendKeyboardText(const char *text)
int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode)
int SDL_SendMouseButton(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button)
SDL_Mouse * SDL_GetMouse(void)
void SDL_SetMouseFocus(SDL_Window *window)
int SDL_SendMouseWheel(SDL_Window *window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction)
int SDL_SendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y)
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLint GLint GLint GLint x
GLuint GLsizei const GLchar * message
GLfloat GLfloat GLfloat GLfloat h
GLubyte GLubyte GLubyte GLubyte w
@ SDL_WINDOWEVENT_RESIZED
@ SDL_WINDOWEVENT_MINIMIZED
@ SDL_WINDOWEVENT_MAXIMIZED
@ SDL_WINDOWEVENT_EXPOSED
int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, int data2)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
void ClearID(SDL_BWin *bwin)
void _HandleWindowResized(BMessage *msg)
int32 _GetNumWindowSlots()
virtual void MessageReceived(BMessage *message)
std::vector< SDL_Window * > _window_map
void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType)
void _HandleMouseFocus(BMessage *msg)
void _SetSDLWindow(SDL_Window *win, int32 winID)
void _HandleKeyboardFocus(BMessage *msg)
void _PushBackWindow(SDL_Window *win)
void _HandleWindowMoved(BMessage *msg)
void _HandleMouseWheel(BMessage *msg)
BGLView * _current_context
void SetCurrentContext(BGLView *newContext)
SDL_Window * GetSDLWindow(int32 winID)
void _HandleMouseMove(BMessage *msg)
int32 GetID(SDL_Window *win)
void _HandleKey(BMessage *msg)
void _HandleMouseButton(BMessage *msg)
SDL_BApp(const char *signature)
bool _GetWinID(BMessage *msg, int32 *winID)
The type used to identify a window.
static char text[MAX_TEXT_LENGTH]