The cl-monitors Reference Manual

This is the cl-monitors Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:28:43 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-monitors

Bindings to libmonitors, allowing the handling of monitors querying and resolution changing.

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://Shirakumo.github.io/cl-monitors/

Source Control

(GIT https://github.com/Shirakumo/cl-monitors.git)

Bug Tracker

https://github.com/Shirakumo/cl-monitors/issues

License

zlib

Version

1.0.0

Dependencies
  • cffi (system).
  • trivial-features (system).
  • trivial-garbage (system).
  • documentation-utils (system).
Source

cl-monitors.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-monitors/cl-monitors.asd

Source

cl-monitors.asd.

Parent Component

cl-monitors (system).

ASDF Systems

cl-monitors.


3.1.2 cl-monitors/package.lisp

Source

cl-monitors.asd.

Parent Component

cl-monitors (system).

Packages

3.1.3 cl-monitors/low-level.lisp

Dependency

package.lisp (file).

Source

cl-monitors.asd.

Parent Component

cl-monitors (system).

Public Interface
Internals

*here* (special variable).


3.1.4 cl-monitors/wrapper.lisp

Dependency

low-level.lisp (file).

Source

cl-monitors.asd.

Parent Component

cl-monitors (system).

Public Interface
Internals

3.1.5 cl-monitors/documentation.lisp

Dependency

wrapper.lisp (file).

Source

cl-monitors.asd.

Parent Component

cl-monitors (system).


4 Packages

Packages are listed by definition order.


4.1 cl-monitors-cffi

Source

package.lisp.

Nickname

org.shirakumo.fraf.monitors.cffi

Use List
  • cffi.
  • common-lisp.
Used By List

cl-monitors.

Public Interface
Internals

*here* (special variable).


4.2 cl-monitors

Source

package.lisp.

Nickname

org.shirakumo.fraf.monitors

Use List
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *static*

Variable containing a pathname to the static directory.

Package

cl-monitors-cffi.

Source

low-level.lisp.


5.1.2 Ordinary functions

Function: deinit ()

Cleans up the library.

You should call this once you are done with everything.

Package

cl-monitors.

Source

wrapper.lisp.

Function: detect ()

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

Package

cl-monitors.

Source

wrapper.lisp.

Function: init ()

Initializes the library.

You should call this before any other function to the library is called. Signals an INITIALIZATION-FAILED-ERROR on failure.

Package

cl-monitors.

Source

wrapper.lisp.

Function: make-current (mode)

Attempts to make the passed mode the current one.

This is equivalent to doing (SETF (MODE (MONITOR mode)) mode).

See MODE

Package

cl-monitors.

Source

wrapper.lisp.

Function: mode-data (pointer-to-mode-struct)

Reads the pointer to the system-dependant data struct of the mode.

You should not need this for anything.

See MODE-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf mode-data) (pointer-to-mode-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: mode-height (pointer-to-mode-struct)

Reads the mode’s height in pixels.

See MODE-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf mode-height) (pointer-to-mode-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: mode-monitor (pointer-to-mode-struct)

Reads the pointer to the monitor struct this mode originated from.

See MODE-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf mode-monitor) (pointer-to-mode-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: mode-refresh (pointer-to-mode-struct)

Reads the mode’s refresh rate in Herz.

See MODE-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf mode-refresh) (pointer-to-mode-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: mode-width (pointer-to-mode-struct)

Reads the mode’s width in pixels.

See MODE-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf mode-width) (pointer-to-mode-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-current-mode (pointer-to-monitor-struct)

Reads the pointer to the current mode of the monitor.

See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-current-mode) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-data (pointer-to-monitor-struct)

Reads the pointer to the system-dependant data struct of the monitor.

You should not need this for anything.

See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-data) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-height (pointer-to-monitor-struct)

Reads the monitor’s physical height in millimetres.

See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-height) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-mode-count (pointer-to-monitor-struct)

Reads the count for how many mode structs there are in the mode field of the monitor.

See MONITOR-MODES
See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-mode-count) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-modes (pointer-to-monitor-struct)

Reads the pointer to the packed mode struct array of the monitor.

See MONITOR-MODE-COUNT
See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-modes) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-name (pointer-to-monitor-struct)

Reads the monitor’s name string.

See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-name) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-primary (pointer-to-monitor-struct)

Reads whether the monitor is the primary monitor of the system.

See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-primary) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitor-width (pointer-to-monitor-struct)

Reads the monitor’s physical width in millimetres.

