Commit graph

75 commits

Author SHA1 Message Date
Vidar Hokstad
da2fe51596 Cleanups, more automated lookups of atoms to avoid needing to dereference constants.
More constants and requestsm including SendEvent, and
a helper for ClientMessage, w/example
2024-01-11 19:24:49 +00:00
Vidar Hokstad
5f3aca393e Switch to threaded model to make the async model easier to work with
Also keeping request objects around and matching them to error
objects to ease debugging, and more debug output when
PUREX_DEBUG env var is set
2024-01-11 19:22:43 +00:00
Vidar Hokstad
0272848944 Make sure exceptions during connection aren't papered over any more. 2024-01-11 19:18:45 +00:00
Vidar Hokstad
7f7db9f571 Debug flag if PUREX_DEBUG env var is set 2024-01-11 19:18:04 +00:00
Vidar Hokstad
04a7851a65 Minor cleanups 2024-01-11 19:17:35 +00:00
Vidar Hokstad
6256db9692 Bumped version 2023-12-28 17:20:54 +00:00
Vidar Hokstad
82de9c1249 Ignore bundle 2023-12-28 17:20:07 +00:00
Vidar Hokstad
e52fb412ee Cleanups 2023-12-28 17:19:08 +00:00
Vidar Hokstad
d7029c2441 Support for symbols instead of constants is now handled directly in the type classes, so has been addressed. 2023-12-28 17:18:27 +00:00
Vidar Hokstad
1e241f35c9 Cleanups 2023-12-28 17:17:22 +00:00
Vidar Hokstad
cfff274350 Less magic in type class construction. 2023-12-28 17:17:10 +00:00
Vidar Hokstad
d28ebf0b3c Bumped version 2023-12-16 14:50:05 +00:00
Vidar Hokstad
e5b672673c Extensive increase in number of requests and events supported. 2023-12-16 14:49:10 +00:00
Vidar Hokstad
370ac3e367 Make example program work with newest interation. 2023-12-16 14:46:16 +00:00
Vidar Hokstad
4ad8687a0a Bumped version 2023-11-21 20:14:49 +00:00
Vidar Hokstad
c08910d0c9 Removed unusued OpenStruct require 2023-11-21 20:13:11 +00:00
Vidar Hokstad
2c1bb45781 More resilient auth 2023-11-21 20:12:59 +00:00
Vidar Hokstad
a5ca257272 Added significant number of new request types. 2023-11-21 20:12:51 +00:00
Vidar Hokstad
3dd9f85468 Updated README 2023-09-25 20:35:47 +01:00
Vidar Hokstad
1af9524748 This example is still awful and messy, but it's better than what was there... Needs chunky_png and skrift gem's installed 2023-09-25 19:06:55 +01:00
Vidar Hokstad
2d820a5600 Started bringing tests up to date 2023-09-25 19:00:56 +01:00
Vidar Hokstad
84f4f37258 Updated Gem set 2023-09-25 18:59:56 +01:00
Vidar Hokstad
799b9a9595 I've been unable to get hold of the previous author, so for the time
being at least I'm pushing this to Rubygems.org as pure-x11.
2023-09-25 18:56:11 +01:00
Vidar Hokstad
3fa4211f06 Added significant number of X requests and event types, and a bunch of convenience functions.
This is still "rough", but it works.
2023-09-25 18:55:00 +01:00
Vidar Hokstad
10d3b63c06 We don't actually use Activsupport or hexdump 2023-09-25 18:52:19 +01:00
Vidar Hokstad
d977805fb0 Initial keysym mapping 2023-09-15 10:54:52 +01:00
Vidar Hokstad
9119b4062c Added PutImage support and a test 2023-08-08 21:43:27 +01:00
Vidar Hokstad
4e08564800 Handle the following requests:
CreateWindow, MapWindow, OpenFont, ListFonts, CreateGC, ChangeGC,
ClearArea, PolyFillRectangle, ImageText8

Parse the following Events:
Expose, MapNotify, ConfigureNotify

Added example script
2023-08-01 20:18:32 +01:00
Vidar Hokstad
e13df2a2c4 Helpers to access root window. 2023-08-01 20:16:22 +01:00
Vidar Hokstad
80fad9a8f9 Added support for some of the weirder requests by adding unpadded String8.
Properly handle Bool
2023-08-01 20:16:11 +01:00
Vidar Hokstad
94301fde33 More flexible protocol API 2023-08-01 20:15:18 +01:00
Vidar Hokstad
b11184b8f5 Improved authentication resilience 2023-08-01 20:14:47 +01:00
Vidar Hokstad
5bb377937f More resilient handling of display settings. 2023-08-01 20:14:05 +01:00
Vidar Hokstad
c5f8743089 Bumped bundle 2023-08-01 20:13:37 +01:00
Vidar Hokstad
8efdc3cff0 Handle "unused" type 2021-09-23 19:24:25 +01:00
Vidar Hokstad
ad16950b18 Missing require 2021-09-23 19:24:14 +01:00
Vidar Hokstad
8023e81c24 Use current Form module instead of obsolete Packet module; better error handling 2021-09-23 19:24:05 +01:00
Vidar Hokstad
09266ec3a2 Correct ~/.Xauthority name 2021-09-23 19:23:34 +01:00
Vidar Hokstad
2fb378f1ff Fix include to match updates names 2021-09-23 19:23:16 +01:00
Vidar Hokstad
589afda917 Valid gemspec 2021-09-23 19:22:33 +01:00
Vidar Hokstad
9f7a3456e1 Updated Gem set 2021-09-23 19:21:25 +01:00
Vidar Hokstad
600fcf975c Fix Gemfile to work w/renamed activesupport gem and https 2021-09-23 19:21:02 +01:00
Richard Ramsden
fcd057fd4b Add development group to Gemfile 2012-05-20 17:36:41 -07:00
Richard Ramsden
ad10e78306 Major refactor of packet builder
I decided to ditch the Packet class name and go with a Form module
that contains a BaseForm which child classes inherit from.

I've created a few tests so you can see how the BaseForm class
works and how packets can be read and sent over a socket to
an X11 server
2012-05-20 17:36:18 -07:00
Richard Ramsden
a503b8391e add method to give unique ids for x11 resources
X11 Protocol expects clients to track unique identifiers in order to reduce 
network traffic. This reduces network traffic because when you create a new
resource say a window the X11 server doesn't have to reply with the ID
of the newly created resource. This makes the X11 protocol extremely fast
since most requests the server doesn't need to reply to a message.

In the first packet returned from X11 they give you a 
resource-id-mask and a resource-id-base. You can use these values to
generate a unique id for X11.
2012-05-19 15:47:50 -07:00
Richard Ramsden
1dafc7ee61 add opcode field to packets
X11 requests must contain an opcode field
to be sent so the X11 server can identify
the request
2012-05-19 13:17:16 -07:00
Richard Ramsden
23fa93fa24 remove old test 2012-05-19 13:15:58 -07:00
Richard Ramsden
736e4d179b use OpenStruct instead of returning a hash value
When we created a Packet object before using
Packet.read would return a hash. Instead, return
an OpenStruct object which makes accessing
parameters easier
2012-05-19 13:14:47 -07:00
Richard Ramsden
13f78a85a0 pretty print display class 2012-05-19 12:03:23 -07:00
Richard Ramsden
1bb7cc9f6b add more types 2012-05-19 11:59:21 -07:00