Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-monitors Reference Manual, version 1.0.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 15:03:57 2021 GMT+0.
• Introduction | What cl-monitors is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
This is a small wrapper library around libmonitors, providing independent monitor resolution detection and change support.
Precompiled versions of the underlying library are included in this. If you want to build it manually however, refer to the libmonitors README.
Load the system through ASDF or Quicklisp and initialise it:
(ql:quickload :cl-monitors)
(cl-monitors:init)
Now you can retrieve a list of the monitors on your system:
(cl-monitors:detect)
You can inspect the available video modes for each of them too:
(mapcar #'cl-monitors:modes *)
And even switch the mode:
(cl-monitors:make-current (second (first *)))
Though you probably want to switch back again to your preferred resolution:
(cl-monitors:make-current (first (first **)))
Once you're all done, don't forget to clean up again after yourself:
(cl-monitors:deinit)
And that's all there is to it. Well-- almost all. You can query information from the monitor
and mode
objects as well of course. For this, see width
, height
, refresh
, current-p
, mode
, name
, and primary-p
.
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-monitors system |
Nicolas Hafner <shinmera@tymoon.eu>
Nicolas Hafner <shinmera@tymoon.eu>
(:git "https://github.com/shirakumo/cl-monitors.git")
zlib
Bindings to libmonitors, allowing the handling of monitors querying and resolution changing.
1.0.0
cl-monitors.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-monitors.asd file | ||
• The cl-monitors/package.lisp file | ||
• The cl-monitors/low-level.lisp file | ||
• The cl-monitors/wrapper.lisp file | ||
• The cl-monitors/documentation.lisp file |
Next: The cl-monitors/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-monitors.asd
cl-monitors (system)
Next: The cl-monitors/low-level․lisp file, Previous: The cl-monitors․asd file, Up: Lisp files [Contents][Index]
cl-monitors (system)
package.lisp
Next: The cl-monitors/wrapper․lisp file, Previous: The cl-monitors/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
cl-monitors (system)
low-level.lisp
*here* (special variable)
Next: The cl-monitors/documentation․lisp file, Previous: The cl-monitors/low-level․lisp file, Up: Lisp files [Contents][Index]
low-level.lisp (file)
cl-monitors (system)
wrapper.lisp
Previous: The cl-monitors/wrapper․lisp file, Up: Lisp files [Contents][Index]
wrapper.lisp (file)
cl-monitors (system)
documentation.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-monitors-cffi package | ||
• The cl-monitors package |
Next: The cl-monitors package, Previous: Packages, Up: Packages [Contents][Index]
package.lisp (file)
org.shirakumo.fraf.monitors.cffi
*here* (special variable)
Previous: The cl-monitors-cffi package, Up: Packages [Contents][Index]
package.lisp (file)
org.shirakumo.fraf.monitors
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported conditions | ||
• Exported classes |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Variable containing a pathname to the static directory.
low-level.lisp (file)
Next: Exported generic functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
Cleans up the library.
You should call this once you are done with everything.
wrapper.lisp (file)
Detects the monitors and modes on the system.
Returns a list of monitors on the system. Signals a DETECTION-FAILED-ERROR on failured.
See MONITOR
wrapper.lisp (file)
Initializes the library.
You should call this before any other function to the library is called. Signals an INITIALIZATION-FAILED-ERROR on failure.
wrapper.lisp (file)
Attempts to make the passed mode the current one.
This is equivalent to doing (SETF (MODE (MONITOR mode)) mode).
See MODE
wrapper.lisp (file)
Reads the pointer to the system-dependant data struct of the mode.
You should not need this for anything.
See MODE-STRUCT
low-level.lisp (file)
(setf mode-data) (function)
low-level.lisp (file)
mode-data (function)
Reads the mode’s height in pixels.
See MODE-STRUCT
low-level.lisp (file)
(setf mode-height) (function)
low-level.lisp (file)
mode-height (function)
Reads the pointer to the monitor struct this mode originated from.
See MODE-STRUCT
low-level.lisp (file)
(setf mode-monitor) (function)
low-level.lisp (file)
mode-monitor (function)
Reads the mode’s refresh rate in Herz.
See MODE-STRUCT
low-level.lisp (file)
(setf mode-refresh) (function)
low-level.lisp (file)
mode-refresh (function)
Reads the mode’s width in pixels.
See MODE-STRUCT
low-level.lisp (file)
(setf mode-width) (function)
low-level.lisp (file)
mode-width (function)
Reads the pointer to the current mode of the monitor.
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-current-mode) (function)
low-level.lisp (file)
monitor-current-mode (function)
Reads the pointer to the system-dependant data struct of the monitor.
You should not need this for anything.
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-data) (function)
low-level.lisp (file)
monitor-data (function)
Reads the monitor’s physical height in millimetres.
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-height) (function)
low-level.lisp (file)
monitor-height (function)
Reads the count for how many mode structs there are in the mode field of the monitor.
See MONITOR-MODES
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-mode-count) (function)
low-level.lisp (file)
monitor-mode-count (function)
Reads the pointer to the packed mode struct array of the monitor.
See MONITOR-MODE-COUNT
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-modes) (function)
low-level.lisp (file)
monitor-modes (function)
Reads the monitor’s name string.
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-name) (function)
low-level.lisp (file)
monitor-name (function)
Reads whether the monitor is the primary monitor of the system.
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-primary) (function)
low-level.lisp (file)
monitor-primary (function)
Reads the monitor’s physical width in millimetres.
See MONITOR-STRUCT
low-level.lisp (file)
(setf monitor-width) (function)
low-level.lisp (file)
monitor-width (function)
Cleans up the monitors library. You should call this once you are done with everything.
low-level.lisp (file)
Detects the monitors and their modes on the system.
You need to pass this two "empty" pointers. The first will be set to
reference an int for the number of monitors that were detected, and the
second to an array of pointers to monitor structs.
If NIL is returned, the detection failed and the two pointers you passed will not have changed.
See MONITOR-STRUCT
low-level.lisp (file)
Frees a monitor struct.
See MONITOR-STRUCT
low-level.lisp (file)
Frees an array of pointers to monitor objects, including the monitors referenced by it.
See MONITORS-FREE-MONITOR
low-level.lisp (file)
Initializes the monitors library. You should call this before anything.
If NIL is returned, the initialisation failed and other library calls will most likely too.
low-level.lisp (file)
Attempts to make the given mode the current mode on its monitor.
If NIL is returned, the mode change failed. Otherwise the monitor’s
current mode is updated to reflect the newly chose none.
See MODE-STRUCT
See MONITOR-CURRENT-MODE
low-level.lisp (file)
Next: Exported conditions, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Returns whether the mode is the current mode of the monitor.
See MODE
wrapper.lisp (file)
Returns the height.
For a mode, this is in pixels.
For a monitor, this is in physical millimetres.
See MODE
See MONITOR
wrapper.lisp (file)
wrapper.lisp (file)
Returns the current mode of the monitor.
SETFable. When set with a suitable mode, it will attempt to switch
the current mode of the monitor to the new one.
Signals a MODE-SWITCH-FAILED-ERROR on failure.
See MODE
See MONITOR
(setf mode) (generic function)
automatically generated reader method
wrapper.lisp (file)
wrapper.lisp (file)
mode (generic function)
wrapper.lisp (file)
Returns the list of possible modes the monitor can assume.
A pox upon those that modify this list.
See MONITOR
automatically generated reader method
wrapper.lisp (file)
Returns the monitor the mode belongs to.
See MONITOR
See MODE
automatically generated reader method
wrapper.lisp (file)
Returns the monitor’s name on the system.
See MONITOR
wrapper.lisp (file)
Returns whether the monitor is the system’s primary monitor.
See MONITOR
wrapper.lisp (file)
Returns the mode’s refresh rate in Herz.
See MODE
wrapper.lisp (file)
Returns the width.
For a mode, this is in pixels.
For a monitor, this is in physical millimetres.
See MODE
See MONITOR
wrapper.lisp (file)
wrapper.lisp (file)
Next: Exported classes, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
Condition for when the monitor detection fails.
See DETECT
See MONITOR-CONDITION
wrapper.lisp (file)
Condition for when the monitor initialization fails.
See INIT
See MONITOR-CONDITION
wrapper.lisp (file)
Condition for when the mode switch call fails.
See MODE
See MONITOR-CONDITION
wrapper.lisp (file)
mode (method)
:mode
mode (generic function)
Base condition class for conditions relating to this library.
wrapper.lisp (file)
condition (condition)
Previous: Exported conditions, Up: Exported definitions [Contents][Index]
Class representing a possible display mode of a monitor.
See MONITOR
See WIDTH
See HEIGHT
See REFRESH
See CURRENT-P
wrapper.lisp (file)
foreign-object (class)
:monitor
monitor (generic function)
Initarg | Value |
---|---|
:monitor | (error "monitor required.") |
CL type for the C mode struct.
See MODE-MONITOR
See MODE-WIDTH
See MODE-HEIGHT
See MODE-REFRESH
See MODE-DATA
low-level.lisp (file)
Class representing a physical monitor on the system.
See MODES
See MODE
See NAME
See PRIMARY-P
See WIDTH
See HEIGHT
wrapper.lisp (file)
foreign-object (class)
modes (generic function)
mode (generic function)
CL type for the C monitor struct.
See MONITOR-NAME
See MONITOR-PRIMARY
See MONITOR-WIDTH
See MONITOR-HEIGHT
See MONITOR-MODE-COUNT
See MONITOR-CURRENT-MODE
See MONITOR-MODES
See MONITOR-DATA
See MONITORS-FREE-MONITOR
low-level.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal macros | ||
• Internal generic functions | ||
• Internal classes |
Next: Internal macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
low-level.lisp (file)
Next: Internal generic functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
wrapper.lisp (file)
Next: Internal classes, Previous: Internal macros, Up: Internal definitions [Contents][Index]
automatically generated reader method
wrapper.lisp (file)
Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
wrapper.lisp (file)
standard-object (class)
pointer (method)
:pointer
pointer (generic function)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
C D F G H I M N P R W |
---|
Jump to: | (
C D F G H I M N P R W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
M P S |
---|
Jump to: | *
M P S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C D F I M P S |
---|
Jump to: | C D F I M P S |
---|