diff --git a/crates/ark/src/plots/graphics_device.rs b/crates/ark/src/plots/graphics_device.rs index 117ec50ab..86f9d7201 100644 --- a/crates/ark/src/plots/graphics_device.rs +++ b/crates/ark/src/plots/graphics_device.rs @@ -77,61 +77,61 @@ pub(crate) fn init_graphics_device() { #[derive(Debug, Default)] #[allow(non_snake_case)] struct DeviceCallbacks { - pub activate: Cell>, - pub deactivate: Cell>, - pub holdflush: Cell i32>>, - pub mode: Cell>, - pub newPage: Cell>, + activate: Cell>, + deactivate: Cell>, + holdflush: Cell i32>>, + mode: Cell>, + newPage: Cell>, } #[derive(Default)] struct DeviceContext { // Tracks whether the graphics device has changes. - pub _changes: Cell, + _changes: Cell, // Tracks whether or not the current plot page has ever been written to. - pub _new_page: Cell, + _new_page: Cell, // Tracks the current graphics device mode. - pub _mode: Cell, + _mode: Cell, // The 'holdflush' flag, as normally handled via a device's 'holdflush()' // callback. If 'dev.hold()' has been set, we want to avoid rendering // new plots. - pub _holdflush: Cell, + _holdflush: Cell, // The ID associated with the current plot page. Used primarily // for accessing indexed plots, e.g. for the Plots pane history. - pub _id: RefCell>, + _id: RefCell>, // A map, mapping plot IDs to the communication channels used // for communicating their rendered results to the frontend. - pub _channels: RefCell>, + _channels: RefCell>, // The device callbacks, which are patched into the device. - pub _callbacks: DeviceCallbacks, + _callbacks: DeviceCallbacks, } impl DeviceContext { - pub fn holdflush(&self, holdflush: i32) { + fn holdflush(&self, holdflush: i32) { self._holdflush.replace(holdflush); } - pub fn mode(&self, mode: i32, _dev: pDevDesc) { + fn mode(&self, mode: i32, _dev: pDevDesc) { self._mode.replace(mode); let old = self._changes.get(); self._changes.replace(old || mode != 0); } - pub fn new_page(&self, _dd: pGEcontext, _dev: pDevDesc) { + fn new_page(&self, _dd: pGEcontext, _dev: pDevDesc) { // Create a new id for this new plot page and note that this is a new page let id = Uuid::new_v4().to_string(); self._id.replace(Some(id)); self._new_page.replace(true); } - pub fn on_did_execute_request( + fn on_did_execute_request( &self, comm_manager_tx: Sender, iopub_tx: Sender, @@ -145,7 +145,7 @@ impl DeviceContext { } } - pub fn on_process_events(&self) { + fn on_process_events(&self) { // Don't try to render a plot if we're currently drawing. if self._mode.get() != 0 { return; @@ -458,11 +458,11 @@ macro_rules! with_device { }}; } -pub unsafe fn on_process_events() { +pub(crate) unsafe fn on_process_events() { DEVICE_CONTEXT.with_borrow(|cell| cell.on_process_events()); } -pub unsafe fn on_did_execute_request( +pub(crate) unsafe fn on_did_execute_request( comm_manager_tx: Sender, iopub_tx: Sender, dynamic_plots: bool,