mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
apprt/gtk-ng: get-title
This commit is contained in:
@ -36,8 +36,7 @@ pub fn close(self: *Self, process_active: bool) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn getTitle(self: *Self) ?[:0]const u8 {
|
pub fn getTitle(self: *Self) ?[:0]const u8 {
|
||||||
_ = self;
|
return self.surface.getTitle();
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn getContentScale(self: *const Self) !apprt.ContentScale {
|
pub fn getContentScale(self: *const Self) !apprt.ContentScale {
|
||||||
|
@ -49,7 +49,11 @@ pub fn Common(
|
|||||||
/// A helper that can be used to create a property that reads and
|
/// A helper that can be used to create a property that reads and
|
||||||
/// writes a private `?[:0]const u8` field type.
|
/// writes a private `?[:0]const u8` field type.
|
||||||
///
|
///
|
||||||
/// This helper helps properly manage the memory to avoid memory leaks.
|
/// Reading the property will result in a copy of the string
|
||||||
|
/// and callers are responsible for freeing it.
|
||||||
|
///
|
||||||
|
/// Writing the property will free the previous value and copy
|
||||||
|
/// the new value into the private field.
|
||||||
///
|
///
|
||||||
/// The object class (Self) must still free the private field
|
/// The object class (Self) must still free the private field
|
||||||
/// in finalize!
|
/// in finalize!
|
||||||
|
@ -881,6 +881,11 @@ pub const Surface = extern struct {
|
|||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
// Properties
|
// Properties
|
||||||
|
|
||||||
|
/// Returns the title property without a copy.
|
||||||
|
pub fn getTitle(self: *Self) ?[:0]const u8 {
|
||||||
|
return self.private().title;
|
||||||
|
}
|
||||||
|
|
||||||
fn propMouseHidden(
|
fn propMouseHidden(
|
||||||
self: *Self,
|
self: *Self,
|
||||||
_: *gobject.ParamSpec,
|
_: *gobject.ParamSpec,
|
||||||
|
Reference in New Issue
Block a user