Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Cogl.DebugObjectForeachTypeCallback(info, *user_data)¶
- Parameters:
info (
Cogl.DebugObjectTypeInfo
) – A pointer to a struct containing information about the type.
A callback function to use for
Cogl.debug_object_foreach_type
().New in version 1.8.
- Cogl.FeatureCallback(feature, *user_data)¶
- Parameters:
feature (
Cogl.FeatureID
) – A single feature currently supported by Cogluser_data (
object
orNone
) – A private pointer passed toCogl.foreach_feature
().
A callback used with
Cogl.foreach_feature
() for enumerating all context level features supported by Cogl.New in version 0.10.
- Cogl.FenceCallback(fence, *user_data)¶
- Parameters:
fence (
Cogl.Fence
) – Unused. In the future this parameter may be used to pass extra information about the fence completion but for now it should be ignored.user_data (
object
orNone
) – The private data passed to cogl_framebuffer_add_fence_callback()
The callback prototype used with cogl_framebuffer_add_fence_callback() for notification of GPU command completion.
New in version 2.0.
- Cogl.FrameCallback(onscreen, event, info, *user_data)¶
- Parameters:
onscreen (
Cogl.Onscreen
) – The onscreen that the frame is associated withevent (
Cogl.FrameEvent
) – ACogl.FrameEvent
notifying how the frame has progressedinfo (
Cogl.FrameInfo
) – The meta information, such as timing information, about the frame that has progressed.user_data (
object
orNone
) – The user pointer passed toCogl.Onscreen.add_frame_callback
()
Is a callback that can be registered via
Cogl.Onscreen.add_frame_callback
() to be called when a frame progresses in some notable way.Please see the documentation for
Cogl.FrameEvent
andCogl.Onscreen.add_frame_callback
() for more details about what events can be notified.New in version 1.14.
- Cogl.FuncPtr()¶
The type used by cogl for function pointers, note that this type is used as a generic catch-all cast for function pointers and the actual arguments and return type may be different.
- Cogl.MetaTextureCallback(sub_texture, sub_texture_coords, meta_coords, *user_data)¶
- Parameters:
sub_texture (
Cogl.Texture
) – A low-levelCogl.Texture
making up part of a #CoglMetaTexture.sub_texture_coords (
float
) – A float 4-tuple ordered like (tx1,ty1,tx2,ty2) defining what region of the current sub_texture maps to a sub-region of a #CoglMetaTexture. (tx1,ty1) is the top-left sub-region coordinate and (tx2,ty2) is the bottom-right. These are low-level texture coordinates.meta_coords (
float
) – A float 4-tuple ordered like (tx1,ty1,tx2,ty2) defining what sub-region of a #CoglMetaTexture this low-level sub_texture maps too. (tx1,ty1) is the top-left sub-region coordinate and (tx2,ty2) is the bottom-right. These are high-level meta-texture coordinates.user_data (
object
orNone
) – A private pointer passed to cogl_meta_texture_foreach_in_region().
A callback used with cogl_meta_texture_foreach_in_region() to retrieve details of all the low-level
Cogl.Texture
s that make up a given #CoglMetaTexture.New in version 1.10.
- Cogl.OnscreenDirtyCallback(onscreen, info, *user_data)¶
- Parameters:
onscreen (
Cogl.Onscreen
) – The onscreen that the frame is associated withinfo (
Cogl.OnscreenDirtyInfo
) – ACogl.OnscreenDirtyInfo
struct containing the details of the dirty areauser_data (
object
orNone
) – The user pointer passed toCogl.Onscreen.add_frame_callback
()
Is a callback that can be registered via
Cogl.Onscreen.add_dirty_callback
() to be called when the windowing system determines that a region of the onscreen window has been lost and the application should redraw it.New in version 1.16.
- Cogl.OnscreenResizeCallback(onscreen, width, height, *user_data)¶
- Parameters:
onscreen (
Cogl.Onscreen
) – ACogl.Onscreen
framebuffer that was resizedwidth (
int
) – The new width of onscreenheight (
int
) – The new height of onscreenuser_data (
object
orNone
) – The private passed toCogl.Onscreen.add_resize_callback
()
Is a callback type used with the
Cogl.Onscreen.add_resize_callback
() allowing applications to be notified whenever an onscreen framebuffer is resized.Cogl automatically updates the viewport of an onscreen framebuffer that is resized so this callback is also an indication that the viewport has been modified too A resize callback will only ever be called while dispatching Cogl events from the system mainloop; so for example during
Cogl.poll_renderer_dispatch
(). This is so that callbacks shouldn’t occur while an application might have arbitrary locks held for example.New in version 2.0.
- Cogl.OnscreenX11MaskCallback(onscreen, event_mask, *user_data)¶
- Parameters:
onscreen (
Cogl.Onscreen
) –event_mask (
int
) –
- Cogl.OutputCallback(output, *user_data)¶
- Parameters:
output (
Cogl.Output
) – The current display output being iterateduser_data (
object
orNone
) – The user pointer passed toCogl.Renderer.foreach_output
()
A callback type that can be passed to
Cogl.Renderer.foreach_output
() for iterating display outputs for a given renderer.New in version 1.14.
- Cogl.PipelineLayerCallback(pipeline, layer_index, *user_data)¶
- Parameters:
pipeline (
Cogl.Pipeline
) – TheCogl.Pipeline
whos layers are being iteratedlayer_index (
int
) – The current layer indexuser_data (
object
orNone
) – The private data passed toCogl.Pipeline.foreach_layer
()
- Return type:
The callback prototype used with
Cogl.Pipeline.foreach_layer
() for iterating all the layers of a pipeline.New in version 2.0.
- Cogl.PrimitiveAttributeCallback(primitive, attribute, *user_data)¶
- Parameters:
primitive (
Cogl.Primitive
) – TheCogl.Primitive
whose attributes are being iteratedattribute (
Cogl.Attribute
) – TheCogl.Attribute
user_data (
object
orNone
) – The private data passed toCogl.Primitive.foreach_attribute
()
- Return type:
The callback prototype used with
Cogl.Primitive.foreach_attribute
() for iterating all the attributes of aCogl.Primitive
.The function should return
True
to continue iteration orFalse
to stop.New in version 1.10.
- Cogl.SwapBuffersNotify(framebuffer, *user_data)¶
- Parameters:
framebuffer (
Cogl.Framebuffer
) –