Commit Graph

1201 Commits

Author SHA1 Message Date
Karsten Heimrich 5fd5fe56bb * refactor _Init and DoLayout to share some code
* DoLayout did not work as expected, after the call
  the scrollbars would have an 1px offset inside the target
* the target needs to be resized while setting a new border, otherwise
  it would overlap the border and give some drawing artefacts
  
- I'm still unsure if the behavior change introduced with the layout stuff is nice



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-31 21:27:50 +00:00
Bruno G. Albuquerque d254c83c84 - Changed BNetBuffer to a simpler (and R5 compatible) implementation.
- This has the side effect that now it actually works.
- This also indirectly fix BNetEndpoint usage of BNetBuffer.
- Added DynamicBuffer (the underlying buffer implementation) to the Jamfile.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-17 21:28:10 +00:00
Oliver Ruiz Dorantes e5da0ec57e some cleanups and styling by Mika and me
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-16 20:32:19 +00:00
Karsten Heimrich 168353694e * cleanup
* use std::nothrow



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-11 19:06:45 +00:00
Karsten Heimrich e6753e37c6 * fix small mem leak
* whitespace cleanup, etc
* some renaming to fit Haiku style



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-08 15:48:10 +00:00
Oliver Ruiz Dorantes 515e878c43 Add method to dump all DeviceClass information in one single string
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-14 16:22:22 +00:00
Jérôme Duval 60581c6303 added get_modifier_key()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-14 14:47:11 +00:00
Oliver Ruiz Dorantes 33fe7b32db - Implement retrieval of Device Classes.
- Implement DeviceClass for easy analisys of discovered devices's type.
- Make harder the intantiation of RemoteDevices.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-13 23:41:32 +00:00
Stephan Aßmus 295f3d13dc Style update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-21 00:15:22 +00:00
Stephan Aßmus 24a0a80b05 Properly integrate the BTabView into a layout tree. Ie, the content will
now resize with the tab view. There is probably a more elegant way overriding
DoLayout(), but this should do for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-21 00:14:05 +00:00
Stephan Aßmus e401039efa Patch by Artur Wyszynski:
* The BTabView can now be used with layout management. In this setup, children
  views are managed by a BCardLayout and are hidden/shown instead of removed/
  added when (de)activated.

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-20 21:51:43 +00:00
Stephan Aßmus fa6cd8ad6a * The previous change to reorder item->Update() and _RecalcItemTops() obviously
broke everything. If the added item has no chance to calculate it's height,
  _RecalcItemTops() won't work of course. Whatever this was supposed to fix,
  there has to be a correct way.
* Override BView::SetFont() to update all the items. I remember wanting to
  implement this, that's why I refactored a _FontChanged() method, but I
  obviousy never did...
* Moved the AttachedToWindow() and FrameMoved() implementations to a more
  logical position in the file.
* Implement B_PAGE_UP/DOWN key presses. Don't know if that's what the BeOS
  implementation did, will check later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 22:34:11 +00:00
Axel Dörfler 1b21be7091 * BBufferIO did not implement Seek() and Position() correctly; it just passed
it to the stream. This caused Read()/Write() to need two syscalls for nothing
  (this only caused the actual stream to share the same position with the
  BBufferIO, something you just cannot rely on when using buffered I/O).
* Anyway, this reduces the time VirtualBox needs to open some RAW test images
  from over 4 minutes to less than 15 seconds...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 21:23:45 +00:00
Stephan Aßmus e1f3108a60 Patch by Scott:
Make sure the comments are C style in headers that are included by POSIX
headers.

Thanks! Should fix #2870.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-10 23:50:42 +00:00
Stephan Aßmus 52de6dce94 Moved the gradient_type and color_step structs into the BGradient
class/namespace. Renamed the B_GRADIENT_* types to TYPE_* as the context
is already given.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 14:56:56 +00:00
Stephan Aßmus c8d611a2c0 Prepend header guard with underscore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 12:00:57 +00:00
Stephan Aßmus b2411d9aeb System headers need to have "_" prepended in their header guards.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 11:58:54 +00:00
Stephan Aßmus b545073f08 * Moved the global BPrivate::WidthBuffer from BTextView into BPrivate as
gWidthBuffer.
* Tracker PoseView now uses BPrivate::gWidthBuffer instead of it's own
  instance.
* TextView.h and PoseView.h are now a little cleaner.
* InterfaceDefs.cpp now deletes gWidthBuffer in _fini_interface_kit_().
* Added binary compatibility support for NetPositive in WidthBuffer.h and .cpp.
  Obviously it kind of defeats the purpose of having WidthBuffer neatly tucked
  away in the BPrivate namespace, but Haiku should run NetPositive, I guess.
  Fixes #2879.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-06 11:31:40 +00:00
Axel Dörfler 2c1e463c7e * Removed B_{MIN|MAX}_PRIORITY from OS.h - they were never really intended
as public defines. They are now called THREAD_{MIN|MAX}_SET_PRIORITY to
  better reflect what they are for. Minimum priority is now 1, ie. you no
  longer can set another thread to the idle priority. This fixes part of
  ticket #2959.
* set_thread_priority() will no longer allow to change the priority of the
  idle thread to something else. This fixes the rest of ticket #2959.
* Automatic whitespace cleanup in OS.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-05 18:11:58 +00:00
Jérôme Duval d2184e65c1 * whitespace cleanup
* implemented the disabled look and color ramping


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 19:08:26 +00:00
Axel Dörfler 5b812019b4 * Added function block_cache_discard() that flushes blocks from the block cache,
discarding their changes. This functionality currently only works correctly
  when no transactions are used.
* Started test application for the block cache, doesn't do anything yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 14:49:33 +00:00
David McPaul daa2f87441 correct spelling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 22:33:06 +00:00
Ingo Weinhold bc3955fea5 Preparations for removing __BEOS__ from the compiler defines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 21:46:26 +00:00
Stefano Ceccherini 4cc3ec9fdd Moved _joystick_info definition to JoystickTweaker.h, since there is no point to keep it public. Removed default parameter in the second version of Open(), otherwise the two functions can't be used unambiguously. Should fix bug #2904
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 08:18:48 +00:00
Axel Dörfler 9e163a7a93 * Made BScrollView work when using it with the layout system.
* Added a layout friendly constructor - it's not so nice to use, though, since
  the original one already doesn't get a BRect (we just don't need the
  resizing mode, and have to set the B_SUPPORTS_LAYOUT flag).
* Refactored size/frame computation a bit.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 10:14:24 +00:00
Axel Dörfler 23debb05d0 * Rewrote InputServerDevice.h header.
* Renamed _BDeviceAddOn_ to DeviceAddOn, and put it into the BPrivate namespace.
* Moved the DeviceManager functionality into the AddOnManager - this also
  solves a locking issue, as BInputServerDevice::Control() was called in the
  context of the DeviceManager before.
* The AddOnManager now uses the BPathMonitor to monitor the devices that
  BInputServerDevices ask for - this greatly simplifies the code.
* Got rid of TList.h, and use ObjectList.h instead.
* Added PathList class that has a list of paths with reference count, used by
  DeviceAddOn and the AddOnManager.
* DeviceAddOn got an actual implementation that lives in InputServerDevice.cpp.
* Added an experimental BInputServerDevice::AddDevices() that could be used
  instead of recursing over devices manually. It replaces the functionality
  that was found in the DeviceManager before (this was done implicitely for
  all monitored devices).
* Greatly cleaned up and simplified the AddOnManager.
* Also fixed lots of potential errors/leaks when things go wrong.
* Removed the extra locker in AddOnManager - its BLooper lock is now used
  instead.
