Commit Graph

2340 Commits

Author SHA1 Message Date
Axel Dörfler 508d8a847f Big cleanup, rewrote Shelf.h.
Fixed bug in BShelf::ReplicantAt() - it is supposed to test if any of
the variables passed in is NULL before writing to them.
Got rid of the _PR3_COMPATIBLE_ stuff - we definitely don't need that :)
Refactored the code a bit - moved the identical parts of the three
DeleteReplicant() variants into a separate method _DeleteReplicant(),
moved _rep_data_ code out of the class definition, replaced names like
"fView2" and "aBool" with something more meaningful.
Prefixed private methods with '_'.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 00:43:52 +00:00
Marcus Overhagen 23f34657e1 This fix should prevent TimeSource control thread from using random semaphores,
by no longer using an uninitialized Blocker object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 21:35:38 +00:00
Axel Dörfler 34597b9215 Moved WindowInfo.h from private/app to private/interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 20:33:13 +00:00
Axel Dörfler 34ce0e42d4 As it turns out, window_info::type is really the window's "feel".
Basic support for the desktop window feel: WinBorder will now resize
a window with kDesktopWindowFeel to span over the whole screen.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 20:28:40 +00:00
Axel Dörfler 2b1246d968 Renamed AS_WINDOW_TITLE to AS_SET_WINDOW_TITLE.
Fixed handling in ServerWindow as stippi's latest commit broke it.
It's now properly done with a separate ServerWindow::SetTitle() method,
that will also take care to rename the window's thread.
Changed naming the window thread in the app_server to "w:<team>:<title>".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 19:20:19 +00:00
Axel Dörfler d76e154b8b Implemented get_token_list() and get_window_info() client side.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 17:30:54 +00:00
Axel Dörfler ef571f678c Cleanup. Added BTokenSpace::GetList(), though it's probably not needed after all
(we can still remove it later if needed).
Added B_SERVER_TOKEN type.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 17:22:35 +00:00
Stephan Aßmus 2e6a5805ba MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 16:30:53 +00:00
Stephan Aßmus 359c905c57 offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 16:17:16 +00:00
Ingo Weinhold 553ea30124 * Moved TRoster out of the BPrivate namespace. It does no longer appear in
any public header.
* Replaced a good deal of the MessageDeliverer's DeliverMessage() versions
  by more general ones using the new interface MessagingTargetSet to represent
  a set of targets. This simplifies the usage in cases where the caller doesn't
  already have the targets in a supported representation.
* Implemented a first approximation of the shutdown process. There is no
  GUI yet. Only superficially tested under R5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 17:17:40 +00:00
Ingo Weinhold 925d069d23 * Added BRoster::ShutDown().
* Adjusted the shutdown command to use BRoster::ShutDown(). Removed
  the alert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 17:04:47 +00:00
Ingo Weinhold 9fac7d6cfc BServer now remembers whether the GUI context has already been initialized, so that InitGUIContext() can be invoked twice without harm.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 16:55:27 +00:00
Ingo Weinhold a60ea28262 * Made BApplication::Private public. Should not have worked before (probably
a compiler bug).
* Don't try to cleanup the app server connection stuff, when compiled
  with RUN_WITHOUT_APP_SERVER.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 16:53:59 +00:00
Ingo Weinhold a406236dc2 New error codes:
- B_SHUTDOWN_CANCELLED: The shutdown process was cancelled (most likely by
  the user).