See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: (setf monitor-width) (pointer-to-monitor-struct)
Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitors-deinit ()

Cleans up the monitors library. You should call this once you are done with everything.

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitors-detect (count monitors)

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

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitors-free-monitor (monitor)

Frees a monitor struct.

See MONITOR-STRUCT

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitors-free-monitors (count monitors)

Frees an array of pointers to monitor objects, including the monitors referenced by it.

See MONITORS-FREE-MONITOR

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitors-init ()

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.

Package

cl-monitors-cffi.

Source

low-level.lisp.

Function: monitors-make-mode-current (mode)

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

Package

cl-monitors-cffi.

Source

low-level.lisp.


5.1.3 Generic functions

Generic Function: current-p (mode)

Returns whether the mode is the current mode of the monitor.

See MODE

Package

cl-monitors.

Methods
Method: current-p ((mode mode))
Source

wrapper.lisp.

Generic Function: height (mode)

Returns the height.

For a mode, this is in pixels.
For a monitor, this is in physical millimetres.

See MODE
See MONITOR

Package

cl-monitors.

Methods
Method: height ((monitor monitor))
Source

wrapper.lisp.

Method: height ((mode mode))
Source

wrapper.lisp.

Generic Reader: mode (condition)

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

Package

cl-monitors.

Methods
Reader Method: mode ((monitor monitor))

automatically generated reader method

Source

wrapper.lisp.

Target Slot

mode.

Reader Method: mode ((condition mode-switch-failed-error))
Source

wrapper.lisp.

Target Slot

mode.

Generic Function: (setf mode) (monitor)
Package

cl-monitors.

Methods
Method: (setf mode) ((monitor monitor))
Source

wrapper.lisp.

Generic Reader: modes (object)

Returns the list of possible modes the monitor can assume.

A pox upon those that modify this list.

See MONITOR

Package

cl-monitors.

Methods
Reader Method: modes ((monitor monitor))

automatically generated reader method

Source

wrapper.lisp.

Target Slot

modes.

Generic Reader: monitor (object)

Returns the monitor the mode belongs to.

See MONITOR
See MODE

Package

cl-monitors.

Methods
Reader Method: monitor ((mode mode))

automatically generated reader method

Source

wrapper.lisp.

Target Slot

monitor.

Generic Function: name (monitor)

Returns the monitor’s name on the system.

See MONITOR

Package

cl-monitors.

Methods
Method: name ((monitor monitor))
Source

wrapper.lisp.

Generic Function: primary-p (monitor)

Returns whether the monitor is the system’s primary monitor.

See MONITOR

Package

cl-monitors.

Methods
Method: primary-p ((monitor monitor))
Source

wrapper.lisp.

Generic Function: refresh (mode)

Returns the mode’s refresh rate in Herz.

See MODE

Package

cl-monitors.

Methods
Method: refresh ((mode mode))
Source

wrapper.lisp.

Generic Function: width (mode)

Returns the width.

For a mode, this is in pixels.
For a monitor, this is in physical millimetres.

See MODE
See MONITOR

Package

cl-monitors.

Methods
Method: width ((monitor monitor))
Source

wrapper.lisp.

Method: width ((mode mode))
Source

wrapper.lisp.


5.1.4 Standalone methods

Method: initialize-instance :after ((monitor monitor) &key pointer)
Source

wrapper.lisp.

Method: print-object ((mode mode) stream)
Source

wrapper.lisp.

Method: print-object ((monitor monitor) stream)
Source

wrapper.lisp.


5.1.5 Conditions

Condition: detection-failed-error

Condition for when the monitor detection fails.

See DETECT
See MONITOR-CONDITION

Package

cl-monitors.

Source

wrapper.lisp.

Direct superclasses
Condition: initialization-failed-error

Condition for when the monitor initialization fails.

See INIT
See MONITOR-CONDITION

Package

cl-monitors.

Source

wrapper.lisp.

Direct superclasses
Condition: mode-switch-failed-error

Condition for when the mode switch call fails.

See MODE
See MONITOR-CONDITION

Package

cl-monitors.

Source

wrapper.lisp.

Direct superclasses
Direct methods

mode.

Direct slots
Slot: mode
Initargs

:mode

Readers

mode.

Writers

This slot is read-only.

Condition: monitor-condition

Base condition class for conditions relating to this library.

Package

cl-monitors.

Source

wrapper.lisp.

Direct superclasses

condition.

Direct subclasses

5.1.6 Classes

Class: mode

Class representing a possible display mode of a monitor.

