// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::Window(smooth::String const&, smooth::GUI::Point const&, smooth::GUI::Size const&, void*)
S::GUI::Window::Window(const String &title, const Point &iPos, const Size &iSize, Void *iWindow) : Widget(iPos, iSize)
{
	backend = WindowBackend::CreateBackendInstance();
	backend->onEvent.SetParentObject(this);
	backend->onEvent.Connect(&Window::Process, this);

	backend->onCreate.Connect(&Window::OnCreate, this);
	backend->onDestroy.Connect(&Window::OnDestroy, this);

	backend->onMinimize.Connect(&Window::OnMinimize, this);
	backend->onMaximize.Connect(&Window::OnMaximize, this);

	backend->onRestore.Connect(&Window::OnRestore, this);

	backend->doClose.Connect(&doClose);

	windows.Add(this, GetHandle());

	maximized	= False;
	minimized	= False;

	type		= classID;

	order		= 0;

	layoutDirection = LD_DEFAULT;

	if (title != NIL) text = title;
	else		  text = "smooth Application";

#ifdef __WIN32__
	frameWidth	= GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER);
#else
	frameWidth	= 1;

	backend->SetSizeModifier(Size(-6, -6));
#endif

	updateRect	= Rect(Point(-1, -1), Size(0, 0));

	icon		= NIL;

	created		= False;
	visible		= False;
	destroyed	= False;

	visibilitySet	= False;

	mainLayer	= new Layer();

	Add(mainLayer);

	doClose.Connect(True);

	onCreate.SetParentObject(this);
	onPaint.SetParentObject(this);
	onEvent.SetParentObject(this);

	handleSystemMessage.Connect(MessageUnknown);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5c220
