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
910e9990
Kaydet (Commit)
910e9990
authored
Tem 14, 2011
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
iOS hacking, intermediate commit
üst
0d1321e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
14 deletions
+44
-14
main.h
sal/inc/sal/main.h
+44
-14
No files found.
sal/inc/sal/main.h
Dosyayı görüntüle @
910e9990
...
...
@@ -47,31 +47,46 @@ void SAL_CALL sal_detail_deinitialize();
#import <UIKit/UIKit.h>
#include <postmac.h>
static
int
sal_argc
;
static
char
**
sal_argv
;
#define SAL_MAIN_WITH_ARGS_IMPL \
int SAL_CALL main(int argc, char ** argv) \
{ \
sal_argc = argc; \
sal_argv = argv; \
sal_detail_initialize(argc, argv); \
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; \
int retVal = UIApplicationMain (argc, argv, @"UIApplication", @"salAppDelegate"); \
\
[pool release]; \
\
sal_detail_deinitialize(); \
return retVal; \
} \
\
static int sal_main_with_args(int argc, char **argv); \
\
static int \
sal_main(void) \
{ \
char *argv[] = { NULL }; \
return sal_main_with_args(0, argv); \
}
#define SAL_MAIN_IMPL \
SAL_MAIN_WITH_ARGS_IMPL \
\
static int \
sal_main_with_args(int argc, char ** argv) \
int SAL_CALL main(int argc, char ** argv) \
{ \
return sal_main(); \
sal_detail_initialize(argc, argv); \
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; \
int retVal = UIApplicationMain (argc, argv, @"UIApplication", @"salAppDelegate"); \
[pool release]; \
sal_detail_deinitialize(); \
return retVal; \
}
#define SAL_MAIN_WITH_GUI_IMPL \
int SAL_CALL main(int argc, char ** argv) \
{ \
sal_detail_initialize(argc, argv); \
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; \
int retVal = sal_main(); \
[pool release]; \
sal_detail_deinitialize(); \
return retVal; \
}
@interface
salAppDelegate
:
NSObject
<
UIApplicationDelegate
>
{
...
...
@@ -79,7 +94,7 @@ sal_main_with_args(int argc, char ** argv) \
@property
(
nonatomic
,
retain
)
UIWindow
*
window
;
@end
static
int
sal_main
_with_args
(
int
argc
,
char
**
argv
);
static
int
sal_main
(
void
);
@implementation
salAppDelegate
...
...
@@ -92,7 +107,7 @@ static int sal_main_with_args(int argc, char **argv);
self
.
window
=
uiw
;
[
uiw
release
];
sal_main
_with_args
(
sal_argc
,
sal_argv
);
sal_main
(
);
[
self
.
window
makeKeyAndVisible
];
return
YES
;
...
...
@@ -122,6 +137,8 @@ int SAL_CALL main(int argc, char ** argv) \
return ret; \
}
#define SAL_MAIN_WITH_GUI_IMPL SAL_MAIN_IMPL
#endif
...
...
@@ -182,6 +199,19 @@ int WINAPI WinMain( HINSTANCE _hinst, HINSTANCE _dummy, char* _cmdline, int _nsh
SAL_WIN_WinMain \
static int SAL_CALL sal_main(void)
/* Use SAL_IMPLEMENT_MAIN_WITH_GUI in programs that actually have a
* VCL GUI. The difference is meaningful only for iOS support, which
* of course is a highly experimental work in progress. So actually,
* don't bother, just let developers who care for iOS take care of it
* when/if necessary.
*/
#define SAL_IMPLEMENT_MAIN_WITH_GUI() \
static int SAL_CALL sal_main(void); \
SAL_MAIN_WITH_GUI_IMPL \
SAL_WIN_WinMain \
static int SAL_CALL sal_main(void)
/*
"How to use" Examples:
...
...
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