- Timestamp:
- Jun 9, 2010 3:15:52 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxCocoa.h
r30122 r30126 36 36 #endif /* __OBJC__ */ 37 37 38 #ifdef __OBJC__ 38 /* Check for OBJC++ */ 39 #if defined(__OBJC__) && defined (__cplusplus) 39 40 40 41 /* Global includes */ -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r28280 r30126 100 100 /* unsigned long context_ptr; */ 101 101 # else 102 Native ViewRef window;103 Native ViewRef nativeWindow; /**< for render_to_app_window */104 Native GLCtxRef *currentCtx;102 NativeNSViewRef window; 103 NativeNSViewRef nativeWindow; /**< for render_to_app_window */ 104 NativeNSOpenGLContextRef *currentCtx; 105 105 # endif 106 106 #elif defined(GLX) … … 134 134 AGLContext context; 135 135 # else 136 Native GLCtxRef context;136 NativeNSOpenGLContextRef context; 137 137 # endif 138 138 #elif defined(GLX) -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa.c
r29175 r30126 79 79 80 80 #ifdef __LP64__ 81 Native ViewRef pParentWin = (NativeViewRef)render_spu_parent_window_id;81 NativeNSViewRef pParentWin = (NativeNSViewRef)render_spu_parent_window_id; 82 82 #else /* __LP64__ */ 83 Native ViewRef pParentWin = (NativeViewRef)(uint32_t)render_spu_parent_window_id;83 NativeNSViewRef pParentWin = (NativeNSViewRef)(uint32_t)render_spu_parent_window_id; 84 84 #endif /* __LP64__ */ 85 85 … … 95 95 { 96 96 #ifdef __LP64__ 97 Native ViewRef pParentWin = (NativeViewRef)render_spu_parent_window_id;97 NativeNSViewRef pParentWin = (NativeNSViewRef)render_spu_parent_window_id; 98 98 #else /* __LP64__ */ 99 Native ViewRef pParentWin = (NativeViewRef)(uint32_t)render_spu_parent_window_id;99 NativeNSViewRef pParentWin = (NativeNSViewRef)(uint32_t)render_spu_parent_window_id; 100 100 #endif /* __LP64__ */ 101 101 cocoaViewReparent(pWinInfo->window, pParentWin); … … 114 114 115 115 #ifdef __LP64__ 116 Native ViewRef pParentWin = (NativeViewRef)render_spu_parent_window_id;116 NativeNSViewRef pParentWin = (NativeNSViewRef)render_spu_parent_window_id; 117 117 #else /* __LP64__ */ 118 Native ViewRef pParentWin = (NativeViewRef)(uint32_t)render_spu_parent_window_id;118 NativeNSViewRef pParentWin = (NativeNSViewRef)(uint32_t)render_spu_parent_window_id; 119 119 #endif /* __LP64__ */ 120 120 -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h
r28800 r30126 19 19 #define __renderspu_cocoa_helper_h 20 20 21 #ifdef __OBJC__ 22 # import <Cocoa/Cocoa.h> 23 typedef NSView *NativeViewRef; 24 typedef NSOpenGLContext *NativeGLCtxRef; 25 #else /* __OBJC__ */ 26 typedef void *NativeViewRef; 27 typedef void *NativeGLCtxRef; 28 #endif /* __OBJC__ */ 29 21 #include <VBox/VBoxCocoa.h> 30 22 #include <iprt/cdefs.h> 31 23 #include <OpenGL/OpenGL.h> … … 33 25 RT_C_DECLS_BEGIN 34 26 27 ADD_COCOA_NATIVE_REF(NSView); 28 ADD_COCOA_NATIVE_REF(NSOpenGLContext); 29 35 30 /* OpenGL context management */ 36 void cocoaGLCtxCreate(Native GLCtxRef *ppCtx, GLbitfield fVisParams);37 void cocoaGLCtxDestroy(Native GLCtxRef pCtx);31 void cocoaGLCtxCreate(NativeNSOpenGLContextRef *ppCtx, GLbitfield fVisParams); 32 void cocoaGLCtxDestroy(NativeNSOpenGLContextRef pCtx); 38 33 39 34 /* View management */ 40 void cocoaViewCreate(Native ViewRef *ppView, NativeViewRef pParentView, GLbitfield fVisParams);41 void cocoaViewReparent(Native ViewRef pView, NativeViewRef pParentView);42 void cocoaViewDestroy(Native ViewRef pView);43 void cocoaViewDisplay(Native ViewRef pView);44 void cocoaViewShow(Native ViewRef pView, GLboolean fShowIt);45 void cocoaViewSetPosition(Native ViewRef pView, NativeViewRef pParentView, int x, int y);46 void cocoaViewSetSize(Native ViewRef pView, int w, int h);47 void cocoaViewGetGeometry(Native ViewRef pView, int *pX, int *pY, int *pW, int *pH);35 void cocoaViewCreate(NativeNSViewRef *ppView, NativeNSViewRef pParentView, GLbitfield fVisParams); 36 void cocoaViewReparent(NativeNSViewRef pView, NativeNSViewRef pParentView); 37 void cocoaViewDestroy(NativeNSViewRef pView); 38 void cocoaViewDisplay(NativeNSViewRef pView); 39 void cocoaViewShow(NativeNSViewRef pView, GLboolean fShowIt); 40 void cocoaViewSetPosition(NativeNSViewRef pView, NativeNSViewRef pParentView, int x, int y); 41 void cocoaViewSetSize(NativeNSViewRef pView, int w, int h); 42 void cocoaViewGetGeometry(NativeNSViewRef pView, int *pX, int *pY, int *pW, int *pH); 48 43 49 void cocoaViewMakeCurrentContext(Native ViewRef pView, NativeGLCtxRef pCtx);50 void cocoaViewSetVisibleRegion(Native ViewRef pView, GLint cRects, GLint* paRects);44 void cocoaViewMakeCurrentContext(NativeNSViewRef pView, NativeNSOpenGLContextRef pCtx); 45 void cocoaViewSetVisibleRegion(NativeNSViewRef pView, GLint cRects, GLint* paRects); 51 46 52 47 /* OpenGL wrapper */ 53 void cocoaFlush( );54 void cocoaFinish( );48 void cocoaFlush(void); 49 void cocoaFinish(void); 55 50 void cocoaBindFramebufferEXT(GLenum target, GLuint framebuffer); 56 51 -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
r29447 r30126 17 17 18 18 #include "renderspu_cocoa_helper.h" 19 20 #import <Cocoa/Cocoa.h> 19 21 20 22 #include "chromium.h" /* For the visual bits of chromium */ … … 1302 1304 * 1303 1305 ********************************************************************************/ 1304 void cocoaGLCtxCreate(Native GLCtxRef *ppCtx, GLbitfield fVisParams)1306 void cocoaGLCtxCreate(NativeNSOpenGLContextRef *ppCtx, GLbitfield fVisParams) 1305 1307 { 1306 1308 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1382 1384 } 1383 1385 1384 void cocoaGLCtxDestroy(Native GLCtxRef pCtx)1386 void cocoaGLCtxDestroy(NativeNSOpenGLContextRef pCtx) 1385 1387 { 1386 1388 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1396 1398 * 1397 1399 ********************************************************************************/ 1398 void cocoaViewCreate(Native ViewRef *ppView, NativeViewRef pParentView, GLbitfield fVisParams)1400 void cocoaViewCreate(NativeNSViewRef *ppView, NativeNSViewRef pParentView, GLbitfield fVisParams) 1399 1401 { 1400 1402 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1414 1416 } 1415 1417 1416 void cocoaViewReparent(Native ViewRef pView, NativeViewRef pParentView)1418 void cocoaViewReparent(NativeNSViewRef pView, NativeNSViewRef pParentView) 1417 1419 { 1418 1420 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1442 1444 } 1443 1445 1444 void cocoaViewDestroy(Native ViewRef pView)1446 void cocoaViewDestroy(NativeNSViewRef pView) 1445 1447 { 1446 1448 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1471 1473 } 1472 1474 1473 void cocoaViewShow(Native ViewRef pView, GLboolean fShowIt)1475 void cocoaViewShow(NativeNSViewRef pView, GLboolean fShowIt) 1474 1476 { 1475 1477 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1480 1482 } 1481 1483 1482 void cocoaViewDisplay(Native ViewRef pView)1484 void cocoaViewDisplay(NativeNSViewRef pView) 1483 1485 { 1484 1486 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1491 1493 } 1492 1494 1493 void cocoaViewSetPosition(Native ViewRef pView, NativeViewRef pParentView, int x, int y)1495 void cocoaViewSetPosition(NativeNSViewRef pView, NativeNSViewRef pParentView, int x, int y) 1494 1496 { 1495 1497 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1500 1502 } 1501 1503 1502 void cocoaViewSetSize(Native ViewRef pView, int w, int h)1504 void cocoaViewSetSize(NativeNSViewRef pView, int w, int h) 1503 1505 { 1504 1506 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1509 1511 } 1510 1512 1511 void cocoaViewGetGeometry(Native ViewRef pView, int *pX, int *pY, int *pW, int *pH)1513 void cocoaViewGetGeometry(NativeNSViewRef pView, int *pX, int *pY, int *pW, int *pH) 1512 1514 { 1513 1515 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1522 1524 } 1523 1525 1524 void cocoaViewMakeCurrentContext(Native ViewRef pView, NativeGLCtxRef pCtx)1526 void cocoaViewMakeCurrentContext(NativeNSViewRef pView, NativeNSOpenGLContextRef pCtx) 1525 1527 { 1526 1528 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; 1527 1529 1528 DEBUG_MSG(("cocoaViewMakeCurrentContext(%p, %p)\n", pView,pCtx));1530 DEBUG_MSG(("cocoaViewMakeCurrentContext(%p, %p)\n", (void*)pView, (void*)pCtx)); 1529 1531 1530 1532 [(OverlayView*)pView setGLCtx:pCtx]; … … 1534 1536 } 1535 1537 1536 void cocoaViewSetVisibleRegion(Native ViewRef pView, GLint cRects, GLint* paRects)1538 void cocoaViewSetVisibleRegion(NativeNSViewRef pView, GLint cRects, GLint* paRects) 1537 1539 { 1538 1540 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1548 1550 * 1549 1551 ********************************************************************************/ 1550 void cocoaFlush( )1552 void cocoaFlush(void) 1551 1553 { 1552 1554 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 1575 1577 } 1576 1578 1577 void cocoaFinish( )1579 void cocoaFinish(void) 1578 1580 { 1579 1581 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init];
Note:
See TracChangeset
for help on using the changeset viewer.