Commit Graph

2228 Commits

Author SHA1 Message Date
Waldemar Kornewald
57eab4408b Now we use the legacy headers when building our compatibility libraries. Fixed BuildSetup to use root instead of libroot.so because arp would not build otherwise. Command-line apps now don't build for R5, anymore. I hope nothing is broken.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-13 16:30:16 +00:00
Stefano Ceccherini
4fbc3f5803 Researched and implemented BDirectWindow::SupportsWindowMode() more
correctly, both for r5 and haiku


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 20:46:13 +00:00
Axel Dörfler
706fb459d5 Oops, remaining messages in the link should be taken into account as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 13:50:34 +00:00
Axel Dörfler
1b974d07ee You can now test if there are more messages waiting in the link.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 13:45:09 +00:00
Stefano Ceccherini
56f2fa945f Removed duplicated status variable, which would've caused the wrong value to be returned
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 21:55:15 +00:00
Axel Dörfler
8126a5e7f4 Fixed debug build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 20:57:51 +00:00
Axel Dörfler
0f4fb801b0 BDirectWindow::DirectDeamonFunc() now exits in case it couldn't acquire or
release the direct buffer handshake semaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 20:16:42 +00:00
Axel Dörfler
e68b762659 More GCC 4 fixes by Ingo Weinhold - appeared because of the recent removal
of new/typeinfo/exception from our headers.
Rearranged the IconCache node_ref hash computation to be padding-resistant
(at least on PPC, node_ref is 16 bytes long, not 12 as it is with x86 and GCC 2).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 19:37:18 +00:00
Ingo Weinhold
bedeb04ec8 Forgot to check this in. GCC 4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 15:44:03 +00:00
Ingo Weinhold
27de84142b Empty implementations of PPC stack trace functions to make the build
system happy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 20:17:49 +00:00
Axel Dörfler
71b550889e Moved dw_sync_data to a private header DirectWindowPrivate.h and renamed it to direct_window_sync_data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:36:38 +00:00
Axel Dörfler
ab6a6bed3a * Renamed direct window commands
* Removed unused cruft from ServerProtocol.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:23:02 +00:00
Axel Dörfler
fc70d6db87 * Renamed AS_LAYER_INVAL_{REGION|RECT} to *_INVALIDATE_*.
* Removed unused AS_LAYER_INVALIDATE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:12:28 +00:00
Axel Dörfler
764ac9e5aa * A stripped down libgame.so is now added to the app_server test environment - it
contains code for BDirectWindow and BWindowScreen only.
* Updated BDirectWindow and BWindowScreen to no longer require the COMPILE_FOR_x
  defines - compilation for R5 is not likely to work anymore, though (the Jamfile
  didn't allow this anymore, anyway)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 14:58:39 +00:00
Stephan Aßmus
2b98735f6d forgot about the right side extra room for the focus indication
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 13:58:42 +00:00
Stephan Aßmus
12b29b9f1a forgot to add a comment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 08:21:50 +00:00
Stephan Aßmus
a80bd60522 through the methods of chaos programming, I hope I have finally got this right
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 08:19:35 +00:00
Stephan Aßmus
a04f5a1a5b Now the scrollbar works much more like the R5 scrollbar:
* prevents the target view from being scrolled out of range
 * handles Trackers completely confused usage of scrollbars

There is just one problem with Tracker's horizontal scrollbar
scrolling the title view much further than it should, which I
will look into tomorrow...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 23:27:35 +00:00
Stephan Aßmus
0f1d5a1af7 finally nailed that bug which prevented Tracker from showing the attribute column titles, I spent way too much time debugging this...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 17:53:55 +00:00
Stephan Aßmus
f056e688a3 now uses the same defaults as in the input_server when unable to contact the input_server
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 17:52:18 +00:00
Stefano Ceccherini
0efe29e09d There is a FillRegion() call after all
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 12:04:18 +00:00
Stephan Aßmus
fcb6cbaa64 when attached to a BWindow, make sure that the window sets up pulse messaging, if the view has B_PULSE_NEEDED, fixes Tracker showing 0 items in CountView
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 22:10:24 +00:00
Stephan Aßmus
1ba4d96326 take it easy when unable to contact the input_server, makes Tracker run much better in the test environment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 22:09:22 +00:00
Stephan Aßmus
1cf70f2e66 use With() and Height() instead of right an bottom for the new frame size, fBounds contains the scrolling offset...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 15:30:15 +00:00
Stephan Aßmus
af43bb3c94 a first and really naive implementation of drag&drop support, no visuals yet... Axel, no worries I'm going to clean this up and remove stuff from EventDispatcher again...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 12:13:22 +00:00
Stephan Aßmus
3f0aa1427c take care of resizing and cleaning up parent BMenuField in FrameResized(), fixes missing areas in Fonts and most likely other BMenuFields
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 12:04:51 +00:00
Axel Dörfler
1d44f6791d Now checks if locking the looper succeeded.
Now hides the window before removing itself to prevent a superfluous drawing update.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 10:46:54 +00:00
Ingo Weinhold
c729b01278 The <arch_config.h> header is needed in <syscalls.h>, since we're using
the atomic functions related macros.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 23:11:02 +00:00
Axel Dörfler
558242b3ac Fixed comment, thanks Jerome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 19:10:16 +00:00
Axel Dörfler
aa110a00e0 AttachedToWindow() could be called twice in case new views were added during
AttachedToWindow().
This fixes the double team entries in the Deskbar.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 18:04:43 +00:00
Axel Dörfler
ec17c60f5a Added a TODO why our bitmap code is currently pretty inefficient.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 10:50:01 +00:00
Stephan Aßmus
9584d7e45e hefty overall drawing speed optimizazion, the Draw() hook was called for every view down the hirarchy when one single child had to redraw, added some TODOs in _Draw about some stuff we need to think about
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 23:27:00 +00:00
Stephan Aßmus
9fe0cc5965 was there any particular reason why BAlerts were old style synchronous controls BWindows?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 23:25:28 +00:00
Axel Dörfler
715476b7ef The resize code now works correctly, finally - it temporarily did harm ;)
The BViews must be resized directly after every change in the window size - we
cannot wait until B_WINDOW_RESIZED, since subsequent calls have wrong view
sizes, then.
B_WINDOW_RESIZED is only really useful for app_server caused window resizing.
Added TODO to SetLook(): it may change the window size as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 23:15:48 +00:00
Axel Dörfler
e7a77b5b71 You also need to delete cloned areas - they are areas like any other (just their
contents are shared)!
Some cleanup. BBitmap::Cleanup() doesn't ask for a reply from the server anymore
(why should it care, anyway?).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 20:12:38 +00:00
Stephan Aßmus
0a95bea66d fixed wrong usage of ConstrainClippingRegion() introduced by myself a couple months ago
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 16:56:31 +00:00
Axel Dörfler
dd344f7934 libtranslation.so was built for the libbe_test target, but wasn't part of the
test environment (the install-test-apps target).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 16:34:13 +00:00
Stephan Aßmus
f41715436a remove left over debugging output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 13:47:16 +00:00
Stephan Aßmus
dde10e4519 fixes for various controls to remove or show focus indication when the window active status changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 13:46:50 +00:00
Stephan Aßmus
a2b387ad6e prevent applying zero offsets to all rects
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 13:45:15 +00:00
Stephan Aßmus
a289cd317f slightly improved look
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 13:44:38 +00:00
Axel Dörfler
ac4fe990c9 * The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
  This saves overhead on both sides, the server doesn't need to build the update message
  for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
  do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
  also break the code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 01:22:02 +00:00
