Commit Graph

910 Commits

Author SHA1 Message Date
Stefano Ceccherini c044172704 I was wrong after all. InsertText() doesn't call SetRunArray() (and
hence CancelInputMethod()), but it implements part of it. To avoid code 
duplication, I added a private _SetRunArray() call, which does most of 
the work, except cancelling the input method, and calling Refresh().
Removed some unneeded code from CancelInputMethod(), some small changes 
in HandleInputMethodChanged. 
-Questa linea, e quelle sotto di essa, saranno ignorate--

M    src/kits/interface/TextView.cpp
M    headers/os/interface/TextView.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-08 21:46:35 +00:00
Ingo Weinhold bf95c9aee6 * The shadow_changed() FS and partitioning system hooks take an
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
  the kernel, since it is no input parameter. It also copies back the
  actual partitionable spaces count on error, now -- B_BUFFER_OVERFLOW
  is returned when the buffer was too small, but then the count must be
  returned too.
* Fixed several instances of syscall implementations that unloaded a disk
  system, although they didn't load it in the first place. This screwed
  up the load count with undesirable consequences.
* _user_create_child_partition() would set the size to the supplied
  offset.
* Fixed broken loop in KPhysicalPartition::CreateShadowPartition().
* KPartition::RemoveChild() notified the listeners about the wrong
  event.
* Intel partitioning module:
  - The *_get_partitionable_spaces() correctly return B_BUFFER_OVERFLOW
    now, if the supplied buffer is too small.
  - Implemented a part of pm_shadow_changed(), which creates and updates
    the PartitionMap, so that the validate_*() hooks have a chance to
    work at all.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:39:35 +00:00
Ingo Weinhold dbef8fc452 * Added get_physical_partition() function, which always retrieves the
physical partition, unlike get_partition() which returns the shadow
  partition, if it exists.
* Added B_PARTITION_SHADOW[_CHILD] partition pseudo operation values for
  the shadow_changed() hook, notifying a disk system, that a shadow
  partition has been created.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:11:37 +00:00
Ingo Weinhold db5c68ca46 * Added the partition size as parameter to the file and partitioning
system initialize() hooks. It's often the only info about the
  partition one needs and thus locking the partition just to get it is
  no longer necessary.
* intel partitioning system:
  - Removed passing around block sizes. We require 512 byte sectors
    anyway. In fact using the parent partition's block size was even
    wrong.
  - Simplified writing the partition map sector.
  - Simplified and corrected the partition map initialization.
  - We don't fail identifying a partition anymore, if the partition map
    contains no partitions. We would never identify a freshly
    initialized partition map before.
  - Made pm_identify() more intelligent: It determines the priority to
    return depending on whether the partition is the device itself and
    whether we have recognized child partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:48:18 +00:00
Ingo Weinhold 8c8f8c8420 Added scan_partition() function which can be used by disk systems (e.g.
in *_initialize()) to save some work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:03:24 +00:00
Axel Dörfler 3e9513aa4a * fs_{write|read}_pages() now has an additional argument "mayBlock".
* the page writer don't allow to block, while all other writers do. This fixes
  bug #1509. The reason the page writer needs this is because it marks several
  pages from different caches as busy.
* Fixed a warning about ASSERT being defined already in BFS, since
  util/DoublyLinkedList.h now includes debug.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 12:45:15 +00:00
Stefano Ceccherini f2476bcc9c Patch by Rene Gollent: TextViews now can scroll even if they aren't
attached to a BScrollView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 11:32:06 +00:00
Ingo Weinhold 636bfc08ae * Renamed fs/vfs_select.cpp to wait_for_objects.cpp and got rid of
vfs_select.h, respectively moved most of it into the new kernel
  private header wait_for_objects.h.
* Added new experimental API functions wait_for_objects[_etc](). They
  work pretty much like poll(), but also for semaphores, ports, and
  threads.
