pub struct NoteApp {Show 18 fields
tabs_data: Vec<NoteTab>,
active_idx: usize,
pub engine: WebEngine,
pub last_win_w: u32,
pub last_win_h: u32,
pub show_menu: bool,
pub open_menu: Option<u8>,
pub last_btn: bool,
ctrl_held: bool,
alt_held: bool,
pub panel_slide: i32,
pub panel_mode: u8,
pub panel_files: Vec<String>,
pub panel_input: String,
pub panel_selected: Option<usize>,
pub output_panel_open: bool,
pub output_text: String,
pub output_panel_height: u32,
}Fields§
§tabs_data: Vec<NoteTab>§active_idx: usize§engine: WebEngine§last_win_w: u32§last_win_h: u32§last_btn: bool§ctrl_held: bool§alt_held: bool§panel_slide: i32§panel_mode: u8§panel_files: Vec<String>§panel_input: String§panel_selected: Option<usize>§output_panel_open: bool§output_text: String§output_panel_height: u32Implementations§
Source§impl NoteApp
impl NoteApp
Sourcepub fn open_file(filename: &str, content: &str) -> Self
pub fn open_file(filename: &str, content: &str) -> Self
外部からファイルを指定して開くためのヘルパー(FilesApp・Aura から呼び出し)
pub fn new() -> Self
fn flush_current_tab(&mut self)
fn load_tab_into_engine(&mut self, idx: usize)
fn open_panel(&mut self, mode: u8)
fn save_current(&mut self)
fn load_file_into_current(&mut self)
fn new_tab_action(&mut self)
Sourcefn run_script(&mut self)
fn run_script(&mut self)
Aura をサンドボックス内で実行する
Trait Implementations§
Source§impl App for NoteApp
impl App for NoteApp
fn name(&self) -> &str
Source§fn instance_info(&self) -> String
fn instance_info(&self) -> String
インスタンス特有の情報(ファイル名やURLなど)を返す
Source§fn draw(
&mut self,
screen: &Screen,
win_x: u32,
win_y: u32,
win_w: u32,
win_h: u32,
)
fn draw( &mut self, screen: &Screen, win_x: u32, win_y: u32, win_w: u32, win_h: u32, )
ウィンドウ内の描画要求
Source§fn on_mouse(
&mut self,
local_x: i32,
local_y: i32,
btn_left: bool,
btn_right: bool,
wheel: i32,
)
fn on_mouse( &mut self, local_x: i32, local_y: i32, btn_left: bool, btn_right: bool, wheel: i32, )
マウスイベント。ローカル座標とホイール移動量が渡される。
Source§fn open_file_dialog(&mut self)
fn open_file_dialog(&mut self)
Alt+O: ファイルオープンダイアログを開く(未実装アプリはno-op)
fn tabs(&self) -> Vec<String>
fn active_tab(&self) -> usize
fn switch_tab(&mut self, idx: usize)
fn add_tab(&mut self)
fn get_dom_value(&self, id: &str) -> Option<String>
fn set_dom_value(&mut self, id: &str, val: &str)
共有されるバックバッファを返す
Source§fn live_title(&self) -> Option<String>
fn live_title(&self) -> Option<String>
タブタイトル一覧。空を返すとタブなし扱い(非推奨: 全アプリは最低1タブ持つ)
タイトルバーに出す文字(
None なら作成時の Window.title)。ページで変わるアプリが使う。Source§fn memory_checkpoint(&mut self)
fn memory_checkpoint(&mut self)
アプリのスレッドの 1 周の頭(錠を持っていない所)で呼ばれる。メモリが足りないときに裏のタブを破棄する
アプリ(ブラウザ)が実装する(2026-11-19。判定は
kernel/tab_discard.rs)。Source§fn open_url_in_new_tab(&mut self, _url: &str)
fn open_url_in_new_tab(&mut self, _url: &str)
同じアプリが URL つきで 2 度目に起動されたとき、その URL を新しいタブで開く(2026-11-18。ブラウザだけが実装する)。
Source§fn tab_thread_fn(&self) -> Option<fn()>
fn tab_thread_fn(&self) -> Option<fn()>
このアプリの各タブ用バックグラウンドスレッド関数を返す。
Some(fn) を返したアプリはタブ追加時にスケジューラでスレッドを起動する。
スレッド関数は引数なしの fn() で、グローバル Mutex 経由でアプリ状態と通信する。
fn needs_timer_redraw(&self) -> bool
Source§fn get_buffer_updated_flag(&self) -> Option<Arc<AtomicBool>>
fn get_buffer_updated_flag(&self) -> Option<Arc<AtomicBool>>
ProxyApp の shared_buffer が更新されたことを通知する AtomicBool を返す。
ProxyApp でない通常のアプリは None を返す(デフォルト実装)。
Core 0 の dirty 判定がこのフラグを読んで矩形を登録する。
fn get_dom_content(&self, _id: &str) -> Option<String>
fn set_dom_content(&mut self, _id: &str, _val: &str)
Source§fn is_stopped(&self) -> bool
fn is_stopped(&self) -> bool
アプリのスレッドがもう居ない(panic・メモリの使いすぎで止めた)か。ウィンドウは最後の画面のまま残る。
同じアプリを開き直すとき、
WindowManager::add_window はこのウィンドウを使い回さず置き換える。Source§fn unresponsive_ms(&self) -> Option<u64>
fn unresponsive_ms(&self) -> Option<u64>
アプリが応答していない時間(ms)。応答しているなら
None(TODO R2 (a))。
ProxyApp はアプリのスレッドの 1 周の始まりが UNRESPONSIVE_MS 以上前なら返す。
メインループで描くアプリは、ウォッチドッグの Not Responding(watchdog::is_not_responding)で見る(Window::unresponsive)。Source§fn kill_tab(&mut self, _idx: usize) -> bool
fn kill_tab(&mut self, _idx: usize) -> bool
タブを 1 つだけ止める(TODO R2 (d)、2026-11-18)。受け付けたら true。
ProxyApp は合図を立てるだけで、アプリのスレッドが、そのタブの JS を打ち切ってから 1 周の頭でタブを閉じる。Source§fn running_tab(&self) -> usize
fn running_tab(&self) -> usize
アプリのスレッドが今動かしているタブ(TODO R2 (d))。
ProxyApp では、利用者が応答しない間に
別のタブを選んでも(App::active_tab は選んだ先を返す)、アプリが実際に動かしているタブを返す。Source§fn tab_kill_pending(&self) -> Option<usize>
fn tab_kill_pending(&self) -> Option<usize>
タブを止める合図を立てたが、まだ閉じていないタブ(TODO R2 (d))。
Auto Trait Implementations§
impl !RefUnwindSafe for NoteApp
impl !Send for NoteApp
impl !Sync for NoteApp
impl !UnwindSafe for NoteApp
impl Freeze for NoteApp
impl Unpin for NoteApp
impl UnsafeUnpin for NoteApp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more