* Replaced PRINT()/PRINTERR() macros in the AddOnManager with TRACE(), and
  ERROR(), both now use debug_printf().
* Hopefully this fixes the problem that I don't have keyboard under VirtualBox
  from time to time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 15:48:34 +00:00
Axel Dörfler ab42853558 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 13:17:29 +00:00
Karsten Heimrich d751323939 * reintroduce member fOffscreen which got removed in r2917
* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)

  fixes ticket 1522, 1591, 1946, 2318 and propably more

  While creating an BBitmap in BApplication the bitmaps window looper would
  be added to the applications gLooperList, thus calling Quit() on that window
  and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
  would fix the problem, but tests on R5 have shown that BApplication hides the
  offscreen window in CountWindows() and WindowAt().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:23:18 +00:00
Karsten Heimrich a02979bb3f * cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:05:37 +00:00
Michael Lotz 88db388930 Remove one line of whitespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:22:00 +00:00
Michael Lotz 3c6372b44a Rename BMessage::CompareData() to HasSameData() as this makes more sense for the
bool return type. Did I mention this was an unstable Haiku extension?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:45:12 +00:00
Stephan Aßmus 11c5023a77 Applied patch by Stephen Deken:
* Added a new class BAffineTransform, currently in the BPrivate namespace
  and the inofficial "shared kit".
* Extended BPolygon to be transformable by a BAffineTransform.

Thanks a lot!

Minor fixes by myself:
* The class accidentally still derived from agg::trans_affine.
* Added then missing comparator operators.
* Swapped the BPoint* and count arguments of Apply(), since that seems
  to be the more common order in the other Be API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:10:10 +00:00
Michael Lotz 5b25b917f9 Introduce BMessage::CompareData() which is a Haiku API extension. It compares
the data of two BMessages and allows recursive comparison (BMessage inside
BMessage). Note that using this API might require you to recompile your app in
the path to R1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 15:55:36 +00:00
Oliver Tappe 39fbf5509b bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
  virtual function slots: instead of statically invoking the method
  that corresponds to the reserved slot on the class that contains the
  slot, we now invoke the virtual Perform() method. Perform() then dispatches 
  the method invocation to the "proper" class, i.e. the highest class in the 
  hierarchy that  actually implements the requested method.
  This fixes a crash in apps that use liblayout's MSlider class and
  should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
  define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
  invoke Perform() where necessary or to pass on the method call statically
  (for slots that were already maintained by Be)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 09:29:06 +00:00
Stephan Aßmus 991547ef6c Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
  BGradientDiamond, BGradientConic and BGradientRadialFocus
  new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
  the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
  coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
  demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
  clashing with the new BGradient class. Re-use some
  parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

TODO:
* Remove the need to have gradient type twice in the
  app_server protocol.
* Refactor some parts of the patch to remove duplicated
  code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 21:27:42 +00:00
Oliver Ruiz Dorantes 07e4b460ce Add flow specificacion command. Add port names being used among the Stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 20:34:30 +00:00
Stephan Aßmus d3cfdf5740 Updated copyright.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 13:17:24 +00:00
Axel Dörfler 057f999da6 * Added a flag B_DISK_SYSTEM_SUPPORTS_WRITING to determine whether or not a
file system can write to files before mounting.
* Set the flag for all file systems that actually can write.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 22:32:27 +00:00
Axel Dörfler 38bbc95758 * Made the use of file devices more convenient and complete by adding
the methods IsFile() and GetFilePath() to BDiskDevice, and
  BDiskDeviceRoster::GetFileDeviceForPath().
* Added new syscalls to implement this functionality.
* Added new flag B_DISK_DEVICE_IS_FILE.
* Fixed wrong operator precedence assumption in the BDiskDevice class at
  several places.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 21:51:43 +00:00
