Interface

HsSoftwareContext

Description [src]

interface Hs.SoftwareContext : GObject.Object

An interface defining an software rendering context.

Cores should use hs_core_create_software_context() within load_rom() to create a context.

Frontends must implement Hs.FrontendInterface.create_software_context and create a context within it.

The size and format of the framebuffer must be provided right away and cannot be changed later, though the core is allowed to recreate the context later. If the core can use multiple resolutions and it’s not known at the creation time, provide the maximum size, and then use a smaller area via hs_software_context_set_area(), hs_software_context_set_row_stride() and/or hs_software_context_set_offset().

To output the data, call hs_software_context_acquire_framebuffer(), then once done, call hs_software_context_release_framebuffer().

Prerequisite

In order to implement SoftwareContext, your type must inherit fromGObject.

Instance methods

hs_software_context_acquire_framebuffer

Locks and returns the framebuffer to render into.

hs_software_context_release_framebuffer

Unlocks the framebuffer.

hs_software_context_set_area

Sets the usable area within the framebuffer.

hs_software_context_set_colorburst

Sets the colorburst for this field.

hs_software_context_set_interlacing

Sets the interlacing mode for the current frame.

hs_software_context_set_offset

Sets the offset in bytes for self.

hs_software_context_set_overscan

Sets the overscan within the framebuffer.

hs_software_context_set_row_stride

Sets the row stride for self.

Interface structure

struct HsSoftwareContextInterface {
  GTypeInterface parent;
  void (* set_area) (
    HsSoftwareContext* self,
    HsRectangle* area
  );
  void (* set_row_stride) (
    HsSoftwareContext* self,
    guint row_stride
  );
  void (* set_offset) (
    HsSoftwareContext* self,
    int offset
  );
  void (* set_interlacing) (
    HsSoftwareContext* self,
    HsInterlacingMode mode
  );
  void (* set_overscan) (
    HsSoftwareContext* self,
    HsBorder* overscan
  );
  void (* set_colorburst) (
    HsSoftwareContext* self,
    float cycle_length,
    float line_offset,
    float field_offset
  );
  gpointer (* acquire_framebuffer) (
    HsSoftwareContext* self
  );
  void (* release_framebuffer) (
    HsSoftwareContext* self
  );
  
}

No description available.

Interface members
parent
GTypeInterface
 

No description available.

set_area
void (* set_area) (
    HsSoftwareContext* self,
    HsRectangle* area
  )
 

No description available.

set_row_stride
void (* set_row_stride) (
    HsSoftwareContext* self,
    guint row_stride
  )
 

No description available.

set_offset
void (* set_offset) (
    HsSoftwareContext* self,
    int offset
  )
 

No description available.

set_interlacing
void (* set_interlacing) (
    HsSoftwareContext* self,
    HsInterlacingMode mode
  )
 

No description available.

set_overscan
void (* set_overscan) (
    HsSoftwareContext* self,
    HsBorder* overscan
  )
 

No description available.

set_colorburst
void (* set_colorburst) (
    HsSoftwareContext* self,
    float cycle_length,
    float line_offset,
    float field_offset
  )
 

No description available.

acquire_framebuffer
gpointer (* acquire_framebuffer) (
    HsSoftwareContext* self
  )
 

No description available.

release_framebuffer
void (* release_framebuffer) (
    HsSoftwareContext* self
  )
 

No description available.

Virtual methods

Hs.SoftwareContext.acquire_framebuffer

Locks and returns the framebuffer to render into.

Hs.SoftwareContext.release_framebuffer

Unlocks the framebuffer.

Hs.SoftwareContext.set_area

Sets the usable area within the framebuffer.

Hs.SoftwareContext.set_colorburst

Sets the colorburst for this field.

Hs.SoftwareContext.set_interlacing

Sets the interlacing mode for the current frame.

Hs.SoftwareContext.set_offset

Sets the offset in bytes for self.

Hs.SoftwareContext.set_overscan

Sets the overscan within the framebuffer.

Hs.SoftwareContext.set_row_stride

Sets the row stride for self.