Difference between revisions of "Mac OS X Porting - Proxy Icon implementation"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 1: Line 1:
 
Started
 
Started
  
Keywords to start : SetWindowProxyFSSpec()
 
  
Note: this function is probably obsolete, because the doc says :  
+
The probable right function to use is (copied from XCode documentation) :
  
GetWindowProxyFSSpec
+
HIWindowGetProxyFSRef
Obtains a file system specification structure for the file that is associated with a window. (Deprecated in Mac OS X v10.5. Use HIWindowGetProxyFSRef instead.)
+
Obtains the FSRef used to determine the proxy icon for a window.
  
OSStatus GetWindowProxyFSSpec (
+
OSStatus HIWindowGetProxyFSRef (
   WindowRef window,
+
   WindowRef inWindow,
   FSSpec *outFile
+
   FSRef * outRef
);
+
);
 +
Parameters
 +
inWindow
 +
The window whose proxy FSRef is to be obtained.
  
 +
outRef
 +
On exit, the FSRef for the window’s proxy icon.
 +
 +
Return Value
 +
A result code. See “Window Manager Result Codes”.
 +
 +
Discussion
 +
If the specified window’s proxy icon has been specified using '''HIWindowSetProxyFSRef''' or '''SetWindowProxyAlias''', HIWindowGetProxyFSRef returns noErr and a valid FSRef for the window’s proxy icon. If the window has no proxy icon, or if the icon was specified by calling SetWindowProxyCreatorAndType or SetWindowProxyIcon, this function returns an error.
 +
 +
Availability
 +
Available in Mac OS X v10.4 and later.
 +
Declared In
 +
MacWindows.h
 
Links (to be improved):   
 
Links (to be improved):   
  

Revision as of 11:45, 30 August 2008

Started


The probable right function to use is (copied from XCode documentation) :

HIWindowGetProxyFSRef Obtains the FSRef used to determine the proxy icon for a window.

OSStatus HIWindowGetProxyFSRef (
  WindowRef inWindow,
  FSRef * outRef
);

Parameters inWindow The window whose proxy FSRef is to be obtained.

outRef On exit, the FSRef for the window’s proxy icon.

Return Value A result code. See “Window Manager Result Codes”.

Discussion If the specified window’s proxy icon has been specified using HIWindowSetProxyFSRef or SetWindowProxyAlias, HIWindowGetProxyFSRef returns noErr and a valid FSRef for the window’s proxy icon. If the window has no proxy icon, or if the icon was specified by calling SetWindowProxyCreatorAndType or SetWindowProxyIcon, this function returns an error.

Availability Available in Mac OS X v10.4 and later. Declared In MacWindows.h Links (to be improved):

Sample code (Carbon, can be obsolete)

Proxy Icon search on Apple lists


Ericb 13:03, 30 August 2008 (CEST) 

Personal tools