# Copyright (c) 2007 SIEGE Development Team
# All rights reserved.
#
# This file is part of libSIEGE.
#
# This software is copyrighted work licensed under the terms of the
# 2-clause BSD license. Please consult the file "license.txt" for
# details.
#
# If you did not recieve the file with this program, please email
# Tim Chas <darkuranium@gmail.com>.

from siege.common cimport *
cimport window

def open(width, height, bpp, flags):
    return bool(sgWindowOpen(width, height, bpp, flags))
def isOpened():
    return bool(sgWindowIsOpened())
def close():
    sgWindowClose()

def setTitle(title):
    sgWindowSetTitle(title)
def getTitle():
    return sgWindowGetTitle()

def setSize(s):
    sgWindowSetSize(s[0], s[1])
def getSize():
    cdef SGuint width
    cdef SGuint height
    sgWindowGetSize(&width, &height)
    return (width, height)

def setWidth(width):
    sgWindowSetWidth(width)
def getWidth():
    return sgWindowGetWidth()

def setHeight(height):
    sgWindowSetHeight(height)
def getHeight():
    return sgWindowGetHeight()

def swapBuffers():
    sgWindowSwapBuffers()
