Skip to content

Marrow

Latest
Compare
Choose a tag to compare
@Scrubsauce Scrubsauce released this 12 Mar 17:15
· 52 commits to master since this release

Foster v2.0: Marrow

Marrow is a rapidly refined version of the Foster library in support of the Final Five project set. Marrow seeks out data from various Windows API's that are accessible to Metro/WinRT applications. Upon retrieval, Marrow converts all of the data from Microsoft specific classes and typings to platform agnostic typings with documented mappings. The translated data is then stored in portable struct for later use, with the added bonus of portability. For a few cases where Foster does not have permission to access certain system information due to the constraints of WinRT, it will return the minimum possible value to run Windows 8.1 (i.e. 1GHz for processor speed).

New to Marrow:

Cylon.h:

  • Added include to stdint.h for typings
  • Added notes for typing mappings under definitions
  • Changed controllerStruct's userIndex from unsigned int to uint32_t
  • Changed controllerStruct's packetNumber from DWORD to uint32_t
  • Changed controllerStruct's buttons from WORD to uint16_t
  • Changed controllerStruct's leftTrigger from BYTE to int8
  • Changed controllerStruct's rightTrigger from BYTE to int8
  • Changed controllerStruct's thumbLeftX from SHORT to int16
  • Changed controllerStruct's thumbLeftY from SHORT to int16
  • Changed controllerStruct's thumbRightX from SHORT to int16
  • Changed controllerStruct's thumbRightY from SHORT to int16
  • Changed cylonStruct's hertz typing from uint64 to float
  • Changed cylonStruct's processorCount typing from unsigned long to uint64_t
  • Changed cylonStruct's memoryBytes typing from UINT4 to uint64_t
  • Changed cylonStruct's picture from IStorageFile^ to uintptr_t and renamed to pictureLocation
  • Changed cylonStruct's pictureType from std::wstring to utf8 encoded std::string
  • Changed cylonStruct's wTimeZoneName from std::wstring to utf8 encoded std::string and renamed to timeZoneName
  • Changed cylonStruct's wUsername from std::wstring to utf8 encoded std::string and renamed to username
  • Changed cylonStruct's wDeviceName from std::wstring to utf8 encoded std::string and renamed to deviceName
  • Changed cylonStruct's milliseconds from unsigned int to uint32_t
  • Changed cylonStruct's seconds from unsigned int to uint32_t
  • Changed cylonStruct's minutes from unsigned int to uint32_t
  • Changed cylonStruct's hours from unsigned int to uint32_t
  • Changed cylonStruct's day from unsigned int to uint32_t
  • Changed cylonStruct's date from unsigned int to uint32_t
  • Changed cylonStruct's month from unsigned int to uint32_t
  • Changed cylonStruct's year from unsigned int to uint32_t
  • Changed cylonStruct's dst from unsigned int to uint32_t
  • Changed cylonStruct's timeZone from long to int32
  • Changed cylonStruct's architecture from unsigned short to uint16_t
  • Changed cylonStruct's processorLevel from unsigned short to uint16_t
  • Changed cylonStruct's osArchitecture from unsigned int to uint32_t
  • Changed cylonStruct's installedDeviceCount from unsigned int to uint32_t
  • Changed cylonStruct's detectedDeviceCount from unsigned int to uint32_t
  • Changed cylonStruct's portableStorageCount from unsigned int to uint32_t
  • Changed cylonStruct's videoCount from unsigned int to uint32_t
  • Changed cylonStruct's micCount from unsigned int to uint32_t
  • Changed cylonStruct's speakerCount from unsigned int to uint32_t
  • Changed cylonStruct's locationCount from unsigned int to uint32_t
  • Changed cylonStruct's scannerCount from unsigned int to uint32_t
  • Changed cylonStruct's minAppAddress from void* to uintptr_t
  • Changed cylonStruct's maxAppAddress from void* to uintptr_t
  • Changed cylonStruct's pageSize from unsigned long to uint32_t
  • Changed cylonStruct's allocationGranularity from unsigned long to uint32_t
  • Changed deviceStruct's wName from std::wstring to utf8 encoded std::string and renamed to name
  • Changed deviceStruct's wID from std::wstring to utf8 encoded std::string and renamed to id
  • Changed deviceStruct's panelLocation from unsigned int to uint32_t
  • Changed deviceStruct's inLid from bool to uint32_t
  • Changed deviceStruct's inDock from bool to uint32_t
  • Changed deviceStruct's isDefault from bool to uint32_t
  • Changed deviceStruct's isEnabled from bool to uint32_t
  • Changed deviceStruct's deviceType from unsigned int to uint32_t
  • Changed deviceStruct's displayIndex from unsigned int to uint32_t
  • Changed deviceStruct's controllerIndex from unsigned int to uint32_t
  • Changed displayStruct's rotationPreference from unsigned int to uint32_t
  • Changed displayStruct's currentRotation from unsigned int to uint32_t
  • Changed displayStruct's nativeRotation from unsigned int to uint32_t
  • Changed displayStruct's resolutionScale from unsigned int to uint32_t
  • Changed displayStruct's _ isStereoscopicEnabled_ from bool to uint32_t
  • Changed displayStruct's logicalDPI from float32 to float
  • Changed displayStruct's rawDPIX from float32 to float
  • Changed displayStruct's rawDPIY from float32 to float
  • Changed mouseStruct's anyLeftRightSwapped from bool to uint32_t
  • Changed mouseStruct's anyVerticalWheelPresent from bool to uint32_t
  • Changed mouseStruct's anyHorizontalWheelPresent from bool to uint32_t
  • Changed mouseStruct's maxNumberOfButtons from unsigned int to uint32_t
  • Removed unused variable comments

Foster.h/Foster.cpp:

  • Added include to stdint.h for typings
  • Added contact information
  • Added link to wiki documentation
  • Added error handling for controllerIndex in buildDevice(), value now defaults to 0 and is modified at the time of insertion similar to displayIndex's error handling
  • Added various updates to casting, typing, etc. to accommodate type changes in Cylon.h
  • Added utf8_encode() method, pass in a wstring and receive a utf8 encoded std::string
  • Added utf8_decode() method, pass in an std::string and receive an std::wstring
  • Removed unnecessary utf8 decoding in produceUsername()
  • Removed produceDeviceInformation(), use produceDeviceTypeInformation() and pass in "all" as the type to retrieve installed devices instead
  • Removed unused size_needed variable from produceDeviceName()
  • Reworded misleading comments in produceDeviceTypeInformation()

Readme.MD:

  • Added Contact
  • Added Abstract
  • Added Documentation
  • Added Goal

General:

  • Various formatting refinements
  • Various additional comment updates
  • Removed various resolved TODO's
  • View the changes here

Contact

josh@mindaptiv.com