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
44fb00ef
Kaydet (Commit)
44fb00ef
authored
Tem 13, 2011
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bin dead MacOSX X11 code
üst
ce0ecd94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
77 deletions
+1
-77
svmainhook.cxx
vcl/source/app/svmainhook.cxx
+1
-77
No files found.
vcl/source/app/svmainhook.cxx
Dosyayı görüntüle @
44fb00ef
...
@@ -31,89 +31,13 @@
...
@@ -31,89 +31,13 @@
#include <tools/tools.h>
#include <tools/tools.h>
#ifndef MACOSX
#ifndef MACOSX
// MacOSX implementation of ImplSVMainHook is in aqua/source/app/salinst.cxx
sal_Bool
ImplSVMainHook
(
int
*
)
sal_Bool
ImplSVMainHook
(
int
*
)
{
{
return
sal_False
;
// indicate that ImplSVMainHook is not implemented
return
sal_False
;
// indicate that ImplSVMainHook is not implemented
}
}
#else
// MACOSX cocoa implementation of ImplSVMainHook is in aqua/source/app/salinst.cxx
#ifndef QUARTZ // MACOSX (X11) needs the CFRunLoop()
#include <osl/thread.h>
#include <premac.h>
#include <CoreFoundation/CoreFoundation.h>
#include <postmac.h>
#include <unistd.h>
extern
sal_Bool
ImplSVMain
();
// ============================================================================
static
void
SourceContextCallBack
(
void
*
pInfo
)
{
}
struct
ThreadContext
{
int
*
pRet
;
CFRunLoopRef
*
pRunLoopRef
;
};
static
void
RunSVMain
(
void
*
pData
)
{
ThreadContext
*
tcx
=
reinterpret_cast
<
ThreadContext
*>
(
pData
);
// busy waiting (ok in this case) until the run loop is
// running
while
(
!
CFRunLoopIsWaiting
(
*
tcx
->
pRunLoopRef
))
usleep
(
100
);
*
tcx
->
pRet
=
ImplSVMain
();
// Force exit since some JVMs won't shutdown when only exit() is invoked
_exit
(
0
);
}
sal_Bool
ImplSVMainHook
(
int
*
pnInit
)
{
// Mac OS X requires that any Cocoa code have a CFRunLoop started in the
// primordial thread. Since all of the AWT classes in Java 1.4 and higher
// are written in Cocoa, we need to start the CFRunLoop here and run
// ImplSVMain() in a secondary thread.
// See http://developer.apple.com/samplecode/simpleJavaLauncher/listing3.html
// for further details and an example
CFRunLoopRef
runLoopRef
=
CFRunLoopGetCurrent
();
ThreadContext
tcx
;
tcx
.
pRet
=
pnInit
;
// the return value
tcx
.
pRunLoopRef
=
&
runLoopRef
;
oslThread
hThreadID
=
osl_createThread
(
RunSVMain
,
&
tcx
);
// Start the CFRunLoop
CFRunLoopSourceContext
aSourceContext
;
aSourceContext
.
version
=
0
;
aSourceContext
.
info
=
NULL
;
aSourceContext
.
retain
=
NULL
;
aSourceContext
.
release
=
NULL
;
aSourceContext
.
copyDescription
=
NULL
;
aSourceContext
.
equal
=
NULL
;
aSourceContext
.
hash
=
NULL
;
aSourceContext
.
schedule
=
NULL
;
aSourceContext
.
cancel
=
NULL
;
aSourceContext
.
perform
=
&
SourceContextCallBack
;
CFRunLoopSourceRef
aSourceRef
=
CFRunLoopSourceCreate
(
NULL
,
0
,
&
aSourceContext
);
CFRunLoopAddSource
(
runLoopRef
,
aSourceRef
,
kCFRunLoopCommonModes
);
CFRunLoopRun
();
osl_joinWithThread
(
hThreadID
);
osl_destroyThread
(
hThreadID
);
return
sal_True
;
// indicate that ImplSVMainHook is implemented
}
#endif // MACOSX
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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