Fortran · 855 bytes Raw Blame History
1 module cursor_mod
2 use cell_mod
3 implicit none
4 private
5
6 public :: cursor_t
7 public :: CURSOR_BLOCK, CURSOR_UNDERLINE, CURSOR_BAR
8
9 ! Cursor styles
10 integer, parameter :: CURSOR_BLOCK = 0
11 integer, parameter :: CURSOR_UNDERLINE = 1
12 integer, parameter :: CURSOR_BAR = 2
13
14 type :: cursor_t
15 integer :: row = 1 ! Current row (1-indexed)
16 integer :: col = 1 ! Current column (1-indexed)
17 logical :: visible = .true. ! Cursor visibility
18 integer :: style = CURSOR_BLOCK ! Cursor style
19 logical :: blink = .true. ! Cursor blink enabled
20 type(color_t) :: fg ! Current foreground color for drawing
21 type(color_t) :: bg ! Current background color for drawing
22 integer :: attrs = 0 ! Current attributes for drawing
23 end type cursor_t
24
25 end module cursor_mod
26