Skip to content

Commit b8879fd

Browse files
committed
Fix build after rebase
1 parent a0820e6 commit b8879fd

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

bindings/c/examples/compile_basic.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
set -ex
44

55
cargo build --manifest-path ../Cargo.toml
6-
gcc -O3 -DDEBUG -o basic basic.c -std=c99 -Wall -I../include -L../../target/debug -lctaffy
6+
gcc -O3 -DDEBUG -o basic basic.c -std=c99 -Wall -I../include -L../../../target/debug -lctaffy

bindings/c/include/taffy.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ typedef enum TaffyMeasureMode {
193193
typedef enum TaffyOverflow {
194194
// The automatic minimum size of this node as a flexbox/grid item should be based on the size of it's content.
195195
TAFFY_OVERFLOW_VISIBLE,
196+
// The automatic minimum size of this node as a flexbox/grid item should be based on the size of its content.
197+
// Content that overflows this node should *not* contribute to the scroll region of its parent.
198+
TAFFY_OVERFLOW_CLIP,
196199
// The automatic minimum size of this node as a flexbox/grid item should be `0`.
197200
TAFFY_OVERFLOW_HIDDEN,
198201
// The automatic minimum size of this node as a flexbox/grid item should be `0`. Additionally, space should be reserved
@@ -323,7 +326,11 @@ typedef struct TaffySize {
323326
float height;
324327
} TaffySize;
325328

326-
typedef struct TaffySize (*TaffyMeasureFunction)(enum TaffyMeasureMode width_measure_mode, float width, enum TaffyMeasureMode height_measure_mode, float height, void *context);
329+
typedef struct TaffySize (*TaffyMeasureFunction)(enum TaffyMeasureMode width_measure_mode,
330+
float width,
331+
enum TaffyMeasureMode height_measure_mode,
332+
float height,
333+
void *context);
327334

328335
typedef struct TaffyLayout {
329336
float x;

bindings/c/src/style_enums.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ impl From<core::Position> for TaffyPosition {
9393
pub enum TaffyOverflow {
9494
/// The automatic minimum size of this node as a flexbox/grid item should be based on the size of it's content.
9595
Visible,
96+
/// The automatic minimum size of this node as a flexbox/grid item should be based on the size of its content.
97+
/// Content that overflows this node should *not* contribute to the scroll region of its parent.
98+
Clip,
9699
/// The automatic minimum size of this node as a flexbox/grid item should be `0`.
97100
Hidden,
98101
/// The automatic minimum size of this node as a flexbox/grid item should be `0`. Additionally, space should be reserved
@@ -103,6 +106,7 @@ impl From<TaffyOverflow> for core::Overflow {
103106
fn from(input: TaffyOverflow) -> core::Overflow {
104107
match input {
105108
TaffyOverflow::Visible => core::Overflow::Visible,
109+
TaffyOverflow::Clip => core::Overflow::Clip,
106110
TaffyOverflow::Hidden => core::Overflow::Hidden,
107111
TaffyOverflow::Scroll => core::Overflow::Scroll,
108112
}
@@ -112,6 +116,7 @@ impl From<core::Overflow> for TaffyOverflow {
112116
fn from(input: core::Overflow) -> TaffyOverflow {
113117
match input {
114118
core::Overflow::Visible => TaffyOverflow::Visible,
119+
core::Overflow::Clip => TaffyOverflow::Clip,
115120
core::Overflow::Hidden => TaffyOverflow::Hidden,
116121
core::Overflow::Scroll => TaffyOverflow::Scroll,
117122
}

bindings/c/src/tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use super::{
55
use ::core::ffi::c_void;
66
use taffy::prelude as core;
77
use taffy::style::AvailableSpace;
8-
use taffy::Taffy as CoreTaffy;
8+
use taffy::TaffyTree as CoreTaffy;
99

1010
pub type TaffyMeasureFunction = extern "C" fn(
1111
width_measure_mode: TaffyMeasureMode,

0 commit comments

Comments
 (0)