Expand description
§Freya Hooks
A collection of hooks to be used in Freya.
Macros§
- Alias for
Cow::Borrowed, because that’s used a million times so shortening it is nice. Makes the code more readable. - Example usage:
- Create
FooThemeWithstructs without having to deal with the verbose syntax. - This macro has three arguments separator by commas.
Structs§
- Theming properties for the
Accordioncomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Animate a color.
- Animate a numeric value.
- Chain a sequence of animated values.
- Configuration for a given Asset.
- Theming properties for the
Bodycomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
BottomTabcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
ButtonSegmentcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Buttoncomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Configuration for a camera
- Theming properties for the
Checkboxcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
DropdownItemcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Dropdowncomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Create a configuration for a
UseEditable. - Used to send custom events to [
EventLoop]. - Theming properties for Fonts.
- You can use this to change a theme for only one component, with the
themeproperty. Theming properties for Fonts. - Theming properties for the
Iconcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Inputcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - A text line from a TextEditor
- Iterator over text lines.
- Theming properties for the
Linkcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Loadercomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
MenuContainercomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
MenuItemcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Popupcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
ProgressBarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Radiocomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
ResizableHandlecomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Describes a Resolution. This struct consists of a Width and a Height value (x,y).
Note: theOrdimplementation of this struct is flipped from highest to lowest. - A utf8 text rope.
- TextEditor implementing a Rope
- Theming properties for the
ScrollBarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
SegmentedButtoncomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
SidebarItemcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Sidebarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Slidercomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
SnackBarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Switchcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Tabcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Tablecomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Holds the position of a cursor in a text
- Events for TextEditor
- Theming properties for the
Tilecomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for the
Tooltipcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Pass uniform values to a Shader.
- Animate your elements. Use
use_animationto use this. - Holds a rendering hook callback that allows to render to the Canvas.
- Manage an editable text.
- Manage the focus operations of given Node
- Created using use_popup.
- Represents a window.
- Identifier of a window. Unique for each window.
Enums§
- Controls the direction of the animation.
- Defines the duration for which an Asset will remain cached after it’s user has stopped using it. The default is 1h (3600s).
- Describes the index of the camera.
- Events emitted to the
UseEditable. - How the editable content must behave.
- Fullscreen modes.
- What to do once the animation gets created.
- What to do once the animation dependencies change.
- What to do once the animation finishes.
- Tells the init function what camera format to pick.
- Indicates what type of surface to use.
- Indicates the type of text dragging being done.
- Uniform value to be passed to a Shader.
Constants§
Traits§
- Common trait for editable texts
Functions§
- Consume an activable Route, use in combination with
ActivableRoute. - Animate your elements easily.
- Start listening to an asset given a AssetConfiguration.
- Get access to the global cache of assets.
- Connect to a given camera and render its frames into an image element
- Register a rendering hook to gain access to the Canvas. Reactivity managed through signals.
- Register a rendering hook to gain access to the Canvas. Reactivity managed with manual dependencies.
- Hook to create an editable text.
- Create a focus manager for a node.
- Same as use_focus but providing a Node instead of generating a new one.
- Get a unique for a given generic type.
- Provide the default
Theme. - Keep some native features (focused element, preferred theme, etc) on sync between the platform and the components
- Provide a SurfaceThemeIndicator down to the components.
- Provide a custom
Theme. - Subscribe to a Node layout changes.
- Get a signal to read the latest layout from a Node.
- Get access to information and features of the platform.
- Get access to information from the platform.
- Create a popups context which can later be answered using use_popup_answer.
- Answer a popup created with use_popup.
- Access the preferred theme selected by the user.
- Get the inherited SurfaceThemeIndicator.
- Subscribe to
Themechanges.