#include <SDL_BWin.h>
Definition at line 64 of file SDL_BWin.h.
◆ SDL_BWin()
SDL_BWin::SDL_BWin |
( |
BRect |
bounds, |
|
|
window_look |
look, |
|
|
uint32 |
flags |
|
) |
| |
|
inline |
Definition at line 68 of file SDL_BWin.h.
69 : BDirectWindow(bounds,
"Untitled", look, B_NORMAL_WINDOW_FEEL,
flags)
93 B_NORMAL_PRIORITY, (
void*)
this);
References _bitmap, _buffer_created, _buffer_dirty, _buffer_locker, _clips, _connected, _connection_disabled, _draw_thread_id, _gl_type, _inhibit_resize, _last_buttons, _mouse_focused, _num_clips, _prev_frame, _SDL_GLView, _shown, _trash_window_buffer, HAIKU_DrawThread(), and NULL.
◆ ~ SDL_BWin()
◆ _KeyEvent()
void SDL_BWin::_KeyEvent |
( |
int32 |
keyCode, |
|
|
const int8 * |
keyUtf8, |
|
|
const ssize_t & |
len, |
|
|
int32 |
keyState |
|
) |
| |
|
inlineprivate |
Definition at line 527 of file SDL_BWin.h.
530 msg.AddInt32(
"key-state", keyState);
531 msg.AddInt32(
"key-scancode", keyCode);
532 if (keyUtf8 !=
NULL) {
533 msg.AddData(
"key-utf8", B_INT8_TYPE, (
const void*)keyUtf8,
len);
535 be_app->PostMessage(&msg);
References BAPP_KEY, and NULL.
Referenced by DispatchMessage().
◆ _MouseButtonEvent()
void SDL_BWin::_MouseButtonEvent |
( |
int32 |
buttons, |
|
|
Uint8 |
state |
|
) |
| |
|
inlineprivate |
◆ _MouseFocusEvent()
void SDL_BWin::_MouseFocusEvent |
( |
bool |
focusGained | ) |
|
|
inlineprivate |
◆ _MouseMotionEvent()
void SDL_BWin::_MouseMotionEvent |
( |
BPoint & |
where, |
|
|
int32 |
transit |
|
) |
| |
|
inlineprivate |
◆ _MouseWheelEvent()
void SDL_BWin::_MouseWheelEvent |
( |
int32 |
x, |
|
|
int32 |
y |
|
) |
| |
|
inlineprivate |
◆ _MoveTo()
void SDL_BWin::_MoveTo |
( |
BMessage * |
msg | ) |
|
|
inlineprivate |
Definition at line 559 of file SDL_BWin.h.
562 msg->FindInt32(
"window-x", &
x) != B_OK ||
563 msg->FindInt32(
"window-y", &
y) != B_OK
Referenced by MessageReceived().
◆ _PostWindowEvent()
void SDL_BWin::_PostWindowEvent |
( |
BMessage & |
msg | ) |
|
|
inlineprivate |
Definition at line 543 of file SDL_BWin.h.
544 msg.AddInt32(
"window-id",
_id);
545 be_app->PostMessage(&msg);
References _id.
Referenced by _MouseFocusEvent(), _MouseMotionEvent(), _MouseWheelEvent(), _RepaintEvent(), _SendMouseButton(), FrameMoved(), FrameResized(), Hide(), Minimize(), QuitRequested(), Show(), WindowActivated(), and Zoom().
◆ _RepaintEvent()
void SDL_BWin::_RepaintEvent |
( |
| ) |
|
|
inlineprivate |
◆ _ResizeTo()
void SDL_BWin::_ResizeTo |
( |
BMessage * |
msg | ) |
|
|
inlineprivate |
Definition at line 570 of file SDL_BWin.h.
573 msg->FindInt32(
"window-w", &
w) != B_OK ||
574 msg->FindInt32(
"window-h", &
h) != B_OK
Referenced by MessageReceived().
◆ _Restore()
void SDL_BWin::_Restore |
( |
| ) |
|
|
inlineprivate |
◆ _SendMouseButton()
void SDL_BWin::_SendMouseButton |
( |
int32 |
button, |
|
|
int32 |
state |
|
) |
| |
|
inlineprivate |
◆ _SetBordered()
void SDL_BWin::_SetBordered |
( |
BMessage * |
msg | ) |
|
|
inlineprivate |
Definition at line 581 of file SDL_BWin.h.
583 if(msg->FindBool(
"window-border", &bEnabled) != B_OK) {
586 SetLook(bEnabled ? B_TITLED_WINDOW_LOOK : B_NO_BORDER_WINDOW_LOOK);
Referenced by MessageReceived().
◆ _SetFullScreen()
void SDL_BWin::_SetFullScreen |
( |
BMessage * |
msg | ) |
|
|
inlineprivate |
Definition at line 612 of file SDL_BWin.h.
615 msg->FindBool(
"fullscreen", &fullscreen) != B_OK
619 SetFullScreen(fullscreen);
Referenced by MessageReceived().
◆ _SetResizable()
void SDL_BWin::_SetResizable |
( |
BMessage * |
msg | ) |
|
|
inlineprivate |
Definition at line 589 of file SDL_BWin.h.
591 if(msg->FindBool(
"window-resizable", &bEnabled) != B_OK) {
595 SetFlags(Flags() & ~(B_NOT_RESIZABLE | B_NOT_ZOOMABLE));
597 SetFlags(Flags() | (B_NOT_RESIZABLE | B_NOT_ZOOMABLE));
Referenced by MessageReceived().
◆ _SetTitle()
void SDL_BWin::_SetTitle |
( |
BMessage * |
msg | ) |
|
|
inlineprivate |
◆ BufferExists()
bool SDL_BWin::BufferExists |
( |
| ) |
|
|
inline |
◆ BufferIsDirty()
bool SDL_BWin::BufferIsDirty |
( |
| ) |
|
|
inline |
◆ CanTrashWindowBuffer()
bool SDL_BWin::CanTrashWindowBuffer |
( |
| ) |
|
|
inline |
◆ Connected()
bool SDL_BWin::Connected |
( |
| ) |
|
|
inline |
◆ ConnectionEnabled()
bool SDL_BWin::ConnectionEnabled |
( |
| ) |
|
|
inline |
◆ CreateGLView()
virtual BGLView* SDL_BWin::CreateGLView |
( |
Uint32 |
gl_flags | ) |
|
|
inlinevirtual |
◆ DirectConnected()
virtual void SDL_BWin::DirectConnected |
( |
direct_buffer_info * |
info | ) |
|
|
inlinevirtual |
Definition at line 167 of file SDL_BWin.h.
174 || ((info->buffer_state & B_BUFFER_RESIZED)
175 || (info->buffer_state & B_BUFFER_RESET)
176 || (info->driver_state == B_MODE_CHANGED));
179 switch(info->buffer_state & B_DIRECT_MODE_MASK) {
183 case B_DIRECT_MODIFY:
199 _bits = (uint8*) info->bits;
219 BDirectWindow::DirectConnected(info);
References _bits, _bounds, _buffer_dirty, _bytes_per_px, _clips, _connected, _connection_disabled, _num_clips, _row_bytes, _SDL_GLView, _trash_window_buffer, free, LockBuffer(), malloc, memcpy, NULL, and UnlockBuffer().
◆ DispatchMessage()
virtual void SDL_BWin::DispatchMessage |
( |
BMessage * |
msg, |
|
|
BHandler * |
target |
|
) |
| |
|
inlinevirtual |
Definition at line 310 of file SDL_BWin.h.
319 if (msg->FindPoint(
"where", &where) == B_OK
320 && msg->FindInt32(
"be:transit", &transit) == B_OK) {
326 if (msg->FindInt32(
"buttons", &buttons) == B_OK) {
332 if (msg->FindInt32(
"buttons", &buttons) == B_OK) {
337 case B_MOUSE_WHEEL_CHANGED:
339 if (msg->FindFloat(
"be:wheel_delta_x", &
x) == B_OK
340 && msg->FindFloat(
"be:wheel_delta_y", &
y) == B_OK) {
349 int8 bytes[4] = { 0, 0, 0, 0 };
350 while (i < 4 && msg->FindInt8(
"byte",
i, &
byte) == B_OK) {
354 if (msg->FindInt32(
"key", &
key) == B_OK) {
360 case B_UNMAPPED_KEY_DOWN:
361 if (msg->FindInt32(
"key", &
key) == B_OK) {
367 case B_UNMAPPED_KEY_UP:
368 if (msg->FindInt32(
"key", &
key) == B_OK) {
383 BDirectWindow::DispatchMessage(msg,
target);
References _KeyEvent(), _MouseButtonEvent(), _MouseMotionEvent(), _MouseWheelEvent(), i, NULL, SDL_PRESSED, and SDL_RELEASED.
◆ FrameMoved()
virtual void SDL_BWin::FrameMoved |
( |
BPoint |
origin | ) |
|
|
inlinevirtual |
◆ FrameResized()
virtual void SDL_BWin::FrameResized |
( |
float |
width, |
|
|
float |
height |
|
) |
| |
|
inlinevirtual |
◆ GetBitmap()
BBitmap* SDL_BWin::GetBitmap |
( |
| ) |
|
|
inline |
◆ GetBufferPx()
uint8* SDL_BWin::GetBufferPx |
( |
| ) |
|
|
inline |
◆ GetBytesPerPx()
int32 SDL_BWin::GetBytesPerPx |
( |
| ) |
|
|
inline |
◆ GetClips()
clipping_rect* SDL_BWin::GetClips |
( |
| ) |
|
|
inline |
◆ GetFbX()
int32 SDL_BWin::GetFbX |
( |
| ) |
|
|
inline |
◆ GetFbY()
int32 SDL_BWin::GetFbY |
( |
| ) |
|
|
inline |
◆ GetGLType()
Uint32 SDL_BWin::GetGLType |
( |
| ) |
|
|
inline |
◆ GetGLView()
BGLView* SDL_BWin::GetGLView |
( |
| ) |
|
|
inline |
◆ GetID()
int32 SDL_BWin::GetID |
( |
| ) |
|
|
inline |
◆ GetNumClips()
int32 SDL_BWin::GetNumClips |
( |
| ) |
|
|
inline |
◆ GetRowBytes()
uint32 SDL_BWin::GetRowBytes |
( |
| ) |
|
|
inline |
◆ Hide()
virtual void SDL_BWin::Hide |
( |
| ) |
|
|
inlinevirtual |
◆ IsShown()
bool SDL_BWin::IsShown |
( |
| ) |
|
|
inline |
◆ LockBuffer()
void SDL_BWin::LockBuffer |
( |
| ) |
|
|
inline |
◆ MessageReceived()
virtual void SDL_BWin::MessageReceived |
( |
BMessage * |
message | ) |
|
|
inlinevirtual |
Definition at line 387 of file SDL_BWin.h.
425 BDirectWindow::MessageReceived(
message);
References _MoveTo(), _ResizeTo(), _Restore(), _SetBordered(), _SetFullScreen(), _SetResizable(), _SetTitle(), BWIN_FULLSCREEN, BWIN_HIDE_WINDOW, BWIN_MAXIMIZE_WINDOW, BWIN_MINIMIZE_WINDOW, BWIN_MOVE_WINDOW, BWIN_RESIZE_WINDOW, BWIN_RESTORE_WINDOW, BWIN_SET_BORDERED, BWIN_SET_RESIZABLE, BWIN_SET_TITLE, BWIN_SHOW_WINDOW, Hide(), Minimize(), and Show().
◆ Minimize()
virtual void SDL_BWin::Minimize |
( |
bool |
minimize | ) |
|
|
inlinevirtual |
◆ QuitRequested()
virtual bool SDL_BWin::QuitRequested |
( |
| ) |
|
|
inlinevirtual |
◆ RemoveGLView()
virtual void SDL_BWin::RemoveGLView |
( |
| ) |
|
|
inlinevirtual |
◆ SetBitmap()
void SDL_BWin::SetBitmap |
( |
BBitmap * |
bitmap | ) |
|
|
inline |
◆ SetBufferDirty()
void SDL_BWin::SetBufferDirty |
( |
bool |
bufferDirty | ) |
|
|
inline |
◆ SetBufferExists()
void SDL_BWin::SetBufferExists |
( |
bool |
bufferExists | ) |
|
|
inline |
◆ SetID()
void SDL_BWin::SetID |
( |
int32 |
id | ) |
|
|
inline |
◆ SetTrashBuffer()
void SDL_BWin::SetTrashBuffer |
( |
bool |
trash | ) |
|
|
inline |
◆ Show()
virtual void SDL_BWin::Show |
( |
| ) |
|
|
inlinevirtual |
◆ SwapBuffers()
virtual void SDL_BWin::SwapBuffers |
( |
void |
| ) |
|
|
inlinevirtual |
◆ UnlockBuffer()
void SDL_BWin::UnlockBuffer |
( |
| ) |
|
|
inline |
◆ WindowActivated()
virtual void SDL_BWin::WindowActivated |
( |
bool |
active | ) |
|
|
inlinevirtual |
◆ Zoom()
virtual void SDL_BWin::Zoom |
( |
BPoint |
origin, |
|
|
float |
width, |
|
|
float |
height |
|
) |
| |
|
inlinevirtual |
◆ _bitmap
BBitmap* SDL_BWin::_bitmap |
|
private |
◆ _bits
◆ _bounds
clipping_rect SDL_BWin::_bounds |
|
private |
◆ _buffer_created
bool SDL_BWin::_buffer_created |
|
private |
◆ _buffer_dirty
bool SDL_BWin::_buffer_dirty |
|
private |
◆ _buffer_locker
BLocker* SDL_BWin::_buffer_locker |
|
private |
◆ _bytes_per_px
int32 SDL_BWin::_bytes_per_px |
|
private |
◆ _clips
clipping_rect* SDL_BWin::_clips |
|
private |
◆ _connected
bool SDL_BWin::_connected |
|
private |
◆ _connection_disabled
bool SDL_BWin::_connection_disabled |
|
private |
◆ _draw_thread_id
thread_id SDL_BWin::_draw_thread_id |
|
private |
◆ _gl_type
◆ _id
◆ _inhibit_resize
bool SDL_BWin::_inhibit_resize |
|
private |
◆ _last_buttons
int32 SDL_BWin::_last_buttons |
|
private |
◆ _mouse_focused
bool SDL_BWin::_mouse_focused |
|
private |
◆ _num_clips
uint32 SDL_BWin::_num_clips |
|
private |
◆ _prev_frame
BRect* SDL_BWin::_prev_frame |
|
private |
◆ _row_bytes
uint32 SDL_BWin::_row_bytes |
|
private |
◆ _SDL_GLView
BGLView* SDL_BWin::_SDL_GLView |
|
private |
◆ _shown
◆ _trash_window_buffer
bool SDL_BWin::_trash_window_buffer |
|
private |
The documentation for this class was generated from the following file:
void _SetTitle(BMessage *msg)
bool _connection_disabled
void _MouseButtonEvent(int32 buttons, Uint8 state)
virtual void Minimize(bool minimize)
GLint GLint GLsizei width
GLuint GLsizei const GLchar * message
void _MouseMotionEvent(BPoint &where, int32 transit)
void _SetBordered(BMessage *msg)
void _ResizeTo(BMessage *msg)
SDL_Scancode
The SDL keyboard scancode representation.
void _SetResizable(BMessage *msg)
GLfloat GLfloat GLfloat GLfloat h
void _MouseFocusEvent(bool focusGained)
void _MouseWheelEvent(int32 x, int32 y)
GLint GLint GLint GLint GLint x
void _MoveTo(BMessage *msg)
GLint GLint GLsizei GLsizei height
#define SDL_BUTTON_MIDDLE
int32 HAIKU_DrawThread(void *data)
void _PostWindowEvent(BMessage &msg)
void _KeyEvent(int32 keyCode, const int8 *keyUtf8, const ssize_t &len, int32 keyState)
GLint GLint GLint GLint GLint GLint y
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
thread_id _draw_thread_id
bool _trash_window_buffer
@ BAPP_WINDOW_CLOSE_REQUESTED
void _SetFullScreen(BMessage *msg)
void _SendMouseButton(int32 button, int32 state)
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)
GLubyte GLubyte GLubyte GLubyte w