#NEWLINE# def UnpackLVITEM( buffer ) : #NEWLINE# #INDENT# ( item_mask , item_item , item_subItem , item_state , item_stateMask , item_textptr , item_cchText , item_image , item_param , item_indent ) = struct . unpack ( '10i' , buffer ) #NEWLINE# if ( not ( item_mask & commctrl . LVIF_TEXT ) ) : #NEWLINE# #INDENT# item_textptr = item_cchText = None #NEWLINE# #UNINDENT# if ( not ( item_mask & commctrl . LVIF_IMAGE ) ) : #NEWLINE# #INDENT# item_image = None #NEWLINE# #UNINDENT# if ( not ( item_mask & commctrl . LVIF_PARAM ) ) : #NEWLINE# #INDENT# item_param = None #NEWLINE# #UNINDENT# if ( not ( item_mask & commctrl . LVIF_INDENT ) ) : #NEWLINE# #INDENT# item_indent = None #NEWLINE# #UNINDENT# if ( not ( item_mask & commctrl . LVIF_STATE ) ) : #NEWLINE# #INDENT# item_state = item_stateMask = None #NEWLINE# #UNINDENT# if item_textptr : #NEWLINE# #INDENT# text = win32gui . PyGetString ( item_textptr ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# text = None #NEWLINE# #UNINDENT# return ( item_item , item_subItem , item_state , item_stateMask , text , item_image , item_param , item_indent )