Drawable surface. More...
#include <kanzi/core/legacy/debug/kzs_error.hpp>#include <kanzi/core/legacy/kzs_types.hpp>#include <kanzi/core.ui/platform/graphics_context/common/kzs_surface_configuration.h>Classes | |
| struct | kzsSurfaceNativeFunctions |
Typedefs | |
| typedef kzsError(* | kzsSurfaceGetUsedSurfaceNativePropertiesFunction) (const struct KzsSurfaceNative *surfaceNative, struct KzsSurfaceProperties *out_surfaceProperties) |
| Sets used surface settings to the given surface properties struct. More... | |
| typedef kzsError(* | kzsSurfaceNativeAttachToWindowFunction) (struct KzsSurfaceNative *, const KzsWindow *window) |
| Attaches native surface to the given window. More... | |
| typedef kzsError(* | kzsSurfaceNativeCreateFunction) (const KzsDesktop *desktop, const KzsDisplay *display, const KzsSurfaceConfiguration *configuration, const KzsWindow *window, KzsSurfaceNative **out_surfaceNative) |
| Creates a native surface. More... | |
| typedef kzsError(* | kzsSurfaceNativeCreateImageFunction) (const struct KzsSurfaceNative *surfaceNative, void *display, void *context, int target, void *data, int *attributes, void **out_image) |
| typedef kzsError(* | kzsSurfaceNativeDeleteFunction) (struct KzsSurfaceNative *surfaceNative) |
| Deletes a native surface and frees all memory allocated for it. More... | |
| typedef kzsError(* | kzsSurfaceNativeDeleteImageFunction) (const struct KzsSurfaceNative *surfaceNative, void *display, void *image) |
| typedef kzsError(* | kzsSurfaceNativeDetachFromWindowFunction) (struct KzsSurfaceNative *surfaceNative) |
| Detaches native surface from the window. More... | |
| typedef void *(* | kzsSurfaceNativeGetContextFunction) (struct KzsSurfaceNative *surfaceNative) |
| Gets the context from native surface. More... | |
| typedef void *(* | kzsSurfaceNativeGetDisplayFunction) (struct KzsSurfaceNative *surfaceNative) |
| Gets the display from native surface. More... | |
| typedef kzString(* | kzsSurfaceNativeGetExtensionsFunction) (const struct KzsSurfaceNative *surfaceNative) |
| Get list of native surface extensions. More... | |
| typedef kzsGLProcPointer(* | kzsSurfaceNativeGetProcAddressFunction) (const struct KzsSurfaceNative *surfaceNative, kzString functionName) |
| Return GL procedure address. More... | |
| typedef kzsError(* | kzsSurfaceNativeReadPixelsFunction) (struct KzsSurfaceNative *surfaceNative, void *out_pixels) |
| Copy color buffer data to the preallocated buffer out_pixels. More... | |
| typedef kzsError(* | kzsSurfaceNativeSetActiveFunction) (struct KzsSurfaceNative *surfaceNative, kzBool active) |
| Sets surface active. More... | |
| typedef kzsError(* | kzsSurfaceNativeSetSwapIntervalFunction) (struct KzsSurfaceNative *surfaceNative, int interval) |
| Specifies the minimum number of video frame periods per buffer swap. More... | |
| typedef kzsError(* | kzsSurfaceNativeUpdateFunction) (struct KzsSurfaceNative *surfaceNative) |
| Updates the surface. More... | |
Functions | |
| kzsError | kzsSurfaceAttachToWindow (struct KzsSurface *surface, const struct KzsWindow *window) |
| Attaches native surface to a window. More... | |
| kzsError | kzsSurfaceCreate (const struct KzsDesktop *desktop, const struct KzsDisplay *display, const struct KzsSurfaceConfiguration *configuration, const struct KzsWindow *window, struct KzsSurface **out_surface) |
| Creates a drawable surface for a window. More... | |
| kzsError | kzsSurfaceCreateFromNative (struct KzsSurfaceNative *surfaceNative, const struct KzsSurfaceConfiguration *configuration, struct KzsSurface **out_surface) |
| Creates a surface and attaches it to given native surface. More... | |
| kzsError | kzsSurfaceCreateImage (const struct KzsSurface *surface, void *display, void *context, int target, void *data, int *attributes, void **out_image) |
| Function for creating native image object, which can be shared between client APIs. More... | |
| kzsError | kzsSurfaceDeleteImage (const struct KzsSurface *surface, void *display, void *image) |
| Function for deleting native image object. More... | |
| kzsError | kzsSurfaceDestroy (struct KzsSurface *surface) |
| Deletes a surface and frees all memory allocated for it. More... | |
| kzsError | kzsSurfaceDetachFromWindow (struct KzsSurface *surface) |
| Detaches native surface from a window. More... | |
| void * | kzsSurfaceGetContext (const struct KzsSurface *surface) |
| void * | kzsSurfaceGetDisplay (const struct KzsSurface *surface) |
| kzString | kzsSurfaceGetExtensions (const struct KzsSurface *surface) |
| Get list of native surface extensions. More... | |
| kzsGLProcPointer | kzsSurfaceGetProcAddress (struct KzsSurface *surface, kzString functionName) |
| Get GL procedure address. More... | |
| kzsError | kzsSurfaceGetUsedSurfaceProperties (struct KzsSurface *surface, struct KzsSurfaceProperties *out_surfaceProperties) |
| Sets used surface settings to the given surface properties struct. More... | |
| void | kzsSurfaceLogProperties (struct KzsSurface *surface) |
| Outputs the properties of the surface to the log. More... | |
| kzsError | kzsSurfaceReadPixels (const struct KzsSurface *surface, void *out_pixels) |
| Reads pixels from the surface. More... | |
| kzsError | kzsSurfaceResize (struct KzsSurface *surface, kzUint width, kzUint height) |
| Resizes the surface. More... | |
| kzsError | kzsSurfaceSetActive (struct KzsSurface *surface, kzBool active) |
| Makes a surface active for drawing or deactivates it. More... | |
| kzsError | kzsSurfaceSetNativeSurface (struct KzsSurface *surface, struct KzsSurfaceNative *surfaceNative) |
| Attaches a given native surface to a surface. More... | |
| kzsError | kzsSurfaceSetSwapInterval (struct KzsSurface *surface, kzInt interval) |
| Specifies the minimum number of video frame periods per buffer swap. More... | |
| kzsError | kzsSurfaceUpdate (struct KzsSurface *surface) |
| Updates the buffer to the screen. More... | |
Drawable surface.
Copyright 2008-2017 by Rightware. All rights reserved.
| typedef kzsError(* kzsSurfaceNativeCreateFunction) (const KzsDesktop *desktop, const KzsDisplay *display, const KzsSurfaceConfiguration *configuration, const KzsWindow *window, KzsSurfaceNative **out_surfaceNative) |
Creates a native surface.
| typedef kzsError(* kzsSurfaceNativeDeleteFunction) (struct KzsSurfaceNative *surfaceNative) |
Deletes a native surface and frees all memory allocated for it.
| typedef kzsError(* kzsSurfaceNativeSetActiveFunction) (struct KzsSurfaceNative *surfaceNative, kzBool active) |
Sets surface active.
| typedef kzsError(* kzsSurfaceNativeUpdateFunction) (struct KzsSurfaceNative *surfaceNative) |
Updates the surface.
| typedef kzsError(* kzsSurfaceNativeSetSwapIntervalFunction) (struct KzsSurfaceNative *surfaceNative, int interval) |
Specifies the minimum number of video frame periods per buffer swap.
Negative interval values are reserved for platform-specific special cases.
| typedef kzsError(* kzsSurfaceNativeReadPixelsFunction) (struct KzsSurfaceNative *surfaceNative, void *out_pixels) |
Copy color buffer data to the preallocated buffer out_pixels.
| typedef void*(* kzsSurfaceNativeGetDisplayFunction) (struct KzsSurfaceNative *surfaceNative) |
Gets the display from native surface.
| typedef void*(* kzsSurfaceNativeGetContextFunction) (struct KzsSurfaceNative *surfaceNative) |
Gets the context from native surface.
| typedef kzsError(* kzsSurfaceGetUsedSurfaceNativePropertiesFunction) (const struct KzsSurfaceNative *surfaceNative, struct KzsSurfaceProperties *out_surfaceProperties) |
Sets used surface settings to the given surface properties struct.
| typedef kzString(* kzsSurfaceNativeGetExtensionsFunction) (const struct KzsSurfaceNative *surfaceNative) |
Get list of native surface extensions.
| typedef kzsGLProcPointer(* kzsSurfaceNativeGetProcAddressFunction) (const struct KzsSurfaceNative *surfaceNative, kzString functionName) |
Return GL procedure address.
| typedef kzsError(* kzsSurfaceNativeCreateImageFunction) (const struct KzsSurfaceNative *surfaceNative, void *display, void *context, int target, void *data, int *attributes, void **out_image) |
| typedef kzsError(* kzsSurfaceNativeDeleteImageFunction) (const struct KzsSurfaceNative *surfaceNative, void *display, void *image) |
| typedef kzsError(* kzsSurfaceNativeAttachToWindowFunction) (struct KzsSurfaceNative *, const KzsWindow *window) |
Attaches native surface to the given window.
| typedef kzsError(* kzsSurfaceNativeDetachFromWindowFunction) (struct KzsSurfaceNative *surfaceNative) |
Detaches native surface from the window.
| kzsError kzsSurfaceCreate | ( | const struct KzsDesktop * | desktop, |
| const struct KzsDisplay * | display, | ||
| const struct KzsSurfaceConfiguration * | configuration, | ||
| const struct KzsWindow * | window, | ||
| struct KzsSurface ** | out_surface | ||
| ) |
Creates a drawable surface for a window.
Graphics context of the new surface is shared with the currently active surface if the rendering APIs match. This function may change the active surface.
| kzsError kzsSurfaceCreateFromNative | ( | struct KzsSurfaceNative * | surfaceNative, |
| const struct KzsSurfaceConfiguration * | configuration, | ||
| struct KzsSurface ** | out_surface | ||
| ) |
Creates a surface and attaches it to given native surface.
| kzsError kzsSurfaceDestroy | ( | struct KzsSurface * | surface | ) |
Deletes a surface and frees all memory allocated for it.
| kzsError kzsSurfaceSetActive | ( | struct KzsSurface * | surface, |
| kzBool | active | ||
| ) |
Makes a surface active for drawing or deactivates it.
Only one surface can be active at a time.
| kzsError kzsSurfaceUpdate | ( | struct KzsSurface * | surface | ) |
Updates the buffer to the screen.
| kzsError kzsSurfaceResize | ( | struct KzsSurface * | surface, |
| kzUint | width, | ||
| kzUint | height | ||
| ) |
Resizes the surface.
| kzsError kzsSurfaceSetNativeSurface | ( | struct KzsSurface * | surface, |
| struct KzsSurfaceNative * | surfaceNative | ||
| ) |
Attaches a given native surface to a surface.
| kzsError kzsSurfaceSetSwapInterval | ( | struct KzsSurface * | surface, |
| kzInt | interval | ||
| ) |
Specifies the minimum number of video frame periods per buffer swap.
Negative interval values are reserved for platform-specific special cases.
| kzsError kzsSurfaceReadPixels | ( | const struct KzsSurface * | surface, |
| void * | out_pixels | ||
| ) |
Reads pixels from the surface.
| kzsError kzsSurfaceCreateImage | ( | const struct KzsSurface * | surface, |
| void * | display, | ||
| void * | context, | ||
| int | target, | ||
| void * | data, | ||
| int * | attributes, | ||
| void ** | out_image | ||
| ) |
Function for creating native image object, which can be shared between client APIs.
| kzsError kzsSurfaceDeleteImage | ( | const struct KzsSurface * | surface, |
| void * | display, | ||
| void * | image | ||
| ) |
Function for deleting native image object.
| kzsError kzsSurfaceGetUsedSurfaceProperties | ( | struct KzsSurface * | surface, |
| struct KzsSurfaceProperties * | out_surfaceProperties | ||
| ) |
Sets used surface settings to the given surface properties struct.
| void kzsSurfaceLogProperties | ( | struct KzsSurface * | surface | ) |
Outputs the properties of the surface to the log.
| kzsGLProcPointer kzsSurfaceGetProcAddress | ( | struct KzsSurface * | surface, |
| kzString | functionName | ||
| ) |
Get GL procedure address.
| void* kzsSurfaceGetDisplay | ( | const struct KzsSurface * | surface | ) |
| void* kzsSurfaceGetContext | ( | const struct KzsSurface * | surface | ) |
| kzString kzsSurfaceGetExtensions | ( | const struct KzsSurface * | surface | ) |
Get list of native surface extensions.
| kzsError kzsSurfaceAttachToWindow | ( | struct KzsSurface * | surface, |
| const struct KzsWindow * | window | ||
| ) |
Attaches native surface to a window.
This function needs not to be called unless the window specified in kzsSurfaceCreate() is to be changed.
| kzsError kzsSurfaceDetachFromWindow | ( | struct KzsSurface * | surface | ) |
Detaches native surface from a window.
This function needs not to be called unless the window specified in kzsSurfaceCreate() is to be changed.