It derives from <GObject>.
Base class for objects implementing different rendering methods.
<GdkDrawContext> is the base object used by
contexts implementing different rendering methods, such as
<GdkCairoContext> or
<GdkGLContext>. It provides shared
functionality between those contexts.
You will always interact with one of those subclasses.
A <GdkDrawContext> is always associated with a
single toplevel surface.
The <GdkDisplay> used to create the
<GdkDrawContext>.
Its value is a <GdkDisplay>, or #f.
It can only be set when the object is made, with #:display.
The <GdkSurface> the context is bound to.
Its value is a <GdkSurface>, or #f.
It can only be set when the object is made, with #:surface.
Indicates that you are beginning the process of redrawing region on the self’s surface.
Calling this function begins a drawing operation using self on the
surface that self was created from. The actual requirements and
guarantees for the drawing operation vary for different implementations
of drawing, so a <GdkCairoContext> and a
<GdkGLContext> need to be treated differently.
A call to this function is a requirement for drawing and must be
followed by a call to draw-context:end-frame, which will complete the drawing
operation and ensure the contents become visible on screen.
Note that the region passed to this function is the minimum region
that needs to be drawn and depending on implementation, windowing system
and hardware in use, it might be necessary to draw a larger region.
Drawing implementation must use draw-context:get-frame-region to query the region
that must be drawn.
When using GTK, the widget system automatically places calls to
draw-context:begin-frame and
draw-context:end-frame via the use
of GskRenderers, so application code does not need to call these
functions explicitly.
Passed: a <GdkDrawContext>.
the <GdkDrawContext> used to draw the frame.
The context must have a surface.
Passed: a <CairoRegion>.
minimum region that should be drawn
Ends a drawing operation started with draw-context:begin-frame.
This makes the drawing available on screen. See draw-context:begin-frame for more details about drawing.
When using a <GdkGLContext>, this function may
call glFlush() implicitly before returning; it is not recommended
to call glFlush() explicitly before calling this function.
Passed: a <GdkDrawContext>.
Retrieves the <GdkDisplay> the self is
created for
Passed: a <GdkDrawContext>.
Returned: a <GdkDisplay>, or #f.
the <GdkDisplay>
Retrieves the region that is currently being repainted.
After a call to draw-context:begin-frame this function will return a
union of the region passed to that function and the area of the surface
that the self determined needs to be repainted.
If self is not in between calls to draw-context:begin-frame and draw-context:end-frame, #f will be returned.
Passed: a <GdkDrawContext>.
Returned: a <CairoRegion>, or #f.
a Cairo region
Retrieves the surface that self is bound to.
Passed: a <GdkDrawContext>.
Returned: a <GdkSurface>, or #f.
Returns #t if self is in the process of drawing to its
surface.
This is the case between calls to draw-context:begin-frame and draw-context:end-frame. In this situation, drawing
commands may be effecting the contents of the self’s surface.
Passed: a <GdkDrawContext>.
Returned: a boolean.
#t if the context is between draw-context:begin-frame and draw-context:end-frame calls.