Commit Graph

1108 Commits

Author SHA1 Message Date
Oliver Ruiz Dorantes
001662ae04 A bit more styling on main headers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 21:15:02 +00:00
Axel Dörfler
9f6ae76f02 * Added acquire_vnode() call that you can use to get another reference to an
inode - unlike get_vnode() the busy flag won't prevent you from getting that
  reference.
* Changed put_vnode() to return an error in case the vnode couldn't be found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 09:59:19 +00:00
Oliver Ruiz Dorantes
ceddc28636 Bring to the stack the LinkKey datatype by Mika Lindqvist
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:11:42 +00:00
Oliver Ruiz Dorantes
26e7ba5602 More Stylistic changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:08:27 +00:00
Oliver Ruiz Dorantes
b48fa68ace Fix bluetooth_server debug window tabs, they were getting out of bounds due the index assignation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:03:17 +00:00
Oliver Ruiz Dorantes
0f9aa9c245 Patch by Fredrik Ekdahl. Fix tabs and whitespaces, this set of files were conflicting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 19:55:13 +00:00
Oliver Ruiz Dorantes
ded3259257 Patch by Fredrik Ekdahl. Fix tabs and whitespaces
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 19:51:16 +00:00
Ingo Weinhold
7f12cc54a7 * It is now supported that I/O operations and requests are only handled
partially (e.g. due to hitting the end of file). The respective
  classes have grown new methods and attributes to deal with that. The
  "finished" callbacks have got additional parameters to indicate
  whether the transfer was only partial and how much has been
  transferred. Other callbacks and functions have a size_t* in/out
  parameter instead of a simple size_t, now.
* vfs_{read,write}_pages() do now use the I/O request framework instead
  of the underlying FS's {read,write}_pages() hooks (those should be
  unused now). Furthermore they've got an additional "flags" parameter,
  which is passed to IORequest::Init(), i.e. it allows to specify that
  the given vecs refer to physical addresses.
* The file cache's read_into_cache() reads directly into physical
  pages, now.
* Fixed bug in DoIO::IO(): The offset was not adjusted, so that all
  pages were incorrectly transferred from/to the same location.
* Fixed broken subrequest scheduling loop head in
  do_iterative_fd_io_iterate().
* Adjusted the test driver and implemented its io() hook. Using this
  driver I/O requests are passed all the way from the VFS/VM to the
  driver and through the I/O scheduler. It even seems to work. :-)
* Added missing const to the iovec* parameter of the IORequest::Init()
  methods.
* Disabled some debug output by default. Added new optional debug
  output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 23:34:10 +00:00
Ingo Weinhold
7df40c23f6 Added handy function volume_for_vnode() which returns the fs_volume for
a given given fs_vnode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 23:33:49 +00:00
Stephan Aßmus
162a7f5f8e * Implemented new BView drawing functions DrawBitmap[Async](
const BBitmap* bitmap, BRect bitmapRect, BRect viewRect, uint32 options).
  Only option so far is B_FILTER_BITMAP_BILINEAR.
* BView::DrawBitmap[Async](const BBitmap* bitmap, BRect viewRect) was accessing
  the bitmap pointer without checking it. Would therefore crash when passing
  NULL, unlike the other methods.
* The BPicture code already reserved room for the BBitmap flags, but did not
  store the actual flags and neiter use them for anything. Since the bitmap
  data is stored anyways, the bitmap creation flags do not matter. So I reused
  this for the new bitmap drawing options.
* Rewrote Bitmap.h and removed the B_BITMAP_SCALE_BILINEAR flag again.
* Tried to optimize Painter::_DrawBitmapBilinearCopy32() a little by giving
  the compiler better hints. There seems to be a marginal, possibly imagined
  speed increase < 0.05 ms. ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:58:30 +00:00