Waldemar Kornewald
9ad01d8d1f Added the merged objects to LinkAgainst.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-03 21:10:53 +00:00
Stefano Ceccherini
4f6f70e059 small change, use the public methods where possible
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-03 14:26:32 +00:00
Axel Dörfler
c072e9f1f5 * BWindow::AddToSubset()/RemoveFromSubset() no longer send their team ID; this
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 16:07:02 +00:00
Axel Dörfler
05aea1dd4a Better app_server communication for SetFeel(), SetLook(), and SetFlags().
SetFeel() gets a status value back as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 14:56:44 +00:00
Ingo Weinhold
b22fc00fa8 Fixed invalid use of STL vector. I wonder, why I always involuntarily
shudder when looking into MDR code (and happily use Beam). Error
checking, anyone?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 23:55:02 +00:00
Ingo Weinhold
9a8ef58959 Build fixes for gcc 4 by Ilzu Siiteri. Small changes by myself.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 23:41:40 +00:00
Axel Dörfler
b32a299f2a Minor cleanup, mostly SERVER_TRUE -> B_OK.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 22:48:42 +00:00
Stefano Ceccherini
4639f874c7 You shall compile before commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 18:37:15 +00:00
Stefano Ceccherini
3106b9ec41 You shall not break the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 18:33:21 +00:00
Stefano Ceccherini
17adbf1f0c Misc style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 17:56:56 +00:00
Stefano Ceccherini
414b75712d Style changes, just to test if committing from here works...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 21:17:02 +00:00
Stefano Ceccherini
a4368fc50d Small cleanups and simplifications. Removed duplicated code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 10:34:06 +00:00
Axel Dörfler
4bd3c01eaa _AddChildToList() was very inefficient in case there was a "before" view
specified. Also, it now drops into the debugger in case "before" doesn't
belong to us already.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-28 15:48:43 +00:00
Axel Dörfler
349837d9c9 Some cleanup in the communication code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-28 15:47:41 +00:00
Waldemar Kornewald
f6ba01da14 Fixed ld reporting too many arguments.
Question about libbind: Why do I have to specify libroot.so in LinkAgainst? And does SharedLibrary not set the dependencies? I had to add Depends libbind.so : ... ;. Ingo, anyone?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-27 13:36:49 +00:00
Axel Dörfler
05644959e1 Commented a very annoying debug message out.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 23:37:53 +00:00
Ingo Weinhold
eb94488877 Fixed image build broken since revision 15169.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 23:16:20 +00:00
Axel Dörfler
59e89c6052 Fixed a locking bug in the icon cache.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 20:18:36 +00:00
Waldemar Kornewald
67b376e953 Moved our networking libraries to src/kits/network/compat. We want to have our own, clean libnetwork.so.
TODO: move all public networking headers to some other place (compat or headers/legacy?) and replace the current headers with clean versions from FreeBSD and BIND 9.3.1
TODO: remove R5 target support


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 17:36:59 +00:00
Axel Dörfler
773be69904 Fixed AppFileInfo::_ReadData(): it was always returning B_BAD_VALUE in case
it read the data from attributes.
Deskbar should now display all those application icons under Haiku as well :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 13:50:29 +00:00
Axel Dörfler
7c6865642c * Don't trust a message that we got goes to a handler that belongs to us.
* when we terminate gracefully and in the looper's thread, we no longer
  unlock ourselves.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 21:06:37 +00:00
