Skip to content

Instantly share code, notes, and snippets.

@hechen
Last active May 4, 2019 11:27
Show Gist options
  • Save hechen/3fff6bcb517a27a0c6aad1c0ff6f364b to your computer and use it in GitHub Desktop.
Save hechen/3fff6bcb517a27a0c6aad1c0ff6f364b to your computer and use it in GitHub Desktop.
TransformProcessType
/*
 * TransformProcessType()
 * 
 * Summary:
 * Changes the 'type' of the process specified in the psn parameter.
 * The type is specified in the transformState parameter.
 * 
 * Discussion:
 * Given a psn for an application, this call transforms that
 * application into the given type. Foreground applications have a
 * menu bar and appear in the Dock. Background applications do not
 * appear in the Dock, do not have a menu bar ( and should not have
 * windows or other user interface ). UIElement applications do not
 * have a menu bar, do not appear in the dock, but may in limited
 * circumstances present windows and user interface. If a foreground
 * application is frontmost when transformed into a background
 * application, it is first hidden and another application is made
 * frontmost. A UIElement or background-only application which is
 * transformed into a foreground application is not brought to the
 * front (use SetFrontProcess() after the transform if this is
 * required) nor will it be shown if it is hidden ( even if hidden
 * automatically by being transformed into a background-only
 * application ), so the caller should use ShowHideProcess() to show
 * the application after it is transformed into a foreground
 * application. Applications can only transform themselves; this
 * call cannot change the type of another application.
*/
extern OSStatus 
TransformProcessType(
 const ProcessSerialNumber * psn,
 ProcessApplicationTransformState transformState) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment