# Struct ocl::builders::ContextProperties [−] [src]

    pub struct ContextProperties { /* fields omitted */ }

Context properties list.

[MINIMALLY TESTED]

TODO: Check for duplicate property assignments.

## Methods

### `impl ContextProperties`
[src]

#### `pub fn new() -> ContextProperties`
[src]

Returns an empty new list of context properties

#### `pub fn platform<P>(self, platform: P) -> ContextProperties where
P: Into<PlatformId>,`
[src]

Specifies a platform (builder-style).

#### `pub fn interop_user_sync(self, sync: bool) -> ContextProperties`
[src]

Specifies whether the user is responsible for synchronization between OpenCL and other APIs (builder-style).

#### `pub fn gl_context(self, gl_ctx: *mut c_void) -> ContextProperties`
[src]

Specifies an OpenGL context handle (builder-style).

#### `pub fn glx_display(self, glx_disp: *mut c_void) -> ContextProperties`
[src]

Specifies a Display pointer for the GLX context (builder-style).

#### `pub fn wgl_hdc(self, wgl_hdc: *mut c_void) -> ContextProperties`
[src]

Specifies a Display pointer for the WGL HDC (builder-style).

#### `pub fn cgl_sharegroup(self, gl_sharegroup: *mut c_void) -> ContextProperties`
[src]

Specifies an OpenGL context CGL share group to associate the OpenCL context with (builder-style).

#### `pub fn egl_display(self, egl_disp: *mut c_void) -> ContextProperties`
[src]

Specifies a pointer for the EGL display (builder-style).

#### `pub fn property_value(self, prop: ContextPropertyValue) -> ContextProperties`
[src]

Pushes a `ContextPropertyValue` onto this list of properties (builder-style).

#### `pub fn set_platform<P>(&mut self, platform: P) where
P: Into<PlatformId>,`
[src]

Specifies a platform.

#### `pub fn set_interop_user_sync(&mut self, sync: bool)`
[src]

Specifies whether the user is responsible for synchronization between OpenCL and other APIs.

#### `pub fn set_gl_context(&mut self, gl_ctx: *mut c_void)`
[src]

Specifies an OpenGL context handle.

#### `pub fn set_glx_display(&mut self, glx_disp: *mut c_void)`
[src]

Specifies a Display pointer for the GLX context.

#### `pub fn set_wgl_hdc(&mut self, wgl_hdc: *mut c_void)`
[src]

Specifies a Display pointer for the WGL HDC.

#### `pub fn set_cgl_sharegroup(&mut self, gl_sharegroup: *mut c_void)`
[src]

Specifies an OpenGL context CGL share group to associate the OpenCL context with.

#### `pub fn set_egl_display(&mut self, egl_disp: *mut c_void)`
[src]

Specifies a pointer for the EGL display.

#### `pub fn set_property_value(&mut self, prop: ContextPropertyValue)`
[src]

Pushes a `ContextPropertyValue` onto this list of properties.

#### `pub fn get_platform(&self) -> Option<PlatformId>`
[src]

Returns a platform id or none.

#### `pub fn contains_gl_context_or_sharegroup(&self) -> bool`
[src]

Returns true if this set of context properties specifies any OpenGL context or sharegroup to associate with.

####
ⓘImportant traits for Vec<u8>

### Important traits for Vec<u8>

`impl Write for Vec<u8>`
`pub fn to_raw(&self) -> Vec<isize>`
[src]

Converts this list into a packed-word representation as specified here.

#### `pub unsafe fn extract_property_from_raw(
property: ContextProperty,
raw_context_properties: &[isize]
) -> Option<ContextPropertyValue>`
[src]

Returns a single context property value.

#### `pub unsafe fn from_raw(
raw_context_properties: &[isize]
) -> Result<ContextProperties, Error>`
[src]

Converts raw stuff into other stuff.

## Trait Implementations

### `impl Clone for ContextProperties`
[src]

#### `fn clone(&self) -> ContextProperties`
[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0
[src]

Performs copy-assignment from `source`. Read more

### `impl From<ContextProperties> for Vec<isize>`
[src]

####
ⓘImportant traits for Vec<u8>

### Important traits for Vec<u8>

`impl Write for Vec<u8>`
`fn from(cp: ContextProperties) -> Vec<isize>`
[src]

Performs the conversion.

### `impl Debug for ContextProperties`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>`
[src]

Formats the value using the given formatter. Read more

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)