vfs: check userland buffers before reading them.
[haiku.git] / src / servers / app / decorator / WindowBehaviour.cpp
blob1a3108bd2f81f9f0a6acbcadbabed93f89a17d9f
1 /*
2 * Copyright 2010, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Clemens Zeidler <haiku@clemens-zeidler.de>
7 */
10 #include "WindowBehaviour.h"
13 WindowBehaviour::WindowBehaviour()
15 fIsResizing(false),
16 fIsDragging(false)
21 WindowBehaviour::~WindowBehaviour()
26 void
27 WindowBehaviour::ModifiersChanged(int32 modifiers)
32 bool
33 WindowBehaviour::AlterDeltaForSnap(Window* window, BPoint& delta, bigtime_t now)
35 return false;
39 /*! \fn WindowBehaviour::MouseDown()
40 \brief Handles a mouse-down message for the window.
42 Note that values passed and returned for the hit regions are only meaningful
43 to the WindowBehavior subclass, save for the value 0, which is refers to an
44 invalid region.
46 \param message The message.
47 \param where The point where the mouse click happened.
48 \param lastHitRegion The hit region of the previous click.
49 \param clickCount The number of subsequent, no longer than double-click
50 interval separated clicks that have happened so far. This number doesn't
51 necessarily match the value in the message. It has already been
52 pre-processed in order to avoid erroneous multi-clicks (e.g. when a
53 different button has been used or a different window was targeted). This
54 is an in-out variable. The method can reset the value to 1, if it
55 doesn't want this event handled as a multi-click. Returning a different
56 click hit region will also make the caller reset the click count.
57 \param _hitRegion Set by the method to a value identifying the clicked
58 decorator element. If not explicitly set, an invalid hit region (0) is
59 assumed. Only needs to be set when returning \c true.
60 \return \c true, if the event was a WindowBehaviour event and should be
61 discarded.