mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 00:38:11 +08:00
Rename the legacy Graphene crate to document-legacy (#899)
* Rename /graphene to /document-legacy * Update names in code
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
use crate::LayerId;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
#[repr(C)]
|
||||
pub enum DocumentResponse {
|
||||
/// For the purposes of rendering, this triggers a re-render of the entire document.
|
||||
DocumentChanged,
|
||||
FolderChanged {
|
||||
path: Vec<LayerId>,
|
||||
},
|
||||
CreatedLayer {
|
||||
path: Vec<LayerId>,
|
||||
},
|
||||
DeletedLayer {
|
||||
path: Vec<LayerId>,
|
||||
},
|
||||
/// Triggers an update of the layer in the layer panel.
|
||||
LayerChanged {
|
||||
path: Vec<LayerId>,
|
||||
},
|
||||
}
|
||||
|
||||
impl fmt::Display for DocumentResponse {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
DocumentResponse::DocumentChanged { .. } => write!(f, "DocumentChanged"),
|
||||
DocumentResponse::FolderChanged { .. } => write!(f, "FolderChanged"),
|
||||
DocumentResponse::CreatedLayer { .. } => write!(f, "CreatedLayer"),
|
||||
DocumentResponse::LayerChanged { .. } => write!(f, "LayerChanged"),
|
||||
DocumentResponse::DeletedLayer { .. } => write!(f, "DeleteLayer"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user