Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Dock and Screen Depth available and a lot of Core Graphic Server Stuff.

Dock and Screen Depth available and a lot of Core Graphic Server Stuff.
Thread Tools
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Feb 27, 2004, 08:26 PM
 
Alright, we all know that the Dock has the magical power to broadcast (or however) to windows that they should not go past X or Y when Zoomed. Now does anyone have any idea how this actually happens... I have played around with the CGSPrivate.h and CGSWindow.h and they are so helpful... Now playing around with the reports feature of PathFinder I got the following lists of methods that the Dock Uses... Does this help anyone understand how its done?

If it doesn't, thats ok, hope someone gets anything from this.

U _CGSAddTrackingRect
U _CGSArrayCount
U _CGSCStringValue
U _CGSClearWindowListTags
U _CGSClearWindowTags
U _CGSCoalesceEventsInMask
U _CGSCreateBoolean
U _CGSCreateCString
U _CGSCurrentInputPointerPosition
U _CGSDisableDisableUpdate
U _CGSDisableUpdate
U _CGSDisplayStatusQuery
U _CGSEnableAutoReleaseOnEvents
U _CGSEventIsAppUnresponsive
U _CGSEventSetAppIsUnresponsiveNotificationTimeout
U _CGSExtractEventRecordsFromMessage
U _CGSForceShowCursor
U _CGSGetActiveDisplayList
U _CGSGetClientWindowCount
U _CGSGetClientWindowList
U _CGSGetCoalesceEventsMask
U _CGSGetConnectionIDForPSN
U _CGSGetCurrentCursorLocation
U _CGSGetCurrentMouseButtonState
U _CGSGetDebugOptions
U _CGSGetDisplayBounds
U _CGSGetDisplayDepth
U _CGSGetDisplaysWithPoint
U _CGSGetEventPort
U _CGSGetIntegerAtIndex
U _CGSGetNextEventRecord
U _CGSGetScreenRectForWindow
U _CGSGetSystemBackgroundWindow
U _CGSGetWindowAlpha
U _CGSGetWindowBounds
U _CGSGetWindowDepth
U _CGSGetWindowFlushSeed
U _CGSGetWindowGeometry
U _CGSGetWindowLevel
U _CGSGetWindowListWithTags
U _CGSGetWindowProperty
U _CGSGetWindowTags
U _CGSGetWorkspace
U _CGSGetWorkspaceWindowCount
U _CGSGetWorkspaceWindowList
U _CGSInputButtonState
U _CGSInputModifierKeyState
U _CGSIntegerValue
U _CGSLockWindowBits
U _CGSLockWindowRectBits
U _CGSMoveWindow
U _CGSNewConnection
U _CGSNewEmptyRegion
U _CGSNewRegionWithRect
U _CGSNewWindowWithOpaqueShape
U _CGSOrderMenuBarWindow
U _CGSOrderWindow
U _CGSOrderWindowList
U _CGSPingConnection
U _CGSPointInRegion
U _CGSPostBroadcastNotification
U _CGSReenableDisableUpdate
U _CGSReenableUpdate
U _CGSRegisterConnectionNotifyProc
U _CGSRegisterCursorWithData
U _CGSReleaseConnection
U _CGSReleaseObj
U _CGSReleaseRegion
U _CGSReleaseWindow
U _CGSReleaseWindowList
U _CGSSetBackgroundEventMask
U _CGSSetBackgroundEventMaskAndShape
U _CGSSetConnectionProperty
U _CGSSetDebugOptions
U _CGSSetDockRect
U _CGSSetEventCapture
U _CGSSetHotKeyEnabled
U _CGSSetOtherUniversalConnection
U _CGSSetRegisteredCursor
U _CGSSetSharedWindowState
U _CGSSetSymbolicHotKey
U _CGSSetSymbolicHotKeyWithExclusion
U _CGSSetSystemDefinedCursor
U _CGSSetUniversalOwner
U _CGSSetWindowAlpha
U _CGSSetWindowClipShape
U _CGSSetWindowDepth
U _CGSSetWindowLevel
U _CGSSetWindowListAlpha
U _CGSSetWindowListSystemAlpha
U _CGSSetWindowListTags
U _CGSSetWindowOpacity
U _CGSSetWindowShadowAndRimParameters
U _CGSSetWindowShadowParameters
U _CGSSetWindowShapeWithWeighting
U _CGSSetWindowTags
U _CGSSetWindowTransform
U _CGSSetWindowTransforms
U _CGSSetWindowType
U _CGSSetWindowWarp
U _CGSUnionRegionWithRect
U _CGSUniqueCString
U _CGSUnlockWindowBits
U _CGSUnlockWindowRectBits
U _CGSizeEqualToSize
U _CGSizeZero
U _CGStyleCreateWithDictionary

     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 27, 2004, 09:42 PM
 
