[Openmcl-devel] Accessing method in CoreGraphics

Duncan Rose duncan at robotcat.demon.co.uk
Fri Apr 15 18:24:21 UTC 2005


Whilst trawling the web recently I came across a page with an  
interesting tidbit on it (from my point of view; page for anybody  
interested is http://www.advogato.org/article/627.html) in the section  
titled 'Is it possible to run a GUI application that doesn't reside in  
a bundle?'.

In short apparently a CoreGraphics framework function  
'CPSEnableForegroundOperation' can be used for this. This method is  
referenced elsewhere; a 'find' in the framework directory returns:

Binary file  
./ApplicationServices.framework/Versions/A/Frameworks/ 
CoreGraphics.framework/CoreGraphics matches
Binary file  
./ApplicationServices.framework/Versions/A/Frameworks/ 
CoreGraphics.framework/CoreGraphics_profile matches
Binary file  
./ApplicationServices.framework/Versions/A/Frameworks/ 
CoreGraphics.framework/Versions/A/CoreGraphics matches
Binary file  
./ApplicationServices.framework/Versions/A/Frameworks/ 
CoreGraphics.framework/Versions/A/CoreGraphics_profile matches
Binary file ./GLUT.framework/GLUT matches
Binary file ./GLUT.framework/Versions/A/GLUT matches
Binary file ./JavaVM.framework/Versions/1.4.1/Libraries/libawt.jnilib  
matches)

I'm trying to use this with the following code:

   (rlet ((psn-struct :<P>rocess<S>erial<Number>))
     (#_GetCurrentProcess psn-struct)
     (#_CPSEnableForegroundOperation psn-struct))

This (expectedly) fails to compile with the following report:

 > Error in process listener(1): Foreign function not found:  
OS::|CPSEnableForegroundOperation|
 > While executing: CCL::LOAD-EXTERNAL-FUNCTION
 > Type :POP to abort.

Unfortunately I can't find any reference to the function in any header  
file on my system (I guess I can't update the interface database in  
this case).

Is there something obvious I'm missing, or something obscure I can try  
(to invoke the function)?

-Duncan




More information about the Openmcl-devel mailing list