class

Shale::Display

Inherits Reference < Object

Constructors

new(width : UInt32, height : UInt32, title : String)

Create a display

Arguments

  • @width Width of the X11 window
  • @height Height of the X11 window
  • title The title added to the X11 window

Description

FIXME: for the x11 pixmap, it seems to be a mismatch by 1 pixel when displaying in the window example: if the window width (499) is less than the framebuffer width (500) (on the righthand side) some reason, the last column of pixels in the framebuffer are show on the lefthand side by 1 pixel UPDATE: temp fix added to the Surface.map_pixel function, but should investigate more if the right fix is to offset the incoming coords before mapping to the framebuffer

Source

Instance methods

clear(*args, **options)
Source
clear(*args, **options, &)
Source
close(*args, **options)
Source
close(*args, **options, &)
Source
draw

Draw to the Display's buffer

Description

Source
finalize

Cleanup garbage collection method

Description

When garbage collection (GC) is initiated, it will call the Display's close method and cleanup X11 resources

Source
flush(*args, **options)
Source
flush(*args, **options, &)
Source
frame_buffer
Source
next_event(*args, **options)
Source
next_event(*args, **options, &)
Source
pending(*args, **options)
Source
pending(*args, **options, &)
Source
resize(width : UInt32, height : UInt32)

Resize the drawing area

Description

Source
swap_buffer

Swap buffer

Description

Writes the X11 image, mapped with the Surface data, to the window for display.

Note: the CPU usage of Xorg process also goes up, not sure what i would need to do to prevent that (if at all possible)

Source
sync(*args, **options)
Source
sync(*args, **options, &)
Source
toggle_fullscreen

Toggle the display for fullscreen or back to windowed mode

Description

TODO

Source
wm_delete_window
Source