1677 {
1678
1679 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
1680 ((ObjectInterface *) clazz->interface)->description =
description;
1681
1683 ((ViewInterface *) clazz->interface)->addClassName =
addClassName;
1684 ((ViewInterface *) clazz->interface)->addSubview =
addSubview;
1687 ((ViewInterface *) clazz->interface)->applyStyle =
applyStyle;
1688 ((ViewInterface *) clazz->interface)->applyTheme =
applyTheme;
1692 ((ViewInterface *) clazz->interface)->awakeWithData =
awakeWithData;
1697 ((ViewInterface *) clazz->interface)->bind =
_bind;
1698 ((ViewInterface *) clazz->interface)->bounds =
bounds;
1700 ((ViewInterface *) clazz->interface)->clippingFrame =
clippingFrame;
1701 ((ViewInterface *) clazz->interface)->containsPoint =
containsPoint;
1702 ((ViewInterface *) clazz->interface)->depth =
depth;
1705 ((ViewInterface *) clazz->interface)->didMoveToWindow =
didMoveToWindow;
1706 ((ViewInterface *) clazz->interface)->didReceiveEvent =
didReceiveEvent;
1707 ((ViewInterface *) clazz->interface)->draw =
draw;
1708 ((ViewInterface *) clazz->interface)->enumerate =
enumerate;
1716 ((ViewInterface *) clazz->interface)->firstResponder =
firstResponder;
1718 ((ViewInterface *) clazz->interface)->hitTest =
hitTest;
1719 ((ViewInterface *) clazz->interface)->
init =
init;
1722 ((ViewInterface *) clazz->interface)->isContainer =
isContainer;
1725 ((ViewInterface *) clazz->interface)->isVisible =
isVisible;
1726 ((ViewInterface *) clazz->interface)->layoutIfNeeded =
layoutIfNeeded;
1727 ((ViewInterface *) clazz->interface)->layoutSubviews =
layoutSubviews;
1728 ((ViewInterface *) clazz->interface)->matchesSelector =
matchesSelector;
1729 ((ViewInterface *) clazz->interface)->moveToWindow =
moveToWindow;
1730 ((ViewInterface *) clazz->interface)->path =
path;
1733 ((ViewInterface *) clazz->interface)->removeClassName =
removeClassName;
1735 ((ViewInterface *) clazz->interface)->removeSubview =
removeSubview;
1736 ((ViewInterface *) clazz->interface)->render =
render;
1739 ((ViewInterface *) clazz->interface)->renderFrame =
renderFrame;
1740 ((ViewInterface *) clazz->interface)->replaceSubview =
replaceSubview;
1742 ((ViewInterface *) clazz->interface)->resize =
resize;
1743 ((ViewInterface *) clazz->interface)->resolve =
resolve;
1744 ((ViewInterface *) clazz->interface)->respondToEvent =
respondToEvent;
1745 ((ViewInterface *) clazz->interface)->select =
_select;
1747 ((ViewInterface *) clazz->interface)->size =
size;
1749 ((ViewInterface *) clazz->interface)->sizeThatFits =
sizeThatFits;
1750 ((ViewInterface *) clazz->interface)->sizeToContain =
sizeToContain;
1751 ((ViewInterface *) clazz->interface)->sizeToFit =
sizeToFit;
1753 ((ViewInterface *) clazz->interface)->updateBindings =
updateBindings;
1754 ((ViewInterface *) clazz->interface)->viewport =
viewport;
1761 ((ViewInterface *) clazz->interface)->warn =
warn;
1763}
static Set * _select(View *self, const char *rule)
static _Bool _bind(View *self, const Inlet *inlets, const Dictionary *dictionary)
CollectionView * initWithFrame(CollectionView *self, const SDL_Rect *frame)
CollectionView * init(CollectionView *self, const SDL_Rect *frame)
Initializes this CollectionView with the specified frame and style.
void renderDeviceDidReset(Font *self)
This method should be invoked when the render context is invalidated.
void renderDeviceWillReset(Renderer *self)
This method is invoked when the render device will become reset.
String * path(const View *self)
_Bool hasClassName(const View *self, cosnt char *className)
void resolve(View *self, Outlet *outlets)
Resolves the given Outlets from this View's hierarchy.
void updateBindings(View *self)
Updates data bindings, prompting the appropriate layout changes.
void becomeFirstResponder(View *self)
Become the first responder in the View hierarchy.
void enumerateSuperview(const View *self, ViewEnumerator enumerator, ident data)
Enumerates the superview of this View, if any, applying enumerator to it.
View * viewWithCharacters(const char *chars, Outlet *outlets)
Instantiates a View initialized with the given null-terminated JSON C string.
View * viewWithResource(const Resource *resource, Outlet *outlets)
Instantiates a View initialized with the JSON data in resource.
Array * visibleSubviews(const View *self)
View * firstResponder(SDL_Window *window)
void addSubview(View *self, View *subview)
Adds a subview to this view, to be drawn above its siblings.
void addClassName(View *self, const char *className)
Adds the given class name to this View.
View * viewWithResourceName(const char *name, Outlet *outlets)
Instantiates a View initialized with the JSON Resource with the specified name.
_Bool isFirstResponder(const View *self)
subviewWithIdentifier(const View *self, const char *identifier)
void warn(View *self, const char *fmt,...)
Appends a warning for this View.
void resize(View *self, const SDL_Size *size)
Resizes this View to the specified size.
void awakeWithResourceName(View *self, const char *name)
Wakes this View with the Resource by the specified name.
void enumerateAncestors(const View *self, ViewEnumerator enumerator, ident data)
Enumerates all ancestors of this View, applying enumerator to each.
_Bool didReceiveEvent(const View *self, const SDL_Event *event)
void awakeWithCharacters(View *self, const char *chars)
Wakes this View with the given null-terminated JSON C string.
void detachStylesheet(View *self, SDL_Window *window)
Detaches this View's Stylesheet from the Theme associated with the given window.
SDL_Rect viewport(const View *self)
void removeAllClassNames(View *self)
Removes all class names from this View.
_Bool matchesSelector(const View *self, const SimpleSelector *simpleSelector)
void sizeThatFits(const View *self)
void respondToEvent(View *self, const SDL_Event *event)
Responds to the specified event.
void removeAllSubviews(View *self)
Removes all subviews from this View.
void enumerateSiblings(const View *self, ViewEnumerator enumerator, ident data)
Enumerates all siblings of this View, applying enumerator to each.
void bringSubviewToFront(View *self, View *subview)
Brings the specified subview to the front.
void replaceSubview(View *self, View *subview, View *replacement)
Replaces the specified subview with the given replacement.
void enumerateAdjacent(const View *self, ViewEnumerator enumerator, ident data)
Enumerates adjacent siblings of this View, applying enumerator to each.
void resignFirstResponder(View *self)
Resigns first responder priority.
_Bool isDescendantOfView(const View *self, const View *view)
void didMoveToWindow(View *self, SDL_Window *window)
Informs this View that it has been added to the View hierachy of the given window.
layoutSubviews(View *self)
Performs layout for this View's immediate subviews.
SDL_Size sizeThatContains(const View *self)
View * viewWithData(const Data *data, Outlet *outlets)
Instantiates a View initialized with the contents of data.
void enumerate(const View *self, ViewEnumerator enumerator, ident data)
_Bool isContainer(const View *self)
View * init(View *self)
Initializes this View.
ancestorWithIdentifier(const View *self, const char *identifier)
void layoutIfNeeded(View *self)
Recursively updates the layout of this View and its subviews.
void sizeToContain(View *self)
Resizes this View to contain its subviews.
void willMoveToWindow(View *self, SDL_Window *window)
Informs this View that it will be added to the View hierarchy for the given window.
_Bool acceptsFirstResponder(const View *self)
void render(View *self, Renderer *renderer)
Renders this View using the given renderer.
void sizeToFit(View *self)
Resizes this View to fit its subviews.
void removeClassName(View *self, const char *className)
Removes the given class name to this View.
void removeSubview(View *self, View *subview)
Removes the given subview from this View.
View * viewWithDictionary(const Dictionary *dictionary, Outlet *outlets)
Instantiates a View initialized with the attributes described in dictionary.