lang: rename signed integer types sN -> iN
Surface rename of the signed integer family: s1..s64 become i1..i64
(u1..u64, usize, isize unchanged). 'string' keeps the s-prefix arm in
name classification; width parsing moves to the i-prefix arm next to
isize.
Internal TypeId tags follow the surface (.s8/.s16/.s32/.s64 ->
.i8/.i16/.i32/.i64), as do mono-key mangle fragments (ptr_i64,
tu_i64_bool) and all display/diagnostic formatting (i{d}).
Migrated in the same sweep: stdlib + examples + issue repros + FFI C
companions (shared symbol names like ffi_id_i64), expected
stdout/stderr/ir snapshots, specs.md, readme.md, CLAUDE.md/AGENTS.md,
implementation_plan.md, docs/, issue writeups. Vendored stb_image and
historical flow state left untouched.
zig build test: 426/426; examples suite: 595/595.
This commit is contained in:
@@ -93,12 +93,12 @@ DOCK_ANIM_DURATION :f32: 0.19; // 190ms
|
||||
|
||||
DockInteraction :: struct {
|
||||
// Drag state
|
||||
dragging_child: s64; // -1 = none
|
||||
dragging_child: i64; // -1 = none
|
||||
drag_start_pos: Point;
|
||||
drag_offset: Point;
|
||||
click_fraction_x: f32;
|
||||
click_fraction_y: f32;
|
||||
hovered_zone: s64; // -1 = none, else DockZone ordinal
|
||||
hovered_zone: i64; // -1 = none, else DockZone ordinal
|
||||
|
||||
// Per-child state
|
||||
natural_sizes: List(Size);
|
||||
@@ -111,7 +111,7 @@ DockInteraction :: struct {
|
||||
anim_sizes: List(Animated(Size));
|
||||
header_pressed: List(bool);
|
||||
|
||||
child_count: s64;
|
||||
child_count: i64;
|
||||
parent_allocator: Allocator; // GPA — used for persistent list growth
|
||||
|
||||
init :: (self: *DockInteraction) {
|
||||
@@ -135,7 +135,7 @@ DockInteraction :: struct {
|
||||
self.header_pressed = List(bool).{};
|
||||
}
|
||||
|
||||
ensure_capacity :: (self: *DockInteraction, count: s64) {
|
||||
ensure_capacity :: (self: *DockInteraction, count: i64) {
|
||||
if self.child_count >= count { return; }
|
||||
while self.child_count < count {
|
||||
self.natural_sizes.append(Size.zero(), self.parent_allocator);
|
||||
@@ -151,7 +151,7 @@ DockInteraction :: struct {
|
||||
}
|
||||
}
|
||||
|
||||
set_target_size :: (self: *DockInteraction, index: s64, target: Size) {
|
||||
set_target_size :: (self: *DockInteraction, index: i64, target: Size) {
|
||||
if index >= self.child_count { return; }
|
||||
anim := @self.anim_sizes.items[index];
|
||||
cur := anim.to;
|
||||
@@ -168,7 +168,7 @@ DockInteraction :: struct {
|
||||
}
|
||||
}
|
||||
|
||||
get_animated_size :: (self: *DockInteraction, index: s64) -> Size {
|
||||
get_animated_size :: (self: *DockInteraction, index: i64) -> Size {
|
||||
if index >= self.child_count { return Size.zero(); }
|
||||
(@self.anim_sizes.items[index]).current
|
||||
}
|
||||
@@ -197,7 +197,7 @@ DockInteraction :: struct {
|
||||
}
|
||||
}
|
||||
|
||||
start_dragging :: (interaction: *DockInteraction, child_index: s64, pos: Point, panel_frame: Frame) {
|
||||
start_dragging :: (interaction: *DockInteraction, child_index: i64, pos: Point, panel_frame: Frame) {
|
||||
interaction.dragging_child = child_index;
|
||||
interaction.drag_start_pos = pos;
|
||||
interaction.drag_offset = Point.zero();
|
||||
@@ -218,7 +218,7 @@ start_dragging :: (interaction: *DockInteraction, child_index: s64, pos: Point,
|
||||
// Helper functions
|
||||
// =============================================================================
|
||||
|
||||
zone_by_index :: (i: s64) -> DockZone {
|
||||
zone_by_index :: (i: i64) -> DockZone {
|
||||
if i == {
|
||||
case 0: .fill;
|
||||
case 1: .center;
|
||||
@@ -234,8 +234,8 @@ zone_by_index :: (i: s64) -> DockZone {
|
||||
}
|
||||
|
||||
find_hovered_zone :: (bounds: Frame, pos: Point, hint_size: f32, enable_corners: bool) -> ?DockZone {
|
||||
count : s64 = if enable_corners then 10 else 6;
|
||||
i : s64 = 0;
|
||||
count : i64 = if enable_corners then 10 else 6;
|
||||
i : i64 = 0;
|
||||
while i < count {
|
||||
zone := zone_by_index(i);
|
||||
hint := dock_zone_get_hint_frame(zone, bounds, hint_size);
|
||||
@@ -365,7 +365,7 @@ DockPanel :: struct {
|
||||
corner_radius: f32;
|
||||
header_height: f32;
|
||||
dock_interaction: *DockInteraction;
|
||||
panel_index: s64;
|
||||
panel_index: i64;
|
||||
|
||||
DEFAULT_BG :Color: Color.rgba(26, 26, 31, 242);
|
||||
DEFAULT_HEADER_BG :Color: Color.rgba(38, 38, 46, 255);
|
||||
@@ -469,7 +469,7 @@ Dock :: struct {
|
||||
hint_active_color: Color;
|
||||
preview_color: Color;
|
||||
enable_corners: bool;
|
||||
on_dock: ?Closure(s64, DockZone);
|
||||
on_dock: ?Closure(i64, DockZone);
|
||||
|
||||
make :: (interaction: *DockInteraction, delta_time: *f32) -> Dock {
|
||||
d : Dock = ---;
|
||||
@@ -519,7 +519,7 @@ impl View for Dock {
|
||||
dt : f32 = self.delta_time.*;
|
||||
interaction.tick_animations(dt);
|
||||
|
||||
i : s64 = 0;
|
||||
i : i64 = 0;
|
||||
while i < self.children.len {
|
||||
child := @self.children.items[i];
|
||||
|
||||
@@ -603,7 +603,7 @@ impl View for Dock {
|
||||
}
|
||||
|
||||
// Draw children
|
||||
i : s64 = 0;
|
||||
i : i64 = 0;
|
||||
while i < self.children.len {
|
||||
child := @self.children.items[i];
|
||||
child.view.render(ctx, child.computed_frame);
|
||||
@@ -619,8 +619,8 @@ impl View for Dock {
|
||||
}
|
||||
|
||||
// Zone hint indicators
|
||||
count : s64 = if self.enable_corners then 10 else 6;
|
||||
j : s64 = 0;
|
||||
count : i64 = if self.enable_corners then 10 else 6;
|
||||
j : i64 = 0;
|
||||
while j < count {
|
||||
zone := zone_by_index(j);
|
||||
hint_frame := dock_zone_get_hint_frame(zone, frame, self.hint_size);
|
||||
|
||||
Reference in New Issue
Block a user