Jérôme Duval a9d11d2365 updated mesa to 7.2
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 19:37:51 +00:00
Stephan Aßmus 71ea6c9229 * Refactored a method for getting the transit from a mouse moved message.
* In _StealMouseMessage(), don't maintain fLastMouseMovedView, instead,
  prevent B_MOUSE_MOVED message from being stolen that are important for
  detecting transit changes. The point is that some apps (like Tracker) are
  shooting themselves in the foot because they steal mouse messages via
  GetMouse() in one place, but then rely on sane transit values in another
  place. The way it works now, the view in question may get notified of the
  same mouse moved coordinate twice, once via GetMouse() and once via
  MouseMoved().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 19:30:59 +00:00
Ingo Weinhold f965a969b1 Extended the profiling API. When using the variable stack trace depth
buffer format, the buffer can now also contain other events than just
stack traces. ATM these are only references to the image events
(created/deleted). Therefore we no longer have to flush the profiling
buffer after such an event, since the debugger can exactly match the
samples. Since we couldn't flush when the profiling timer hit while the
thread was in the kernel, that wasn't working that well anyway.
"profile -f" fails to translate stack trace addresses only very rarely,
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 00:53:38 +00:00
Michael Lotz 7e1490e0ad Introduce some extensions to the USB v3 module API that allow for device
enumeration (getting roothubs, enumerating child devices and detecting device
topology) and hub port management (resetting and disabling ports). These were
laying around for quite some time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 13:42:59 +00:00
Ingo Weinhold 0135e2e324 * Increased the maximum profiling caller stack depth significantly.
* Extended the profiling API by an option to record a variable number of
  samples per tick. The stack depth is used as a maximum.
* Added new option "-f" to the "profile" tool. When specified it
  increments the hit counts of all symbols in the full available caller
  stack. I.e. the resulting hit counts will approximate the total time
  spent in each function or any function directly or indirectly called
  by it. Thus "_start" and "main" will usually get 100% and leaf
  functions only what time has actually been spent in them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 01:08:27 +00:00
Rene Gollent 90b7764dc3 Move WidthBuffer and TextGapBuffer into BPrivate and use them from there in BPoseView and BTextView. This (correctly) fixes the previous gcc4 build issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 20:47:16 +00:00
Rene Gollent 40ca6c57ee Declare BPoseView as a friend of BTextView. This allows it to use the private width buffer classes, and fixes the gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 18:03:17 +00:00
Stephan Aßmus 8864334702 * First steps towards making BTextView behave well within the layout management.
* The class calculates a minimum width now, which is based on the line height,
  this may also fix the bug with the small text inputs in the Pe Find window.
* Added TODOs about implementing GetHeightForWidth(), which may be a good idea
  when a BTextView is used as non-editable informative text in an interface,
  and one wants to make sure that the entire text is shown.
* Replaced the call to _Refresh() in Draw(), which recalculates all the line
  breaks for no reason with _DrawLines() again. The TODO mentioned that text
  will be drawn without drawing the background first, but maybe this is a
  relict from times where Draw() was invoked directly? At least I cannot see
  any negative consequences, and this should be much more efficient.
  (Other than that, this patch should hopefully have no potential negative
  side effects...<crosses fingers>)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 15:36:44 +00:00
Stephan Aßmus e6378518c4 Fixed typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 09:15:35 +00:00
Stephan Aßmus 6168332c35 Sorry, should have been part of r27660. Moved BTextView::UndoBuffer derivatives
into BTextView class as well, hopefully fixing the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 08:43:06 +00:00
Ingo Weinhold ecfad924e0 Solution for the potential deadlock when needing to flush the profiling
buffer during a timer event that interrupted a kernel function: We do
now flush the buffer as soon as it is 70% full, *if* we didn't interrupt
a kernel function. When the buffer runs full and we still haven't hit a
user function, we drop the tick. The number of dropped ticks is recorded
and sent to the debugger with the next update message.
Reverted the previous partial solution (the temporary disabling of
profiling while in debugger support code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 22:04:03 +00:00