- B_SHUTTING_DOWN: An operation cannot be performed, since the system is
  shutting down (e.g. BApplication creation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 16:50:29 +00:00
Stefano Ceccherini 96f6ef632c The bar and knob frame are now calculated. That way we god rid of some billions fPrivateData->fThumbFrame.OffsetBy() calls
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 07:42:24 +00:00
Stefano Ceccherini 0ee76eaf12 More work on scrollbars. Some refactoring.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-02 14:08:33 +00:00
Stefano Ceccherini 267b721430 Started integration of new drawing code. Still so much work to do. Simplified some parts of the code. Scrollbars are broken in many ways, need refactoring
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 22:13:10 +00:00
Axel Dörfler 86fa5942b1 Added a LinkReceiver::Code() method, that can be used to retrieve the
code of the current message.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 06:50:09 +00:00
Axel Dörfler b7a96f02fd Now fills in system_info::cpu_infos[] (ie. CPU activity) by looking at the active
time of the idle thread. IOW Pulse now works :-)
Renamed the idle thread/stack to start with 1 instead of 0 (first idle thread will
be called "idle thread 1").
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 00:31:38 +00:00
Stefano Ceccherini bb2ee4164b Forgot to commit the changed header too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-30 09:14:08 +00:00
Marcus Overhagen 0d1adad317 Media Codec API just got a visit from the coding style police.
We now use "const" for the chunk buffer pointer returned by GetNextChunk,
because the buffer is not supposed to be modified by the codec.
size_t is used for the size where applicable. This matches BMediaDecoder.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-30 00:24:06 +00:00
Axel Dörfler a00fcbcdf8 Improved BSlider class:
- rewrote GetPreferredSize(), it now actually works correctly
- BSlider is certainly not supposed to resize itself on creation
- fixed BarFrame() and ThumbFrame() to support a different view frame
  than the ideal one
- added SetBarThickness() support
- refactored constraining the mouse point to _ConstrainPoint() - it's
  now used by MouseDown() and MouseMoved() - because of that, tracking
  now works with vertical sliders as well
- still has some drawing problems, but less
- _ReservedSlider4() was defined public for the R5 build
Cleanup, more or less rewrote the header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-29 02:12:42 +00:00
Axel Dörfler ef79db4f7c Doh, two times in a row... forgot to update ViewAux.h.
Changes from BView refactoring.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-29 00:22:01 +00:00
Axel Dörfler bb1336b44f Some refactoring and cleanup:
- renamed some members and methods to fit our style guide
- moved removeSelf() to RemoveSelf() (as those two are essentially
  the same), and fixed it on the way: the state of the child views
  is now also updated by the new _UpdateStateForRemove() method
- Moved BWindow::sendPulse() and activateView() to BView::_Pulse()
  and BView::_Activate()
- some minor stuff

This also fixes the broken previous commit - I forgot to update
View.h; this update contains the previous changes as well. Sorry
for the inconvenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 23:02:44 +00:00
Axel Dörfler 80a230b10e Rewrote the push/pop state and ViewAttr stuff:
- it now seems to work finally correctly
- renamed ViewAttr to ViewState and put it into the BPrivate namespace
- some refactoring (moved some private BView methods to ViewState)
- renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore)
- exchanged BView::originX/Y with fParentOffset (BPoint)
- divided AS_LAYER_GET_COLORS into separate ones for high/low/view color
- BView::SetPattern() now actually works as expected (ie. updates
  only if necessary)
