Drawable surface. More...
#include <kanzi/core/legacy/debug/kzs_error.hpp>
#include <kanzi/core/legacy/kzs_types.hpp>
#include <kanzi/core.ui/platform/input/common/kzs_input.h>
Classes | |
struct | kzsSurfaceNativeFunctions |
Typedefs | |
typedef void(* | kzsGLProcPointer) () |
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(* | kzsSurfaceNativeDeleteFunction) (struct KzsSurfaceNative *surfaceNative) |
Deletes a native surface and frees all memory allocated for it. More... | |
typedef kzsError(* | kzsSurfaceNativeSetActiveFunction) (struct KzsSurfaceNative *surfaceNative, kzBool active) |
Sets surface active. More... | |
typedef kzsError(* | kzsSurfaceNativeUpdateFunction) (struct KzsSurfaceNative *surfaceNative) |
Updates the surface. More... | |
typedef kzsError(* | kzsSurfaceNativeSetSwapIntervalFunction) (struct KzsSurfaceNative *surfaceNative, int interval) |
Specifies the minimum number of video frame periods per buffer swap. More... | |
typedef kzsError(* | kzsSurfaceNativeReadPixelsFunction) (struct KzsSurfaceNative *surfaceNative, void *out_pixels) |
Copy color buffer data to the preallocated buffer out_pixels. More... | |
typedef void *(* | kzsSurfaceNativeGetDisplayFunction) (struct KzsSurfaceNative *surfaceNative) |
Gets the display from native surface. More... | |
typedef void *(* | kzsSurfaceNativeGetContextFunction) (struct KzsSurfaceNative *surfaceNative) |
Gets the context from native surface. More... | |
typedef kzsError(* | kzsSurfaceGetUsedSurfaceNativePropertiesFunction) (const struct KzsSurfaceNative *surfaceNative, struct KzsSurfaceProperties *out_surfaceProperties) |
Sets used surface settings to the given surface properties struct. 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(* | 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. More... | |
typedef kzsError(* | kzsSurfaceNativeDetachFromWindowFunction) (struct KzsSurfaceNative *surfaceNative) |
Detaches native surface from the window. More... | |
Functions | |
KANZI_API 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... | |
KANZI_API kzsError | kzsSurfaceDestroy (struct KzsSurface *surface) |
Deletes a surface and frees all memory allocated for it. More... | |
KANZI_API kzsError | kzsSurfaceSetActive (struct KzsSurface *surface, kzBool active) |
Makes a surface active for drawing or deactivates it. More... | |
KANZI_API kzsError | kzsSurfaceUpdate (struct KzsSurface *surface) |
Updates the buffer to the screen. More... | |
KANZI_API kzsError | kzsSurfaceResize (struct KzsSurface *surface, kzUint width, kzUint height) |
Resizes the surface. More... | |
KANZI_API kzsError | kzsSurfaceSetSwapInterval (struct KzsSurface *surface, kzInt interval) |
Specifies the minimum number of video frame periods per buffer swap. More... | |
KANZI_API kzsError | kzsSurfaceReadPixels (const struct KzsSurface *surface, void *out_pixels) |
Reads pixels from the surface. More... | |
KANZI_API 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... | |
KANZI_API kzsError | kzsSurfaceDeleteImage (const struct KzsSurface *surface, void *display, void *image) |
Function for deleting native image object. More... | |
KANZI_API kzsError | kzsSurfaceGetUsedSurfaceProperties (struct KzsSurface *surface, struct KzsSurfaceProperties *out_surfaceProperties) |
Gets the current surface properties. More... | |
KANZI_API void | kzsSurfaceLogProperties (struct KzsSurface *surface) |
Outputs the properties of the surface to the log. More... | |
KANZI_API kzsGLProcPointer | kzsSurfaceGetProcAddress (struct KzsSurface *surface, kzString functionName) |
Get GL procedure address. More... | |
KANZI_API struct KzsGlGraphicsContext * | kzsSurfaceGetGraphicsContext (const struct KzsSurface *surface) |
KANZI_API void * | kzsSurfaceGetDisplay (const struct KzsSurface *surface) |
KANZI_API void * | kzsSurfaceGetContext (const struct KzsSurface *surface) |
KANZI_API kzString | kzsSurfaceGetExtensions (const struct KzsSurface *surface) |
Get list of native surface extensions. More... | |
KANZI_API kzsError | kzsSurfaceAttachToWindow (struct KzsSurface *surface, const struct KzsWindow *window) |
Attaches native surface to a window. More... | |
KANZI_API kzsError | kzsSurfaceDetachFromWindow (struct KzsSurface *surface) |
Detaches native surface from a window. More... | |
Drawable surface.
Copyright 2008-2017 by Rightware. All rights reserved.
typedef void(* kzsGLProcPointer) () |
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.
KANZI_API 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.
KANZI_API kzsError kzsSurfaceDestroy | ( | struct KzsSurface * | surface | ) |
Deletes a surface and frees all memory allocated for it.
KANZI_API 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.
KANZI_API kzsError kzsSurfaceUpdate | ( | struct KzsSurface * | surface | ) |
Updates the buffer to the screen.
KANZI_API kzsError kzsSurfaceResize | ( | struct KzsSurface * | surface, |
kzUint | width, | ||
kzUint | height | ||
) |
Resizes the surface.
KANZI_API 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.
KANZI_API kzsError kzsSurfaceReadPixels | ( | const struct KzsSurface * | surface, |
void * | out_pixels | ||
) |
Reads pixels from the surface.
KANZI_API 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.
KANZI_API kzsError kzsSurfaceDeleteImage | ( | const struct KzsSurface * | surface, |
void * | display, | ||
void * | image | ||
) |
Function for deleting native image object.
KANZI_API kzsError kzsSurfaceGetUsedSurfaceProperties | ( | struct KzsSurface * | surface, |
struct KzsSurfaceProperties * | out_surfaceProperties | ||
) |
Gets the current surface properties.
surface | Surface to query properties for. |
out_surfaceProperties | Surface properties structure to write. |
KANZI_API void kzsSurfaceLogProperties | ( | struct KzsSurface * | surface | ) |
Outputs the properties of the surface to the log.
KANZI_API kzsGLProcPointer kzsSurfaceGetProcAddress | ( | struct KzsSurface * | surface, |
kzString | functionName | ||
) |
Get GL procedure address.
KANZI_API struct KzsGlGraphicsContext* kzsSurfaceGetGraphicsContext | ( | const struct KzsSurface * | surface | ) |
KANZI_API void* kzsSurfaceGetDisplay | ( | const struct KzsSurface * | surface | ) |
KANZI_API void* kzsSurfaceGetContext | ( | const struct KzsSurface * | surface | ) |
KANZI_API kzString kzsSurfaceGetExtensions | ( | const struct KzsSurface * | surface | ) |
Get list of native surface extensions.
KANZI_API 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.
KANZI_API 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.