Expand description
The dwarf-term
crate allows you to draw a screen that ends up looking like
dwarf fortress.
At the moment there’s only a single graphics set supported, but perhaps in future versions that will become an element that you can change at runtime.
Modules§
- dpi
- DPI is important, so read the docs for this module if you don’t want to be confused.
- macros
- All of our macros go in here.
- os
- Contains traits with platform-specific methods in them.
- palettes
- Module for color palettes you might wish to use with your indexed color images.
- u16_ext
- Module for code specific to
u16
base images. - u32_ext
- Module for code specific to
u32
base images.
Macros§
- check_
misalign4 - Checks that an address is aligned to a 4 byte bound.
- check_
misalign8 - Checks that an address is aligned to a 8 byte bound.
- check_
misalign16 - Checks that an address is aligned to a 16 byte bound.
- check_
misalign32 - Checks that an address is aligned to a 32 byte bound.
- determine_
overlay - rgb16
- As per
rgba16
, but automatically selects alpha=true. - rgb32
- As per
rgba32
, but automatically selects alpha = 255. - rgba16
- Builds a
u16
value from the given RGBA values. - rgba32
- Builds a
u32
value from the given RGBA values.
Structs§
- Available
Monitors Iter - An iterator for the list of available monitors.
- Context
- Represents an OpenGL context.
- Context
Builder - Object that allows you to build
Context
s. - Device
Id - Identifier of an input device.
- Dwarf
Term - A terminal where each cell has a foreground, background, and sprite id.
- Events
Loop - Provides a way to retreive events from the system and from the windows that were registered to the events loop.
- Events
Loop Closed - The error that is returned when an
EventsLoopProxy
attempts to wake up anEventsLoop
that no longer exists. - Events
Loop Proxy - Used to wake up the
EventsLoop
from another thread. - GlAttributes
- Attributes to use when creating an OpenGL context.
- GlWindow
- Represents an OpenGL context and a Window with which it is associated.
- Headless
Context - Represents a headless OpenGL context.
- Headless
Renderer Builder - Object that allows you to build headless contexts.
- Icon
- An icon used for the window titlebar, taskbar, etc.
- Image
MutRef Iter - A struct that iterates over pixels of an
Image
by mutable reference. - Image
MutSlice - A mutable sub-view of some image data.
- Image
RefIter - A struct that iterates over pixels of an
Image
by reference. - Image
Slice - A shared view of some image data.
- Keyboard
Input - Describes a keyboard input event.
- Modifiers
State - Represents the current state of the keyboard modifiers
- Monitor
Id - Identifier for a monitor.
- NESImage
- An image the size of an NES screen, backed by an array.
- Pixel
Format - Describes a possible format. Unused.
- Pixel
Format Requirements - Describes how the backend should choose a pixel format.
- Touch
- Represents touch event
- VecImage
- An image backed by a
Vec
. - Window
- Represents a window.
- Window
Attributes - Attributes to use when creating a window.
- Window
Builder - Object that allows you to build windows.
- Window
Id - Identifier of a window. Unique for each window.
Enums§
- Api
- All APIs related to OpenGL that you can possibly get while using glutin.
- Context
Error - Error that can happen when manipulating an OpenGL context.
- Control
Flow - Returned by the user callback given to the
EventsLoop::run_forever
method. - Creation
Error - Error that can happen while creating a window or a headless renderer.
- Device
Event - Represents raw hardware events that are not associated with any particular window.
- Dwarf
Term Glium Error - Some sort of OpenGL error happened.
- Element
State - Describes the input state of a key.
- Event
- Describes a generic event.
- GlProfile
- Describes the requested OpenGL context profiles.
- GlRequest
- Describes the OpenGL API and version that are being requested when a context is created.
- Mouse
Button - Describes a button of a mouse controller.
- Mouse
Cursor - Describes the appearance of the mouse cursor.
- Mouse
Scroll Delta - Describes a difference in the mouse scroll wheel state.
- Release
Behavior - The behavior of the driver when you change the current context.
- Robustness
- Specifies the tolerance of the OpenGL context to faults. If you accept raw OpenGL commands and/or raw shader code from an untrusted source, you should definitely care about this.
- Touch
Phase - Describes touch-screen input state.
- Virtual
KeyCode - Symbolic name for a keyboard key.
- Window
Creation Error - Error that can happen while creating a window or a headless renderer.
- Window
Event - Describes an event from a
Window
.
Statics§
- GL_CORE
- The minimum core profile GL context. Useful for getting the minimum required GL version while still running on OSX, which often forbids the compatibility profile features.
- NES_
PALETTE - A palette for NES colors.
- SHARECART_
PALETTE - Colors from the Sharecart1000 spec.
Traits§
- GlContext
- A trait for types associated with a GL context.
- Readable
Image - Trait for anything that can be read as if it was an image.
- Writable
Image - The trait for anything that can be written to as if it was an image.
- Writable
Image U16Ext - This allows
u16
specific extensions to theWritableImage
concepts. - Writable
Image U32Ext - Extra functionality that’s only available to images of u32 values.
Functions§
- linear_
to_ u32 - The inverse of
u32_to_linear
. - u32_
to_ linear - Converts an RGBA
u32
into a pseudo-linear brightness float array.