Commit Graph

136 Commits

Author SHA1 Message Date
latentprion ead7d8ff5f Add findxwindow script 2025-07-21 23:24:53 -04:00
hayodea 9cc7a6685c Build: Add -Woverride with AM_INIT_AUTOMAKE 2025-01-31 14:45:52 -04:00
hayodea 8237cd62da xcbXorg: Rename api tag to "xcb", instead of "xcb-xorg" v0.00.003 2025-01-14 23:39:22 -04:00
hayodea 181759ff26 Docs:xcbXorg: Document apiParams, providerParams and devSelector
Add documentation that explains how to construct a devSpec for matching
and attaching windows from Xorg using the xcbXorg sense API lib.
2025-01-14 23:29:26 -04:00
hayodea 7b79636681 devSpec:yacc: Put param after params 2025-01-14 23:14:19 -04:00
hayodea 4dee8c62c9 devSpec:yacc: We now print out the current lex token string
We used some preprocessor logic to enable access to yytext and now
we can have verbose, useful error messages from the parser :)
2025-01-14 23:13:02 -04:00
hayodea 9a9f5058ed devSpec: allow backslash escaped whitespace in STRING tokens
This allows us to use spaces when specifying window name selectors.
Which is very convenient and cool.
2025-01-14 23:11:30 -04:00
hayodea ff56bfce04 xcbXorg: Indentation 2025-01-14 21:12:41 -04:00
hayodea 098b79b331 xcbXorg: Add new param keys: devsubstring, devstring
* devsubstring: substring match on window name.
* devstring: exact match on window name
2025-01-14 21:11:47 -04:00
hayodea 20154d1e95 xcbXorg: Use apiParams to choose match method for window attachment
We now use param keys in the API params to choose what type of ID
the deviceSelector holds, and how to match it.

* dev-id/devid: matches by ID.
* dev-substr/dev-substring/devsubstr: Matches window name by substring.
* dev-string/devstr/dev-str: matches window name by exact whole string.
2025-01-14 20:59:28 -04:00
hayodea 64baa7906b xcbXorg: Implement window search by ID and name
The name search doesn't quite seem to work, but we captured all 4
of our regularly active windows (including the browser!!!) using
window IDs.
2025-01-14 20:22:12 -04:00
hayodea d31530e0bd xcbXorg: indentation 2025-01-14 17:01:16 -04:00
hayodea a80db04dac xcbXorg: Replace display+screen with XConnectionIdentifier 2025-01-14 16:58:22 -04:00
hayodea 0a6f7feeca xcbXorg: Now properly connects to requested display *AND* screen
We append the desired screen number to the connection string.
2025-01-14 16:50:37 -04:00
hayodea 091d7ceeba xcbXorg: Parse devSpec params, connect to Xorg displays
This patch adds some nicely weighty code for connecting to X displays
and managing those connections. Attaching devices will automatically
connect to their required X display. Removing all devices dependent
on a given X display connection will also disconnect from that
Xdisplay.
2025-01-14 14:17:05 -04:00
hayodea cfdeb17639 SenseApiMgr: Add doxygen comment explaining the lib search priorities 2025-01-14 14:17:05 -04:00
hayodea aaae3dcbb2 DevSpec: Grammar now parses params as key[=[val]]
* Updated docs to reflect this.
* This was important in allowing us to write the xcbXorg connection
 code.
2025-01-14 14:17:05 -04:00
hayodea 4eb0ef75bc DevSpec: Yacc: Silence unused warning about yyunput() 2025-01-13 22:01:17 -04:00
hayodea 09caf314f1 Eliminate the C FFI; Namespace lib API and DeviceManager
We decided to get rid of the C FFI for libs. It was becoming too intricate
and complicated. It was becoming a technical burden and expanding into
too much extra code. It's unfortunate, but we'll have to give up on getting
out-of-tree hot-loadable libraries the easy way.

It's possible to still do it with cross compilation or by keeping track
of the libstdc++ version that the running harikoff binary was compiled
against. Then we can ensure that our loadable lib code is linked against
that same libstdc++ code and this should ensure ABI stability.
2025-01-13 21:57:11 -04:00
hayodea a4f96c8dfa Senselib FFI: Use devDesc object in SenseApiLib, also add per-device metadata to xcbXorg
We also had to write conversion constructors and so on to CSenseDeviceDesc.
The technical debt that's being piled up from this C FFI is excessive.
I think we'll end it here. API Libs will have to be written in C++
from now on. API Lib interfaces will be in C++.

We'll use cross compilers to ensure stability for out-of-tree lib
development.
2025-01-13 11:53:38 -04:00
hayodea 660f0f0e73 DevMgr: Make vectors hold sh_ptr and not uniq_ptr
This allows us to mirror the contents of the two lists into the unified
list much more easily.
2025-01-13 08:02:59 -04:00
hayodea edf51a4441 DevSpecp.yy: Fix mirror list use of std::move()d objects
We were building a list of mirrored items filled with the memory
pointed to by unique_ptrs which had already been std::move()d into
other unique_ptrs.
2025-01-13 07:06:28 -04:00
hayodea 8e94e829d0 SenseDevSpec: add NULL checks stringify, ostream::<< 2025-01-13 07:05:05 -04:00
hayodea 3f9b406fb2 Build: handle "" enableval in --enable-senseapi-xcbxorg 2025-01-12 14:36:27 -04:00
hayodea 0a36f7d370 Build: Add XCB_LIBS; Skeleton: mlo_initializeInd, mlo_attachDeviceReq
* Renamed some of the Sense API lib classes
  (CSensorDeviceDesc=>CSenseDeviceDesc,
  SensorDeviceDesc=>SenseDeviceDesc).