* Removed the "ref" parameter from notify_select_events() and the
  select_sync_pool functions as well as from fd_ops::fd_[de]select(). It
  is no longer needed. The FS interface select() hook still has it,
  though -- the VFS will always pass 0.
* de]select_fd() take a select_info* instead of a select_sync* + ref
  pair, now. Added respective functions for semaphores, ports, and
  threads.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 19:47:31 +00:00
Axel Dörfler 083de48a4b * Rewrote the trigger selection mechanism: it now searches for uppercase
characters first, and then falls back to take everything. fTrigger is now
  uint32 and works with all unicode characters; unlike in BeOS, the
  MenuTriggerTest application now works correctly in Haiku.
* fTriggerIndex is now a character position, not a byte position of the label;
  this allows BMenuItem::DrawContent() to draw the trigger at the correct
  position, even if there are multi-byte UTF-8 characters.
* The above fixed bug #1506; triggers are still not working, though.
* Rewrote Menu.h header.
* Renamed all private methods (that are not called by BWindow) to have the
  underscore prefix.
* Removed unused methods.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 10:52:45 +00:00
Marcus Overhagen 8ce98e44cc convert files to new include file locations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:53:42 +00:00
Marcus Overhagen 641e015e6e this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:08:52 +00:00
Marcus Overhagen 178bce195a this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:07:23 +00:00
Marcus Overhagen 4ecfa05eb3 this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:06:24 +00:00
Marcus Overhagen 5451eb688b this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:05:55 +00:00
Marcus Overhagen 7d4093aa23 this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:04:05 +00:00
Stefano Ceccherini e96b202311 Patch from Ioan Molnar:
If a Tab is partially out of the window, clicking on it to make it the 
active tab will scroll it to be completely visible.
The best solution would probably be having a way to scroll through the 
whole list of tabs, or something like this. But for now, at least, makes 
the tabbed terminal a bit more useful.
Thanks!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-27 08:26:15 +00:00
Stefano Ceccherini 6d523548f1 Fixed endlines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-27 07:55:16 +00:00
Stefano Ceccherini 3424ff46e9 renamed private members of BPicture to fit our coding guidelines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-10 14:55:42 +00:00
Stephan Aßmus a431f44be8 * make the text view layouting more robust, draw the frame around the
text view, ignore the divider for this (application code could layout
  the textview itself, and fDivider might not be maintained)
* change Draw() and TextInput::MakeFocus() accordingly

this fixes the weird placement of text controls in Beam


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 12:51:59 +00:00
Marcus Overhagen 402a4a4e7b Set scsi target id limit to 16, was previously hardcoded to 2. Add a node attribute to allow overriding this value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 19:57:51 +00:00
Marcus Overhagen c42a837e85 scsi_sim_cookie is just another name for void *
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:55:45 +00:00
Ingo Weinhold 76a8ec23db * Added disk system flags for whether a partition name and partition
content name are supported.
* Added file_system_module_info::flags (analogously to
  partition_module_info::flags) which indicate which disk device
  features the FS supports.
* Replaced the
  file_system_module_info/partition_module_info::supports_*()
  hooks by a get_supported_operations() hook and for partitioning
  systems additionally a get_supported_child_operations() hook.
* Updated file and partitioning systems accordingly.
* Updated fs_shell accordingly.
* Updated the DDM accordingly. The syscall interface remains unchanged,
  though.
* _user_supports_initializing_partition() also checks whether the parent
  partitioning system is content now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 21:21:30 +00:00
Axel Dörfler b78583734c The client-side implementation of B_NO_POINTER_HISTORY did only work for SetEventMask(),
but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-20 23:24:26 +00:00
Stephan Aßmus f591e3a0f2 * fix weird Shape op/point allocation
* handle out of memory situations
* don't try to copy (and assign op!) in SetData if opCount/ptCount is 0
-> FontDemo doesn't crash anymore eventually when cycling fonts in outline
mode


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 11:17:29 +00:00
Stefano Ceccherini 422fadc829 Moved the dummy table local to the PicturePlayer::Play() function since,
as Marcus pointed out, having it outside wasn't thread safe. Moved 
PicturePlayer into the BPrivate namespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 14:40:03 +00:00
Axel Dörfler b73648647d * Fixed the TODO added by Ingo in r21957: locking the application didn't even make any
sense. Instead, we now lock its app_server connection only. The deadlock as exposed
  by starting Icon-O-Matic twice is now gone, at last.