See MONITOR
See WIDTH
See HEIGHT
See REFRESH
See CURRENT-P

Package

cl-monitors.

Source

wrapper.lisp.

Direct superclasses

foreign-object.

Direct methods
Direct Default Initargs
InitargValue
:monitor(error monitor required.)
Direct slots
Slot: monitor
Initargs

:monitor

Readers

monitor.

Writers

This slot is read-only.

Class: mode-struct

CL type for the C mode struct.

See MODE-MONITOR
See MODE-WIDTH
See MODE-HEIGHT
See MODE-REFRESH
See MODE-DATA

Package

cl-monitors-cffi.

Source

low-level.lisp.

Direct superclasses
  • foreign-struct-type.
  • translatable-foreign-type.
Class: monitor

Class representing a physical monitor on the system.

See MODES
See MODE
See NAME
See PRIMARY-P
See WIDTH
See HEIGHT

Package

cl-monitors.

Source

wrapper.lisp.

Direct superclasses

foreign-object.

Direct methods
Direct slots
Slot: modes
Readers

modes.

Writers

This slot is read-only.

Slot: mode
Readers

mode.

Writers

This slot is read-only.

Class: monitor-struct

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

Package

cl-monitors-cffi.

Source

low-level.lisp.

Direct superclasses
  • foreign-struct-type.
  • translatable-foreign-type.

5.2 Internals


5.2.1 Special variables

Special Variable: *here*
Package

cl-monitors-cffi.

Source

low-level.lisp.


5.2.2 Macros

Macro: define-foreign-reader ((name internal-name) (class))
Package

cl-monitors.

Source

wrapper.lisp.


5.2.3 Generic functions

Generic Reader: pointer (object)
Package

cl-monitors.

Methods
Reader Method: pointer ((foreign-object foreign-object))

automatically generated reader method

Source

wrapper.lisp.

Target Slot

pointer.


5.2.4 Classes

Class: foreign-object
Package

cl-monitors.

Source

wrapper.lisp.

Direct subclasses
Direct methods

pointer.

Direct slots
Slot: pointer
Initargs

:pointer

Readers

pointer.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   F   G   H   I   M   N   P   R   W  
Index Entry  Section

