Lightningbeam/PyGUI-2.5.3/GUI/Win32/WGL.py

23 lines
499 B
Python

#------------------------------------------------------------------------------
#
# PyGUI - WGL - Win32
#
#------------------------------------------------------------------------------
from ctypes import *
gdi32 = windll.gdi32
def SetPixelFormat(hdc, ipf):
gdi32.SetPixelFormat(hdc, ipf, None)
def attr_array(d):
a = []
for k, v in d.iteritems():
a.append(k)
a.append(v)
a.append(0)
return a
def attr_dict(keys, values):
return dict(zip(keys, values))