Struct surfman::platform::unix::wayland::connection::Connection [−][src]
pub struct Connection { /* fields omitted */ }
Expand description
A connection to the Wayland server.
Implementations
Connects to the default Wayland server.
pub unsafe fn from_native_connection(
native_connection: NativeConnection
) -> Result<Connection, Error>
[src]
pub unsafe fn from_native_connection(
native_connection: NativeConnection
) -> Result<Connection, Error>
[src]Wraps an existing EGL display in a Connection
.
The display is not retained, as there is no way to do this in the EGL API. Therefore, it is the caller’s responsibility to ensure that the EGL display remains alive as long as the connection is.
Returns the underlying native connection.
Returns the OpenGL API flavor that this connection supports (OpenGL or OpenGL ES).
Returns the “best” adapter on this system, preferring high-performance hardware adapters.
This is an alias for Connection::create_hardware_adapter()
.
Returns the “best” adapter on this system, preferring high-performance hardware adapters.
Returns the “best” adapter on this system, preferring low-power hardware adapters.
Returns the “best” adapter on this system, preferring software adapters.
Opens the hardware device corresponding to the given adapter.
Device handles are local to a single thread.
pub unsafe fn create_device_from_native_device(
&self,
native_device: NativeDevice
) -> Result<Device, Error>
[src]
pub unsafe fn create_device_from_native_device(
&self,
native_device: NativeDevice
) -> Result<Device, Error>
[src]Opens the hardware device corresponding to the adapter wrapped in the given native device.
This is present for compatibility with other backends.
Opens the display connection corresponding to the given winit
window.
pub fn create_native_widget_from_winit_window(
&self,
window: &Window
) -> Result<NativeWidget, Error>
[src]
pub fn create_native_widget_from_winit_window(
&self,
window: &Window
) -> Result<NativeWidget, Error>
[src]Creates a native widget type from the given winit
window.
This type can be later used to create surfaces that render to the window.
pub unsafe fn create_native_widget_from_ptr(
&self,
raw: *mut c_void,
size: Size2D<i32>
) -> NativeWidget
[src]
pub unsafe fn create_native_widget_from_ptr(
&self,
raw: *mut c_void,
size: Size2D<i32>
) -> NativeWidget
[src]Create a native widget from a raw pointer
Trait Implementations
type NativeConnection = NativeConnection
type NativeConnection = NativeConnection
The native type associated with this connection.
type NativeDevice = NativeDevice
type NativeDevice = NativeDevice
The native device type associated with this connection.
type NativeWidget = NativeWidget
type NativeWidget = NativeWidget
The native widget type associated with this connection.
Connects to the default display.
Returns the native connection corresponding to this connection.
Returns the OpenGL API flavor that this connection supports (OpenGL or OpenGL ES).
Returns the “best” adapter on this system, preferring high-performance hardware adapters. Read more
Returns the “best” adapter on this system, preferring high-performance hardware adapters.
Returns the “best” adapter on this system, preferring low-power hardware adapters.
Returns the “best” adapter on this system, preferring software adapters.
unsafe fn create_device_from_native_device(
&self,
native_device: Self::NativeDevice
) -> Result<Device, Error>
[src]
unsafe fn create_device_from_native_device(
&self,
native_device: Self::NativeDevice
) -> Result<Device, Error>
[src]Wraps an existing native device type in a device.
Opens the display connection corresponding to the given winit
window.
fn create_native_widget_from_winit_window(
&self,
window: &Window
) -> Result<NativeWidget, Error>
[src]
fn create_native_widget_from_winit_window(
&self,
window: &Window
) -> Result<NativeWidget, Error>
[src]Creates a native widget type from the given winit
window. Read more
unsafe fn create_native_widget_from_ptr(
&self,
raw: *mut c_void,
size: Size2D<i32>
) -> NativeWidget
[src]
unsafe fn create_native_widget_from_ptr(
&self,
raw: *mut c_void,
size: Size2D<i32>
) -> NativeWidget
[src]Creates a native widget from a raw pointer
Auto Trait Implementations
impl RefUnwindSafe for Connection
impl !Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations
Mutably borrows from an owned value. Read more