home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 June / maximum-cd-2009-06.iso / DiscContents / digsby_setup.exe / lib / gui / native / win / appbar.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-02-26  |  1.9 KB  |  44 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. from gui.native.win.winutil import WinStruct, win_id
  5. from gui.native.win.winconstants import ABM_NEW
  6. from ctypes.wintypes import UINT, HWND, DWORD, c_uint, RECT, HANDLE, LPARAM
  7. from ctypes import windll
  8. import winhelpers
  9. SHAppBarMessage = windll.shell32.SHAppBarMessage
  10.  
  11. def notify_fullscreen(win, on_fullscreen, off_fullscreen):
  12.     win.BindWin32(EVT_WIN32_FULLSCREEN, _fullscreen_callback)
  13.     abd = APPBARDATA(hWnd = win.Handle, uCallbackMessage = EVT_WIN32_FULLSCREEN)
  14.     SHAppBarMessage(ABM_NEW, abd.ptr)
  15.  
  16.  
  17. def _fullscreen_callback(hWnd, msg, wParam, lParam):
  18.     print 'in _fullscreen_callback'
  19.     print locals()
  20.  
  21. EVT_WIN32_FULLSCREEN = win_id()
  22.  
  23. class APPBARDATA(WinStruct):
  24.     _fields_ = [
  25.         ('cbSize', DWORD),
  26.         ('hWnd', HANDLE),
  27.         ('uCallbackMessage', c_uint),
  28.         ('uEdge', c_uint),
  29.         ('rc', RECT),
  30.         ('lParam', LPARAM)]
  31.  
  32.  
  33. def main():
  34.     import wx
  35.     a = wx.PySimpleApp()
  36.     f = wx.Frame(None)
  37.     notify_fullscreen(f, (lambda : pass), (lambda : pass))
  38.     f.Show()
  39.     a.MainLoop()
  40.  
  41. if __name__ == '__main__':
  42.     main()
  43.  
  44.