pub struct GObjectType {Show 14 fields
pub type_name: String,
pub type_macro: Option<GType>,
pub function_prefix: String,
pub parent_type: Option<String>,
pub flags: Option<String>,
pub kind: GObjectTypeKind,
pub interfaces: Vec<InterfaceImplementation>,
pub has_private: bool,
pub code_block_statements: Vec<Statement>,
pub export_macros: Vec<String>,
pub doc: Option<TypeDoc>,
pub properties: Vec<ParamSpecAssignment>,
pub signals: Vec<Signal>,
pub location: SourceLocation,
}Fields§
§type_name: String§type_macro: Option<GType>§function_prefix: String§parent_type: Option<String>§flags: Option<String>§kind: GObjectTypeKind§interfaces: Vec<InterfaceImplementation>§has_private: bool§code_block_statements: Vec<Statement>§export_macros: Vec<String>§doc: Option<TypeDoc>§properties: Vec<ParamSpecAssignment>§signals: Vec<Signal>§location: SourceLocationImplementations§
Source§impl GObjectType
impl GObjectType
pub fn function_prefix(&self) -> &str
Sourcepub fn init_function_name(&self) -> String
pub fn init_function_name(&self) -> String
Get the expected instance init function name based on the function_prefix
Sourcepub fn class_init_function_name(&self) -> String
pub fn class_init_function_name(&self) -> String
Get the expected class_init function name based on the function_prefix
Sourcepub fn default_init_function_name(&self) -> String
pub fn default_init_function_name(&self) -> String
Get the expected default_init function name for interfaces
Sourcepub fn class_struct_name(&self) -> Option<String>
pub fn class_struct_name(&self) -> Option<String>
Returns the expected name of the class or interface struct for this
type, without the leading underscore. Returns None for final types,
which have no separate class struct.
- Derivable types →
"{TypeName}Class" - Interface types →
"{TypeName}Interface"
Sourcepub fn is_interface(&self) -> bool
pub fn is_interface(&self) -> bool
Check if this is an interface type
Sourcepub fn extract_signals(
&self,
class_init_func: &FunctionDefItem,
source: &[u8],
) -> Vec<Signal>
pub fn extract_signals( &self, class_init_func: &FunctionDefItem, source: &[u8], ) -> Vec<Signal>
Extract signals from a class_init function
Trait Implementations§
Source§impl Clone for GObjectType
impl Clone for GObjectType
Source§fn clone(&self) -> GObjectType
fn clone(&self) -> GObjectType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GObjectType
impl Debug for GObjectType
Auto Trait Implementations§
impl Freeze for GObjectType
impl RefUnwindSafe for GObjectType
impl Send for GObjectType
impl Sync for GObjectType
impl Unpin for GObjectType
impl UnsafeUnpin for GObjectType
impl UnwindSafe for GObjectType
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