for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PpSetPC()
Modify the attributes of a print context
Synopsis:
int PpSetPC( PpPrintContext_t *pc,
int member,
void const * const data,
int lock );
Arguments:
- pc
- The pointer to a PpPrintContext_t structure that was returned by PpCreatePC().
- member
- The member of the print context to modify, as given in the table below. For a description of the members, see PpPrintContext_t.
- data
- A pointer to the data to be assigned to the specified print context member.
- lock
- If nonzero, the PtPrintSel widget and properties applications won't override or allow modification of the member; its value is locked. Locked members have their controls dimmed and inactive in the PtPrintSel widget or PtPrintSelection() dialog.
Library:
ph
Description:
This function provides a mechanism to modify the attributes of a print context.
![]() |
Don't modify the print context directly, as the appropriate changed bits won't be set and the application may stop working if the print context structure is redefined in the future. |
Use the data types given below when setting the value of the members of the print context.
![]() |
In the following table:
|
| Member | Data |
|---|---|
| Pp_PC_COLLATING_MODE | char * |
| Pp_PC_COLOR_MODE | char * |
| Pp_PC_CONTROL | Read only: see PpGetPC() |
| Pp_PC_COPIES | char * |
| Pp_PC_DATE | String |
| Pp_PC_DEVICE | String |
| Pp_PC_DITHERING | char * |
| Pp_PC_DO_PREVIEW | char * |
| Pp_PC_DRIVER | String |
| Pp_PC_DUPLEX | char * |
| Pp_PC_FILENAME | String |
| Pp_PC_INKTYPE | char * |
| Pp_PC_INTENSITY | ulong_t * |
| Pp_PC_JOB_NAME | String |
| Pp_PC_MARGINS | PhRect_t * |
| Pp_PC_MAX_DEST_SIZE | ulong_t |
| Pp_PC_NAME | String |
| Pp_PC_NONPRINT_MARGINS | PhRect_t * |
| Pp_PC_ORIENTATION | char * |
| Pp_PC_PAGE_NUM | ulong_t |
| Pp_PC_PAGE_RANGE | PpPageRange_t * |
| Pp_PC_PAPER_SIZE | PhDim_t * |
| Pp_PC_PAPER_SOURCE | char * |
| Pp_PC_PAPER_TYPE | char * |
| Pp_PC_PREVIEW_APP | String |
| Pp_PC_PRINTER_RESOLUTION | PhDim_t * |
| Pp_PC_PROP_APP | String |
| Pp_PC_REVERSED | char |
| Pp_PC_SCALE | PhPoint_t * |
| Pp_PC_SOURCE_COLORS | ulong_t * |
| Pp_PC_SOURCE_OFFSET | PhPoint_t * |
| Pp_PC_SOURCE_RESOLUTION | PhDim_t * |
| Pp_PC_SOURCE_SIZE | PhDim_t * |
| Pp_PC_USER_ID | String |
By default, all members are 0 or NULL.
Returns:
- 0
- Success.
- -1
- An error occurred. See errno for details.
Errors:
- EACCES
- The specified member couldn't be changed because it's locked.
- ESRCH
- An unknown member was specified.
Examples:
set_my_apps_Pp_prefs( PpPrintContext_t *pc )
{
char do_preview = 1, duplex = some_value;
PpSetPC( pc, Pp_PC_DO_PREVIEW, &do_preview, 0 );
PpSetPC( pc, Pp_PC_DUPLEX, &duplex, 0 );
// etc...
}
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PhDim_t, PhPoint_t, PhRect_t, PpContinueJob(), PpCreatePC(), PpEndJob(), PpGetCanvas(), PpGetPC(), PpLoadDefaultPrinter(), PpLoadPrinter(), PpPrintContext_t, PpPrintNewPage(), PpPrintWidget(), PpReleasePC() PpSetCanvas(), PpStartJob(), PpSuspendJob(),
Printing in the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
