home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 February / maximum-cd-2011-02.iso / DiscContents / digsby_setup85.exe / lib / gui / native / win / winfullscreen.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-11-24  |  787 b   |  27 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. from ctypes import c_int, byref, WinError, windll
  5.  
  6. try:
  7.     SHQueryUserNotificationState = windll.shell32.SHQueryUserNotificationState
  8. except AttributeError:
  9.     enabled = False
  10.  
  11. enabled = True
  12. last_state = False
  13.  
  14. def get_accepts_notifications():
  15.     global last_state
  16.     state = c_int()
  17.     if SHQueryUserNotificationState(byref(state)):
  18.         raise WinError()
  19.     SHQueryUserNotificationState(byref(state))
  20.     val = state.value
  21.     last_state = val
  22.     return val not in (1, 2, 3, 4)
  23.  
  24. if __name__ == '__main__':
  25.     print get_accepts_notifications()
  26.  
  27.