History log of /haiku/src/servers/app/MessageLooper.h
Revision Date Author Comments
# 565155af 27-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

Remove unnecessary usages of BLocker::Sem().

Most of these should have been BLocker::InitCheck() anyway.
The one that was actually using the sem (MessageLooper)
should just store the name parameter, which simplifies
things anyway.

Done as a result of a branch where I'm experimenting
with making BLocker not even create a semaphore in
"benaphore" mode.


# f744935b 04-Aug-2016 Axel Dörfler <axeld@pinc-software.de>

app_server: Fixed broken ServerApp allocation.

* Did not use std::nothrow, but exceptions were not catched.
* MessageLooper::Run() now returns a status code.
* There are a lot more cases of a new without nothrow that need to
be investigated.


# 7f9368ca 09-Dec-2015 looncraz <looncraz@looncraz.net>

Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# b02ce811 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

You can now specify a timeout to MessageLooper::PostMessage().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15510 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 67e79bf4 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

A message looper can now have a death semaphore, ServerWindow now uses them.
ServerApp now waits up to 3 seconds for windows before killing them - it now
waits on the death semaphore, and only kills a window if it didn't quit fast
enough.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15147 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35a71b19 25-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The app_server now inherits from MessageLooper as well.
Removed unused stuff.
The app_server now deletes itself when done (and therefore must not be
allocated on the stack anymore).
The cursor handling should be moved over to the desktop as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 770c05d6 25-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The Desktop class now gets its own message processing loop: moved application
creation/deletion (and management) over to that class.
ServerApp now gets a desktop pointer, and no longer uses gDesktop.
Converted private MessageLooper::_MessagePort() to a public method MessagePort()
so that the looper can be addressed from elsewhere without using PostMessage().
Added a real basic message loop to MessageLooper::_MessageLoop().
BApplication now only asks the app_server to get its desktop object which should
now be used for everything that's not in the realm of the application.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c6a25272 24-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Split ServerWindow::Quit() into two parts, and moved the generic one to
the MessageLooper class - the other part is called from there as virtual
_PrepareQuit().
Moved the class documentation to the source file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89ab121e 23-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Factored a MessageLooper class out of ServerWindow and ServerApp. Could still
be improved a bit (Quit() and _MessageLooper() are empty right now).
Removed ServerApp::PingTarget().
Hopefully cleared some confusion about ServerApp::fClientLooperPort and fClientToken
(previously fHandlerToken), even if it's currently unused.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13807 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b02ce81171a1f7c6f70af150f07d9d59ab9f0b01 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

You can now specify a timeout to MessageLooper::PostMessage().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15510 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 67e79bf45aca758085d8272ba2c2c46415560361 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

A message looper can now have a death semaphore, ServerWindow now uses them.
ServerApp now waits up to 3 seconds for windows before killing them - it now
waits on the death semaphore, and only kills a window if it didn't quit fast
enough.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15147 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35a71b19367c9c6bb43385b07b860200aed6223e 25-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The app_server now inherits from MessageLooper as well.
Removed unused stuff.
The app_server now deletes itself when done (and therefore must not be
allocated on the stack anymore).
The cursor handling should be moved over to the desktop as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 770c05d6cc602b2e545e2ccae5a17c576881dc9c 25-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The Desktop class now gets its own message processing loop: moved application
creation/deletion (and management) over to that class.
ServerApp now gets a desktop pointer, and no longer uses gDesktop.
Converted private MessageLooper::_MessagePort() to a public method MessagePort()
so that the looper can be addressed from elsewhere without using PostMessage().
Added a real basic message loop to MessageLooper::_MessageLoop().
BApplication now only asks the app_server to get its desktop object which should
now be used for everything that's not in the realm of the application.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c6a25272973999ab0f24dc010b70c7ea811fa35f 24-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Split ServerWindow::Quit() into two parts, and moved the generic one to
the MessageLooper class - the other part is called from there as virtual
_PrepareQuit().
Moved the class documentation to the source file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89ab121e66e7cd6136e4e561805b85acea3d046a 23-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Factored a MessageLooper class out of ServerWindow and ServerApp. Could still
be improved a bit (Quit() and _MessageLooper() are empty right now).
Removed ServerApp::PingTarget().
Hopefully cleared some confusion about ServerApp::fClientLooperPort and fClientToken
(previously fHandlerToken), even if it's currently unused.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13807 a95241bf-73f2-0310-859d-f6bbb57e9c96