[haiku-development] Re: Shared BMessage value between preflets

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 07 Feb 2017 16:34:24 +0000

7 février 2017 17:28 "Brian Hill" <brianh@xxxxxxxxxxxx> a écrit:

I am writing a patch for the Screen preflet, and need to send it a
message from the Backgrounds preflet using a BMessage 'what' value that
Screen defines in its Constants.h file. Including Screen's Constants.h
file in Backgrounds classes would include lots of extra variables
Backgrounds doesn't need, I just need the one BMessage value
UPDATE_DESKTOP_COLOR_MSG. What is the best way to share this value
between the two preflets, create a new file (something like Shared.h)
that just contains that one value that classes in both preflets can
reference?

Yes, and put it somewhere in headers/private. Maybe you can find a suitable 
header there and just add to it.

-- 
Adrien.

Other related posts: