-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
219 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
mod animate_option; | ||
mod finish; | ||
mod frame_rate_range; | ||
mod update; | ||
mod finish; | ||
|
||
pub use animate_option::*; | ||
pub use finish::*; | ||
pub use frame_rate_range::*; | ||
pub use update::*; | ||
pub use finish::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
mod animate; | ||
mod dialog; | ||
mod gesture; | ||
mod node; | ||
mod animate; | ||
|
||
pub use animate::*; | ||
pub use dialog::*; | ||
pub use gesture::*; | ||
pub use node::*; | ||
pub use animate::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
mod list; | ||
mod list_item; | ||
mod text; | ||
mod text_input; | ||
mod xcomponent; | ||
|
||
pub use list::*; | ||
pub use list_item::*; | ||
pub use text::*; | ||
pub use text_input::*; | ||
pub use xcomponent::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
crates/arkui/src/component/built_in_component/text_input.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use crate::{ | ||
ArkUIAttributeBasic, ArkUICommonAttribute, ArkUIEvent, ArkUIGesture, ArkUINode, ArkUINodeType, | ||
ArkUIResult, ARK_UI_NATIVE_NODE_API_1, | ||
}; | ||
|
||
#[derive(Clone)] | ||
pub struct TextInput(ArkUINode); | ||
|
||
impl TextInput { | ||
pub fn new() -> ArkUIResult<Self> { | ||
let list_item = ARK_UI_NATIVE_NODE_API_1.create_node(ArkUINodeType::TextInput)?; | ||
Ok(Self(ArkUINode { | ||
raw: list_item, | ||
tag: ArkUINodeType::TextInput, | ||
..Default::default() | ||
})) | ||
} | ||
} | ||
|
||
impl From<TextInput> for ArkUINode { | ||
fn from(list_item: TextInput) -> Self { | ||
list_item.0 | ||
} | ||
} | ||
|
||
impl ArkUIAttributeBasic for TextInput { | ||
fn raw(&self) -> &ArkUINode { | ||
&self.0 | ||
} | ||
|
||
fn borrow_mut(&mut self) -> &mut ArkUINode { | ||
&mut self.0 | ||
} | ||
} | ||
|
||
impl ArkUICommonAttribute for TextInput {} | ||
impl ArkUIEvent for TextInput {} | ||
impl ArkUIGesture for TextInput {} |
Oops, something went wrong.