sashakoshka
a6e4ed9934
Rename unicode.go to encoding.go
2022-11-25 13:35:11 -05:00
sashakoshka
9d2872f256
Support mode shift modifier
...
The code has also been reorganized and cleaned up a bit, with more
comments added.
2022-11-25 13:33:28 -05:00
sashakoshka
e588d7d791
Modifier states returned from x backend should be 100% correct now
2022-11-24 22:16:22 -05:00
sashakoshka
941a78eaf1
THE DRAGON HAS BEEN SLAIN
...
Numlock is fully supported, as well as shift lock. Of course, I
cannot properly test shift lock or caps lock because I have neither
of those things, but I assume they work as well as num lock does.
2022-11-24 22:02:32 -05:00
sashakoshka
33ed2af075
We now take into account keypad keys
...
However, num lock is not accounted for. This still needs to be
implemented.
2022-11-24 18:20:47 -05:00
sashakoshka
5a76bd0c22
Fix bug with keyboard input
2022-11-23 20:34:05 -05:00
sashakoshka
9a37fbf04a
Updated examples and added more documentation
2022-11-19 18:00:47 -05:00
sashakoshka
9a8bb85afc
Replaced orange with a dim/grey color
2022-11-18 19:46:50 -05:00
sashakoshka
f55f98651f
It needed more blackjack and hookers to work correctly
2022-11-17 23:16:47 -05:00
sashakoshka
3cb0ac64fc
I made my own draw method with blackjack and hookers
2022-11-17 21:19:23 -05:00
sashakoshka
75200a7310
Mouse scroll events are properly compressed and summed up
2022-11-17 19:23:39 -05:00
sashakoshka
c57c8acba7
Changed the API for scrolling
2022-11-17 19:11:49 -05:00
sashakoshka
43696543d8
Compress motion notify events
2022-11-17 19:01:16 -05:00
sashakoshka
d6280a0d28
Added two new styles (although no style has been implemented)
2022-11-17 11:25:27 -05:00
sashakoshka
51fbd8acef
Added more efficient damage buffer method
2022-11-17 00:26:28 -05:00
sashakoshka
754017a2db
Added Buffer interface, and clear method
2022-11-16 21:20:48 -05:00
sashakoshka
0ee58d22f6
Made centering the buffer in the window optional
...
It causes jitter while resizing in floating wms
2022-11-16 11:31:35 -05:00
sashakoshka
81a0c60943
Added simpler method of detecting window bounds change on draw
2022-11-16 11:14:30 -05:00
sashakoshka
cab280a371
Removed the need for a quit handler
2022-11-16 11:08:30 -05:00
sashakoshka
e030f8632b
Overhauled event system
2022-11-16 00:29:23 -05:00
sashakoshka
3a3fb66db8
Buffer is thread safe
2022-11-15 17:45:48 -05:00
sashakoshka
85994112cf
Made buffer's dot private
2022-11-15 17:41:08 -05:00
sashakoshka
77cf88b856
There is only one type of buffer now
2022-11-15 17:36:41 -05:00
sashakoshka
abc9945ea1
Configuration values are now loaded from files
...
Stone will load from /etc/stone/stone.conf and ~/.config/stone/stone.conf
2022-11-15 13:43:21 -05:00
sashakoshka
02d010818f
Fix possible segfault in X backend
2022-11-15 11:40:10 -05:00
sashakoshka
1eceb53b94
Added fun color example
2022-11-15 11:29:45 -05:00
sashakoshka
de3e4b528b
Redid color system
2022-11-15 11:16:29 -05:00
sashakoshka
100e72fada
Added license
2022-11-15 00:27:30 -05:00
sashakoshka
c0d85cda5b
Added documentation
2022-11-15 00:22:01 -05:00
sashakoshka
6b251e6fee
Position buffer in center of screen
2022-11-14 23:38:41 -05:00
sashakoshka
79d8891c5b
Added some stuff to draw debug bounding boxes
2022-11-14 23:32:05 -05:00
sashakoshka
d9c9895e82
Fixed mouse buttons
2022-11-14 23:17:10 -05:00
sashakoshka
1d71df180d
Changed how buttons are stored in press and release events
2022-11-14 23:15:21 -05:00
sashakoshka
b816a4abf5
Added a Printable method to button
2022-11-14 23:09:31 -05:00
sashakoshka
c6c7383ef2
Fixed advance keycode translation
2022-11-14 22:58:44 -05:00
sashakoshka
84cd21b16d
Added untested advanced keycode translation
2022-11-14 22:33:46 -05:00
sashakoshka
820c7d4f6a
Made separate function for converting keycode to keysym
2022-11-14 15:58:34 -05:00
sashakoshka
aee4158d2d
Added keyboard input
2022-11-13 23:47:35 -05:00
sashakoshka
82caf1efd8
Split X backend into multiple files
2022-11-13 22:44:19 -05:00
sashakoshka
872b36d172
Added text input example (non-working)
2022-11-13 22:28:44 -05:00
sashakoshka
7dde0ad5a3
Redid button codes
2022-11-13 17:35:37 -05:00
sashakoshka
5a0e0cd49b
Set minimum window dimensions
2022-11-13 15:39:33 -05:00
sashakoshka
636e5ce7e7
Sus. Sus amongus.
...
amoogoos.
2022-11-12 22:43:36 -05:00
sashakoshka
a68790d342
Merge branch 'x-backend' of git.tebibyte.media:sashakoshka/stone into x-backend
2022-11-12 19:04:37 -05:00
sashakoshka
48510db209
Added mouse button press input
2022-11-12 19:02:24 -05:00
sashakoshka
47ee6545cb
X backend only sends what it needs to
2022-11-11 23:46:46 -05:00
sashakoshka
e4f97a918a
Application must now manually call application.Draw in all cases
...
This behavior is way more consistent, and it makes the drawing code
a bit simpler.
2022-11-11 23:24:20 -05:00
sashakoshka
c865f7146a
Buffer is now reallocated on window size change
2022-11-11 22:46:07 -05:00
sashakoshka
05c448f058
Applications can now manually call a screen redraw in a way that I think is thread safe
2022-11-11 22:30:59 -05:00
sashakoshka
ea32b7899b
Remove pixel backend
2022-11-11 20:27:51 -05:00
sashakoshka
38f7185be2
Draw the actual buffer text on screen
2022-11-11 18:14:43 -05:00
sashakoshka
85b6e5495e
Fonts now render properly with a baseline and all that
2022-11-11 17:25:17 -05:00
sashakoshka
8ef81ecc7f
Implemented some shape drawing functions to debug character positioning
2022-11-11 15:20:52 -05:00
sashakoshka
cc498fa89c
Find and load any font
2022-11-11 15:01:36 -05:00
sashakoshka
ed5c6829d4
Remove fakeImage struct and replace with image.Uniform
2022-11-11 14:51:08 -05:00
sashakoshka
93b02b4628
We have text
2022-11-10 21:32:02 -05:00
sashakoshka
d26845a4d6
Draw background color in window
2022-11-10 20:43:27 -05:00
sashakoshka
1afbcdb6bc
Load an actual font
2022-11-10 12:38:02 -05:00
sashakoshka
23a04a9cdb
Added icon setting
2022-11-10 02:02:08 -05:00
sashakoshka
4536932dde
Resize canvas when the window is resized
2022-11-10 01:00:47 -05:00
sashakoshka
f807c8df35
Handle actual X events
2022-11-09 22:33:18 -05:00
sashakoshka
01f43a03a4
A canvas is now created
2022-11-09 19:07:40 -05:00
sashakoshka
c93ca17fe5
x backend has an event loop
2022-11-09 18:53:14 -05:00
sashakoshka
0c5118b59a
Added X backend stub
2022-11-09 15:52:49 -05:00
sashakoshka
e7b5136ea6
Return channel from run method
2022-11-09 01:18:56 -05:00
sashakoshka
11bdae78a0
Add icon setter to backend
2022-11-09 01:13:44 -05:00
sashakoshka
60269d554c
Updated backend interface to use new event interface
2022-11-09 01:12:55 -05:00
sashakoshka
b60d7518e0
Add new event interface
2022-11-09 01:12:47 -05:00
sashakoshka
3456d4e862
Got rid of old event getters
2022-11-09 01:04:53 -05:00
sashakoshka
7a6be48cb8
Added some documentation
2022-11-09 01:01:13 -05:00
sashakoshka
509c6f0bc6
Characters are now rendered with their proper descent
2022-11-06 16:35:16 -05:00
sashakoshka
3a879d9a5f
Mouse input works
2022-11-06 15:59:06 -05:00
sashakoshka
f3d0bad959
Create readme
2022-11-06 15:37:33 -05:00
sashakoshka
3abba9d69b
Don't even bother with text wrapping
...
This is a pretty useless feature, all things considered. It should
be the job of the application to figure that out.
2022-11-06 15:26:50 -05:00
sashakoshka
f98b551ba2
Added bounds checking to buffer
2022-11-06 15:25:55 -05:00
sashakoshka
ff7240d553
Pass keyboard events through application
2022-11-06 15:12:44 -05:00
sashakoshka
f6b8d9903b
Return err from Application.Run
2022-11-06 14:47:37 -05:00
sashakoshka
b773ba6fc6
Cells get cleared properly (lol)
2022-11-06 14:44:09 -05:00
sashakoshka
4b129a8391
Buffer, DamageBuffer, and Application are io.Writers
2022-11-06 14:17:43 -05:00
sashakoshka
18ea5681de
Buffer is now drawn in the screen center (similar to kitty)
2022-11-06 12:42:22 -05:00
sashakoshka
6e5cbd50f5
Fixed coordinate system
2022-11-05 18:56:56 -04:00
sashakoshka
d739c0a6ed
Cells are now drawn
2022-11-05 18:43:57 -04:00
sashakoshka
11cab091dc
Individually clear dirty cells
2022-11-05 18:08:00 -04:00
sashakoshka
e12fb3d7db
Window resizing
2022-11-02 18:51:33 -04:00
sashakoshka
fa72865465
Downgrade to go 1.18
2022-11-02 16:31:20 -04:00
sashakoshka
32e30440f7
Add input state queries
2022-11-02 15:14:59 -04:00
sashakoshka
ce6a108d27
input.go no longer depends on glfw
2022-11-02 15:14:26 -04:00
sashakoshka
fea20558ac
Initial commit
2022-10-31 15:51:28 -04:00