Commit Graph

14817 Commits

Author SHA1 Message Date
Axel Dörfler
8643b0987c All controls/views now accept NULL arguments for "width" and "height" in GetPreferredSize().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:29:39 +00:00
Axel Dörfler
f97761575a * GetPreferredSize() now accepts NULL arguments for "width" and "height"
* use GetFontHeight() instead of: BFont font; GetFont(&font); font.GetHeight(...)
* fixed odd unarchiving of the alignment.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:28:18 +00:00
Axel Dörfler
a8c4b88de4 * Fixed issues like not calling the inherited virtual or calling the wrong one.
* Applied coding style.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:13:01 +00:00
Axel Dörfler
43ca776563 * applied the logic from BWindow::task_looper() to BLooper as well (messages to
invalid target handlers are dropped).
* B_PREFERRED messages now go to the looper if there is no other preferred handler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 16:25:30 +00:00
Axel Dörfler
6450b76dd4 Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
  EventDispatcher handles them now. As a result, a window will now
  get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
  the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
  when it's set - this is now used for the window moving instead of
  the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
  method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
  because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
  BWindow::_SanitizeMessage(() (similar to what the input_server does).
  This should also make the mechanism pretty robust, since every
  B_MOUSE_MOVED message can now trigger the view transit (in case a
  message is lost). B_WINDOW_ACTIVATED messages should be generated
  client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
  layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
  field; "where" (in window's coordinates) and "be:view_where" are
  added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
  dropped instead of being sent to the looper - this should be done
  in BLooper as well, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 15:17:58 +00:00
Axel Dörfler
8196fa8da4 * now accepts NULL arguments for "width" and "height" in GetPreferredSize()
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 14:51:01 +00:00
Axel Dörfler
6338e9da5d Fixed RemoveMessage() I broke before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 14:42:33 +00:00
Axel Dörfler
876a3803df * removed adding "be:transit" stuff in the EventDispatcher - this is now only done
client side (or will be, with the next commit).
* added GetMouse() functionality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 11:27:09 +00:00
Ingo Weinhold
6724a1930d Adjusted build_cross_tools[_gcc4] scripts according to the new directory
layout in the buildtools module.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 23:34:51 +00:00
Rudolf Cornelissen
317806623e Added MMS (multihead cards) support by using primary adaptors BIOS for all cards. Confirmed a G200MMS working OK on all four heads with the Be test harness application. That's one card with four G200 GPU's on it! (thanks Cale Lewis :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 21:12:13 +00:00
Rudolf Cornelissen
df84e0383c Bumped version to 0.23
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 21:10:17 +00:00
Axel Dörfler
85606ee1de Fixed DetachCurrentMessage():
* the current message is not part of the queue when it's dispatched, so it
  doesn't make any sense to try to remove it.
* it's only to be called during message processing - and at that time, the
  looper is locked, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 20:52:36 +00:00
Axel Dörfler
b361534e3c Filter out some fields in the message that we may set ourselves.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 20:34:02 +00:00
Stephan Aßmus
bbbe5a3329 of course, GetPreferredSize() is defined void
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 19:17:12 +00:00
Stephan Aßmus
45b013192a fix crashes when the text pointer is NULL, this lets you for example pick a background image with the Backrounds preflet, though it doesn't work further down
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 19:02:56 +00:00
Rudolf Cornelissen
605636b672 added 512Mb memory detection.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 14:57:12 +00:00
Rudolf Cornelissen
f0feff006f test commit..
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 14:38:24 +00:00
Axel Dörfler
bf9979bdaa This should fix the build of libroot.so, patch by Korli.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 14:16:20 +00:00
Axel Dörfler
b095201503 * changed the way a message is forwarded to the focus view (instead of adding
a suspend focus field to the message, there is now a "feed focus" field in
  case the message should be forwarded).
* added a comment to the BPoint version of _FindView() (since it's broken)
* _DistributeMessage() is now called after _DetermineTarget() - so that it
  can prevent sending the message twice to the focus view.
* removed BWindow::DoUpdate() as it's no longer used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 12:49:35 +00:00
Axel Dörfler
8e51bdd43f This works around a sporadic crashing bug - I didn't really fixed the bug, just
its symptoms. I guess this piece of code could need some documentation...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 12:38:50 +00:00
Jérôme Duval
ef0635bd49 added some more glibc functions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 21:41:39 +00:00
Michael Lotz
c919ec6862 Fixed build for non-Message4 again. Both BMessage::Private classes should be compatible.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 19:10:13 +00:00
Michael Lotz
85b31e1b69 Removing Message2 and Message3. They did not proof to be good enough so they don't need to take up space either.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 18:47:51 +00:00
Axel Dörfler
b360ada4bd If a handler passes a BMessage on to the next handler, it will now make sure
its filters are taken into account.
It will also filter out messages in case the filter targeted the current handler
again - note, this is not really a good solution, as ideally, all previous handlers
must be ignored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 17:02:56 +00:00
Axel Dörfler
14d02d22f6 Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
  view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
  target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
  at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
  (this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
  (previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
  changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
  compatible to that one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 16:58:36 +00:00
Axel Dörfler
2c5ab65d23 * fPreviousText can be NULL for views that don't have focus (ie. by using SetEventMask()).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 16:42:20 +00:00
Axel Dörfler
82d8744887 * now all event targets of the focus window get into the focus list - that
way, we always send only one message per event, no matter how many targets
  there are in the window (the focus event list was not always maintained
  correctly before, too).
* the current mouse filter eats all B_MOUSE_UP events, and therefore, the
  temporary event targets were never removed.
* changed the way BWindow::_DistributeMessage() recognizes if it should forward
  the event - not yet final, though.
* naming is now more consistent (events -> event_mask).
* some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 16:25:23 +00:00
Axel Dörfler
3cace414ad Removed run_task(), as it's not really needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 12:35:30 +00:00
Michael Lotz
174459d703 Fix build when not using Message4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 02:40:49 +00:00
Axel Dörfler
e489029756 * made the dano and r5 message more similar to use (naming).
* coding style changes to structure naming.
* but no bug fixes yet...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 22:24:03 +00:00
Axel Dörfler
5232a619c1 Fixed build, sorry again - sure, with a commit that big, I just had to mess it up :/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 21:19:55 +00:00
Rudolf Cornelissen
551528038f added registerdefine for laptop backlight conttrol.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 20:47:47 +00:00
Rudolf Cornelissen
cb44181d5b updated docs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 20:47:08 +00:00
Rudolf Cornelissen
84cbe0e39f added preliminary DPMS support for laptop panels (disabling/enabling backlight). Not for NV11 though, and only if no external DVI panel is connected to a supported laptop. Please note: this feature can possibly be extended for NV11 and external panels if enough feedback (logfile) gets to me. If the driver/screen nolonger works for someone please let me know as well. Bumped version to 0.66.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 20:46:17 +00:00
Axel Dörfler
8fe493128f * Added swapped endian type codes for the R5 and Dano message readers.
* when Unflatten() encounters an unknown message format, it will now return
  B_NOT_A_MESSAGE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 17:28:24 +00:00
Axel Dörfler
51a16ce830 No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 17:26:25 +00:00
Axel Dörfler
4c57bd573e Fix for compilation with the new messaging code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 17:20:19 +00:00
Axel Dörfler
9e2023b10b * Fixed sending/receiving "use preferred handler" messages - it simply didn't
work before.
* Removed the private header fPreferredTarget field.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:58:34 +00:00
Axel Dörfler
4ceb1e519c * reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
  you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
  in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
  counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
  to your UserBuildConfig:
	AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
  target the client handler, while the other will target the preferred handler of the
  client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:24:23 +00:00
Axel Dörfler
26e09e5870 Small fix: didn't make sure the previous focus was still part of the window.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:13:52 +00:00
Axel Dörfler
4aeff099bf * Removed all *Ptr types (and just use pointers to the type instead).
* minor style guide changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:12:38 +00:00
Axel Dörfler
d1071ff01b Removed Utils.cpp - it's not really useful anymore.
Note, I temporarily kept the Utils.h in, because I have other local changes to be
committed soon (sorry for this, but it shouldn't harm).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:09:16 +00:00
Axel Dörfler
ae3ba51fc1 Some minor fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:03:11 +00:00
Axel Dörfler
ece36066af Removed third argument from calls to ServerWindow::SendMessageToClient() - it's predefined
to "false" anyway, and will be removed shortly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 15:52:48 +00:00
Stephan Aßmus
b223f78041 fixes origin and scale handling, it behaves mostly like R5 now (it is used for drawing only, yes not mouse coords or anything else). Also fixes offscreen layers clipping rebuilding when the user defined clipping is added or changed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 15:10:18 +00:00
Jérôme Duval
3ce6b663e6 Report from NetBSD emuxki driver:
"Add some byteswap ops around DMA descriptors for big endian machines."


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 13:21:04 +00:00
Rudolf Cornelissen
742677072f panel distinction type logging update: it turns out on 'std' NV11's (at least) this can't be done (card hanging afterwards). No more trouble over here now. Laptop owners are encouraged to run the driver with logging enabled and send me the logfile! NV11 laptop owners please contact me for a recompiled binary to test this: I need info to be able to activate DPMS for laptops...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 12:10:48 +00:00
Adi Oanca
ace01f864b Removed BWindow::_DetermineTarget(). BWindow's task_looper() just calls BLooper's one. Took Message4 stuff from BWindow's task_looper() and put it in BLooper::task_looper() - guess this is wanted...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 21:44:51 +00:00
Adi Oanca
2899b880f6 Uncommented a correct piece of code. B_FRAME_RESIZED/MOVED are sent more accurately. Renamed AddToViewsWithInvalidCoords, SendViewCoordUpdateMsg into _AddToViewsWithInvalidCoords, _SendViewCoordUpdateMsg.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15036 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 21:16:57 +00:00
Adi Oanca
8e81fc4919 Some cleanup. Removed do_Hide, do_Show and do_CopyBits
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15034 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 18:25:27 +00:00