# register_command_source

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/function-register_command_source/

**function** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
fn register_command_source<T: ObjectType>(adapter: fn(ferroui_base::Ref<T>) -> std::rc::Rc<dyn ICommandSource>)
```

Declares that class `T` (and the classes derived from it) implements
`ICommandSource` through the handle created by `adapter`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/i_command_source.rs#L23)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
