mjolnir._asm.undocumented.cgsdebug

Home: https://github.com/asmagill/mjolnir_asm.undocumented

Functions to get and set undocumented options and features within OS X. These are undocumented features from the "private" api's for Mac OS X and are not guaranteed to work with any particular version of OS X or at all. This code was based primarily on code samples and segments found at (https://code.google.com/p/undocumented-goodness/) and (https://code.google.com/p/iterm2/source/browse/branches/0.10.x/CGSInternal/CGSDebug.h?r=2).

This submodule provides access to CGSDebug related features. Most notably, this contains the hydra.shadow(bool) functionality, and a specific function is provided for just that functionality.

I make no promises that these will work for you or work at all with any, past, current, or future versions of OS X. I can confirm only that they didn't crash my machine during testing under 10.10pb2. You have been warned.

clear

mjolnir._asm.undocumented.cgsdebug.clear()

Clears all of the CGSDebug option flags.

get

mjolnir._asm.undocumented.cgsdebug.get(option) -> boolean

Returns a boolean indicating whether the specified CGSDebug option is set or not.

getmask

mjolnir._asm.undocumented.cgsdebug.getmask() -> number

Returns the numeric value representing the bitmask of all currently set CGSDebug options.

options

mjolnir._asm.undocumented.cgsdebug.options[]

Connivence array of all currently defined debug options.

    flashScreenUpdates
        All screen updates are flashed in yellow. Regions under a DisableUpdate are flashed in orange. Regions that are hardware accellerated are painted green.

    colorByAccelleration
        Colors windows green if they are accellerated, otherwise red. Doesn't cause things to refresh properly - leaves excess rects cluttering the screen.

    noShadows
        Disables shadows on all windows.

    noDelayAfterFlash
        Setting this disables the pause after a flash when using FlashScreenUpdates or FlashIdenticalUpdates.

    autoflushDrawing
        Flushes the contents to the screen after every drawing operation.

    showMouseTrackingAreas
        Highlights mouse tracking areas. Doesn't cause things to refresh correctly - leaves excess rectangles cluttering the screen.

    flashIdenticalUpdates
        Flashes identical updates in red.

    dumpWindowListToFile
        Dumps a list of windows to /tmp/WindowServer.winfo.out. This is what Quartz Debug uses to get the window list.

    dumpConnectionListToFile
        Dumps a list of connections to /tmp/WindowServer.cinfo.out.

    verboseLogging
        Dumps a very verbose debug log of the WindowServer to /tmp/CGLog_WinServer_<PID>.

    verboseLoggingAllApps
        Dumps a very verbose debug log of all processes to /tmp/CGLog_&lt;NAME&gt;_<PID>.

    dumpHotKeyListToFile
        Dumps a list of hotkeys to /tmp/WindowServer.keyinfo.out.

    dumpSurfaceInfo
        Dumps SurfaceInfo? to /tmp/WindowServer.sinfo.out

    dumpOpenGLInfoToFile
        Dumps information about OpenGL extensions, etc to /tmp/WindowServer.glinfo.out.

    dumpShadowListToFile
        Dumps a list of shadows to /tmp/WindowServer.shinfo.out.

    dumpWindowListToPlist
        Dumps a list of windows to `/tmp/WindowServer.winfo.plist`. This is what Quartz Debug on 10.5 uses to get the window list.

    dumpResourceUsageToFiles
        Dumps information about an application's resource usage to `/tmp/CGResources_&lt;NAME&gt;_&lt;PID&gt;`.

set

mjolnir._asm.undocumented.cgsdebug.set(option, boolean)

Enables (value == true) or disables (value == false) the specified CGSDebug option.

shadow

mjolnir._asm.undocumented.cgsdebug.shadow(bool)

Sets whether OSX apps have shadows.