From 76493702fbd30046af0cdc9e55b2bd7634667c77 Mon Sep 17 00:00:00 2001 From: Jay Dolan Date: Wed, 2 Sep 2026 19:22:19 -0400 Subject: [PATCH 1/4] Adopt zero-length interface members from Objectively Objectively no longer stores an interface pointer on each instance; `$` resolves the interface through Object::clazz, and the struct member exists only to carry a type for typeof. ClassDef.interfaceOffset is gone. Follow suit: each instance struct's interface member becomes a zero-length array, and each ClassDef drops interfaceOffset. No call sites change. See jdolan/Objectively#41 and jdolan/ObjectivelyGPU#6. Co-Authored-By: Claude Fable 5.1 --- Examples/HelloViewController.c | 1 - Examples/HelloViewController.h | 5 ++--- Sources/ObjectivelyMVC/Box.c | 1 - Sources/ObjectivelyMVC/Box.h | 4 ++-- Sources/ObjectivelyMVC/Button.c | 1 - Sources/ObjectivelyMVC/Button.h | 4 ++-- Sources/ObjectivelyMVC/Checkbox.c | 1 - Sources/ObjectivelyMVC/Checkbox.h | 4 ++-- Sources/ObjectivelyMVC/CollectionItemView.c | 1 - Sources/ObjectivelyMVC/CollectionItemView.h | 4 ++-- Sources/ObjectivelyMVC/CollectionView.c | 1 - Sources/ObjectivelyMVC/CollectionView.h | 4 ++-- Sources/ObjectivelyMVC/Control.c | 1 - Sources/ObjectivelyMVC/Control.h | 4 ++-- Sources/ObjectivelyMVC/DebugViewController.c | 1 - Sources/ObjectivelyMVC/DebugViewController.h | 4 ++-- Sources/ObjectivelyMVC/Font.c | 1 - Sources/ObjectivelyMVC/Font.h | 4 ++-- Sources/ObjectivelyMVC/HSVColorPicker.c | 1 - Sources/ObjectivelyMVC/HSVColorPicker.h | 4 ++-- Sources/ObjectivelyMVC/HueColorPicker.c | 1 - Sources/ObjectivelyMVC/HueColorPicker.h | 4 ++-- Sources/ObjectivelyMVC/Image.c | 1 - Sources/ObjectivelyMVC/Image.h | 4 ++-- Sources/ObjectivelyMVC/ImageView.c | 1 - Sources/ObjectivelyMVC/ImageView.h | 4 ++-- Sources/ObjectivelyMVC/Input.c | 1 - Sources/ObjectivelyMVC/Input.h | 4 ++-- Sources/ObjectivelyMVC/Label.c | 1 - Sources/ObjectivelyMVC/Label.h | 4 ++-- Sources/ObjectivelyMVC/NavigationViewController.c | 1 - Sources/ObjectivelyMVC/NavigationViewController.h | 4 ++-- Sources/ObjectivelyMVC/Option.c | 1 - Sources/ObjectivelyMVC/Option.h | 4 ++-- Sources/ObjectivelyMVC/PageView.c | 1 - Sources/ObjectivelyMVC/PageView.h | 4 ++-- Sources/ObjectivelyMVC/Panel.c | 1 - Sources/ObjectivelyMVC/Panel.h | 4 ++-- Sources/ObjectivelyMVC/ProgressBar.c | 1 - Sources/ObjectivelyMVC/ProgressBar.h | 4 ++-- Sources/ObjectivelyMVC/RGBColorPicker.c | 1 - Sources/ObjectivelyMVC/RGBColorPicker.h | 4 ++-- Sources/ObjectivelyMVC/Renderer.c | 1 - Sources/ObjectivelyMVC/Renderer.h | 4 ++-- Sources/ObjectivelyMVC/ScrollBar.c | 1 - Sources/ObjectivelyMVC/ScrollBar.h | 4 ++-- Sources/ObjectivelyMVC/ScrollHandle.c | 1 - Sources/ObjectivelyMVC/ScrollHandle.h | 4 ++-- Sources/ObjectivelyMVC/ScrollView.c | 1 - Sources/ObjectivelyMVC/ScrollView.h | 4 ++-- Sources/ObjectivelyMVC/Select.c | 1 - Sources/ObjectivelyMVC/Select.h | 4 ++-- Sources/ObjectivelyMVC/Selector.c | 1 - Sources/ObjectivelyMVC/Selector.h | 4 ++-- Sources/ObjectivelyMVC/SelectorSequence.c | 1 - Sources/ObjectivelyMVC/SelectorSequence.h | 4 ++-- Sources/ObjectivelyMVC/SimpleSelector.c | 1 - Sources/ObjectivelyMVC/SimpleSelector.h | 4 ++-- Sources/ObjectivelyMVC/SlideShowView.c | 1 - Sources/ObjectivelyMVC/SlideShowView.h | 4 ++-- Sources/ObjectivelyMVC/Slider.c | 1 - Sources/ObjectivelyMVC/Slider.h | 4 ++-- Sources/ObjectivelyMVC/StackView.c | 1 - Sources/ObjectivelyMVC/StackView.h | 4 ++-- Sources/ObjectivelyMVC/Style.c | 1 - Sources/ObjectivelyMVC/Style.h | 4 ++-- Sources/ObjectivelyMVC/Stylesheet.c | 1 - Sources/ObjectivelyMVC/Stylesheet.h | 4 ++-- Sources/ObjectivelyMVC/TabView.c | 1 - Sources/ObjectivelyMVC/TabView.h | 4 ++-- Sources/ObjectivelyMVC/TabViewController.c | 1 - Sources/ObjectivelyMVC/TabViewController.h | 4 ++-- Sources/ObjectivelyMVC/TabViewItem.c | 1 - Sources/ObjectivelyMVC/TabViewItem.h | 4 ++-- Sources/ObjectivelyMVC/TableCellView.c | 1 - Sources/ObjectivelyMVC/TableCellView.h | 4 ++-- Sources/ObjectivelyMVC/TableColumn.c | 1 - Sources/ObjectivelyMVC/TableColumn.h | 4 ++-- Sources/ObjectivelyMVC/TableHeaderCellView.c | 1 - Sources/ObjectivelyMVC/TableHeaderCellView.h | 4 ++-- Sources/ObjectivelyMVC/TableHeaderView.c | 1 - Sources/ObjectivelyMVC/TableHeaderView.h | 4 ++-- Sources/ObjectivelyMVC/TableRowView.c | 1 - Sources/ObjectivelyMVC/TableRowView.h | 4 ++-- Sources/ObjectivelyMVC/TableView.c | 1 - Sources/ObjectivelyMVC/TableView.h | 4 ++-- Sources/ObjectivelyMVC/Text.c | 1 - Sources/ObjectivelyMVC/Text.h | 4 ++-- Sources/ObjectivelyMVC/TextView.c | 1 - Sources/ObjectivelyMVC/TextView.h | 4 ++-- Sources/ObjectivelyMVC/Theme.c | 1 - Sources/ObjectivelyMVC/Theme.h | 4 ++-- Sources/ObjectivelyMVC/View.c | 1 - Sources/ObjectivelyMVC/View.h | 4 ++-- Sources/ObjectivelyMVC/ViewController.c | 1 - Sources/ObjectivelyMVC/ViewController.h | 4 ++-- Sources/ObjectivelyMVC/Warning.c | 1 - Sources/ObjectivelyMVC/Warning.h | 4 ++-- Sources/ObjectivelyMVC/WindowController.c | 1 - Sources/ObjectivelyMVC/WindowController.h | 4 ++-- 100 files changed, 100 insertions(+), 151 deletions(-) diff --git a/Examples/HelloViewController.c b/Examples/HelloViewController.c index 0e5e9ac0..e9764047 100644 --- a/Examples/HelloViewController.c +++ b/Examples/HelloViewController.c @@ -338,7 +338,6 @@ Class *_HelloViewController(void) { .name = "HelloViewController", .superclass = _ViewController(), .instanceSize = sizeof(HelloViewController), - .interfaceOffset = offsetof(HelloViewController, interface), .interfaceSize = sizeof(HelloViewControllerInterface), .initialize = initialize, }); diff --git a/Examples/HelloViewController.h b/Examples/HelloViewController.h index 673b6e0e..3a4858c2 100644 --- a/Examples/HelloViewController.h +++ b/Examples/HelloViewController.h @@ -47,11 +47,10 @@ struct HelloViewController { ViewController viewController; /** - * @brief The interface. - * + * @brief The interface type. * @private */ - HelloViewControllerInterface *interface; + HelloViewControllerInterface *interface[0]; /** * @brief A Panel. diff --git a/Sources/ObjectivelyMVC/Box.c b/Sources/ObjectivelyMVC/Box.c index 419d4fe8..af159cfd 100644 --- a/Sources/ObjectivelyMVC/Box.c +++ b/Sources/ObjectivelyMVC/Box.c @@ -144,7 +144,6 @@ Class *_Box(void) { .name = "Box", .superclass = _View(), .instanceSize = sizeof(Box), - .interfaceOffset = offsetof(Box, interface), .interfaceSize = sizeof(BoxInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Box.h b/Sources/ObjectivelyMVC/Box.h index e48aea8f..0de00172 100644 --- a/Sources/ObjectivelyMVC/Box.h +++ b/Sources/ObjectivelyMVC/Box.h @@ -49,10 +49,10 @@ struct Box { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - BoxInterface *interface; + BoxInterface *interface[0]; /** * @brief The internal container. diff --git a/Sources/ObjectivelyMVC/Button.c b/Sources/ObjectivelyMVC/Button.c index 63e33b2a..ffdd2b00 100644 --- a/Sources/ObjectivelyMVC/Button.c +++ b/Sources/ObjectivelyMVC/Button.c @@ -213,7 +213,6 @@ Class *_Button(void) { .name = "Button", .superclass = _Control(), .instanceSize = sizeof(Button), - .interfaceOffset = offsetof(Button, interface), .interfaceSize = sizeof(ButtonInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Button.h b/Sources/ObjectivelyMVC/Button.h index 3f456a55..208904af 100644 --- a/Sources/ObjectivelyMVC/Button.h +++ b/Sources/ObjectivelyMVC/Button.h @@ -73,10 +73,10 @@ struct Button { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ButtonInterface *interface; + ButtonInterface *interface[0]; /** * @brief The ButtonDelegate. diff --git a/Sources/ObjectivelyMVC/Checkbox.c b/Sources/ObjectivelyMVC/Checkbox.c index 6ef728d4..fb9c34f2 100644 --- a/Sources/ObjectivelyMVC/Checkbox.c +++ b/Sources/ObjectivelyMVC/Checkbox.c @@ -190,7 +190,6 @@ Class *_Checkbox(void) { .name = "Checkbox", .superclass = _Control(), .instanceSize = sizeof(Checkbox), - .interfaceOffset = offsetof(Checkbox, interface), .interfaceSize = sizeof(CheckboxInterface), .initialize = initialize, .destroy = destroy, diff --git a/Sources/ObjectivelyMVC/Checkbox.h b/Sources/ObjectivelyMVC/Checkbox.h index d19dfed1..ba8a636d 100644 --- a/Sources/ObjectivelyMVC/Checkbox.h +++ b/Sources/ObjectivelyMVC/Checkbox.h @@ -72,10 +72,10 @@ struct Checkbox { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - CheckboxInterface *interface; + CheckboxInterface *interface[0]; /** * @brief The CheckboxDelegate. diff --git a/Sources/ObjectivelyMVC/CollectionItemView.c b/Sources/ObjectivelyMVC/CollectionItemView.c index c9eae6d6..0f4122ad 100644 --- a/Sources/ObjectivelyMVC/CollectionItemView.c +++ b/Sources/ObjectivelyMVC/CollectionItemView.c @@ -143,7 +143,6 @@ Class *_CollectionItemView(void) { .name = "CollectionItemView", .superclass = _View(), .instanceSize = sizeof(CollectionItemView), - .interfaceOffset = offsetof(CollectionItemView, interface), .interfaceSize = sizeof(CollectionItemViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/CollectionItemView.h b/Sources/ObjectivelyMVC/CollectionItemView.h index 6cb973af..35031316 100644 --- a/Sources/ObjectivelyMVC/CollectionItemView.h +++ b/Sources/ObjectivelyMVC/CollectionItemView.h @@ -48,10 +48,10 @@ struct CollectionItemView { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - CollectionItemViewInterface *interface; + CollectionItemViewInterface *interface[0]; /** * @brief The ImageView. diff --git a/Sources/ObjectivelyMVC/CollectionView.c b/Sources/ObjectivelyMVC/CollectionView.c index e8965d4c..d2b074e0 100644 --- a/Sources/ObjectivelyMVC/CollectionView.c +++ b/Sources/ObjectivelyMVC/CollectionView.c @@ -547,7 +547,6 @@ Class *_CollectionView(void) { .name = "CollectionView", .superclass = _Control(), .instanceSize = sizeof(CollectionView), - .interfaceOffset = offsetof(CollectionView, interface), .interfaceSize = sizeof(CollectionViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/CollectionView.h b/Sources/ObjectivelyMVC/CollectionView.h index d143a648..c8c5e7c7 100644 --- a/Sources/ObjectivelyMVC/CollectionView.h +++ b/Sources/ObjectivelyMVC/CollectionView.h @@ -123,10 +123,10 @@ struct CollectionView { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - CollectionViewInterface *interface; + CollectionViewInterface *interface[0]; /** * @brief The layout axis. diff --git a/Sources/ObjectivelyMVC/Control.c b/Sources/ObjectivelyMVC/Control.c index f78edb91..2b72b920 100644 --- a/Sources/ObjectivelyMVC/Control.c +++ b/Sources/ObjectivelyMVC/Control.c @@ -397,7 +397,6 @@ Class *_Control(void) { .name = "Control", .superclass = _View(), .instanceSize = sizeof(Control), - .interfaceOffset = offsetof(Control, interface), .interfaceSize = sizeof(ControlInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Control.h b/Sources/ObjectivelyMVC/Control.h index c19fc470..01f36d94 100644 --- a/Sources/ObjectivelyMVC/Control.h +++ b/Sources/ObjectivelyMVC/Control.h @@ -88,10 +88,10 @@ struct Control { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ControlInterface *interface; + ControlInterface *interface[0]; /** * @brief The ControlBevel. diff --git a/Sources/ObjectivelyMVC/DebugViewController.c b/Sources/ObjectivelyMVC/DebugViewController.c index 21d7db03..4991f8fd 100644 --- a/Sources/ObjectivelyMVC/DebugViewController.c +++ b/Sources/ObjectivelyMVC/DebugViewController.c @@ -347,7 +347,6 @@ Class *_DebugViewController(void) { .name = "DebugViewController", .superclass = _ViewController(), .instanceSize = sizeof(DebugViewController), - .interfaceOffset = offsetof(DebugViewController, interface), .interfaceSize = sizeof(DebugViewControllerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/DebugViewController.h b/Sources/ObjectivelyMVC/DebugViewController.h index 668f8dba..9f63456c 100644 --- a/Sources/ObjectivelyMVC/DebugViewController.h +++ b/Sources/ObjectivelyMVC/DebugViewController.h @@ -46,10 +46,10 @@ struct DebugViewController { ViewController viewController; /** - * @brief The interface. + * @brief The interface type. * @protected */ - DebugViewControllerInterface *interface; + DebugViewControllerInterface *interface[0]; /** * @brief The View to debug. diff --git a/Sources/ObjectivelyMVC/Font.c b/Sources/ObjectivelyMVC/Font.c index 6fe90833..19eddc91 100644 --- a/Sources/ObjectivelyMVC/Font.c +++ b/Sources/ObjectivelyMVC/Font.c @@ -427,7 +427,6 @@ Class *_Font(void) { .name = "Font", .superclass = _Object(), .instanceSize = sizeof(Font), - .interfaceOffset = offsetof(Font, interface), .interfaceSize = sizeof(FontInterface), .initialize = initialize, .destroy = destroy, diff --git a/Sources/ObjectivelyMVC/Font.h b/Sources/ObjectivelyMVC/Font.h index e1ac1959..08be6f59 100644 --- a/Sources/ObjectivelyMVC/Font.h +++ b/Sources/ObjectivelyMVC/Font.h @@ -69,10 +69,10 @@ struct Font { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - FontInterface *interface; + FontInterface *interface[0]; /** * @brief The raw font data. diff --git a/Sources/ObjectivelyMVC/HSVColorPicker.c b/Sources/ObjectivelyMVC/HSVColorPicker.c index 47054fa1..578c843f 100644 --- a/Sources/ObjectivelyMVC/HSVColorPicker.c +++ b/Sources/ObjectivelyMVC/HSVColorPicker.c @@ -267,7 +267,6 @@ Class *_HSVColorPicker(void) { .name = "HSVColorPicker", .superclass = _Control(), .instanceSize = sizeof(HSVColorPicker), - .interfaceOffset = offsetof(HSVColorPicker, interface), .interfaceSize = sizeof(HSVColorPickerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/HSVColorPicker.h b/Sources/ObjectivelyMVC/HSVColorPicker.h index 2515ef8a..dc01cca5 100644 --- a/Sources/ObjectivelyMVC/HSVColorPicker.h +++ b/Sources/ObjectivelyMVC/HSVColorPicker.h @@ -70,10 +70,10 @@ struct HSVColorPicker { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - HSVColorPickerInterface *interface; + HSVColorPickerInterface *interface[0]; /** * @brief The color preview. diff --git a/Sources/ObjectivelyMVC/HueColorPicker.c b/Sources/ObjectivelyMVC/HueColorPicker.c index 4aa2f7f5..a479576c 100644 --- a/Sources/ObjectivelyMVC/HueColorPicker.c +++ b/Sources/ObjectivelyMVC/HueColorPicker.c @@ -216,7 +216,6 @@ Class *_HueColorPicker(void) { .name = "HueColorPicker", .superclass = _Control(), .instanceSize = sizeof(HueColorPicker), - .interfaceOffset = offsetof(HueColorPicker, interface), .interfaceSize = sizeof(HueColorPickerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/HueColorPicker.h b/Sources/ObjectivelyMVC/HueColorPicker.h index db0532b0..7eab4729 100644 --- a/Sources/ObjectivelyMVC/HueColorPicker.h +++ b/Sources/ObjectivelyMVC/HueColorPicker.h @@ -70,10 +70,10 @@ struct HueColorPicker { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - HueColorPickerInterface *interface; + HueColorPickerInterface *interface[0]; /** * @brief The hue preview. diff --git a/Sources/ObjectivelyMVC/Image.c b/Sources/ObjectivelyMVC/Image.c index 151c84e6..c348dade 100644 --- a/Sources/ObjectivelyMVC/Image.c +++ b/Sources/ObjectivelyMVC/Image.c @@ -217,7 +217,6 @@ Class *_Image(void) { .name = "Image", .superclass = _Object(), .instanceSize = sizeof(Image), - .interfaceOffset = offsetof(Image, interface), .interfaceSize = sizeof(ImageInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Image.h b/Sources/ObjectivelyMVC/Image.h index e8fb84d8..01015d02 100644 --- a/Sources/ObjectivelyMVC/Image.h +++ b/Sources/ObjectivelyMVC/Image.h @@ -43,10 +43,10 @@ struct Image { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ImageInterface *interface; + ImageInterface *interface[0]; /** * @brief The backing surface. diff --git a/Sources/ObjectivelyMVC/ImageView.c b/Sources/ObjectivelyMVC/ImageView.c index 4299a5fa..96b88274 100644 --- a/Sources/ObjectivelyMVC/ImageView.c +++ b/Sources/ObjectivelyMVC/ImageView.c @@ -265,7 +265,6 @@ Class *_ImageView(void) { .name = "ImageView", .superclass = _View(), .instanceSize = sizeof(ImageView), - .interfaceOffset = offsetof(ImageView, interface), .interfaceSize = sizeof(ImageViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/ImageView.h b/Sources/ObjectivelyMVC/ImageView.h index bad29fe4..1f9a32bd 100644 --- a/Sources/ObjectivelyMVC/ImageView.h +++ b/Sources/ObjectivelyMVC/ImageView.h @@ -50,10 +50,10 @@ struct ImageView { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ImageViewInterface *interface; + ImageViewInterface *interface[0]; /** * @brief The blend factors (currently unused; reserved for future per-pipeline support). diff --git a/Sources/ObjectivelyMVC/Input.c b/Sources/ObjectivelyMVC/Input.c index 1bc4221e..c7d9606c 100644 --- a/Sources/ObjectivelyMVC/Input.c +++ b/Sources/ObjectivelyMVC/Input.c @@ -218,7 +218,6 @@ Class *_Input(void) { .name = "Input", .superclass = _StackView(), .instanceSize = sizeof(Input), - .interfaceOffset = offsetof(Input, interface), .interfaceSize = sizeof(InputInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Input.h b/Sources/ObjectivelyMVC/Input.h index 2307b7a9..ff8ca8dc 100644 --- a/Sources/ObjectivelyMVC/Input.h +++ b/Sources/ObjectivelyMVC/Input.h @@ -62,10 +62,10 @@ struct Input { StackView stackView; /** - * @brief The interface. + * @brief The interface type. * @protected */ - InputInterface *interface; + InputInterface *interface[0]; /** * @brief The Control. diff --git a/Sources/ObjectivelyMVC/Label.c b/Sources/ObjectivelyMVC/Label.c index 0a28b37a..a50381d2 100644 --- a/Sources/ObjectivelyMVC/Label.c +++ b/Sources/ObjectivelyMVC/Label.c @@ -137,7 +137,6 @@ Class *_Label(void) { .name = "Label", .superclass = _View(), .instanceSize = sizeof(Label), - .interfaceOffset = offsetof(Label, interface), .interfaceSize = sizeof(LabelInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Label.h b/Sources/ObjectivelyMVC/Label.h index 0e4cae36..7bfc0ea2 100644 --- a/Sources/ObjectivelyMVC/Label.h +++ b/Sources/ObjectivelyMVC/Label.h @@ -45,10 +45,10 @@ struct Label { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - LabelInterface *interface; + LabelInterface *interface[0]; /** * @brief The Label Text. diff --git a/Sources/ObjectivelyMVC/NavigationViewController.c b/Sources/ObjectivelyMVC/NavigationViewController.c index ba99eb00..4298e3fd 100644 --- a/Sources/ObjectivelyMVC/NavigationViewController.c +++ b/Sources/ObjectivelyMVC/NavigationViewController.c @@ -156,7 +156,6 @@ Class *_NavigationViewController(void) { .name = "NavigationViewController", .superclass = _ViewController(), .instanceSize = sizeof(NavigationViewController), - .interfaceOffset = offsetof(NavigationViewController, interface), .interfaceSize = sizeof(NavigationViewControllerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/NavigationViewController.h b/Sources/ObjectivelyMVC/NavigationViewController.h index 9e5da821..f253ee11 100644 --- a/Sources/ObjectivelyMVC/NavigationViewController.h +++ b/Sources/ObjectivelyMVC/NavigationViewController.h @@ -48,10 +48,10 @@ struct NavigationViewController { ViewController viewController; /** - * @brief The interface. + * @brief The interface type. * @protected */ - NavigationViewControllerInterface *interface; + NavigationViewControllerInterface *interface[0]; }; /** diff --git a/Sources/ObjectivelyMVC/Option.c b/Sources/ObjectivelyMVC/Option.c index 601b6e80..ad6c453f 100644 --- a/Sources/ObjectivelyMVC/Option.c +++ b/Sources/ObjectivelyMVC/Option.c @@ -151,7 +151,6 @@ Class *_Option(void) { .name = "Option", .superclass = _View(), .instanceSize = sizeof(Option), - .interfaceOffset = offsetof(Option, interface), .interfaceSize = sizeof(OptionInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Option.h b/Sources/ObjectivelyMVC/Option.h index b5ac4c6c..ed9b69bd 100644 --- a/Sources/ObjectivelyMVC/Option.h +++ b/Sources/ObjectivelyMVC/Option.h @@ -46,10 +46,10 @@ struct Option { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - OptionInterface *interface; + OptionInterface *interface[0]; /** * @brief True if this Option is selected, false otherwise. diff --git a/Sources/ObjectivelyMVC/PageView.c b/Sources/ObjectivelyMVC/PageView.c index 93b07278..be74f1ac 100644 --- a/Sources/ObjectivelyMVC/PageView.c +++ b/Sources/ObjectivelyMVC/PageView.c @@ -183,7 +183,6 @@ Class *_PageView(void) { .name = "PageView", .superclass = _View(), .instanceSize = sizeof(PageView), - .interfaceOffset = offsetof(PageView, interface), .interfaceSize = sizeof(PageViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/PageView.h b/Sources/ObjectivelyMVC/PageView.h index 84f1b91d..0a379c3f 100644 --- a/Sources/ObjectivelyMVC/PageView.h +++ b/Sources/ObjectivelyMVC/PageView.h @@ -65,10 +65,10 @@ struct PageView { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - PageViewInterface *interface; + PageViewInterface *interface[0]; /** * @brief The index of the current page. diff --git a/Sources/ObjectivelyMVC/Panel.c b/Sources/ObjectivelyMVC/Panel.c index 20b8cdbb..0acc4927 100644 --- a/Sources/ObjectivelyMVC/Panel.c +++ b/Sources/ObjectivelyMVC/Panel.c @@ -307,7 +307,6 @@ Class *_Panel(void) { .name = "Panel", .superclass = _Control(), .instanceSize = sizeof(Panel), - .interfaceOffset = offsetof(Panel, interface), .interfaceSize = sizeof(PanelInterface), .initialize = initialize, .destroy = destroy, diff --git a/Sources/ObjectivelyMVC/Panel.h b/Sources/ObjectivelyMVC/Panel.h index 25aae331..a5b5ade3 100644 --- a/Sources/ObjectivelyMVC/Panel.h +++ b/Sources/ObjectivelyMVC/Panel.h @@ -52,10 +52,10 @@ struct Panel { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - PanelInterface *interface; + PanelInterface *interface[0]; /** * @brief The optional accessories container. diff --git a/Sources/ObjectivelyMVC/ProgressBar.c b/Sources/ObjectivelyMVC/ProgressBar.c index 63a40ce8..3bfe217f 100644 --- a/Sources/ObjectivelyMVC/ProgressBar.c +++ b/Sources/ObjectivelyMVC/ProgressBar.c @@ -220,7 +220,6 @@ Class *_ProgressBar(void) { .name = "ProgressBar", .superclass = _View(), .instanceSize = sizeof(ProgressBar), - .interfaceOffset = offsetof(ProgressBar, interface), .interfaceSize = sizeof(ProgressBarInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/ProgressBar.h b/Sources/ObjectivelyMVC/ProgressBar.h index a7184135..1baef034 100644 --- a/Sources/ObjectivelyMVC/ProgressBar.h +++ b/Sources/ObjectivelyMVC/ProgressBar.h @@ -66,10 +66,10 @@ struct ProgressBar { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ProgressBarInterface *interface; + ProgressBarInterface *interface[0]; /** * @brief The background ImageView. diff --git a/Sources/ObjectivelyMVC/RGBColorPicker.c b/Sources/ObjectivelyMVC/RGBColorPicker.c index 608e7780..db54189d 100644 --- a/Sources/ObjectivelyMVC/RGBColorPicker.c +++ b/Sources/ObjectivelyMVC/RGBColorPicker.c @@ -270,7 +270,6 @@ Class *_RGBColorPicker(void) { .name = "RGBColorPicker", .superclass = _Control(), .instanceSize = sizeof(RGBColorPicker), - .interfaceOffset = offsetof(RGBColorPicker, interface), .interfaceSize = sizeof(RGBColorPickerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/RGBColorPicker.h b/Sources/ObjectivelyMVC/RGBColorPicker.h index 44455325..9ffc408a 100644 --- a/Sources/ObjectivelyMVC/RGBColorPicker.h +++ b/Sources/ObjectivelyMVC/RGBColorPicker.h @@ -68,10 +68,10 @@ struct RGBColorPicker { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - RGBColorPickerInterface *interface; + RGBColorPickerInterface *interface[0]; /** * @brief The delegate. diff --git a/Sources/ObjectivelyMVC/Renderer.c b/Sources/ObjectivelyMVC/Renderer.c index b538a5a9..6c36d53c 100644 --- a/Sources/ObjectivelyMVC/Renderer.c +++ b/Sources/ObjectivelyMVC/Renderer.c @@ -579,7 +579,6 @@ Class *_Renderer(void) { .name = "Renderer", .superclass = _Object(), .instanceSize = sizeof(Renderer), - .interfaceOffset = offsetof(Renderer, interface), .interfaceSize = sizeof(RendererInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Renderer.h b/Sources/ObjectivelyMVC/Renderer.h index 59e1769d..232e172e 100644 --- a/Sources/ObjectivelyMVC/Renderer.h +++ b/Sources/ObjectivelyMVC/Renderer.h @@ -75,10 +75,10 @@ struct Renderer { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - RendererInterface *interface; + RendererInterface *interface[0]; /** * @brief The current frame command buffer (valid between beginFrame and endFrame). diff --git a/Sources/ObjectivelyMVC/ScrollBar.c b/Sources/ObjectivelyMVC/ScrollBar.c index 6617f5f3..7730c82d 100644 --- a/Sources/ObjectivelyMVC/ScrollBar.c +++ b/Sources/ObjectivelyMVC/ScrollBar.c @@ -231,7 +231,6 @@ Class *_ScrollBar(void) { .name = "ScrollBar", .superclass = _View(), .instanceSize = sizeof(ScrollBar), - .interfaceOffset = offsetof(ScrollBar, interface), .interfaceSize = sizeof(ScrollBarInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/ScrollBar.h b/Sources/ObjectivelyMVC/ScrollBar.h index aac7da4d..5c42b1d2 100644 --- a/Sources/ObjectivelyMVC/ScrollBar.h +++ b/Sources/ObjectivelyMVC/ScrollBar.h @@ -91,10 +91,10 @@ struct ScrollBar { View view; /** - * @brief The interface. + * @brief The interface type. * @private */ - ScrollBarInterface *interface; + ScrollBarInterface *interface[0]; /** * @brief The ScrollView this bar drives. Weak reference (not retained). diff --git a/Sources/ObjectivelyMVC/ScrollHandle.c b/Sources/ObjectivelyMVC/ScrollHandle.c index 8322f2bd..ddd22645 100644 --- a/Sources/ObjectivelyMVC/ScrollHandle.c +++ b/Sources/ObjectivelyMVC/ScrollHandle.c @@ -108,7 +108,6 @@ Class *_ScrollHandle(void) { .name = "ScrollHandle", .superclass = _Control(), .instanceSize = sizeof(ScrollHandle), - .interfaceOffset = offsetof(ScrollHandle, interface), .interfaceSize = sizeof(ScrollHandleInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/ScrollHandle.h b/Sources/ObjectivelyMVC/ScrollHandle.h index 3e70bf46..d4bd1ef3 100644 --- a/Sources/ObjectivelyMVC/ScrollHandle.h +++ b/Sources/ObjectivelyMVC/ScrollHandle.h @@ -69,10 +69,10 @@ struct ScrollHandle { Control control; /** - * @brief The interface. + * @brief The interface type. * @private */ - ScrollHandleInterface *interface; + ScrollHandleInterface *interface[0]; /** * @brief The delegate. diff --git a/Sources/ObjectivelyMVC/ScrollView.c b/Sources/ObjectivelyMVC/ScrollView.c index 4d41d854..d866ed62 100644 --- a/Sources/ObjectivelyMVC/ScrollView.c +++ b/Sources/ObjectivelyMVC/ScrollView.c @@ -281,7 +281,6 @@ Class *_ScrollView(void) { .name = "ScrollView", .superclass = _Control(), .instanceSize = sizeof(ScrollView), - .interfaceOffset = offsetof(ScrollView, interface), .interfaceSize = sizeof(ScrollViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/ScrollView.h b/Sources/ObjectivelyMVC/ScrollView.h index 72427712..f9a37302 100644 --- a/Sources/ObjectivelyMVC/ScrollView.h +++ b/Sources/ObjectivelyMVC/ScrollView.h @@ -66,10 +66,10 @@ struct ScrollView { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ScrollViewInterface *interface; + ScrollViewInterface *interface[0]; /** * @brief The content View offset. diff --git a/Sources/ObjectivelyMVC/Select.c b/Sources/ObjectivelyMVC/Select.c index ec43a440..4ac0bddb 100644 --- a/Sources/ObjectivelyMVC/Select.c +++ b/Sources/ObjectivelyMVC/Select.c @@ -490,7 +490,6 @@ Class *_Select(void) { .name = "Select", .superclass = _Control(), .instanceSize = sizeof(Select), - .interfaceOffset = offsetof(Select, interface), .interfaceSize = sizeof(SelectInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Select.h b/Sources/ObjectivelyMVC/Select.h index ec421d71..8dee4937 100644 --- a/Sources/ObjectivelyMVC/Select.h +++ b/Sources/ObjectivelyMVC/Select.h @@ -68,10 +68,10 @@ struct Select { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - SelectInterface *interface; + SelectInterface *interface[0]; /** * @brief An optional Comparator to sort Options. diff --git a/Sources/ObjectivelyMVC/Selector.c b/Sources/ObjectivelyMVC/Selector.c index 8e9791ef..cda7dff4 100644 --- a/Sources/ObjectivelyMVC/Selector.c +++ b/Sources/ObjectivelyMVC/Selector.c @@ -510,7 +510,6 @@ Class *_Selector(void) { .name = "Selector", .superclass = _Object(), .instanceSize = sizeof(Selector), - .interfaceOffset = offsetof(Selector, interface), .interfaceSize = sizeof(SelectorInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Selector.h b/Sources/ObjectivelyMVC/Selector.h index 10136b7b..35927fa0 100644 --- a/Sources/ObjectivelyMVC/Selector.h +++ b/Sources/ObjectivelyMVC/Selector.h @@ -54,10 +54,10 @@ struct Selector { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - SelectorInterface *interface; + SelectorInterface *interface[0]; /** * @brief The sequences. diff --git a/Sources/ObjectivelyMVC/SelectorSequence.c b/Sources/ObjectivelyMVC/SelectorSequence.c index 686d3fa2..bbb64928 100644 --- a/Sources/ObjectivelyMVC/SelectorSequence.c +++ b/Sources/ObjectivelyMVC/SelectorSequence.c @@ -196,7 +196,6 @@ Class *_SelectorSequence(void) { .name = "SelectorSequence", .superclass = _Object(), .instanceSize = sizeof(SelectorSequence), - .interfaceOffset = offsetof(SelectorSequence, interface), .interfaceSize = sizeof(SelectorSequenceInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/SelectorSequence.h b/Sources/ObjectivelyMVC/SelectorSequence.h index fb74d95e..38c8cbbe 100644 --- a/Sources/ObjectivelyMVC/SelectorSequence.h +++ b/Sources/ObjectivelyMVC/SelectorSequence.h @@ -60,10 +60,10 @@ struct SelectorSequence { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - SelectorSequenceInterface *interface; + SelectorSequenceInterface *interface[0]; /** * @brief The combinators. diff --git a/Sources/ObjectivelyMVC/SimpleSelector.c b/Sources/ObjectivelyMVC/SimpleSelector.c index d4d91b73..1dff5f05 100644 --- a/Sources/ObjectivelyMVC/SimpleSelector.c +++ b/Sources/ObjectivelyMVC/SimpleSelector.c @@ -206,7 +206,6 @@ Class *_SimpleSelector(void) { .name = "SimpleSelector", .superclass = _Object(), .instanceSize = sizeof(SimpleSelector), - .interfaceOffset = offsetof(SimpleSelector, interface), .interfaceSize = sizeof(SimpleSelectorInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/SimpleSelector.h b/Sources/ObjectivelyMVC/SimpleSelector.h index b0af81d5..1472c1e0 100644 --- a/Sources/ObjectivelyMVC/SimpleSelector.h +++ b/Sources/ObjectivelyMVC/SimpleSelector.h @@ -60,10 +60,10 @@ struct SimpleSelector { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - SimpleSelectorInterface *interface; + SimpleSelectorInterface *interface[0]; /** * @brief The pattern, as provided by the user. diff --git a/Sources/ObjectivelyMVC/SlideShowView.c b/Sources/ObjectivelyMVC/SlideShowView.c index 4f38a052..22372f16 100644 --- a/Sources/ObjectivelyMVC/SlideShowView.c +++ b/Sources/ObjectivelyMVC/SlideShowView.c @@ -168,7 +168,6 @@ Class *_SlideShowView(void) { .name = "SlideShowView", .superclass = _View(), .instanceSize = sizeof(SlideShowView), - .interfaceOffset = offsetof(SlideShowView, interface), .interfaceSize = sizeof(SlideShowViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/SlideShowView.h b/Sources/ObjectivelyMVC/SlideShowView.h index 7c860047..92c71172 100644 --- a/Sources/ObjectivelyMVC/SlideShowView.h +++ b/Sources/ObjectivelyMVC/SlideShowView.h @@ -49,10 +49,10 @@ struct SlideShowView { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - SlideShowViewInterface *interface; + SlideShowViewInterface *interface[0]; /** * @brief The images to display. diff --git a/Sources/ObjectivelyMVC/Slider.c b/Sources/ObjectivelyMVC/Slider.c index fcf194f9..decd2919 100644 --- a/Sources/ObjectivelyMVC/Slider.c +++ b/Sources/ObjectivelyMVC/Slider.c @@ -350,7 +350,6 @@ Class *_Slider(void) { .name = "Slider", .superclass = _Control(), .instanceSize = sizeof(Slider), - .interfaceOffset = offsetof(Slider, interface), .interfaceSize = sizeof(SliderInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Slider.h b/Sources/ObjectivelyMVC/Slider.h index 707b1847..ae803c9e 100644 --- a/Sources/ObjectivelyMVC/Slider.h +++ b/Sources/ObjectivelyMVC/Slider.h @@ -67,10 +67,10 @@ struct Slider { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - SliderInterface *interface; + SliderInterface *interface[0]; /** * @brief The slider bar. diff --git a/Sources/ObjectivelyMVC/StackView.c b/Sources/ObjectivelyMVC/StackView.c index 8105a23b..b3ef98a1 100644 --- a/Sources/ObjectivelyMVC/StackView.c +++ b/Sources/ObjectivelyMVC/StackView.c @@ -325,7 +325,6 @@ Class *_StackView(void) { .name = "StackView", .superclass = _View(), .instanceSize = sizeof(StackView), - .interfaceOffset = offsetof(StackView, interface), .interfaceSize = sizeof(StackViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/StackView.h b/Sources/ObjectivelyMVC/StackView.h index 2c016414..706e785d 100644 --- a/Sources/ObjectivelyMVC/StackView.h +++ b/Sources/ObjectivelyMVC/StackView.h @@ -73,10 +73,10 @@ struct StackView { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - StackViewInterface *interface; + StackViewInterface *interface[0]; /** * @brief The axis. diff --git a/Sources/ObjectivelyMVC/Style.c b/Sources/ObjectivelyMVC/Style.c index 2c17d679..cd1e4a16 100644 --- a/Sources/ObjectivelyMVC/Style.c +++ b/Sources/ObjectivelyMVC/Style.c @@ -580,7 +580,6 @@ Class *_Style(void) { .name = "Style", .superclass = _Object(), .instanceSize = sizeof(Style), - .interfaceOffset = offsetof(Style, interface), .interfaceSize = sizeof(StyleInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Style.h b/Sources/ObjectivelyMVC/Style.h index fb70d757..5bd28287 100644 --- a/Sources/ObjectivelyMVC/Style.h +++ b/Sources/ObjectivelyMVC/Style.h @@ -48,10 +48,10 @@ struct Style { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - StyleInterface *interface; + StyleInterface *interface[0]; /** * The attributes. diff --git a/Sources/ObjectivelyMVC/Stylesheet.c b/Sources/ObjectivelyMVC/Stylesheet.c index 1ab5d882..5dfb3b3f 100644 --- a/Sources/ObjectivelyMVC/Stylesheet.c +++ b/Sources/ObjectivelyMVC/Stylesheet.c @@ -283,7 +283,6 @@ Class *_Stylesheet(void) { .name = "Stylesheet", .superclass = _Object(), .instanceSize = sizeof(Stylesheet), - .interfaceOffset = offsetof(Stylesheet, interface), .interfaceSize = sizeof(StylesheetInterface), .initialize = initialize, .destroy = destroy, diff --git a/Sources/ObjectivelyMVC/Stylesheet.h b/Sources/ObjectivelyMVC/Stylesheet.h index 7e3f1a6b..84bed4bd 100644 --- a/Sources/ObjectivelyMVC/Stylesheet.h +++ b/Sources/ObjectivelyMVC/Stylesheet.h @@ -49,10 +49,10 @@ struct Stylesheet { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - StylesheetInterface *interface; + StylesheetInterface *interface[0]; /** * @brief The Selectors, ordered by specificity. diff --git a/Sources/ObjectivelyMVC/TabView.c b/Sources/ObjectivelyMVC/TabView.c index c30d74e6..55eb4a80 100644 --- a/Sources/ObjectivelyMVC/TabView.c +++ b/Sources/ObjectivelyMVC/TabView.c @@ -313,7 +313,6 @@ Class *_TabView(void) { .name = "TabView", .superclass = _StackView(), .instanceSize = sizeof(TabView), - .interfaceOffset = offsetof(TabView, interface), .interfaceSize = sizeof(TabViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TabView.h b/Sources/ObjectivelyMVC/TabView.h index 7b7685d3..e027a57b 100644 --- a/Sources/ObjectivelyMVC/TabView.h +++ b/Sources/ObjectivelyMVC/TabView.h @@ -84,10 +84,10 @@ struct TabView { StackView stackView; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TabViewInterface *interface; + TabViewInterface *interface[0]; /** * @brief The TabViewDelegate. diff --git a/Sources/ObjectivelyMVC/TabViewController.c b/Sources/ObjectivelyMVC/TabViewController.c index 5670cf02..227f60e0 100644 --- a/Sources/ObjectivelyMVC/TabViewController.c +++ b/Sources/ObjectivelyMVC/TabViewController.c @@ -175,7 +175,6 @@ Class *_TabViewController(void) { .name = "TabViewController", .superclass = _ViewController(), .instanceSize = sizeof(TabViewController), - .interfaceOffset = offsetof(TabViewController, interface), .interfaceSize = sizeof(TabViewControllerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TabViewController.h b/Sources/ObjectivelyMVC/TabViewController.h index 445c387f..5e0b4758 100644 --- a/Sources/ObjectivelyMVC/TabViewController.h +++ b/Sources/ObjectivelyMVC/TabViewController.h @@ -50,10 +50,10 @@ struct TabViewController { ViewController viewController; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TabViewControllerInterface *interface; + TabViewControllerInterface *interface[0]; /** * @brief The TabView. diff --git a/Sources/ObjectivelyMVC/TabViewItem.c b/Sources/ObjectivelyMVC/TabViewItem.c index abefe94b..0e063e35 100644 --- a/Sources/ObjectivelyMVC/TabViewItem.c +++ b/Sources/ObjectivelyMVC/TabViewItem.c @@ -134,7 +134,6 @@ Class *_TabViewItem(void) { .name = "TabViewItem", .superclass = _Object(), .instanceSize = sizeof(TabViewItem), - .interfaceOffset = offsetof(TabViewItem, interface), .interfaceSize = sizeof(TabViewItemInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TabViewItem.h b/Sources/ObjectivelyMVC/TabViewItem.h index d7594e7f..9bf99085 100644 --- a/Sources/ObjectivelyMVC/TabViewItem.h +++ b/Sources/ObjectivelyMVC/TabViewItem.h @@ -57,10 +57,10 @@ struct TabViewItem { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TabViewItemInterface *interface; + TabViewItemInterface *interface[0]; /** * @brief The identifier. diff --git a/Sources/ObjectivelyMVC/TableCellView.c b/Sources/ObjectivelyMVC/TableCellView.c index 0d7bed6c..4907d43e 100644 --- a/Sources/ObjectivelyMVC/TableCellView.c +++ b/Sources/ObjectivelyMVC/TableCellView.c @@ -85,7 +85,6 @@ Class *_TableCellView(void) { .name = "TableCellView", .superclass = _View(), .instanceSize = sizeof(TableCellView), - .interfaceOffset = offsetof(TableCellView, interface), .interfaceSize = sizeof(TableCellViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TableCellView.h b/Sources/ObjectivelyMVC/TableCellView.h index 2e671877..c262fe49 100644 --- a/Sources/ObjectivelyMVC/TableCellView.h +++ b/Sources/ObjectivelyMVC/TableCellView.h @@ -46,10 +46,10 @@ struct TableCellView { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TableCellViewInterface *interface; + TableCellViewInterface *interface[0]; /** * @brief The text. diff --git a/Sources/ObjectivelyMVC/TableColumn.c b/Sources/ObjectivelyMVC/TableColumn.c index 2db8b74e..c8abb119 100644 --- a/Sources/ObjectivelyMVC/TableColumn.c +++ b/Sources/ObjectivelyMVC/TableColumn.c @@ -97,7 +97,6 @@ Class *_TableColumn(void) { .name = "TableColumn", .superclass = _Object(), .instanceSize = sizeof(TableColumn), - .interfaceOffset = offsetof(TableColumn, interface), .interfaceSize = sizeof(TableColumnInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TableColumn.h b/Sources/ObjectivelyMVC/TableColumn.h index ce173da8..f7ef6b29 100644 --- a/Sources/ObjectivelyMVC/TableColumn.h +++ b/Sources/ObjectivelyMVC/TableColumn.h @@ -50,10 +50,10 @@ struct TableColumn { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TableColumnInterface *interface; + TableColumnInterface *interface[0]; /** * @brief The header cell. diff --git a/Sources/ObjectivelyMVC/TableHeaderCellView.c b/Sources/ObjectivelyMVC/TableHeaderCellView.c index d878995b..f29f9064 100644 --- a/Sources/ObjectivelyMVC/TableHeaderCellView.c +++ b/Sources/ObjectivelyMVC/TableHeaderCellView.c @@ -59,7 +59,6 @@ Class *_TableHeaderCellView(void) { .name = "TableHeaderCellView", .superclass = _TableCellView(), .instanceSize = sizeof(TableHeaderCellView), - .interfaceOffset = offsetof(TableHeaderCellView, interface), .interfaceSize = sizeof(TableHeaderCellViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TableHeaderCellView.h b/Sources/ObjectivelyMVC/TableHeaderCellView.h index 21c22e87..6fcb99fe 100644 --- a/Sources/ObjectivelyMVC/TableHeaderCellView.h +++ b/Sources/ObjectivelyMVC/TableHeaderCellView.h @@ -46,10 +46,10 @@ struct TableHeaderCellView { TableCellView tableCellView; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TableHeaderCellViewInterface *interface; + TableHeaderCellViewInterface *interface[0]; }; /** diff --git a/Sources/ObjectivelyMVC/TableHeaderView.c b/Sources/ObjectivelyMVC/TableHeaderView.c index b2164ef3..54469241 100644 --- a/Sources/ObjectivelyMVC/TableHeaderView.c +++ b/Sources/ObjectivelyMVC/TableHeaderView.c @@ -84,7 +84,6 @@ Class *_TableHeaderView(void) { .name = "TableHeaderView", .superclass = _TableRowView(), .instanceSize = sizeof(TableHeaderView), - .interfaceOffset = offsetof(TableHeaderView, interface), .interfaceSize = sizeof(TableHeaderViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TableHeaderView.h b/Sources/ObjectivelyMVC/TableHeaderView.h index dce6f33d..9bed7c65 100644 --- a/Sources/ObjectivelyMVC/TableHeaderView.h +++ b/Sources/ObjectivelyMVC/TableHeaderView.h @@ -46,10 +46,10 @@ struct TableHeaderView { TableRowView tableRowView; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TableHeaderViewInterface *interface; + TableHeaderViewInterface *interface[0]; }; /** diff --git a/Sources/ObjectivelyMVC/TableRowView.c b/Sources/ObjectivelyMVC/TableRowView.c index a31633f1..5b473af8 100644 --- a/Sources/ObjectivelyMVC/TableRowView.c +++ b/Sources/ObjectivelyMVC/TableRowView.c @@ -168,7 +168,6 @@ Class *_TableRowView(void) { .name = "TableRowView", .superclass = _StackView(), .instanceSize = sizeof(TableRowView), - .interfaceOffset = offsetof(TableRowView, interface), .interfaceSize = sizeof(TableRowViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TableRowView.h b/Sources/ObjectivelyMVC/TableRowView.h index 77b19739..a479ca26 100644 --- a/Sources/ObjectivelyMVC/TableRowView.h +++ b/Sources/ObjectivelyMVC/TableRowView.h @@ -49,10 +49,10 @@ struct TableRowView { StackView stackView; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TableRowViewInterface *interface; + TableRowViewInterface *interface[0]; /** * @brief The cells. diff --git a/Sources/ObjectivelyMVC/TableView.c b/Sources/ObjectivelyMVC/TableView.c index 25f7fe3a..b0c6195f 100644 --- a/Sources/ObjectivelyMVC/TableView.c +++ b/Sources/ObjectivelyMVC/TableView.c @@ -624,7 +624,6 @@ Class *_TableView(void) { .name = "TableView", .superclass = _Control(), .instanceSize = sizeof(TableView), - .interfaceOffset = offsetof(TableView, interface), .interfaceSize = sizeof(TableViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TableView.h b/Sources/ObjectivelyMVC/TableView.h index 669c7a3e..e02ad09e 100644 --- a/Sources/ObjectivelyMVC/TableView.h +++ b/Sources/ObjectivelyMVC/TableView.h @@ -127,10 +127,10 @@ struct TableView { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TableViewInterface *interface; + TableViewInterface *interface[0]; /** * @brief The column definitions. diff --git a/Sources/ObjectivelyMVC/Text.c b/Sources/ObjectivelyMVC/Text.c index 27beb9fe..1dffc1cd 100644 --- a/Sources/ObjectivelyMVC/Text.c +++ b/Sources/ObjectivelyMVC/Text.c @@ -649,7 +649,6 @@ Class *_Text(void) { .name = "Text", .superclass = _View(), .instanceSize = sizeof(Text), - .interfaceOffset = offsetof(Text, interface), .interfaceSize = sizeof(TextInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Text.h b/Sources/ObjectivelyMVC/Text.h index c9dd5a3e..b45f80d4 100644 --- a/Sources/ObjectivelyMVC/Text.h +++ b/Sources/ObjectivelyMVC/Text.h @@ -74,10 +74,10 @@ struct Text { View view; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TextInterface *interface; + TextInterface *interface[0]; /** * @brief The text color. diff --git a/Sources/ObjectivelyMVC/TextView.c b/Sources/ObjectivelyMVC/TextView.c index 81ea1ba3..fd50f38b 100644 --- a/Sources/ObjectivelyMVC/TextView.c +++ b/Sources/ObjectivelyMVC/TextView.c @@ -450,7 +450,6 @@ Class *_TextView(void) { .name = "TextView", .superclass = _Control(), .instanceSize = sizeof(TextView), - .interfaceOffset = offsetof(TextView, interface), .interfaceSize = sizeof(TextViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/TextView.h b/Sources/ObjectivelyMVC/TextView.h index a74ea5bd..3bb23f23 100644 --- a/Sources/ObjectivelyMVC/TextView.h +++ b/Sources/ObjectivelyMVC/TextView.h @@ -84,10 +84,10 @@ struct TextView { Control control; /** - * @brief The interface. + * @brief The interface type. * @protected */ - TextViewInterface *interface; + TextViewInterface *interface[0]; /** * @brief The user-provided text. diff --git a/Sources/ObjectivelyMVC/Theme.c b/Sources/ObjectivelyMVC/Theme.c index 97a25bd1..dde38d03 100644 --- a/Sources/ObjectivelyMVC/Theme.c +++ b/Sources/ObjectivelyMVC/Theme.c @@ -181,7 +181,6 @@ Class *_Theme(void) { .name = "Theme", .superclass = _Object(), .instanceSize = sizeof(Theme), - .interfaceOffset = offsetof(Theme, interface), .interfaceSize = sizeof(ThemeInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Theme.h b/Sources/ObjectivelyMVC/Theme.h index 102608d8..021fc214 100644 --- a/Sources/ObjectivelyMVC/Theme.h +++ b/Sources/ObjectivelyMVC/Theme.h @@ -56,10 +56,10 @@ struct Theme { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ThemeInterface *interface; + ThemeInterface *interface[0]; /** * @brief The Stylesheets, in order of priority. diff --git a/Sources/ObjectivelyMVC/View.c b/Sources/ObjectivelyMVC/View.c index 8f7bb398..83725ba8 100644 --- a/Sources/ObjectivelyMVC/View.c +++ b/Sources/ObjectivelyMVC/View.c @@ -2227,7 +2227,6 @@ Class *_View(void) { .name = "View", .superclass = _Object(), .instanceSize = sizeof(View), - .interfaceOffset = offsetof(View, interface), .interfaceSize = sizeof(ViewInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/View.h b/Sources/ObjectivelyMVC/View.h index b427a773..3b4d9088 100644 --- a/Sources/ObjectivelyMVC/View.h +++ b/Sources/ObjectivelyMVC/View.h @@ -177,10 +177,10 @@ struct View { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - ViewInterface *interface; + ViewInterface *interface[0]; /** * @brief The alignment. diff --git a/Sources/ObjectivelyMVC/ViewController.c b/Sources/ObjectivelyMVC/ViewController.c index 7ecf9df1..9cd9a5bc 100644 --- a/Sources/ObjectivelyMVC/ViewController.c +++ b/Sources/ObjectivelyMVC/ViewController.c @@ -341,7 +341,6 @@ Class *_ViewController(void) { .name = "ViewController", .superclass = _Object(), .instanceSize = sizeof(ViewController), - .interfaceOffset = offsetof(ViewController, interface), .interfaceSize = sizeof(ViewControllerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/ViewController.h b/Sources/ObjectivelyMVC/ViewController.h index 1b90f90e..b9b4d1b4 100644 --- a/Sources/ObjectivelyMVC/ViewController.h +++ b/Sources/ObjectivelyMVC/ViewController.h @@ -57,9 +57,9 @@ struct ViewController { Object object; /** - * @brief The interface. + * @brief The interface type. */ - ViewControllerInterface *interface; + ViewControllerInterface *interface[0]; /** * @brief The child view controllers. diff --git a/Sources/ObjectivelyMVC/Warning.c b/Sources/ObjectivelyMVC/Warning.c index 273e328b..b7fbce53 100644 --- a/Sources/ObjectivelyMVC/Warning.c +++ b/Sources/ObjectivelyMVC/Warning.c @@ -103,7 +103,6 @@ Class *_Warning(void) { .name = "Warning", .superclass = _Object(), .instanceSize = sizeof(Warning), - .interfaceOffset = offsetof(Warning, interface), .interfaceSize = sizeof(WarningInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/Warning.h b/Sources/ObjectivelyMVC/Warning.h index 4fa69dcb..4883edd0 100644 --- a/Sources/ObjectivelyMVC/Warning.h +++ b/Sources/ObjectivelyMVC/Warning.h @@ -55,10 +55,10 @@ struct Warning { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - WarningInterface *interface; + WarningInterface *interface[0]; /** * @brief The WarningType. diff --git a/Sources/ObjectivelyMVC/WindowController.c b/Sources/ObjectivelyMVC/WindowController.c index b5e6087b..bbf5ff63 100644 --- a/Sources/ObjectivelyMVC/WindowController.c +++ b/Sources/ObjectivelyMVC/WindowController.c @@ -627,7 +627,6 @@ Class *_WindowController(void) { .name = "WindowController", .superclass = _Object(), .instanceSize = sizeof(WindowController), - .interfaceOffset = offsetof(WindowController, interface), .interfaceSize = sizeof(WindowControllerInterface), .initialize = initialize, }); diff --git a/Sources/ObjectivelyMVC/WindowController.h b/Sources/ObjectivelyMVC/WindowController.h index e477697d..61046ccb 100644 --- a/Sources/ObjectivelyMVC/WindowController.h +++ b/Sources/ObjectivelyMVC/WindowController.h @@ -51,10 +51,10 @@ struct WindowController { Object object; /** - * @brief The interface. + * @brief The interface type. * @protected */ - WindowControllerInterface *interface; + WindowControllerInterface *interface[0]; /** * @brief The DebugViewController. From 9bcbfe0d5f1dfe6338cbee363e76d5d5210508cf Mon Sep 17 00:00:00 2001 From: Jay Dolan Date: Wed, 2 Sep 2026 19:33:06 -0400 Subject: [PATCH 2/4] Bump version to 2.2.0; require ObjectivelyGPU and Objectively >= 2.2.0 Objectively 2.2.0 changed the instance layout (no per-instance interface pointers); ObjectivelyGPU 2.2.0 is the first build against it. This library MUST be built against both and nothing older. Co-Authored-By: Claude Fable 5.1 --- Documentation/install.md | 4 ++-- configure.ac | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/install.md b/Documentation/install.md index 62b9fc37..e94e0d0c 100644 --- a/Documentation/install.md +++ b/Documentation/install.md @@ -11,8 +11,8 @@ Tagged releases are published on the [GitHub releases page](https://github.com/j ## Dependencies -* [Objectively](https://github.com/jdolan/Objectively) >= 2.0.0 -* [ObjectivelyGPU](https://github.com/jdolan/ObjectivelyGPU) >= 1.0.0 +* [Objectively](https://github.com/jdolan/Objectively) >= 2.2.0 +* [ObjectivelyGPU](https://github.com/jdolan/ObjectivelyGPU) >= 2.2.0 * [SDL3](https://github.com/libsdl-org/SDL) >= 3.2.0, [SDL3_image](https://github.com/libsdl-org/SDL_image), [SDL3_ttf](https://github.com/libsdl-org/SDL_ttf) ## Building diff --git a/configure.ac b/configure.ac index cc3cd94a..3b5d974d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.69) -AC_INIT([ObjectivelyMVC], [2.1.7], [jay@jaydolan.com]) +AC_INIT([ObjectivelyMVC], [2.2.0], [jay@jaydolan.com]) AC_CONFIG_HEADERS([Sources/ObjectivelyMVC/Config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -51,8 +51,8 @@ AM_CONDITIONAL([MINGW], [test "x$HOST_NAME" = "xMINGW"]) AM_CONDITIONAL([LINUX], [test "x$HOST_NAME" = "xLINUX"]) PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) -PKG_CHECK_MODULES([OBJECTIVELYGPU], [ObjectivelyGPU >= 1.0.0]) -PKG_CHECK_MODULES([OBJECTIVELY], [Objectively >= 2.0.0]) +PKG_CHECK_MODULES([OBJECTIVELYGPU], [ObjectivelyGPU >= 2.2.0]) +PKG_CHECK_MODULES([OBJECTIVELY], [Objectively >= 2.2.0]) PKG_CHECK_MODULES([SDL3], [sdl3 >= 3.2.0 sdl3-image sdl3-ttf]) AC_SUBST(SDL3_DLL_LIBS, $(echo $SDL3_LIBS | sed 's/-lmingw32//; s/-lSDL3main//')) From b7b4093b028dd87d89d968442604c71708f6e23c Mon Sep 17 00:00:00 2001 From: Jay Dolan Date: Wed, 2 Sep 2026 19:39:53 -0400 Subject: [PATCH 3/4] Derive the shared library soname from the package version The library was previously unversioned. Use -release MAJOR.MINOR, computed from AC_INIT, so every minor release gets a new soname and patch releases stay compatible, matching Objectively and ObjectivelyGPU. Co-Authored-By: Claude Fable 5.1 --- Sources/ObjectivelyMVC/Makefile.am | 1 + configure.ac | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/ObjectivelyMVC/Makefile.am b/Sources/ObjectivelyMVC/Makefile.am index fb1c183c..3adc73f4 100644 --- a/Sources/ObjectivelyMVC/Makefile.am +++ b/Sources/ObjectivelyMVC/Makefile.am @@ -129,6 +129,7 @@ libObjectivelyMVC_la_CFLAGS = \ @SDL3_CFLAGS@ libObjectivelyMVC_la_LDFLAGS = \ + -release @RELEASE_VERSION@ \ @HOST_LDFLAGS@ libObjectivelyMVC_la_LIBADD = \ diff --git a/configure.ac b/configure.ac index 3b5d974d..4392cf2e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,7 @@ AC_PREREQ(2.69) AC_INIT([ObjectivelyMVC], [2.2.0], [jay@jaydolan.com]) +AC_SUBST([RELEASE_VERSION], [m4_bpatsubst(AC_PACKAGE_VERSION, [\.[0-9]*$], [])]) AC_CONFIG_HEADERS([Sources/ObjectivelyMVC/Config.h]) AC_CONFIG_MACRO_DIR([m4]) From 283bfd084565036ff9f8c37ce73fc08a32c12266 Mon Sep 17 00:00:00 2001 From: Jay Dolan Date: Wed, 2 Sep 2026 19:47:06 -0400 Subject: [PATCH 4/4] Fix Makefile.am by correcting LDFLAGS syntax Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- Sources/ObjectivelyMVC/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ObjectivelyMVC/Makefile.am b/Sources/ObjectivelyMVC/Makefile.am index 3adc73f4..ed365545 100644 --- a/Sources/ObjectivelyMVC/Makefile.am +++ b/Sources/ObjectivelyMVC/Makefile.am @@ -129,7 +129,7 @@ libObjectivelyMVC_la_CFLAGS = \ @SDL3_CFLAGS@ libObjectivelyMVC_la_LDFLAGS = \ - -release @RELEASE_VERSION@ \ + -release @RELEASE_VERSION@ \ @HOST_LDFLAGS@ libObjectivelyMVC_la_LIBADD = \