mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
ohos: Add basic IME and keyboard support (#34188)
* ohos: Add basic IME and keyboard support - Add extremely basic support for keyboard events - Add basic IME support - Showing and hiding the IME - inserting text - deleting characters - very basic configuration of the IME Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Apply suggestions from code review Improve the log message Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> * Update ports/servoshell/egl/ohos.rs Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> * ohos: Bump the minimum required SDK version to 5.0 Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Remove pub from callbacks The callbacks don't need to be public, as we will be registering them. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Rename composition event Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: clippy in log Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: address some clippy warnings Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Raise Error in mach if unsupported SDK version is used. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Add keyboard-types dependency for android Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
This commit is contained in:
parent
c64d5e9d30
commit
538ac61a82
14 changed files with 320 additions and 63 deletions
|
@ -33,14 +33,13 @@ pub(crate) fn redirect_stdout_and_stderr() -> Result<(), LogRedirectError> {
|
|||
|
||||
// The first step is to redirect stdout and stderr to the logs.
|
||||
// We redirect stdout and stderr to a custom descriptor.
|
||||
let (readerfd, writerfd) =
|
||||
nix::unistd::pipe().map_err(|e| LogRedirectError::CreatePipeFailed(e))?;
|
||||
let (readerfd, writerfd) = nix::unistd::pipe().map_err(LogRedirectError::CreatePipeFailed)?;
|
||||
// Leaks the writer fd. We want to log for the whole program lifetime.
|
||||
let raw_writerfd = writerfd.into_raw_fd();
|
||||
let _fd = nix::unistd::dup2(raw_writerfd, RawFd::from(1))
|
||||
.map_err(|e| LogRedirectError::RedirectToPipeFailed(e))?;
|
||||
.map_err(LogRedirectError::RedirectToPipeFailed)?;
|
||||
let _fd = nix::unistd::dup2(raw_writerfd, RawFd::from(2))
|
||||
.map_err(|e| LogRedirectError::RedirectToPipeFailed(e))?;
|
||||
.map_err(LogRedirectError::RedirectToPipeFailed)?;
|
||||
|
||||
// Then we spawn a thread whose only job is to read from the other side of the
|
||||
// pipe and redirect to the logs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue