Skip to documentation
SLOP

tiny.windowing.ClipboardCapacity

Reference tiny.windowing ClipboardCapacity

Defined in clipboard.

API (9)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callsclipboardCapacity
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/windowing/src/clipboard.zig:24

zig
pub const Capacity = struct {    received_text_byte_count: usize,    published_text_byte_count: usize,    transfer_read_byte_count: usize,    retained_wait_event_count: usize,    x11_property_long_count: u32,    transfer_read_bytes: usize,    retained_wait_event_bytes: usize,    maximum_backend_working_storage_bytes: usize,    pub fn derive(limits: Limits) CapacityError!Capacity {        if (limits.received_text_byte_count == 0) return error.ReceivedTextEmpty;        if (limits.received_text_byte_count > std.math.maxInt(u32)) {            return error.ReceivedTextTooLarge;        }        if (limits.published_text_byte_count == 0) return error.PublishedTextEmpty;        if (limits.transfer_read_byte_count == 0) return error.TransferReadStorageEmpty;        if (limits.retained_wait_event_count == 0) return error.WaitEventStorageEmpty;        const x11_property_long_count: u32 = @intCast(            limits.received_text_byte_count / 4 +                @intFromBool(limits.received_text_byte_count % 4 != 0),        );        const retained_wait_event_bytes = std.math.mul(            usize,            limits.retained_wait_event_count,            x11_message_bytes,        ) catch return error.CapacityOverflow;        const maximum_backend_working_storage_bytes = @max(            limits.transfer_read_byte_count,            retained_wait_event_bytes,        );        return .{            .received_text_byte_count = limits.received_text_byte_count,            .published_text_byte_count = limits.published_text_byte_count,            .transfer_read_byte_count = limits.transfer_read_byte_count,            .retained_wait_event_count = limits.retained_wait_event_count,            .x11_property_long_count = x11_property_long_count,            .transfer_read_bytes = limits.transfer_read_byte_count,            .retained_wait_event_bytes = retained_wait_event_bytes,            .maximum_backend_working_storage_bytes = maximum_backend_working_storage_bytes,        };    }};

Source: lib/windowing/src/root.zig:109

zig
pub const ClipboardCapacity = clipboard_module.Capacity;
Called byCallsNo direct callstest sourcelib.windowing.src.clipboardtest: clipboard capacity derives exac...test sourcelib.windowing.src.clipboardtest: clipboard source replaces trans...test sourcelib.windowing.src.clipboardtest: clipboard wait storage rejects ...private sourcelib.windowing.src.cocoa.CocoaStorageinittest sourcelib.windowing.src.cocoatest: Cocoa clipboard publication ret...+2 moreClipboardCapacityderive
Static calls · unresolved targets: 0 · external targets: 0.

Complete caller list for ClipboardCapacity.derive

7 direct callers.

Audit

Definitions2
Public names4
Members8
Version26.7.0
Revisiondaab053ee433