Stephan Aßmus
3c7dd7c346 Added const versions of the methods that should have been declared like
that from the start. Please review for possible binary compatibility problems!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:50:07 +00:00
Stephan Aßmus
1c111165b0 Cleanup only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 16:27:13 +00:00
Ingo Weinhold
ec598fe493 * Added FS interface hooks io() and cancel_io(). The former is supposed
to provide asynchrounous (or only synchronous, if asynchronous is not
  supported) I/O request support. It will eventually replace
  {read,write}_pages(). None of the FS implementations implement them
  yet.
* Implemented some support functions for request-based I/O. File system
  implementations can use do_fd_io() which passes an I/O request to the
  layer responsible for a given FD, and do_iterative_fd_io(), which
  translates a request for a file to subrequests for the underlying
  device and passes them on. Both fall back to synchrounous processing
  when the io() hook is not supported.
  Furthermore added vfs_synchronous_io() which should be handy for the
  devfs to perform io_requests synchronously for devices that don't
  support the io() hook.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 02:07:20 +00:00
Stephan Aßmus
dcd70f0e39 * Introduced new BBitmap flag B_BITMAP_SCALE_BILINEAR.
* When drawing BBitmaps with scaling in the app_server, use a bilinear
  filter when a bitmap has this flag set. (Hope nobody objects, otherwise
  I can revert or improve this. Performance can certainly be improved, since
  the AGG implementation is too generic. But that goes for the nearest
  neighbor implementation as well.)
* Flags are uint32, fix app_server side code to declare them correctly. Use
  appropriate link methods in BBitmap and ServerApp.
