---
title: PMSessionSetIdleProc
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/core_printing/1805540-pmsessionsetidleproc
---

# PMSessionSetIdleProc

Installs an idle callback function in your print loop.

## Declaration

```occ
OSStatus PMSessionSetIdleProc (
   PMPrintSession printSession,
   PMIdleUPP idleProc
);
```

## Parameters

- `printSession`: The printing session that provides a context for the print job.
- `idleProc`: A universal procedure pointer to your idle function. Your idle function is defined by the callback [doc://com.apple.documentation/documentation/applicationservices/core_printing/pmidleprocptr](applicationservices/core_printing/pmidleprocptr.md).

## Return Value

A result code. See [Result Codes](../core_printing.md).

## Overview

You do not need this function in macOS. Instead, use the standard idle proc. 

## See Also

### Print Loop Functions

- [PMSessionBeginCGDocumentNoDialog](../1460101-pmsessionbegincgdocumentnodialog.md)
- [PMSessionBeginDocumentNoDialog](1805538-pmsessionbegindocumentnodialog.md)
- [PMSessionEndDocumentNoDialog](../1464527-pmsessionenddocumentnodialog.md)
- [PMSessionBeginPageNoDialog](../1463416-pmsessionbeginpagenodialog.md)
- [PMSessionEndPageNoDialog](../1462014-pmsessionendpagenodialog.md)