* Fixed the TODO added by Ingo in r21953: moved the thread/handler renaming code in a
  dedicated method _SetName() which is now called from _InitData() and SetTitle(); the
  "w>" is no longer lost.
* Unlike the BeBook states, BMessageQueue::RemoveMessage() is indeed not supposed to
  delete the message it removes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-15 01:06:20 +00:00
Ingo Weinhold d23c482278 Patch by Łukasz 'Sil2100' Zemczak: Made BStatusBar layout friendly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 23:34:06 +00:00
Stefano Ceccherini 4d47fee5cd Renamed some BPicture private functions, small cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 15:28:31 +00:00
Stephan Aßmus 8c1a98d8d4 * there was a complete mixup of "drawing origin" and "scrolling offset" in the
BView implementation (client side)
* introduced some private methods for _Convert*(BPoint*) methods which avoid
  doing the check_lock() thing in the recursion, also Origin() would likely
  have communicated with the app_server all the time, since the origin bit
  was needlessly invalidated, so some speedup should be achieved
* this should fix ticket #98


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 09:52:25 +00:00
Jérôme Duval a9fa028de4 updated mesa to 7.0.1
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 21:12:30 +00:00
Axel Dörfler eaad52e8d7 Now uses the cache stack trick for a cheaper check_lock() version as suggested by stippi.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 22:43:52 +00:00
Stephan Aßmus a4dcea7870 * remove dos newlines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:16:22 +00:00
Stephan Aßmus 2222864eed * complete overhaul of the font/glyph caching
* the previous AGG implementation is superfluous
* the new implementation is based on that one, but in a way that allows
  read/write locking to the list of cache entries (fonts) as well as
  read/write locking to the cached glyphs per individual font cache entry
* new GlyphLayoutEngine.h, which is to be the central place for layouting
  glyphs along the baseline.
  It handles the locking for getting the font cache entries.
  It works by giving it a template class GlyphConsumer which does the
  actual work.
* changed AGGTextRenderer to use the new font cache
* changed ServerFont::StringWidth(), and the bounding box stuff to use it
* changed DrawingEngine, it doesn't need the global font lock anymore
* our BFont thought that GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString
  is the same, which of course it isn't, hence the two separate functions...
  AsGlyphs just gets the bounding box of each glyph in a string, not treating
  the string as an actual word
  AsString adds the offset of the glyph in the word to the bounding box
* changed ServerProtocol.h accordingly for the different bounding box meaning


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 19:10:38 +00:00
Ingo Weinhold 9e12e9a72e * Added mapping of dup() in the FS shell.
* Adjusted the FS initialize() hook to have FD and partition_id
  parameters like the other hooks instead of the partition path.
* Adjusted initialization in BFS accordingly.
* Implemented the FS initialization method in KFileSystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 12:43:49 +00:00
Axel Dörfler edb15b5565 bonefish+axeld:
* Simplified the notification framework: removed the updater stuff completely;
  it was only there to account for some peculiarities of the node monitor which
  we now solved differently.
* NotificationListener no longer includes a doubly linked list link for convenience;
  it might want to listen to more than just one service.
* NotificationService cannot have an abstract destructor.
* Changed the _user_stop_watching() syscall to mirror the Be API; ie. it's no
  longer possible to just remove some flags separately, just to stop listening
  completely.
* Adapted the node monitor implementation to live in the NodeMonitorService class
  that uses the new notification framework.
* Removed the public kernel node monitor API - it wasn't useful that way since you
  couldn't do a lot with the KMessage in the kernel without using a private API.
  Now you will have to use the (private) notification manager to use the node monitor
  from inside the kernel. At a later point, we might introduce a public API for that,
  too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-01 14:48:44 +00:00
