Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
e65acd2e
Kaydet (Commit)
e65acd2e
authored
Agu 31, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use SystemWindowData to request a NSOpenGLWindow
Change-Id: Ief50a2fc533846cd61be66b1ea166a992942083b
üst
ff3321cf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
8 deletions
+32
-8
sysdata.hxx
include/vcl/sysdata.hxx
+4
-1
salobj.h
vcl/inc/osx/salobj.h
+1
-1
salinst.cxx
vcl/osx/salinst.cxx
+2
-3
salobj.cxx
vcl/osx/salobj.cxx
+22
-3
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+3
-0
No files found.
include/vcl/sysdata.hxx
Dosyayı görüntüle @
e65acd2e
...
...
@@ -51,6 +51,7 @@ struct SystemEnvData
HWND
hWnd
;
// the window hwnd
#elif defined( MACOSX )
NSView
*
mpNSView
;
// the cocoa (NSView *) implementing this object
bool
mbOpenGL
;
// use a OpenGL providing NSView
#elif defined( ANDROID )
// Nothing
#elif defined( IOS )
...
...
@@ -75,6 +76,7 @@ struct SystemEnvData
,
hWnd
(
0
)
#elif defined( MACOSX )
,
mpNSView
(
NULL
)
,
mbOpenGL
(
false
)
#elif defined( ANDROID )
#elif defined( IOS )
#elif defined( UNX )
...
...
@@ -174,7 +176,8 @@ struct SystemWindowData
{
unsigned
long
nSize
;
// size in bytes of this structure
#if defined( WNT ) // meaningless on Windows
#elif defined( MACOSX ) // meaningless on Mac OS X
#elif defined( MACOSX )
bool
bOpenGL
;
// create a OpenGL providing NSView
// Nothing
#elif defined( ANDROID )
// Nothing
...
...
vcl/inc/osx/salobj.h
Dosyayı görüntüle @
e65acd2e
...
...
@@ -52,7 +52,7 @@ public:
void
setClippedPosSize
();
AquaSalObject
(
AquaSalFrame
*
pFrame
);
AquaSalObject
(
AquaSalFrame
*
pFrame
,
SystemWindowData
*
pWinData
);
virtual
~
AquaSalObject
();
virtual
void
ResetClipRegion
()
SAL_OVERRIDE
;
...
...
vcl/osx/salinst.cxx
Dosyayı görüntüle @
e65acd2e
...
...
@@ -757,13 +757,12 @@ void AquaSalInstance::DestroyFrame( SalFrame* pFrame )
delete
pFrame
;
}
SalObject
*
AquaSalInstance
::
CreateObject
(
SalFrame
*
pParent
,
SystemWindowData
*
/* pWindowData */
,
bool
/* bShow */
)
SalObject
*
AquaSalInstance
::
CreateObject
(
SalFrame
*
pParent
,
SystemWindowData
*
pWindowData
,
bool
/* bShow */
)
{
// SystemWindowData is meaningless on Mac OS X
AquaSalObject
*
pObject
=
NULL
;
if
(
pParent
)
pObject
=
new
AquaSalObject
(
static_cast
<
AquaSalFrame
*>
(
pParent
)
);
pObject
=
new
AquaSalObject
(
static_cast
<
AquaSalFrame
*>
(
pParent
)
,
pWindowData
);
return
pObject
;
}
...
...
vcl/osx/salobj.cxx
Dosyayı görüntüle @
e65acd2e
...
...
@@ -22,8 +22,9 @@
#include "osx/saldata.hxx"
#include "osx/salobj.h"
#include "osx/salframe.h"
#include <AppKit/NSOpenGLView.h>
AquaSalObject
::
AquaSalObject
(
AquaSalFrame
*
pFrame
)
:
AquaSalObject
::
AquaSalObject
(
AquaSalFrame
*
pFrame
,
SystemWindowData
*
pWindowData
)
:
mpFrame
(
pFrame
),
mnClipX
(
-
1
),
mnClipY
(
-
1
),
...
...
@@ -37,6 +38,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
{
maSysData
.
nSize
=
sizeof
(
maSysData
);
maSysData
.
mpNSView
=
NULL
;
maSysData
.
mbOpenGL
=
pWindowData
->
bOpenGL
;
NSRect
aInitFrame
=
{
NSZeroPoint
,
{
20
,
20
}
};
mpClipView
=
[[
NSClipView
alloc
]
initWithFrame
:
aInitFrame
];
...
...
@@ -45,8 +47,25 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
[
mpFrame
->
getNSView
()
addSubview
:
mpClipView
];
[
mpClipView
setHidden
:
YES
];
}
maSysData
.
mpNSView
=
[[
NSView
alloc
]
initWithFrame
:
aInitFrame
];
if
(
maSysData
.
mpNSView
)
if
(
pWindowData
->
bOpenGL
)
{
NSOpenGLPixelFormatAttribute
aAttributes
[]
=
{
NSOpenGLPFADoubleBuffer
,
NSOpenGLPFAAlphaSize
,
8
,
NSOpenGLPFAColorSize
,
24
,
0
};
NSOpenGLPixelFormat
*
pixFormat
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes
:
aAttributes
];
maSysData
.
mpNSView
=
[[
NSOpenGLView
alloc
]
initWithFrame
:
aInitFrame
pixelFormat
:
pixFormat
];
}
else
{
maSysData
.
mpNSView
=
[[
NSView
alloc
]
initWithFrame
:
aInitFrame
];
}
if
(
maSysData
.
mpNSView
)
{
if
(
mpClipView
)
[
mpClipView
setDocumentView
:
maSysData
.
mpNSView
];
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
e65acd2e
...
...
@@ -724,6 +724,9 @@ bool OpenGLContext::initWindow()
SystemWindowData
OpenGLContext
::
generateWinData
(
Window
*
/*pParent*/
)
{
SystemWindowData
aWinData
;
#if defined(MACOSX)
aWinData
.
bOpenGL
=
true
;
#endif
aWinData
.
nSize
=
sizeof
(
aWinData
);
return
aWinData
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment