Commit Graph

650 Commits

Author SHA1 Message Date
Axel Dörfler
ef4aa90f49 Added public InnerFrame() and TopBorderOffset() methods. If you don't like the
naming, please shout :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 17:07:38 +00:00
Axel Dörfler
3a3f6c1ee9 BTextControl::AttachedToWindow() set wrong colors in case the control was
disabled (unlike SetEnabled()). They are now both using the correctly working
_UpdateTextViewColors() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 15:28:49 +00:00
Axel Dörfler
ffe72abd85 * Fixed BTextControl resizing (did not invalidate the border area before).
* Rewrote TextControl.h
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 14:22:33 +00:00
Stephan Aßmus
c81d2e7a59 * fixed window zooming/unzooming behaviour
* fixed FrameResized() and FrameMoved() not
  being called anymore in response to ResizeTo()
  and MoveTo() since I introduced a check in
  DispatchMessage() (fixes bug #123)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 16:39:46 +00:00
Ingo Weinhold
cda4ca9582 Module interface for interrupt controllers. Might change later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:31:07 +00:00
Ingo Weinhold
3277aade49 * Added get_root() to device_manager_info. Surprisingly enough, it
returns the root device node. Now its actually possible to
  traverse the device node tree without a node to start with.
* Fixed execution order problem in dm_get_next_child_node(). The
  supplied node was put first (which could cause its immediate
  deletion), but was still accessed thereafter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:29:14 +00:00
Ingo Weinhold
41f7459c23 Added a get_pci_info() to pci_device_module_info. It was a bit too
complicated to get a pci_info for a given pci_device before. The
function is not very efficiently implemented, but I didn't see how to
do that without more intrusive changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:15:53 +00:00
Jérôme Duval
38f16e924f added some missing definitions from usb_audio driver
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 13:11:30 +00:00
Axel Dörfler
aa1f543799 Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
  deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
  to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
  cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
  just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 18:14:14 +00:00
Michael Lotz
ec56c2c1dc Fixed and cleaned up BShape and BShapeIterator. They should now work and behave like the R5 version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-04 22:11:57 +00:00
Stefano Ceccherini
e333843348 Added Alloc/Copy/FreeRunArray() as Axel's suggestion, and used it internally in TextView. Also fixed small memory leak
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-03 21:22:00 +00:00
Ingo Weinhold
1cac47bfa9 Added a few more constructors and initialization methods. Among them two
SetToImage() variants for initializing the object to the resources of
the shared object file belonging to a loaded image. Should be handy for
libraries and add-ons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 00:15:01 +00:00
Ingo Weinhold
15424f3d37 Finally fixed update_mime_info(). As Be's version it understands two
different "force" levels now and updates the app file info attributes
for shared object files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 19:41:07 +00:00
Marcus Overhagen
583578c557 added experimental support for CardBus<->PCI bridges
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-23 17:50:01 +00:00
Stefano Ceccherini
ccee0bb56d renamed fToken to fAreaOffset and use it instead of fArea for the area offset. Less hacky.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-21 20:30:31 +00:00
Stephan Aßmus
55f6067fcd * I thought it was a good idea to Flush() the server link
in all drawing methods in case the parent window was
  not in a "transaction" (fInTransaction). For ordinary
  updates, nothing has changed, but if you call drawing
  methods outside of an update, they will happen "immediately"
  rather than when the link is sporadically full and auto
  flushes. The effect is that the cursor in Terminal blinks
  reliably, the selection in BTextViews follows the mouse
  right on the spot (and so on). BWindow::BeginViewTransaction()
  and EndViewTransaction() now have a meaning in Haiku too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-12 12:22:34 +00:00
Axel Dörfler
fc62f08d8a * Fixed BView::_SetShelf(), it did not remove a previous shelf.
* Fixed BShelf::_AddReplicant(), at least a bit. I managed to add the "ScreenChanger"
  icon to the tray, although the icon was not drawn, and it was on the wrong
  position.
* _AddReplicant() also did not reply to the waiting message source in case
  of failure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 21:56:26 +00:00
Ingo Weinhold
716a16ce61 * Find out a few interesting information about the system (like CPU,
bus, and time base frequency) in the PPC boot loader, and propagate
  them to the kernel via kernel_args.
* Now we use the correct time base frequency for timer calculations.
* Implemented PPC specific system info stuff. Added a few PPC CPU
  types to <OS.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 13:30:23 +00:00
Axel Dörfler
5edcfe9619 Cleanup!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 09:23:08 +00:00
Axel Dörfler
f17cfabc82 * Fixed BBox resizing when not attached.
* Less flickering when drawing the label: the area of the label is now
  clipped, so there is no need to fill the background again.
* Consumed the last reserved member for the bounding box of the label.
* More or less rewrote the header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 18:23:48 +00:00
Axel Dörfler
e351ecb78d Renamed BView::_SetViewImage() to _SetViewBitmap(), and AS_LAYER_SET_VIEW_IMAGE
to AS_LAYER_SET_VIEW_BITMAP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 14:52:43 +00:00
Stefano Ceccherini
2c6856d660 more cleanups. I'll probably end up rewriting the etire header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-26 10:16:22 +00:00
Stefano Ceccherini
a66e501974 more cleanup. I can't seem to be able to clone the vesa accelerant so I'm a bit stuck at the moment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-24 14:20:44 +00:00
Stefano Ceccherini
ed58e05e18 Partly converted the header to our coding style, added some debug output, started to clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-24 13:06:05 +00:00
Jérôme Duval
37a84232bb fix build for echo drivers, added cs_timer.h from pcmcia-cs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 18:57:29 +00:00
Stefano Ceccherini
70da1fab92 Haiku doesn't have byteorder.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 10:52:48 +00:00
Jérôme Duval
f6486d9d01 added some more headers from pcmcia-cs
fixed the build for non haiku platforms


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 19:06:45 +00:00
Axel Dörfler
348c7214f5 Improved processor identification for some VIA C3 models.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 11:55:01 +00:00
Jérôme Duval
4f9f2ee29d added a pcmcia bus raw driver compatible with R5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 22:50:05 +00:00
Ingo Weinhold
2fee50849c GCC 4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 13:53:26 +00:00
Axel Dörfler
463e791c29 Added new window flag B_SAME_POSITION_IN_ALL_WORKSPACES.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 13:07:47 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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