* Moved SenseApiDesc into /include/user/senseApiDesc.
* Add conversion constructor to convert from SenseDeviceDesc
  to
* Wireframe mlo_initializeInd to call xcb_connect().
* Add $(XCB_LIBS) to libxcbXorg_LDFLAGS.
* Wireframe mlo_attachDeviceReq().
2025-01-12 14:31:33 -04:00
hayodea b85d6f76a6 SenseApiMgr: add initialize/finalizeAllSenseApiLibs()
Also, SenseApiDesc: initializeInd() now takes void. We no longer
try to pass a struct of marionette-role ops into the libs. We'll
be using message queueing for the handshake side of async calls now.
2025-01-12 09:44:49 -04:00
hayodea c8a7a6678f Fix annoying build warning 2025-01-12 09:44:08 -04:00
hayodea c6577b1155 Add stringifiers to SenseApi related classes 2025-01-11 06:40:43 -04:00
hayodea 8aa28a877e Marionette: Post initializeHarikoff() as a lambda 2025-01-11 06:19:11 -04:00
hayodea bffc32519b ComponentThreads: now basics are working.
Next step is to get the unified event loops working generically
and then we can begin region-splitting up the data in harikoff.

We'll assign all the global resource managers to Marionette and
then assign the Mind components to the respective component threads.
2025-01-11 04:35:11 -04:00
hayodea 876526364b Build: Added -Wall,extra,-pedantic, fixed warnings and peeves. 2025-01-10 18:27:10 -04:00
hayodea ce2d47e6b9 Build: formatting: add m4 quotes 2025-01-10 17:41:17 -04:00
hayodea 870b8de249 Marionette: Introduce concept and add other 3 component threads
We introduce the 4 main component threads of execution for Harikoff:
* Marionette: This is the resident hijacking module that makes Harikoff
  instances non-persons, if configured to allow hijacking.
* Director: :)
* Canvas: :)
* Subconscious: DB, storage and recall.
2025-01-10 17:37:49 -04:00
hayodea 4a9d2cb546 xcbXorg: Update initializationIndFn func prototype 2025-01-10 17:36:39 -04:00
hayodea c696db9e45 Build: Require Boost.Asio to be v1.69.0+ 2025-01-10 17:35:22 -04:00
hayodea d2d5b8960f Build: PRefix project link with http:// 2025-01-09 18:34:58 -04:00
hayodea 49d03df73b Build: Add AX_BOOST_[BASE/ASIO].m4, check for BOOST_ASIO 2025-01-09 18:21:21 -04:00
hayodea 9e35748d9a Rename Csal_lmo=>Csal_mlo, and introduce a Csal_mho role
* Introduce the hk end of the management role for the senseApiLibs.
* Implement a basic set of operations and callbacks for this role.
2025-01-09 17:18:24 -04:00
hayodea 53583e5735 SenseApiLib, SenseApiDesc improvements, new Sense API Mgmt Lib Ops role
SenseApiDesc:
* Use a number count for num exported implexor APIs instead of
  NULL-terminated list.
* Add sanity checker functions for structs.

SenseApiLib:
* Invoke the new sanity checkers on new Lib objects.
* SenseApiDesc is now a member object instead of being
  pointed to.

SenseApiManager:
* loadSenseApiLib now calls the SenseApiDesc getter function.
* loadSenseApiLib now fills out the SenseApiLib class object.

New Sense API Mgmt Sub-API:

This sub-api (metalanguage, some might call it) is used to initialize
the lib's connection to the provider. After this call, the lib should
be ready to attach new devices to its provider on behalf of Hk.
v0.00.002
2025-01-09 06:03:43 -04:00
hayodea 2a397ae064 Build: Check for libXCB when building XcbXorg sense API 2025-01-08 18:36:34 -04:00
hayodea 88df316013 build: Conditionally compile senseApis 2025-01-08 18:27:40 -04:00
hayodea 396bcefbf4 XcbXorg: Fill in correct placeholder implexor algo name 2025-01-08 18:00:07 -04:00
hayodea 62db724246 senseApiMgr: Fix formatting 2025-01-08 17:58:08 -04:00
hayodea bbbd6c36cd Release: Tagging v0.00.002:
* Loadable sense API libraries.
2025-01-08 17:34:33 -04:00
hayodea d14cef5328 Move senseApi libs into their own outer subdir 2025-01-08 17:28:21 -04:00
hayodea 988e84a545 Pretty up exception message 2025-01-08 15:09:18 -04:00
hayodea 4f2fbaa255 Fix NULL ptr use from dlerror() 2025-01-08 15:08:51 -04:00
hayodea 01ddb6d842 Only search in senseApiLibPath if it's actually set 2025-01-08 15:08:23 -04:00
hayodea 1178970728 cmd:opts: Now set OptionParser::argv0 to argv[0] 2025-01-08 15:07:42 -04:00
hayodea 090f0d3b02 senseApiMgr: new method: loadAllSenseApisFromOptions
This method dlopens() all senseApi libs that were referenced by
device specs.
2025-01-08 15:06:31 -04:00