import e32

if e32.s60_version_info>=(3,0):
    import imp
    _fgimage = imp.load_dynamic('_fgimage', 'z:\\sys\\bin\\_fgimage.pyd')
    
else:
    import _fgimage

del e32, imp #remove unnecessary names from namespace
from _fgimage import *
del _fgimage

#
# code wrapper
#

import fgimage

class Splash:
  def __init__(self,img=None):
     self.fgi= FGImage()
     self.img = img
     
  def hide(self):
     return self.fgi.unset()

  def show(self,xy,image=None):
     if image: 
       return self.fgi.set(xy[0],xy[1],image._bitmapapi())
     else:  
       return self.fgi.set(xy[0],xy[1],self.img._bitmapapi())