mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
@@ -19,30 +19,30 @@ pub fn new_primary() &Clipboard {
|
||||
return &Clipboard{}
|
||||
}
|
||||
|
||||
fn (mut cb Clipboard) set_text(text string) bool {
|
||||
pub fn (mut cb Clipboard) set_text(text string) bool {
|
||||
cb.text = text
|
||||
cb.is_owner = true
|
||||
cb.got_text = true
|
||||
return true
|
||||
}
|
||||
|
||||
fn (mut cb Clipboard) get_text() string {
|
||||
pub fn (mut cb Clipboard) get_text() string {
|
||||
return cb.text
|
||||
}
|
||||
|
||||
fn (mut cb Clipboard) clear() {
|
||||
pub fn (mut cb Clipboard) clear() {
|
||||
cb.text = ''
|
||||
cb.is_owner = false
|
||||
}
|
||||
|
||||
fn (mut cb Clipboard) free() {
|
||||
pub fn (mut cb Clipboard) free() {
|
||||
}
|
||||
|
||||
fn (cb &Clipboard) has_ownership() bool {
|
||||
pub fn (cb &Clipboard) has_ownership() bool {
|
||||
return cb.is_owner
|
||||
}
|
||||
|
||||
fn (cb &Clipboard) check_availability() bool {
|
||||
pub fn (cb &Clipboard) check_availability() bool {
|
||||
// This is a dummy clipboard implementation,
|
||||
// which can be always used, although it does not do much...
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user