Commit Graph

2846 Commits

Author SHA1 Message Date
Stefano Ceccherini
4185bd8b34 Hopefully simplified BMenu/BMenuWindow relationship and made it more robust.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 13:06:47 +00:00
Axel Dörfler
606e0d364e * Factored out the vnode disconnection code from fs_unmount() to a separate
function, and added a vfs_disconnect_vnode() for other kernel components.
* devfs_unpublish_device() can now optionally make use of this call.
* Fixed the type check of devfs' unpublish_node().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 01:13:12 +00:00
Axel Dörfler
065aa7f66c Added a basic unpublishing function for drivers, not yet tested, though (and even
though it looks so simple, I see no reason why it shouldn't work 8-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 00:13:44 +00:00
Axel Dörfler
e7d4bde0b8 Accidently broke ConstIterator::Rewind().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 22:13:36 +00:00
Stephan Aßmus
306e92084c * small cleanup of Draw (less usage of ui_color() which currently
takes a trip to the server!)
* changed look of mark and submenu symbol to better fit the rest
  of the already changed controls
* the actual background color is passed to DrawMarkSymbol() and
  DrawSubmenuSymbol()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 18:20:06 +00:00
Axel Dörfler
ecdaf9dea8 * The boot loader now adds all block devices in case the BIOS doesn't give enough
information to identify the boot volume - if we want to be able to map all BIOS
  drive IDs to the disks in the system, we need to do this always, though.
* Forgot to commit the updated disk_identifier.h in the last commit...
* Removed the unused dumpBlock() function from devices.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 14:50:37 +00:00
Axel Dörfler
c918a987a0 * Removed my old doubly linked list implementation, and stay with Ingo's.
* Adapt other sources where needed (the boot loader's RootFileSystem still
  used the old implementation).
* Implemented RootFileSystem::Rewind().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 10:27:05 +00:00
Axel Dörfler
c14a34a65f * Improved kernel ELF loader (and made it more similar to the one from the boot
loader): it now supports holes between segments, and accepts any segment order.
* Renamed elf.c to elf.cpp and fixed warnings.
* Renamed elf_image_info::dynamic_ptr and eheader to dynamic_section and elf_header.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-26 15:58:43 +00:00
Axel Dörfler
e404297e56 Very basic driver for the "Intel Extreme Graphics 2" chips, only supports i865G for now.
Only mode switches do work, doesn't yet make sure the mode is valid, though.
At this point, this driver only works on Haiku, the R5 app_server is crashing for some
reason I need to investigate some day (maybe tomorrow :)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-24 21:46:40 +00:00
Stefano Ceccherini
65b4fb8ab1 Check if alt is the command key on BMenu::AttachedToWindow instead of doing it for every BMenuItem::Draw()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-20 20:20:29 +00:00
Stephan Aßmus
af3ac4e80f replaced usage of floor() and ceil() to convert from
BRect to clipping_rect with simple C casts. I think this
is more adequate, since clipping_rects are used for
pixel indices. This change fixes some graphics problems too,
it appears that cursor coords are fractional on Haiku, even
with a normal mouse. In Playground, this resulted in the
hit points being rendered wrongly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:26:17 +00:00
Axel Dörfler
db823da57e * Even though our current heap is a temporary solution, the heap size depends
now on the amount of memory installed in the system. Ie. if you have only
  128 MB the kernel heap will be only half in size.
* Minor cleanup in vm_page.c, renamed some variables to match our style guide.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 15:02:21 +00:00
Axel Dörfler
5f0bf2a3e1 We now track how many pages are in a vm_cache. Therefore, the area_info.ram_size
now reflects the number of pages in the areas cache, instead of just the size of the
area.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 20:17:31 +00:00
Axel Dörfler
16c7939643 Somehow svn messed up my local copy and didn't let me commit this before (needed
to checkout private headers again).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 16:49:24 +00:00
Axel Dörfler
16ed1e1d15 * Removed headers/private/servers/app - everything is in src/servers/app now.
* Removed DisplaySupport.h, wasn't needed anymore.
* Removed private color set functions from InterfaceDefs.cpp - we might want
  something similar, but definitely not like that.