Axel Dörfler
84081467b9 Don't trust the app_server that the view token under the mouse belongs to the
current looper.
This needs an investigation in the app_server, as that probably shouldn't happen?
(well, I wrote that part, I should know better)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 20:32:09 +00:00
Axel Dörfler
a77d29375c Put a small TODO into the file: apparently, color_distance() does bad things for
Qemu - the loop to initialize the system color map takes two seconds over here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 15:32:40 +00:00
Axel Dörfler
147bfa2a75 Renamed the port where app_server messages are received from "w_rcv_port" to "w<app_server"
to match the name of the application's port for that task.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 12:20:56 +00:00
Axel Dörfler
860c144735 No longer checks if there is already a "be:transit" item in the message;
there should never be one (at least not a valid one).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 16:39:19 +00:00
Axel Dörfler
5604d3c9ce * _DetermineTarget() will now return fLastMouseMovedView in case there
was no valid "_view_token" in the mouse event.
* _SanitizeMessage() will now only add the "be:transit" field for
  B_MOUSE_MOVED messages. It will also now only update fLastMouseMovedView
  for B_MOUSE_MOVED messages, and not for all mouse messages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 16:25:41 +00:00
Stefano Ceccherini
a2a5442d81 minor cleanup, changed some variables into constants
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 13:10:03 +00:00
Axel Dörfler
45d4256f2d Added a BTokenSpace::SetToken() to assign a specific token.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 13:00:06 +00:00
Philippe Houdoin
b8c43bc75e Fixed building libGL.so for non haiku targets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 05:21:04 +00:00
Philippe Houdoin
49af301b35 Fixed build for non haiku targets.
Added dummy support for glutKeyboardUpFunc(), glutSpecialFunc() and glutJoystickFunc().
To be implemented later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 05:11:01 +00:00
Michael Lotz
76c0041c51 I suppose setting the height was forgotten?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:49:38 +00:00
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
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
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
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
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
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
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
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
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
0139f287b4 Following recent changes (Axel's token stuff or Message4 impl) I could not launch a single application/window in app_server. This fixes the problem. Note I always test with DEBUG=1. Am I the only one who had this problem?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 16:22:39 +00:00
Axel Dörfler
17de8ec214 GetToken() is supposed to always set the _option argument - not only on success.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 16:19:45 +00:00
Axel Dörfler
d081112cb7 * removed tokens are no longer put on a stack and reused - every token is only
used once now. If tokens were reused, you could eventually target the wrong
  (but valid again) messenger.
* removed unused stuff (like GetList()).
* some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 00:46:44 +00:00
Axel Dörfler
4ad46aa954 Made BMessage::GetInfo() pointer arguments optional (ie. passing NULL doesn't
cause a crash anymore).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 15:35:38 +00:00
Ingo Weinhold
65f512e089 Fixed gcc 4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 22:53:30 +00:00
Ingo Weinhold
3d5caf598e Fixed gcc 4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 20:56:35 +00:00
Axel Dörfler
1ba67cc8c6 * almost rewrote BMessageQueue; simplified code, removed over-extensive documentation,
cleanup.
* made BMessageQueue::IsLocked() const - the non-const version is still provided
  for binary compatibility.
* Both BMessageQueue::FindMessage() versions are now thread safe, the queue's BLocker
  is now mutable to allow for this.
* renamed BMessage::link to fQueueLink as the "Message4" implementation uses it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 13:01:59 +00:00
Stephan Aßmus
f4cee9d5f5 fix the FBC problem, as Ingo pointed out, derived classes contain slots for all virtuals defined in the base class, therefor, it is ok to just define WindowActivated for BScrollBar. The only problem is that BScrollBar::WindowActivated() cannot be called from apps having overridden WindowActivated() in a BScrollBar subclass of their own.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 23:46:02 +00:00
Axel Dörfler
44534147b1 "#ifdef __HAIKU__" is no longer needed with the new build system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 13:47:48 +00:00
Ingo Weinhold
d89467ed24 Fixed potential endless recursion in FBC code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 12:10:30 +00:00
Axel Dörfler
9a1d68e4aa * rewrote ColorControl.h
* removed unused stuff.
* shuffled methods around in the source, so that you don't have to jump so far
  when working at a specific thing (ie. all draw functions are grouped together, ...)
* ResizeToPreferred() should now work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 02:45:19 +00:00
Stephan Aßmus
034104bc0f * fix invalidation of changed items
* fix deselecting items
* fix selection with the mouse and also holding down modifiers
* fix some more stuff I have already forgotten
* applied coding style in most places
* renamed private functions to be consistent

needs more work though, some stuff can definitely be
removed, some needs to be added


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 01:36:10 +00:00
Stephan Aßmus
437fc0be3f invalidate the parent where the blue focus indication actually belongs, completes Axels recent changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 01:32:23 +00:00
Stephan Aßmus
e1d08bc65b when using enter or space to invoke a button, have the button snooze a mikrod to make sure the visuals get across
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 01:27:37 +00:00
Stephan Aßmus
db3c2e1e8e * drawing is on the road to perfection
* uses another virtual to implement WindowActivated() and draw itself in
  disabled look just like in R5
* fixed _ButtonRectFor() off by one errors
* tiny problems remain when clicking on the ScrollBar (it is shifted)
* the _ValueFor() might not be perfect


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 00:23:03 +00:00
Axel Dörfler
a2236c14c0 The mouse down/moved area is now the same as the one drawn...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 00:07:42 +00:00
Axel Dörfler
4a71b881a9 Final GCC 4 fixes by Ingo Weinhold (were not visible before, due to a missing -no-undefined).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 16:08:59 +00:00
Axel Dörfler
02e5c93fd6 Rewrote FilePanel.h, cleanup.
Removed public functions run_open_panel() and run_save_panel() - they are deprecated
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 15:53:46 +00:00
Axel Dörfler
b66d753712 * Prepared the BScreen and BPrivateScreen class to be used with multiple monitors.
* BPrivateScreen now buffers its frame for 0.1 seconds (so that calling it several
  times in a row is both consistent and cheap).
* Added GetFrameBufferConfig() call to the HW interface (and implemented it).
* Added server commands AS_VALID_SCREEN_ID, AS_GET_NEXT_SCREEN_ID, and
  AS_GET_FRAME_BUFFER_CONFIG.
* BPrivateScreen::BaseAddress() and BPrivateScreen::BytesPerRow() are now working.
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 14:36:12 +00:00
Axel Dörfler
d9525baaf5 * Forgot to update Screen.h with the last commit...
* Introduced and implemented AS_GET_SCREEN_ID_FROM_WINDOW - it only returns B_MAIN_SCREEN_ID,
  though.
* renamed ServerWindow::fHandlerToken to fClientToken.
* The BScreen(BWindow *) constructor now really asks the server for the screen ID.
* ServerApp::fWindowList is now a BObjectList.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 12:08:21 +00:00
Axel Dörfler
a817d6ad5a * (tried to) implemented RootLayer::ResizeBy() and activated AS_SET_SCREEN_MODE again;
it works in the test environment, but I haven't yet tested it on real hardware.
* moved PrivateScreen.h to src/kits/interface/ - it's not used outside of that one.
* moved reading the color map from the BPrivateScreen constructor to the ColorMap()
  method.
* improved/cleaned server/client communication for the screen stuff a tiny bit.
* fixed the GetBitmap() method I implemented yesterday.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 11:01:02 +00:00
Axel Dörfler
466871cc93 Implemented GetBitmap() - only client side, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 20:05:42 +00:00
Axel Dörfler
8bd2c11fc4 Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 19:43:42 +00:00
Axel Dörfler
fdcd381f42 Fixed warning: FindFloppyDevice() and UnmountIfMatchingID() are not used if
compiled without _INCLUDES_CLASS_DEVICE_MAP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:53:59 +00:00
Axel Dörfler
6d01b66d30 GCC 4 fixes by Ingo Weinhold.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:43:11 +00:00
Axel Dörfler
5fa643150b * no longer needs to define roundf() as it's now part of libroot.so (like on BeOS).
* for the libbe_test target, though, I need to declare it, although it's also declared
  in BeOS' math.h - Ingo??
* removed comment about B_ASYNCHRONOUS_CONTROLS - it's only used by our control classes
  to behave differently depending on that flag (mouse tracking).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:40:55 +00:00
Michael Lotz
cf10934e5f Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 11:31:07 +00:00
Stephan Aßmus
fbb143cded a new look, the old one is still there and disabled by an ifdef, so it should be easy to return back to the old look should the new one cause any heart attacks. I tried to remind of the Haiku heritage go from there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 00:22:11 +00:00
Stephan Aßmus
d51a034e21 prevent windows from being located at fractional offsets, fixes BAlerts (again)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 00:17:04 +00:00
Ingo Weinhold
758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Axel Dörfler
de6f940f1a Forgot to update this one: accidently got the install-test-apps rule wrong for libtracker.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 20:28:42 +00:00
Axel Dörfler
455d1c46a6 * The text view now has a larger horizontal offset to look better.
* Since the text view doesn't necessarily occupy the whole text area anymore,
  we need to clear the area around it manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 19:57:18 +00:00
Axel Dörfler
292d5ced0e * Rewrote shortkey handling - it now actually works as expected.
* Some work on _DetermineTarget(), more to come.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 16:13:06 +00:00
Axel Dörfler
bfe7d52d7b Shortcuts now at least somehow work, but the mechanism is still broken.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 13:34:19 +00:00
Axel Dörfler
ee001e262a Made it a bit clearer that virtuals do not work in the constructor the way you'd think they do.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 13:29:07 +00:00
Axel Dörfler
105644bf32 * the text rect of the inner text view is now the same size as its bounds;
that's simplifies resizing and moving a lot (it's now working correctly).
* the inner text view is now only navigable if the text control should have
  been navigable.