(
(setf mode): Public generic functions
(setf mode): Public generic functions
(setf mode-data): Public ordinary functions
(setf mode-height): Public ordinary functions
(setf mode-monitor): Public ordinary functions
(setf mode-refresh): Public ordinary functions
(setf mode-width): Public ordinary functions
(setf monitor-current-mode): Public ordinary functions
(setf monitor-data): Public ordinary functions
(setf monitor-height): Public ordinary functions
(setf monitor-mode-count): Public ordinary functions
(setf monitor-modes): Public ordinary functions
(setf monitor-name): Public ordinary functions
(setf monitor-primary): Public ordinary functions
(setf monitor-width): Public ordinary functions

C
current-p: Public generic functions
current-p: Public generic functions

D
define-foreign-reader: Private macros
deinit: Public ordinary functions
detect: Public ordinary functions

F
Function, (setf mode-data): Public ordinary functions
Function, (setf mode-height): Public ordinary functions
Function, (setf mode-monitor): Public ordinary functions
Function, (setf mode-refresh): Public ordinary functions
Function, (setf mode-width): Public ordinary functions
Function, (setf monitor-current-mode): Public ordinary functions
Function, (setf monitor-data): Public ordinary functions
Function, (setf monitor-height): Public ordinary functions
Function, (setf monitor-mode-count): Public ordinary functions
Function, (setf monitor-modes): Public ordinary functions
Function, (setf monitor-name): Public ordinary functions
Function, (setf monitor-primary): Public ordinary functions
Function, (setf monitor-width): Public ordinary functions
Function, deinit: Public ordinary functions
Function, detect: Public ordinary functions
Function, init: Public ordinary functions
Function, make-current: Public ordinary functions
Function, mode-data: Public ordinary functions
Function, mode-height: Public ordinary functions
Function, mode-monitor: Public ordinary functions
Function, mode-refresh: Public ordinary functions
Function, mode-width: Public ordinary functions
Function, monitor-current-mode: Public ordinary functions
Function, monitor-data: Public ordinary functions
Function, monitor-height: Public ordinary functions
Function, monitor-mode-count: Public ordinary functions
Function, monitor-modes: Public ordinary functions
Function, monitor-name: Public ordinary functions
Function, monitor-primary: Public ordinary functions
Function, monitor-width: Public ordinary functions
Function, monitors-deinit: Public ordinary functions
Function, monitors-detect: Public ordinary functions
Function, monitors-free-monitor: Public ordinary functions
Function, monitors-free-monitors: Public ordinary functions
Function, monitors-init: Public ordinary functions
Function, monitors-make-mode-current: Public ordinary functions

G
Generic Function, (setf mode): Public generic functions
Generic Function, current-p: Public generic functions
Generic Function, height: Public generic functions
Generic Function, mode: Public generic functions
Generic Function, modes: Public generic functions
Generic Function, monitor: Public generic functions
Generic Function, name: Public generic functions
Generic Function, pointer: Private generic functions
Generic Function, primary-p: Public generic functions
Generic Function, refresh: Public generic functions
Generic Function, width: Public generic functions

H
height: Public generic functions
height: Public generic functions
height: Public generic functions

I
init: Public ordinary functions
initialize-instance: Public standalone methods

M
Macro, define-foreign-reader: Private macros
make-current: Public ordinary functions
Method, (setf mode): Public generic functions
Method, current-p: Public generic functions
Method, height: Public generic functions
Method, height: Public generic functions
Method, initialize-instance: Public standalone methods
Method, mode: Public generic functions
Method, mode: Public generic functions
Method, modes: Public generic functions
Method, monitor: Public generic functions
Method, name: Public generic functions
Method, pointer: Private generic functions
Method, primary-p: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, refresh: Public generic functions
Method, width: Public generic functions
Method, width: Public generic functions
mode: Public generic functions
mode: Public generic functions
mode: Public generic functions
mode-data: Public ordinary functions
mode-height: Public ordinary functions
mode-monitor: Public ordinary functions
mode-refresh: Public ordinary functions
mode-width: Public ordinary functions
modes: Public generic functions
modes: Public generic functions
monitor: Public generic functions
monitor: Public generic functions
monitor-current-mode: Public ordinary functions
monitor-data: Public ordinary functions
monitor-height: Public ordinary functions
monitor-mode-count: Public ordinary functions
monitor-modes: Public ordinary functions
monitor-name: Public ordinary functions
monitor-primary: Public ordinary functions
monitor-width: Public ordinary functions
monitors-deinit: Public ordinary functions
monitors-detect: Public ordinary functions
monitors-free-monitor: Public ordinary functions
monitors-free-monitors: Public ordinary functions
monitors-init: Public ordinary functions
monitors-make-mode-current: Public ordinary functions

N
name: Public generic functions
name: Public generic functions

P
pointer: Private generic functions
pointer: Private generic functions
primary-p: Public generic functions
primary-p: Public generic functions
print-object: Public standalone methods
print-object: Public standalone methods

R
refresh: Public generic functions
refresh: Public generic functions

W
width: Public generic functions
width: Public generic functions
width: Public generic functions


A.4 Data types

Jump to:   C   D   F   I   L   M   P   S   W  
Index Entry  Section

C
cl-monitors: The cl-monitors system
cl-monitors: The cl-monitors package
cl-monitors-cffi: The cl-monitors-cffi package
cl-monitors.asd: The cl-monitors/cl-monitors․asd file
Class, foreign-object: Private classes
Class, mode: Public classes
Class, mode-struct: Public classes
Class, monitor: Public classes
Class, monitor-struct: Public classes
Condition, detection-failed-error: Public conditions
Condition, initialization-failed-error: Public conditions
Condition, mode-switch-failed-error: Public conditions
Condition, monitor-condition: Public conditions

D
detection-failed-error: Public conditions
documentation.lisp: The cl-monitors/documentation․lisp file

F
File, cl-monitors.asd: The cl-monitors/cl-monitors․asd file
File, documentation.lisp: The cl-monitors/documentation․lisp file
File, low-level.lisp: The cl-monitors/low-level․lisp file
File, package.lisp: The cl-monitors/package․lisp file
File, wrapper.lisp: The cl-monitors/wrapper․lisp file
foreign-object: Private classes

I
initialization-failed-error: Public conditions

L
low-level.lisp: The cl-monitors/low-level․lisp file

M
mode: Public classes
mode-struct: Public classes
mode-switch-failed-error: Public conditions
monitor: Public classes
monitor-condition: Public conditions
monitor-struct: Public classes

P
Package, cl-monitors: The cl-monitors package
Package, cl-monitors-cffi: The cl-monitors-cffi package
package.lisp: The cl-monitors/package․lisp file

S
System, cl-monitors: The cl-monitors system

W
wrapper.lisp: The cl-monitors/wrapper․lisp file