* Minor cleanup, added some missing licenses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 16:42:14 +00:00
Axel Dörfler
38a6ea1d98 * Removed the old AS_AREA_MESSAGE stuff - it's currently not used at all, and
even though we might need something similar, we can't use it (since it was
  based on BGet++).
* Removed BGet++, it's not used anymore.
* Removed ServerMemIO class, was never used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 15:59:23 +00:00
Axel Dörfler
d3b71f5562 Who said I couldn't break the build?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 14:43:29 +00:00
Axel Dörfler
9a44fdc97c * Implemented a new client allocation method: instead of having all bitmaps of
all teams in serveral server areas, and instead of having to eventually clone
  them all several times in BBitmap, we now have one or more areas per team,
  and BBitmap will only clone areas once if needed. As a side effect, this
  method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
  maintenance structures into those everyone-read-write areas, they are now
  separated, so that faulty applications cannot crash the app_server this
  way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
  be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
  (ie. via ServerApp), per area (for overlays, not yet implemented), and using
  malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 13:43:26 +00:00
Axel Dörfler
66b7a0f477 Renamed the _kern_init_heap_address_range() syscall to _kern_reserve_heap_address_range()
and made it more powerful.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 12:52:01 +00:00
Axel Dörfler
7ca5966a15 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 14:42:47 +00:00
Axel Dörfler
e589b33020 Should fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 14:42:04 +00:00
Jérôme Duval
a34963f388 added posix_gnu_string
added more posix definitions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 11:09:43 +00:00
Axel Dörfler
49fe96777b * Removed ColorUtils.cc from libbe.so - I can't think of a reason why
these should be public (they don't match any basic Be naming style
  anyway :-).
* Put the code that's used by the app_server where it's needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-15 00:22:01 +00:00
Jérôme Duval
e0f9a4e815 added some wchar.h definitions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 23:18:32 +00:00
Jérôme Duval
641526173e fixed cpluscplus guard
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 23:17:32 +00:00
Axel Dörfler
579c74ceb5 * Implemented a simple version of the private function mstats() (BeIDE needs it).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 23:15:57 +00:00
Rudolf Cornelissen
dd822d46f6 added new nv.settings to header. Recompile 3D if you want to run 3D :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 16:34:31 +00:00
Axel Dörfler
f46bdd1c9a Added a _kern_get_timezone() syscall that can be used without needing to
re-evaluate the timezone file over and over.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 14:29:56 +00:00
Axel Dörfler
58d9acf59e Enlarged the kernel heap to 32 MB for now, to relieve the "heap overgrown" thing a bit.
That buys some more time before switching to a slab allocator :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-13 17:18:15 +00:00
Axel Dörfler
ca69de45a8 Applied Michael's patch for MessageUtils.h - this is supposed to fix some
crashing bugs with R5 message format conversion.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-13 11:52:28 +00:00
Michael Lotz
641a8290a7 Fixed converting KMessages, their target and reply info weren't preserved. Fixes bug 295.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16734 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-12 13:21:08 +00:00
Axel Dörfler
43d7fe9753 * Added two new constructor forms that allow you to create a BMessageRunner
that is detached from its local object; ie. it will continue to send its
  messages when you delete the object.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-12 12:27:16 +00:00
Stephan Aßmus
ecf9f94800 * cleaned up fPulseRunner stuff, I have no idea why fPulseEnabled was
useful... so I removed it
* fixed memory leak with SetPulseRate(0), fPulseRunner is now
  properly freed in the Window destructor
* fTitle is now freed as well
* fix some potential leaks in BView destructor as well