Erm...I imagine anybody with knowledge of how the Dock works would know how to use nm themselves. I've always assumed it was CGSSetDockRect.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Professional Poster
Join Date: Sep 2000
Location: Texas
Status: Offline
Reply With Quote
Feb 27, 2004, 09:44 PM
 
Originally posted by Chuckit:
Erm...I imagine anybody with knowledge of how the Dock works would know how to use nm themselves. I've always assumed it was CGSSetDockRect.
What do you mean by nm?
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 28, 2004, 12:11 AM
 
Originally posted by djohnson:
What do you mean by nm?
I mean nm. It's a tool that displays the symbol table for a program or library. The list he gave is pretty much identical to what you'd get if you typed nm Dock | grep CGS inside the Dock's bundle.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Feb 28, 2004, 08:45 AM
 
Originally posted by Chuckit:
Erm...I imagine anybody with knowledge of how the Dock works would know how to use nm themselves. I've always assumed it was CGSSetDockRect.
So you think CGSSetDockRect is the thing to use? Thanks chuck.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Feb 28, 2004, 04:41 PM
 
You probably won't be able to use CGSSetDockRect without a privileged CGSConnection (i.e. the Dock's).
     
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Feb 28, 2004, 07:39 PM
 
Originally posted by Angus_D:
You probably won't be able to use CGSSetDockRect without a privileged CGSConnection (i.e. the Dock's).
Ok, so what kind of magic has to happen to get said privileges, Im not looking for code here, just suggestion on where to start looking...
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 28, 2004, 09:56 PM
 
Originally posted by BrandonCorbin:
Ok, so what kind of magic has to happen to get said privileges, Im not looking for code here, just suggestion on where to start looking...
I really don't know why you'd want to lie to applications about where the Dock is, but I think there are relevant functions in the CGSPrivate.h that's floating around.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Feb 29, 2004, 10:17 AM
 
Thanks for your tip...

Brandon
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Feb 29, 2004, 12:50 PM
 
Originally posted by BrandonCorbin:
Ok, so what kind of magic has to happen to get said privileges, Im not looking for code here, just suggestion on where to start looking...
APE to load yourself as a bundle inside the Dock...
     
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Feb 29, 2004, 01:58 PM
 
Originally posted by Angus_D:
APE to load yourself as a bundle inside the Dock...
Good idea... Since our developer has gotten the CGSPrivate.h to work we could go that way, but coudlnt we use APE to tell all applications when they are ZOOMED to not go over our application?

Since I would be nice to have the dock still work right!

The concept is having an application that is always on top, and that other applications would not launch or be zoomed under our app...
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 29, 2004, 05:03 PM
 
Yes, you could use APE. You'd have to patch -[NSScreen visibleFrame] and GetAvailableWindowPositioningBounds() to exclude the area of the screen with your window.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Feb 29, 2004, 05:15 PM
 
Chuckit, you rock.

Originally posted by Chuckit:
Yes, you could use APE. You'd have to patch -[NSScreen visibleFrame] and GetAvailableWindowPositioningBounds() to exclude the area of the screen with your window.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:58 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2