* default text view inset is now (3, 3) - but this might be adapted by the
  total size of the control.
* the height of the control now takes the label into account - it may differ
  from the height of the text line.
* instead of computing the size again, the BTextControl constructor now
  just uses its GetPreferredSize().
* the label position now depends on the position of the text view.
* the inner text view is now centered vertically inside the BTextControl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 13:25:10 +00:00
Axel Dörfler
36c17cde14 * fixed GetPreferredSize() to return the real preferred size.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 13:19:07 +00:00
Axel Dörfler
450f071d9c * Fixed layout for different font sizes. Not tested with all color modes, though.
* fixed drawing and positioning items at subpixels.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 13:12:07 +00:00
Axel Dörfler
ee694ac85f * Disallowed chars now work correctly and no longer prevent the BTextView from
being edited.
* A non editable BTextView is now still navigable.
* Made cursor one pixel shorter (at least it looked a bit too long to me...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 13:04:29 +00:00
Axel Dörfler
ba98d1b0cd * Terminal is now also built for the libbe_test platform; removed explicit linking
against libroot.so.
* libtracker.so is now also built for that one, and also removed libroot.so linking.
* MiniTerminal is no longer build for the libbe_test platform.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 13:50:26 +00:00
Axel Dörfler
9032e7128e InitData() no longer calls SetTitle(), but sets the title directly.
SetTitle() now also works when called before the window is shown for the first time
(ie. before the window thread is running).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 13:09:23 +00:00
Axel Dörfler
d28dc0ce83 This fixes the build for the libbe_test target - there is no stdint.h in BeOS
(and it shouldn't matter a lot in this case, anyway).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 12:19:30 +00:00
Stephan Aßmus
d3b27f09af check if the bitmap size can even be expressed in an int32, set init status to B_BAD_VALUE if not. This works arround a bug in WonderBrush... :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:12:32 +00:00
Stephan Aßmus
d28b9f6540 * disable caching of the clipping region,
there can be no notification when it changes in the server.
  Note that GetClippingRegion() gets the actually effective clipping,
  not only the user defined clipping.
* when removing ourself, set the last mouse moved view of the parent
  window to NULL in case it was pointing to this view
* round the frame rectangle passed to the constructor, I have not
  actually compared this with R5 behaviour though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:10:03 +00:00
Stephan Aßmus
8111539117 a quick solution to get some B_EXITED_VIEW transit when the mouse leaves a view, probably gets replaced when Axel is looking into the event handling stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:00:29 +00:00
Axel Dörfler
fff7b3cd5d Now also sorts the font list - unlike the app_server, it could also take the
user's locale into account.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 15:40:22 +00:00
Stephan Aßmus
fabffa3867 fixes for Stroke and FillPolygon
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 13:14:24 +00:00
Stephan Aßmus
97078ce5e6 also return B_BAD_VALUE in case NULL pointer passed, please yell if you disagree with this change, but I thought the client code could look less cluttered this way
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 12:00:10 +00:00
Stefano Ceccherini
ac50702270 BMenu::FindMarked() was broken just like FindItem() was. And it's even my fault. Yay!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 10:12:58 +00:00
Axel Dörfler
789f68f07a Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 22:25:34 +00:00