I wrote a stress test app, which I'm soon going to commit as well...
it shows that not all memory leaks are fixed by this patch, I could
use some help with this...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 19:32:53 +00:00
Michael Lotz
bdbd1cb441 Removing the USING_MESSAGE4 define.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 18:06:46 +00:00
Michael Lotz
2bf8fb3a96 Putting Message4 into place to become the new BMessage implementation. Will cleanup USING_MESSAGE4 now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 17:55:47 +00:00
Michael Lotz
16ba0dc5ca Removing old BMessage implementation. Message4 will replace it in the next commit.
This will allow to fix message related problems like drag and drop and scripting.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 17:52:56 +00:00
Axel Dörfler
f157272bee * You are supposed to free() the mode list returned by BScreen::GetModeList(),
and not to delete it.
* The header didn't include everything it needed.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 15:13:19 +00:00
Axel Dörfler
e389ac9d78 * Removed superfluous Delete*() methods.
* Invocations like SetShortDescription("") will now remove the description as
  well, not only SetShortDescription(NULL).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 10:57:47 +00:00
Stephan Aßmus
8e89843efc * when the client constrained the clipping on a view, the server used to
take an empty region as an indication to remove the clipping, but on R5,
  this is actually valid... this patch fixes the problem
* the ViewState::clipping_region is now consistently used to memorize
  the user defined clipping of the view state instead of being sometimes
  used to cache the current view clipping


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 18:57:44 +00:00
Axel Dörfler
33a9adb376 * Added a wait_for_thread_etc() function that allows specifying semaphore flags
and a timeout.
* _user_wait_for_thread() was not interruptible before, ie. Control-C wouldn't
  work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 16:41:03 +00:00
Axel Dörfler
f8f104b2e1 Fixed build, thanks Jerome!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 16:36:04 +00:00
Bryan Varner
abe0393b82 * acpi bus_manager addition of get_object() functions.
* thermal driver uses get_object to obtain the passive device package.

Need changes to acpi_object_type to handle references... that'll have to come in the near future.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 06:51:46 +00:00
Marcus Overhagen
0c4d975c52 build media kit with debug enabled, even for release builds
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-07 13:24:19 +00:00
Marcus Overhagen
65b73ae4f2 Added a Disconnect() method with simpler parameter list.
Added more error checking to Connect() and Input/Output publishing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-07 12:52:19 +00:00
Axel Dörfler
9f6376a0c7 * get_vnode() did not decrease the sUnusedVnodes counter when taking one node
of that list.
* Added a vfs_free_unused_vnodes() function that calls the low memory handler
  directly.
* create_sem_etc() now calls the above function in case there are no semaphores
  available anymore; this usually frees up to 2 semaphores per node (one from
  the cache if there is a file cache attached, and eventually one from the
  file system).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 16:18:52 +00:00
Axel Dörfler
b420ef6461 * Many VM area creation functions just panicked when a vm_store, vm_cache,
or vm_cache_ref couldn't be created, instead of cleaning up and returning
  an appropriate error.
* vm_cache_ref_create() no returns a status_t instead of the vm_cache_ref
  (as that's part of the vm_cache anyway).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 13:06:10 +00:00
Michael Lotz
404ccd1a92 Added extended ImportBits() to BBitmap to allow the use of BPoint offsets.
Is this too much feature creep?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 01:05:47 +00:00
Michael Lotz
ee18c3ccff Added an extended ImportBits() to ServerBitmap to allow the use of offsets and made ReadBitmap() use it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 00:18:26 +00:00
Michael Lotz
bdc6f9e7ef * Fixed a swapping bug for 16 bit colorspaces
* Added some comments
* Added some checking to avoid noop shifts
* Added buffer length checks
* Implemented (as Stephan suggested) a version of ConvertBits() that takes offsets.
This new version allows to move a region of the source into a region (possibly not at the same point) on the dest while converting colorspaces on the fly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 23:53:33 +00:00
Axel Dörfler
0d4c16e0c0 * Reduced the stack usage of most of the I/O paths - there were several places
that put one or more full paths on the stack before, which could cause some
  problems under certain conditions.
* Cleaned up KPath, ie. use size_t instead of int32 where appropriate, added
  license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 18:11:59 +00:00