Stefano Ceccherini 60be800755 Added a wrapper method to instantiate_object(), where we catch any
possible exception thrown from the constructor called by the function 
itself, for safety. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-30 14:21:41 +00:00
Ingo Weinhold 2dc6403ddc Addition of write support to the disk device manager. Courtesy of Tomas
Kucera and Jan Matejek.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 12:12:35 +00:00
Philippe Houdoin f4ac9a9693 DPC module interface is not binary compatible with Be's own DPC.
Make our DPC named differently to avoid this confusion.
Detected while testing our ACPI (which needs our DPC) under 
R5...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-25 23:44:00 +00:00
Stephan Aßmus ed2254308b * just realized a bug already when reading over the commit log...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:16:54 +00:00
Stephan Aßmus 582da17386 * complete reimplementation of BRegion and it's backend
I "ported" the region implementation from XOrg to work on BRegion data.

This resulted in pretty much the same code structure as before, with 
RegionSupport.cpp containing the messy details. Only now it _is_ really messy
from a code beauty point of view. I didn't exactly feel like cleaning it
up right now... but I guess I will have to.

So what does this mean - our BRegion implementation was very slow (no offense!),
and on top of that it scaled very badly with more and more rects. The new
implementation seems to be on par with the very fast R5 implementation and
the data looks exactly the same too. BRegion is very performance critical
for the app_server, and I cannot wait to try this on my slow computer...

Some changes are noteworthy: The right and bottom coordinates of
BRegion internal data are now exclusive! I inherited that from the
XOrg implementation and didn't feel like changing the code, seeing it
is probably tested quite well. The conversion is handled transparently.

Secondly, constructing a BRegion with just one rect is not invoking
malloc anymore for the member data, this makes it much more efficient
to use temporary BRegions with just one rect, both externally and internally
in the BRegion implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:06:28 +00:00
Jérôme Duval 0de9b61d51 updated mesa to 7.0
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 22:28:49 +00:00
François Revol 60076b7199 Official place for socket.h is sys/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-14 09:26:22 +00:00
Jérôme Duval 5d5a6848b5 added printf format attributes for gcc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-11 18:55:27 +00:00
Axel Dörfler b463849f4d StorageKit.h still included the Alias.h header file I removed with the previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-06 12:52:01 +00:00
Axel Dörfler 70fa61adbb * Removed the _IMPEXP* stuff from the headers Ingo clearly identified as ours.
* Removed storage/Alias.h as that stuff isn't even available on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-06 10:35:17 +00:00
Axel Dörfler 7a1b4ef3fd Obviously forgot to commit these; they were part of the mount_id/vnode_id to dev_t/ino_t
conversion.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-05 14:48:16 +00:00
Axel Dörfler f9d99406ae Fixed build under Dano (and probably Zeta, too); our headers used entry_ref resp.
BDirectory without declaring it first. Since that's an actual bug, I made the
changes in the Haiku headers, and copied them back to the build headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 23:20:05 +00:00
Stefano Ceccherini 99584ef9a2 Added _Show/_HideCaret() and used them in place of more bug-prone code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 20:20:09 +00:00
Axel Dörfler b418398455 * Removed _GetWindowList()
* _WindowAt() and _CountWindows() now have an individual version of that
  code which should be magnitudes faster.
* _WindowQuitLoop() no longer handles hidden windows specially - instead,
  it now walks the window list in the correct direction which should fix
  the issues.
* Also, it now uses WindowAt() and thus has an up-to-date view of the
  window list (it will no longer ignore new windows).
* And finally, it will no longer dereference an unsafe pointer (for
  BWindow::IsFilePanel()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-25 23:38:45 +00:00
Michael Lotz ac9d119566 Commiting patch by Salvatore Benedetto. This adds isochronous handling to the USB bus manager and enables inbound isochronous support in the UHCI driver. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-25 19:51:12 +00:00