movq -0xf8(%rbp), %rdi
movq 0x1327eb(%rip), %rax    # 0x208720
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x5d0, %rdi            # imm = 0x5D0
movq %rdi, -0xf0(%rbp)
xorl %esi, %esi
callq 0x5d4a0
jmp 0xd5f53
movq -0xf8(%rbp), %rdi
addq $0x5d8, %rdi            # imm = 0x5D8
callq 0x5c030
jmp 0xd5f68
movq -0xf8(%rbp), %rdi
addq $0x5ec, %rdi            # imm = 0x5EC
callq 0x5c030
jmp 0xd5f7d
movq -0xf8(%rbp), %rdi
addq $0x600, %rdi            # imm = 0x600
movq %rdi, -0x100(%rbp)
xorl %esi, %esi
callq 0x5da90
jmp 0xd5f9b
movq -0xf8(%rbp), %rdi
addq $0x628, %rdi            # imm = 0x628
movq %rdi, -0x108(%rbp)
callq 0x8aae0
jmp 0xd5fb7
movq -0xf8(%rbp), %rdi
addq $0x648, %rdi            # imm = 0x648
movq %rdi, -0x110(%rbp)
callq 0x8aae0
jmp 0xd5fd3
movq -0xf8(%rbp), %rdi
addq $0x668, %rdi            # imm = 0x668
movq %rdi, -0x118(%rbp)
callq 0xda5b0
jmp 0xd5fef
movq -0xf8(%rbp), %rdi
addq $0x688, %rdi            # imm = 0x688
movq %rdi, -0x120(%rbp)
callq 0xda600
jmp 0xd600b
movq -0xf8(%rbp), %rdi
addq $0x6b0, %rdi            # imm = 0x6B0
movq %rdi, -0x128(%rbp)
callq 0xda640
jmp 0xd6027
callq 0xdc3e0
movq %rax, -0x130(%rbp)
jmp 0xd6035
movq -0xf8(%rbp), %rsi
movq -0x130(%rbp), %rax
movq %rax, 0x5c0(%rsi)
movq 0x5c0(%rsi), %rdi
addq $0x58, %rdi
callq 0x8ad00
jmp 0xd605c
movq -0xf8(%rbp), %rcx
movq 0x5c0(%rcx), %rdi
addq $0x58, %rdi
movq $0x0, -0x40(%rbp)
movq $0x81, -0x48(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xda680
jmp 0xd608d
movq -0xf8(%rbp), %rcx
movq 0x5c0(%rcx), %rdi
addq $0xe0, %rdi
movq $0x0, -0x50(%rbp)
movq $0x171, -0x58(%rbp)     # imm = 0x171
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0xda6e0
jmp 0xd60c1
movq -0xf8(%rbp), %rcx
movq 0x5c0(%rcx), %rdi
addq $0x100, %rdi            # imm = 0x100
movq $0x0, -0x60(%rbp)
movq $0x179, -0x68(%rbp)     # imm = 0x179
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0xda6e0
jmp 0xd60f5
movq -0xf8(%rbp), %rcx
movq 0x5c0(%rcx), %rdi
subq $-0x80, %rdi
movq $0x0, -0x70(%rbp)
movq $0x181, -0x78(%rbp)     # imm = 0x181
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0xda6e0
jmp 0xd6126
movq -0xf8(%rbp), %rcx
movq 0x5c0(%rcx), %rdi
addq $0xa0, %rdi
movq $0x0, -0x80(%rbp)
movq $0x189, -0x88(%rbp) # imm = 0x189
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0xda6e0
jmp 0xd6160
movq -0xf8(%rbp), %rcx
movq 0x5c0(%rcx), %rdi
addq $0xc0, %rdi
movq $0x0, -0x90(%rbp)
movq $0x191, -0x98(%rbp) # imm = 0x191
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0xda6e0
jmp 0xd61a0
movq -0xf8(%rbp), %rsi
movq 0x5c0(%rsi), %rdi
addq $0x30, %rdi
addq $0x688, %rsi            # imm = 0x688
callq 0xda820
jmp 0xd61c0
movq -0xf8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x5d050
movl %eax, -0x134(%rbp)
jmp 0xd61db
movl -0x134(%rbp), %edx
movq 0x1324a0(%rip), %rdi    # 0x208688
leaq -0xa0(%rbp), %rsi
callq 0xda890
jmp 0xd61f6
movq -0xf8(%rbp), %rdi
movb $0x0, 0x5c8(%rdi)
movb $0x0, 0x5c9(%rdi)
movq 0x1325ee(%rip), %rax    # 0x208800
movswl (%rax), %esi
addq $0x20, %rdi
callq 0x5a2e0
jmp 0xd6220
movq -0xf8(%rbp), %rax
movl $0x0, 0x5b8(%rax)
movl $0x0, 0x618(%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x5b110
movb %al, -0x135(%rbp)
jmp 0xd624e
movb -0x135(%rbp), %al
testb $0x1, %al
jne 0xd625d
jmp 0xd6303
movq -0xf8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xf0, %rdi
callq 0x59760
jmp 0xd6276
jmp 0xd6321
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd6592
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd6586
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd657a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd656e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd6562
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd6556
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd654a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd653e
movq -0xf8(%rbp), %rdi
addq $0xf0, %rdi
leaq 0xb12f4(%rip), %rsi     # 0x18760c
callq 0x5a230
jmp 0xd631f
jmp 0xd6321
movq -0xf8(%rbp), %rax
movl $0x1, 0x5e8(%rax)
movq 0x5c0(%rax), %rax
movq %rax, -0x140(%rbp)
leaq -0xa8(%rbp), %rdi
movl $0xfffffffa, %edx       # imm = 0xFFFFFFFA
movl %edx, %esi
callq 0x59260
jmp 0xd6355
movq -0x140(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xdcdd0
jmp 0xd636a
leaq -0xc0(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, %esi
callq 0x5c2c0
jmp 0xd637f
leaq -0xc8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
jmp 0xd6391
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
callq 0x59ff0
jmp 0xd63ad
movq -0xf8(%rbp), %rdi
movups -0xb8(%rbp), %xmm0
movups %xmm0, 0x5ec(%rdi)
addq $0x5d0, %rdi            # imm = 0x5D0
xorl %esi, %esi
callq 0x5ac20
jmp 0xd63d2
movq -0xf8(%rbp), %rax
movb $0x0, 0x5ca(%rax)
movb $0x0, 0xcb(%rax)
movb $0x0, 0x5cb(%rax)
movb $0x0, 0x5cc(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0x148(%rbp)
jmp 0xd6408
movb $0x1, -0xe1(%rbp)
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0xd641f
movq -0x148(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x5afd0
jmp 0xd6434
movq -0xf8(%rbp), %rax
movq -0x148(%rbp), %rcx
movb $0x0, -0xe1(%rbp)
movq %rcx, 0x620(%rax)
leaq -0xe0(%rbp), %rdi
callq 0x5df00
movq -0xf8(%rbp), %rdi
movq 0x620(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xd6475
movq -0xf8(%rbp), %rdi
addq $0x688, %rdi            # imm = 0x688
movl $0x1, %esi
callq 0xda8d0
jmp 0xd648f
movq -0xf8(%rbp), %rsi
movq %rsi, %rdi
addq $0x628, %rdi            # imm = 0x628
callq 0x8ad00
jmp 0xd64a7
movq -0xf8(%rbp), %rsi
movq %rsi, %rdi
addq $0x648, %rdi            # imm = 0x648
callq 0x8ad00
jmp 0xd64bf
movq -0xf8(%rbp), %rsi
movq %rsi, %rdi
addq $0x668, %rdi            # imm = 0x668
callq 0x8ad00
jmp 0xd64d7
movq -0xf8(%rbp), %rdi
addq $0x6b0, %rdi            # imm = 0x6B0
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xda910
jmp 0xd64f1
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd6520
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x5df00
testb $0x1, -0xe1(%rbp)
jne 0xd652b
jmp 0xd653c
movq -0x148(%rbp), %rdi
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
jmp 0xd653e
movq -0x128(%rbp), %rdi
callq 0xda940
movq -0x120(%rbp), %rdi
callq 0xda960
movq -0x118(%rbp), %rdi
callq 0xda980
movq -0x110(%rbp), %rdi
callq 0x8ad70
movq -0x108(%rbp), %rdi
callq 0x8ad70
movq -0x100(%rbp), %rdi
callq 0x5df00
movq -0xf0(%rbp), %rdi
callq 0x5de40
movq -0xf8(%rbp), %rdi
callq 0x5bd90
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)