* Enable the BeOS compatibility mode for B_RGB32 (works just like B_RGBA32
  in B_OP_ALPHA mode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 23:40:13 +00:00
Jérôme Duval
27a76e1d73 added amd phenom cpu type, untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 18:35:39 +00:00
Oliver Ruiz Dorantes
76646d9f67 Cleanups
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 20:54:32 +00:00
Ingo Weinhold
6e60a6ac03 Added function get_memory_map_etc() which works similar to
get_memory_map(), but has a saner semantics and allows specifying a
team.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 04:07:14 +00:00
Ingo Weinhold
902559ce32 * Added a mutex to IORequest. It doesn't look like we can get around
using a lock and I'm not very much in favor of a global one.
* Added "finished" callback to IORequest.
* IOOperation::Finish() no longer invokes its parent request's
  ChunkFinished(). The finisher does this instead. ChunkFinished()
  can optionally remove the chunk from the parent.
* Added IORequest::Wait() which waits for the completion of the request.
* Introduced IORequestChunk::ResetStatus() to make setting the status to
  "pending" somewhat more explicit.
* Implemented the missing IOScheduler::SetCallback() methods.
* The NotifyAll() calls on the IOScheduler's condition variables were
  missing, so it just waited forever.
* Added some more debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 01:54:41 +00:00
Ingo Weinhold
e6bd90c58d * bfs_fsync() was the only place which could cause the
fs_vnode_ops::write_pages() to be called with fsReenter = true. Since
  this is no longer the case, the argument has become superfluous. For
  read_pages() it always was. Removed the argument from the functions
  and all functions that propagated it.
* Some whitespace at the end of lines was removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 15:47:47 +00:00
Oliver Ruiz Dorantes
0a95b2a34b An automatic way to define max number of packet types
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-17 20:38:09 +00:00
Axel Dörfler
6db6b628d6 * Added B_PHYSICAL_BASE_ADDRESS address specification for anonymous areas.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 23:32:25 +00:00
Axel Dörfler
736352dcf5 * Added [un]lock_memory_etc() versions that accept a team_id as first argument.
This allows drivers to lock the memory outside of the original team context.
* create_area_etc() got a struct team as first argument, but that should have
  been a team_id.
* Removed delete_area_etc() - there is already vm_delete_area() doing the same
  thing.
* Renamed vm_get_address_space_by_id() to vm_get_address_space(), as there is
  no other method of getting an address space.
* Removed erroneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 22:55:17 +00:00
François Revol
3a7f25d039 Add identifier for 64 bit float raw audio format, really just to show we can support it without hacking the API :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 19:06:39 +00:00
Oliver Ruiz Dorantes
870ae24a6d Resolve allocation of multiple Messengers,(Mika Lindqvist)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 19:04:53 +00:00
Stephan Aßmus
1ae794159a * Changed the signature of UpdateText() to return a "const char*" (char*
really makes no sense if the pointer belongs to the derived class and
  only confuses). Note this change does not affect binary compatibility.
* Introduced a new MaxUpdateTextWidth() virtual method which is really
  necessary to handle the update text correctly in the layout.
* Introduced a new UpdateTextChanged() method which can be called to
  notify the control of a changed update text. Internally, SetValue()
  also uses it.
* Handle the width or height of the UpdateText() correctly in the layout.
  For horizontal layout, the width was forgotten to be included in
  GetPreferredSize(), for vertical layout, it was completely broken before.
* Handle invalidation correctly when the UpdateText() changes.
* Remove the arbitrary insets for labels from the border the control. This
  makes it easier to align the control's labels with other controls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 18:37:44 +00:00
Stephan Aßmus
423b124450 First round of BSlider fixes to be more layout friendly:
* Improve the minimum size calculation and cache it.
* Invalidate the layout on various property changes that require it.

Vertical BSliders are very broken... that's up next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 14:41:10 +00:00
Stephan Aßmus
cdcfa5945d * Added layout friendly constructor
* Use constructor lists for initializing members
* Simplified initial SetBarColor()
* Update the offscreen view with ViewColor() and LowColor(), someone might
  have changed it after AttachedToWindow() was called.
* Cleanup here and there


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 13:46:05 +00:00
Stephan Aßmus
e87506af4d * Implement SetFont() and invalidate the layout. More controls should probably
do this.
* Fix build, appearantly I made a last minute change in Draw()...

BTW, confirmed that adding virtuals declared in the base class is ok for
binary compatibility.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:55:44 +00:00
Stephan Aßmus
d3fe87ce70 * Cache a fPreferredSize following the example of BButton. Changed
GetPreferredSize() accordingly.
* No longer adds margins to the left/right side and top/bottom. These will
  make it difficult to make exact visual alignments with other controls and
  labels.
* Invalidate the layout in SetText().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:20:26 +00:00
Axel Dörfler
b6c3ddcfb4 * Cleaned up odd indentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-14 17:30:59 +00:00
Oliver Tappe
49a22456dd Overhauled BNetEndpoint implementation (and BNetAddress, too):
* added NetEndpointTest that exposed a couple of bugs
* fixed several bugs in the implementation of BNetEndpoint, some of which kept 
  NetPenguin from working
* fixed a couple of constness issues in BNetEndpoint and BNetAddress


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-13 19:58:35 +00:00
Ingo Weinhold
f9f2d81621 Added helper function get_default_partition_content_name() that can be
used by file systems to get a useful name, if the file system (or just
that specific volume) doesn't have one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-13 12:50:35 +00:00
Ingo Weinhold
60f2ef17be * Added "partition_id partition" field to fs_volume, so that file
systems can get the partition they reside on easily.
* Updated TODO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-13 12:47:08 +00:00
Oliver Ruiz Dorantes
d04eb939af -Move the launching of the Local Device to an IOCTL from the open hook to be more compatible with the net_stack
-Implement Launch method in the accesors regarding previous comment
-Fix KDL at removing device



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-09 17:01:30 +00:00
Stephan Aßmus
bb73c05fd7 * Introduced a new view event mask flag: B_FULL_POINTER_HISTORY which,
when set, prevents any old mouse moved message discarding.
* BWindow::DispatchMessage(B_MOUSE_MOVED) checks the event time of the
  message and discards too old events, but only if there is another event
  in the queue and the view does not specify B_FULL_POINTER_HISTORY.
* BView::GetMouse() ignores the checkHistory flag passed to the function
  in case the event mask specifies B_NO_POINTER_HISTORY.
  B_FULL_POINTER_HISTORY on the other hand prevents the dropping of old
  messages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-09 14:13:03 +00:00
Oliver Tappe
1aa3d2e3f3 Resolved a couple of problems in BNetAddress implementation:
* fixed several byte order inconsistencies, it does not make sense to always
  convert the byte order input/output values - no we convert where it can
  be expected and leave it where it is confusing
* fixed size inconsistencies with respect to family and port, both of which
  were sometimes handled as int8, as int16 and as int32 in different places
  (now they are always int16)
These fixes make Beam connect to the correct address and port, but it still doesn't work, as it seems to be using UDP instead of TCP (doh!). Will look into that tomorrow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 22:37:06 +00:00
Oliver Ruiz Dorantes
75c310bc5b Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:12:07 +00:00
Oliver Ruiz Dorantes
ade530ec1d Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:10:24 +00:00
Oliver Ruiz Dorantes
c8bc2d8897 Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 20:01:02 +00:00
Oliver Ruiz Dorantes
9bfe62f9aa Cleapups, Fix memory leaks,
Patch by Mika Lindqvist. Could we give give him Commit access? 
I am getting daily patches from him with fixes and new features.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 19:41:45 +00:00
Oliver Ruiz Dorantes
51ac4f530a Patch by Mika Lindqvist
FromString Implementation for the bdaddr utils class 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 21:43:21 +00:00
Rene Gollent
84d75fa444 Rewrote SwapItems() so as to not fail in various cases.
Fixed logic error in CountItemsUnder() that would sometimes 
return the wrong count. This would result in issues such as
Vision's network reordering failing to reorder down due to
retrieving the wrong item based on the count.

This fixes ticket #2447.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-28 03:03:56 +00:00
Axel Dörfler
9c557206db * Rewrote NetKit.h, and added the libnetapi headers.
* This closes bug #2444.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-24 09:03:44 +00:00
François Revol
b409283372 Set max cpu count to 1 for ARM. Anyone knows a real SMP platform using it ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 21:48:18 +00:00
Stephan Aßmus
d6b036858b Move the now used boolean to the old place in order to avoid different padding
to happen and therefor changing the object size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-19 14:17:56 +00:00
Stephan Aßmus
eaa6da1ef7 Use a flag in BWindow to store whether an update to a view (Invalidate()) has
been requested. The first call to a BView::Invalidate() will flush the link
so that app_server is notified as soon as possible. It makes no sense for
further calls to Invalidate() to flush also, since Flush() is not cheap. This
trick makes Invalidate() about 3.2 times faster, making it a cheaper operation.
I could not see any negative effects, I tested with apps that invalidate
multiple different parts inside a window in reaction to something. Thanks go to
Ingo who had the idea.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-19 13:07:44 +00:00
Oliver Ruiz Dorantes
24f4a20d25 Add UI classes to the build.
Adding some helper methods to the Local and remote devices



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-18 21:01:26 +00:00
Maurice Kalinowski
53779f07a4 fix gcc4 warning about wrong argument type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-15 19:21:00 +00:00
Rene Gollent
0c8bdbafd5 Revamp BList somewhat to further optimize the resizing behavior.
We now keep track of a lower bound as to when the list should scale
itself back down. When increasing the list size, we double the current,
with the lower bound set to 1/4 of the current size, not allowing it to
go any smaller than the block size. These combined allow us to do very
cheap tests to see if an operation requires a resize at all, and minimize
how often the list actually needs to be resized, since the difference in upper
and lower bounds prevents bouncing back and forth between a size in the case
of adding/removing an item while close to a boundary. All in all this should
make BList noticably more scalable when doing large numbers of add/remove
operations.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 21:30:28 +00:00
Oliver Ruiz Dorantes
c15ecd98ca - Add some core code for the L2CAP layer (l2cap commands)
- Tailor a bit the main module
- Fix definitions in the main header




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 19:31:29 +00:00