- exchanged the ViewAttr::flags with ViewState::valid_flags which inverses
  the previous logic (which wasn't even used consistently)
- fState was initialized twice (incorrectly by the ViewAttr constructor,
  and then again correctly by initCachedState()) - now the ViewState
  constructor does the job alone, but correctly
- BView::PushState() no longer resets the state (it did so only locally
  anyway...)
- cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 18:56:55 +00:00
Adi Oanca 843c11c953 another message
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 15:09:02 +00:00
Ingo Weinhold 9351453415 * Added a private API class BServer, a BApplication subclass especially
for servers, that don't have a GUI or want to control when the app server
  connection is established.
* BServer is necessarily a friend of BApplication, for it uses a private
  constructor. Hence BApplication::Private::InitGUIContext() is no longer
  needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 14:53:29 +00:00
Ingo Weinhold c8e7f53e08 * Radically culled the list of BApplication friends and introduced a
BApplication::Private class for accessing relevant parts.
* Pulled the app server connection and IK initialization out of
  InitData() into a new method _InitGUIContext() and introduced a private
  constructor that allows to avoid this initialization. This will be used
  for servers that don't have GUI respectively want to init the app server
  connection later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 12:55:16 +00:00
Adi Oanca 876a13d8dc added a scroll message
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 12:02:49 +00:00
Axel Dörfler 85bd83a710 AS_CREATE_WINDOW now also gets the actual frame width and size limits of
the window on server side - ie. if the app_server could not create a
window of the size requested, BWindow::fFrame will still be correct
(and the size limits will mirror actual decorator limits).
Renamed fMinWindHeight and friends to fMinHeight and so on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 01:14:39 +00:00
Axel Dörfler 9793d44045 Removed superfluous BView::findView() and moved its functionality to BView::FindView().
Fixed it on the way - it's a bad idea to pass NULL pointers to strcmp().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-27 01:54:12 +00:00
Philippe Houdoin d5cf9b7feb Removed GLX headers: was never there anyway!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-26 21:48:15 +00:00
Philippe Houdoin c17c7c0645 Internal Mesa3D's private declaration use everywhere in Mesa code.
Maybe this header will move in the future...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-26 13:54:42 +00:00
Philippe Houdoin 0061feaff0 Import OpenGL kit headers, thanks to Mesa3D project.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-26 13:50:18 +00:00
Stefano Ceccherini 55b222b0b0 Stephan already implemented the needed support for dpms stuff too, so why not implementing the client methods too?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 13:53:48 +00:00
Stefano Ceccherini 75de27f83b more BScreen related stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 06:30:09 +00:00
Stefano Ceccherini 4b7db694ce RetraceSemaphore() doesn't need to be public
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 05:40:59 +00:00
Stefano Ceccherini c641898150 implemented client/server side support for BScreen::GetDeviceInfo() and WaitForRetrace(), and (only client side) support for Bscreen::ProposeMode()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 18:02:01 +00:00
Axel Dörfler 0ec4af2233 Improved AreaPool to have an initial size as well as well as a name that is
used for new area.
MemPool::AddToPool() now gracefully deals with NULL pointers (or a size of 0).
BitmapManager was deleting the area it transferred to AreaPool before - it
no longer needs an extra area, though.
Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 04:01:16 +00:00
Axel Dörfler b5436616a3 Fixed some style related functions and other oddities in FontServer.
Also applied our style guide on that class.
Renamed some public globals to match our style guide.
Made BitmapManager inherit from BLocker instead of duplicating its
functionality (incorrectly, did not check for B_INTERRUPTED) locally.
Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 03:31:41 +00:00
Stephan Aßmus 3dcb3b079a Added some root layer locking in ServerWindow.cpp when accessing the layer tree. Moved HWInterface management out of DisplayDriverPainter and into Desktop. Removed all the directly hardware related functions from DisplayDriver API. They just called the same HWInterface functions. Now DisplayDriver is much cleaner and ready for being attached to a yet to be written BitmapHWInterface. Clean up of the display mode stuff in Screen and the View-/AccelerantHWInterface. Frequency is now regarded on Haiku. AccelerantHWInterface::GetModeList now works before SetMode has been called. Added MultiLocker from the sample code. HWInterface uses it now in preparation to being used from multiple instances of DisplayDriver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 23:46:17 +00:00
Stephan Aßmus c69d4b2719 clean up, bug fixes and more robustness
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 23:14:40 +00:00
Rudolf Cornelissen fad6f70b5d added/modified shared_info to (better) support upto 32 3D accelants. Needs to be improved/expanded later though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-19 15:11:42 +00:00
Stefano Ceccherini 10c5dab807 Added client side support for BScreen::RetraceSemaphore() and BScreen::GetModeList(). Server side support isn't yet there, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-18 06:36:23 +00:00
Stephan Aßmus 2734243aca Preparation of more correct support for state stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-17 13:20:45 +00:00
Jérôme Duval 679778fdd8 comment out opengl defs, needed for future opengl additions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-17 09:57:08 +00:00
Axel Dörfler 8095208973 Added poke driver, courtesy of Oscar Lesta. The "poke" command line application will follow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 19:12:46 +00:00
Stephan Aßmus c818183b7e _started_ implementing Tab sliding
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 16:44:58 +00:00
Rudolf Cornelissen a1d2fb778f modified 3d reload flag to support 32 clones, added clone counter as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 12:47:29 +00:00
Rudolf Cornelissen 512d251741 added shared_info flag to inform 3D add-on to reload it's rendering state.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 10:01:26 +00:00