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
cfe512ac
Kaydet (Commit)
cfe512ac
authored
Nis 15, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Start hacking on handling orientation changes
Change-Id: I94cfdc1b334539399faff29c046185bbbf698d23
üst
c02f96f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
3 deletions
+56
-3
AppDelegate.m
ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
+32
-1
View.m
ios/experimental/LibreOffice/LibreOffice/View.m
+20
-2
ViewController.m
ios/experimental/LibreOffice/LibreOffice/ViewController.m
+4
-0
No files found.
ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
Dosyayı görüntüle @
cfe512ac
...
@@ -26,6 +26,17 @@ static View *theView;
...
@@ -26,6 +26,17 @@ static View *theView;
(
void
)
launchOptions
;
(
void
)
launchOptions
;
CGRect
bounds
=
[[
UIScreen
mainScreen
]
bounds
];
CGRect
bounds
=
[[
UIScreen
mainScreen
]
bounds
];
NSLog
(
@"mainScreen bounds: %dx%d@(%d,%d)"
,
(
int
)
bounds
.
size
.
width
,
(
int
)
bounds
.
size
.
height
,
(
int
)
bounds
.
origin
.
x
,
(
int
)
bounds
.
origin
.
y
);
CGRect
applicationFrame
=
[[
UIScreen
mainScreen
]
applicationFrame
];
NSLog
(
@"mainScreen applicationFrame: %dx%d@(%d,%d)"
,
(
int
)
applicationFrame
.
size
.
width
,
(
int
)
applicationFrame
.
size
.
height
,
(
int
)
applicationFrame
.
origin
.
x
,
(
int
)
applicationFrame
.
origin
.
y
);
self
.
window
=
[[
UIWindow
alloc
]
initWithFrame
:
bounds
];
self
.
window
=
[[
UIWindow
alloc
]
initWithFrame
:
bounds
];
self
.
window
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
window
.
backgroundColor
=
[
UIColor
whiteColor
];
...
@@ -51,7 +62,10 @@ static View *theView;
...
@@ -51,7 +62,10 @@ static View *theView;
[
self
.
window
addGestureRecognizer
:
tapRecognizer
];
[
self
.
window
addGestureRecognizer
:
tapRecognizer
];
lo_set_view_size
(
bounds
.
size
.
width
,
bounds
.
size
.
height
);
if
(
UIInterfaceOrientationIsLandscape
([[
UIApplication
sharedApplication
]
statusBarOrientation
]))
lo_set_view_size
(
applicationFrame
.
size
.
height
,
applicationFrame
.
size
.
width
);
else
lo_set_view_size
(
applicationFrame
.
size
.
width
,
applicationFrame
.
size
.
height
);
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
keyboardWillShow
:
)
name
:
UIKeyboardWillShowNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
keyboardWillShow
:
)
name
:
UIKeyboardWillShowNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
keyboardDidHide
:
)
name
:
UIKeyboardDidHideNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
keyboardDidHide
:
)
name
:
UIKeyboardDidHideNotification
object
:
nil
];
...
@@ -110,6 +124,23 @@ static View *theView;
...
@@ -110,6 +124,23 @@ static View *theView;
(
void
)
application
;
(
void
)
application
;
}
}
-
(
void
)
application
:(
UIApplication
*
)
application
didChangeStatusBarFrame
:(
CGRect
)
oldStatusBarFrame
{
(
void
)
application
;
(
void
)
oldStatusBarFrame
;
CGRect
applicationFrame
=
[[
UIScreen
mainScreen
]
applicationFrame
];
NSLog
(
@"New applicationFrame: %dx%d@(%d,%d)"
,
(
int
)
applicationFrame
.
size
.
width
,
(
int
)
applicationFrame
.
size
.
height
,
(
int
)
applicationFrame
.
origin
.
x
,
(
int
)
applicationFrame
.
origin
.
y
);
NSLog
(
@"statusBarOrientation: %d"
,
[[
UIApplication
sharedApplication
]
statusBarOrientation
]);
if
(
UIInterfaceOrientationIsLandscape
([[
UIApplication
sharedApplication
]
statusBarOrientation
]))
lo_set_view_size
(
applicationFrame
.
size
.
height
,
applicationFrame
.
size
.
width
);
else
lo_set_view_size
(
applicationFrame
.
size
.
width
,
applicationFrame
.
size
.
height
);
}
-
(
void
)
keyboardWillShow
:(
NSNotification
*
)
note
-
(
void
)
keyboardWillShow
:(
NSNotification
*
)
note
{
{
NSDictionary
*
info
=
[
note
userInfo
];
NSDictionary
*
info
=
[
note
userInfo
];
...
...
ios/experimental/LibreOffice/LibreOffice/View.m
Dosyayı görüntüle @
cfe512ac
...
@@ -20,8 +20,26 @@
...
@@ -20,8 +20,26 @@
CGContextRef
context
=
UIGraphicsGetCurrentContext
();
CGContextRef
context
=
UIGraphicsGetCurrentContext
();
CGContextSaveGState
(
context
);
CGContextSaveGState
(
context
);
CGContextTranslateCTM
(
context
,
0
,
self
.
frame
.
size
.
height
);
CGContextScaleCTM
(
context
,
1
,
-
1
);
switch
([[
UIApplication
sharedApplication
]
statusBarOrientation
])
{
case
UIInterfaceOrientationPortrait
:
CGContextTranslateCTM
(
context
,
0
,
self
.
frame
.
size
.
height
);
CGContextScaleCTM
(
context
,
1
,
-
1
);
break
;
case
UIInterfaceOrientationLandscapeLeft
:
CGContextTranslateCTM
(
context
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
CGContextRotateCTM
(
context
,
M_PI
/
2
);
CGContextScaleCTM
(
context
,
-
1
,
1
);
break
;
case
UIInterfaceOrientationLandscapeRight
:
CGContextRotateCTM
(
context
,
-
M_PI
/
2
);
CGContextScaleCTM
(
context
,
-
1
,
1
);
break
;
case
UIInterfaceOrientationPortraitUpsideDown
:
CGContextTranslateCTM
(
context
,
self
.
frame
.
size
.
width
,
0
);
CGContextScaleCTM
(
context
,
-
1
,
1
);
break
;
}
lo_render_windows
(
context
,
rect
);
lo_render_windows
(
context
,
rect
);
CGContextRestoreGState
(
context
);
CGContextRestoreGState
(
context
);
...
...
ios/experimental/LibreOffice/LibreOffice/ViewController.m
Dosyayı görüntüle @
cfe512ac
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
#import "ViewController.h"
#import "ViewController.h"
#include <osl/detail/ios-bootstrap.h>
#import "lo.h"
@implementation
ViewController
@implementation
ViewController
-
(
void
)
viewDidLoad
-
(
void
)
viewDidLoad
...
...
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