Commit Graph

2709 Commits

Author SHA1 Message Date
Axel Dörfler
463e791c29 Added new window flag B_SAME_POSITION_IN_ALL_WORKSPACES.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 13:07:47 +00:00
Rudolf Cornelissen
224b9020ab added some defines for SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT (in progress).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 20:03:36 +00:00
Axel Dörfler
e83820ed57 Merged app_server_new_clipping branch changes r15290 to 15418 back into trunk.
Also fixed Jamfile for the test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 12:41:19 +00:00
Ingo Weinhold
c729b01278 The <arch_config.h> header is needed in <syscalls.h>, since we're using
the atomic functions related macros.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 23:11:02 +00:00
Axel Dörfler
aa110a00e0 AttachedToWindow() could be called twice in case new views were added during
AttachedToWindow().
This fixes the double team entries in the Deskbar.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 18:04:43 +00:00
Axel Dörfler
715476b7ef The resize code now works correctly, finally - it temporarily did harm ;)
The BViews must be resized directly after every change in the window size - we
cannot wait until B_WINDOW_RESIZED, since subsequent calls have wrong view
sizes, then.
B_WINDOW_RESIZED is only really useful for app_server caused window resizing.
Added TODO to SetLook(): it may change the window size as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 23:15:48 +00:00
Axel Dörfler
ac4fe990c9 * The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
  This saves overhead on both sides, the server doesn't need to build the update message
  for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
  do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
  also break the code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 01:22:02 +00:00
Stefano Ceccherini
a410e190a4 Added rect_contains()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-03 14:12:10 +00:00
Axel Dörfler
c072e9f1f5 * BWindow::AddToSubset()/RemoveFromSubset() no longer send their team ID; this
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 16:07:02 +00:00
Axel Dörfler
85f8bb71c7 * You can now change the look of a window on the fly.
* renamed some Decorator functions like GetLook() to Look().
* renamed _look to fLook and _flags to fFlags.
* removed the feel from decorators - they don't need to know
  or care about the feel.
* the DefaultDecorator didn't allow resizing of modal windows.
* DefaultDecorator::SetTitle() no longer clears the passed
  in updateRegion, it just fills it (so that you can call
  more than one of these methods after the other, and still
  get a correct update region).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 14:56:01 +00:00
Stefano Ceccherini
17adbf1f0c Misc style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 17:56:56 +00:00
Rudolf Cornelissen
b0994d7e75 added field for primary card's name in shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-27 10:32:40 +00:00
Axel Dörfler
3f5eacff02 Quick and dirty hack to let those font rendering problems disappear - I don't really
know what's going on, but this appears to fix it. And since we'll get a new glyph
layout backend sooner or later, I don't want to mess with that stuff again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 22:26:50 +00:00
Axel Dörfler
26b02ddc80 The input_server is now notified when the screen resolution is changed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 16:22:06 +00:00
Rudolf Cornelissen
a40e885b9d added field for primary card's name in shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 21:57:56 +00:00
Axel Dörfler
c3b8f9f69a Added a very simple "code_to_name" utility that will print out the name of
an app_server code. It's always up-to-date as it just reads the header
directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 14:53:34 +00:00
Rudolf Cornelissen
e3c42851f7 moved a define to shared_info for logging update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 15:18:30 +00:00
Rudolf Cornelissen
36e7feca38 updated shared_info for logging update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 15:06:27 +00:00
Axel Dörfler
45d4256f2d Added a BTokenSpace::SetToken() to assign a specific token.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 13:00:06 +00:00
Rudolf Cornelissen
3ea52afce9 added dpms_flags to shared info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 12:16:28 +00:00
Rudolf Cornelissen
88489db7f9 added useable INT flag to shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 11:20:50 +00:00
Axel Dörfler
f97761575a * GetPreferredSize() now accepts NULL arguments for "width" and "height"
* use GetFontHeight() instead of: BFont font; GetFont(&font); font.GetHeight(...)
* fixed odd unarchiving of the alignment.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:28:18 +00:00
Axel Dörfler
6450b76dd4 Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
  EventDispatcher handles them now. As a result, a window will now
  get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
  the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
  when it's set - this is now used for the window moving instead of
  the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
  method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
  because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
  BWindow::_SanitizeMessage(() (similar to what the input_server does).
  This should also make the mechanism pretty robust, since every
  B_MOUSE_MOVED message can now trigger the view transit (in case a
  message is lost). B_WINDOW_ACTIVATED messages should be generated
  client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
  layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
  field; "where" (in window's coordinates) and "be:view_where" are
  added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
  dropped instead of being sent to the looper - this should be done
  in BLooper as well, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 15:17:58 +00:00
Axel Dörfler
b095201503 * changed the way a message is forwarded to the focus view (instead of adding
a suspend focus field to the message, there is now a "feed focus" field in
  case the message should be forwarded).
* added a comment to the BPoint version of _FindView() (since it's broken)
* _DistributeMessage() is now called after _DetermineTarget() - so that it
  can prevent sending the message twice to the focus view.
* removed BWindow::DoUpdate() as it's no longer used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 12:49:35 +00:00
Michael Lotz
85b31e1b69 Removing Message2 and Message3. They did not proof to be good enough so they don't need to take up space either.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 18:47:51 +00:00
Axel Dörfler
14d02d22f6 Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
  view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
  target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
  at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
  (this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
  (previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
  changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
  compatible to that one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 16:58:36 +00:00
Axel Dörfler
3cace414ad Removed run_task(), as it's not really needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 12:35:30 +00:00
Axel Dörfler
e489029756 * made the dano and r5 message more similar to use (naming).
* coding style changes to structure naming.
* but no bug fixes yet...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 22:24:03 +00:00
Rudolf Cornelissen
551528038f added registerdefine for laptop backlight conttrol.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 20:47:47 +00:00
Axel Dörfler
4ceb1e519c * reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
  you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
  in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
  counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
  to your UserBuildConfig:
	AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
  target the client handler, while the other will target the preferred handler of the
  client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:24:23 +00:00
Stephan Aßmus
b223f78041 fixes origin and scale handling, it behaves mostly like R5 now (it is used for drawing only, yes not mouse coords or anything else). Also fixes offscreen layers clipping rebuilding when the user defined clipping is added or changed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 15:10:18 +00:00
Adi Oanca
ace01f864b Removed BWindow::_DetermineTarget(). BWindow's task_looper() just calls BLooper's one. Took Message4 stuff from BWindow's task_looper() and put it in BLooper::task_looper() - guess this is wanted...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 21:44:51 +00:00
Rudolf Cornelissen
58e201cb00 added new registerdefines for LVDS/TMDS distinction code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 13:50:34 +00:00
Axel Dörfler
d081112cb7 * removed tokens are no longer put on a stack and reused - every token is only
used once now. If tokens were reused, you could eventually target the wrong
  (but valid again) messenger.
* removed unused stuff (like GetList()).
* some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 00:46:44 +00:00
Ingo Weinhold
29306dbe81 Host platform gcc 4 fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 22:29:31 +00:00
Axel Dörfler
f759822327 * the new input event dispatcher is now actually used, although it doesn't
distribute any messages to the clients yet.
* removed the working thread from RootLayer - for now, its event handlers are
  still called using input filters in the new event dispatcher, though (to
  get things started).
* ServerApp is now using a BMessenger to identify its client, and no longer
  stores the port/token separately.
* the input_server handshake is a bit simpler now, as it can now just reply
  to the app_server message, removed unused code from ServerProtocol.h
* calmed down the MultiLocker (it always printed thread statistics on startup,
  because it's compiled in debug mode).
* removed the cursor thread stuff from AppServer.cpp
* the new event dispatcher now uses a cursor thread when supported (only in
  native mode, not in the test environment), although it improves cursor
  movement under Qemu, the effect is not as good as expected - this might
  need some more investigations (might just be a thread priority problem).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 11:30:06 +00:00
Ingo Weinhold
65f512e089 Fixed gcc 4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 22:53:30 +00:00
Axel Dörfler
740ccdc27e Cleanup, added license.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 20:19:27 +00:00
Rudolf Cornelissen
44906a1b98 added two more reg defines for DMA init code NV47. Completed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 18:38:41 +00:00
Rudolf Cornelissen
7514b6b4dc updated register defines to support extended acc engine init stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 16:33:28 +00:00
Rudolf Cornelissen
44e343dc48 updated engine DMA acc init code, part 3 (in progress).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 14:58:52 +00:00
Rudolf Cornelissen
efb60a4ef5 updating DMA acceleration code for NV41, 43, 44. Adding code for NV47: sync to XF86, in progress (acc might be broken now..)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 13:00:33 +00:00
Axel Dörfler
128ddaa3e3 Some work on the input_server:
* Rewrote event handling: instead of writing every single device message to
  the event port, they are just queued in a list, and the event loop is only
  notified if necessary (ie. if a notification has been sent already, new
  events are just queued up until the input_server found the time to process
  them).
* This also fixed a big memory leak: every message processed by EnqueueDeviceMessage()
  (IOW every key or mouse event) was leaked!
* no longer abuses gInputMethodListLocker to lock the method event queue
  (it now uses the standard event queue lock).
* removed the completely superfluous, weird and decelerating event caching mechanism
* tried to find a better distribution of work between _SanitizeEvents(),
  _MethodizeEvents(), and _DispatchEvents().
* HandleSetMousePosition() now only does what it's supposed to do (this currently
  causes the mouse to jump at the start, though).
* now uses the "Message4" for message sending if available.
* fixed "kb_mouse_settings.h" to include all headers it needs.
* some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 17:25:58 +00:00
Axel Dörfler
1ba67cc8c6 * almost rewrote BMessageQueue; simplified code, removed over-extensive documentation,
cleanup.
* made BMessageQueue::IsLocked() const - the non-const version is still provided
  for binary compatibility.
* Both BMessageQueue::FindMessage() versions are now thread safe, the queue's BLocker
  is now mutable to allow for this.
* renamed BMessage::link to fQueueLink as the "Message4" implementation uses it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 13:01:59 +00:00
Stephan Aßmus
f4cee9d5f5 fix the FBC problem, as Ingo pointed out, derived classes contain slots for all virtuals defined in the base class, therefor, it is ok to just define WindowActivated for BScrollBar. The only problem is that BScrollBar::WindowActivated() cannot be called from apps having overridden WindowActivated() in a BScrollBar subclass of their own.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 23:46:02 +00:00
Axel Dörfler
6c17d02551 * Introduced a new handshake between input_server and app_server, and some
temporary handling code in the app_server.
* RootLayer no longer creates the input_server messaging port - this is now
  the responsibility of the input_server.
* Moved AS_CREATE_[OFFSCREEN_]WINDOW from ServerApp::_MessageLooper() to
  _DispatchMessage().
* The RootLayer thread is now started as soon as the input_server is there.
* removed or disabled any input_server stuff in the AppServer class.
* removed old message commmands to the app_server.
* Removed the R5_CURSOR_COMM and HAIKU_APPSERVER_COMM definitions: the
  input_server is now automatically built correctly depending on the target.
* InputServer::EventLoop() plays now safe and checks for error conditions.
* InputServer::EnqueueDeviceMessage() seems to leak memory, added TODO about
  this.
* InputServer event loop messaging uses ports for inner-app communication - why?
* The InputServer event loop thread is no longer killed on exit, it just quits
  when its port is gone.
* Minor cleanup in input_server.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 19:59:53 +00:00
Axel Dörfler
44534147b1 "#ifdef __HAIKU__" is no longer needed with the new build system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 13:47:48 +00:00
Axel Dörfler
9a1d68e4aa * rewrote ColorControl.h
* removed unused stuff.
* shuffled methods around in the source, so that you don't have to jump so far
  when working at a specific thing (ie. all draw functions are grouped together, ...)
* ResizeToPreferred() should now work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 02:45:19 +00:00
Stephan Aßmus
034104bc0f * fix invalidation of changed items
* fix deselecting items
* fix selection with the mouse and also holding down modifiers
* fix some more stuff I have already forgotten
* applied coding style in most places
* renamed private functions to be consistent

needs more work though, some stuff can definitely be
removed, some needs to be added


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 01:36:10 +00:00
Stephan Aßmus
db3c2e1e8e * drawing is on the road to perfection
* uses another virtual to implement WindowActivated() and draw itself in
  disabled look just like in R5
* fixed _ButtonRectFor() off by one errors
* tiny problems remain when clicking on the ScrollBar (it is shifted)
* the _ValueFor() might not be perfect


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 00:23:03 +00:00
Axel Dörfler
f375b21da5 Forgot to remove IPoint.h - it's no longer needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 19:48:16 +00:00
Axel Dörfler
be05d56c7e * the app_server now uses a global token space - this should later be changed to
have different token spaces depending on the scope of its objects.
* removed TokenHandler - we're now using BTokenSpace instead.
* removed unused IPoint.cpp - if we ever need it again, it can still easily be
  resurrected from the dead.
* some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 19:46:20 +00:00
Michael Pfeiffer
4a6c604ad4 Clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 19:08:35 +00:00
Axel Dörfler
614de12d9c * the decorator knows best which region to update when changing the title, so
it must now fill the updateRegion parameter of SetTitle().
* WinBorder::SetName() is now greatly simplified and achieves better results
  due to that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 18:16:01 +00:00
Axel Dörfler
02e5c93fd6 Rewrote FilePanel.h, cleanup.
Removed public functions run_open_panel() and run_save_panel() - they are deprecated
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 15:53:46 +00:00
Axel Dörfler
b66d753712 * Prepared the BScreen and BPrivateScreen class to be used with multiple monitors.
* BPrivateScreen now buffers its frame for 0.1 seconds (so that calling it several
  times in a row is both consistent and cheap).
* Added GetFrameBufferConfig() call to the HW interface (and implemented it).
* Added server commands AS_VALID_SCREEN_ID, AS_GET_NEXT_SCREEN_ID, and
  AS_GET_FRAME_BUFFER_CONFIG.
* BPrivateScreen::BaseAddress() and BPrivateScreen::BytesPerRow() are now working.
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 14:36:12 +00:00
Axel Dörfler
d9525baaf5 * Forgot to update Screen.h with the last commit...
* Introduced and implemented AS_GET_SCREEN_ID_FROM_WINDOW - it only returns B_MAIN_SCREEN_ID,
  though.
* renamed ServerWindow::fHandlerToken to fClientToken.
* The BScreen(BWindow *) constructor now really asks the server for the screen ID.
* ServerApp::fWindowList is now a BObjectList.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 12:08:21 +00:00
Axel Dörfler
a817d6ad5a * (tried to) implemented RootLayer::ResizeBy() and activated AS_SET_SCREEN_MODE again;
it works in the test environment, but I haven't yet tested it on real hardware.
* moved PrivateScreen.h to src/kits/interface/ - it's not used outside of that one.
* moved reading the color map from the BPrivateScreen constructor to the ColorMap()
  method.
* improved/cleaned server/client communication for the screen stuff a tiny bit.
* fixed the GetBitmap() method I implemented yesterday.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 11:01:02 +00:00
Axel Dörfler
8bd2c11fc4 Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 19:43:42 +00:00
Axel Dörfler
d2f25ec7a5 That work-around for R5 build targets should no longer be necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 17:54:18 +00:00
Axel Dörfler
8b794301de Changed the way the app_server is built:
* no more libappserver.so - this breaks the "Appearance" application, but that
  has to be fixed some day later.
* the drawing stuff is now built in its own directory as libasdrawing.a.
* TEST_MODE defaults to "0" if not defined yet - it's overridden in the test
  build now, not in the main build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 15:40:21 +00:00
Axel Dörfler
4e766dd482 * header cleanup, but there is still a lot more to do...
* added round(), roundf(), and roundl() implementations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:22:47 +00:00
Axel Dörfler
6065411b88 ualarm()'s arguments are actually useconds_t, too.
Fixed implementation of ualarm() to support larger values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:20:25 +00:00
Axel Dörfler
ec068e96bb No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:06:56 +00:00
Axel Dörfler
b22f48cc07 Fixed alarm(), ualarm(), and sleep() return codes - "uint" is not a POSIX type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:06:08 +00:00
Axel Dörfler
71c6382f33 useconds_t and suseconds_t are now long long ints.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:05:26 +00:00
Michael Lotz
cf10934e5f Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 11:31:07 +00:00
Ingo Weinhold
758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Axel Dörfler
292d5ced0e * Rewrote shortkey handling - it now actually works as expected.
* Some work on _DetermineTarget(), more to come.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 16:13:06 +00:00
Axel Dörfler
d6f43ca72c Looks like Dano headers aren't perfect. I hope this solution is at least a tiny
bit like Ingo would have done it :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 15:50:47 +00:00
Axel Dörfler
2b7b3ade5c Added more or less empty "begin/end transaction" handling in ServerWindow.
Right now, only the updates are disabled as a start. I am not sure what else
we can do here, but there probably is something :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 14:25:12 +00:00
Axel Dörfler
c12196d47b * Removing fonts now works as expected.
* removing a font family or style now always goes through the font manager.
* removed FreeType "cache" remains (it wasn't used, anyway, and won't be used
  by us).
* renamed SharedObject to ReferenceCounting as that's what it does.
* the default fonts weren't deleted on shutdown.
* added temporary work-around for waiting until a newly created entry is complete
  (just waits a moment...) - this will be fixed once Haiku supports this in a
  better way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 17:32:35 +00:00
Rudolf Cornelissen
53ea108855 added custom TV_PRIMARY flag
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 16:38:25 +00:00
Axel Dörfler
d5f377d66c * BinaryInsertUnique() didn't work at all.
* both, BinaryInsert() and BinaryInsertUnique() now propagate the result of
  the AddItem() call - which could fail because of low memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 15:31:18 +00:00
Axel Dörfler
2522a90fd1 Even more font stuff:
* the node monitor is now working - fonts can only be added yet, though
* deleting a FontFamily did not work before, as the last style to be
  removed tried to delete the family again.
* "luckily", FontFamilies and FontStyles were not deleted at all before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 14:52:26 +00:00
Axel Dörfler
174b20a89a Adds the concept of owning the table entries - before, they were always owned,
now it defaults to not-owning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 14:49:24 +00:00
Axel Dörfler
90dfa70739 * ServerFont now also adopts the FontStyle's face and direction on
construction.
* ServerFont::SetStyle() now adopts the style's face and direction, too.
* Started a more sane handling of ServerFont::SetFace() (at least there's
  a to-do comment :-)).
* Minor cleanup (GetStyle() -> Style(), GetFamily() -> Family(),
  GetPath() -> Path()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 20:10:40 +00:00
Axel Dörfler
974dd00c85 The font manager now has default fonts for bold/fixed as well - these are now used
in the DesktopSettings as defaults, too (but can be changed there).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 19:16:25 +00:00
Axel Dörfler
d0a688ee92 Introduced and implemented new font command AS_GET_DEFAULT_SYSTEM_FONT that returns
the default fonts of the app_server.
Moved some font command implementations around to group them a bit better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 18:34:48 +00:00
Axel Dörfler
f46e077c5f Changed the meaning of the second parameter in AttachString(): it's now the maximum
length, not the length of the string.
Introduced a maximal string length that may be sent at once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 18:28:13 +00:00
Ingo Weinhold
88ccb61ad5 Removed GCC headers float.h and varargs.h. Fixed limits.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 18:01:16 +00:00
Stephan Aßmus
2b97fe884d now updates BView::PenLocation() correctly after DrawString(), stuff like DrawChar('a') is working nicely now, for rotated text much better then in BeOS in fact because of subpixel precision in pen location
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 16:55:08 +00:00
Axel Dörfler
5e4d267b5e The FontStyles are already deleted when deconstructing the family list - the
styles hash table shouldn't try to delete them again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 19:04:01 +00:00
Axel Dörfler
ec9b3f7ca1 The font manager now utilizes a hash table to look up fonts by ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 16:49:33 +00:00
Jérôme Duval
e970946333 EHOSTDOWN not needed for Haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 20:09:10 +00:00
Ingo Weinhold
64c51217b2 Fixed header guard name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 18:17:21 +00:00
Axel Dörfler
5f931929f7 Accidently forgot to commit these files. They should have been part of r14751.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 17:33:24 +00:00
Axel Dörfler
862542af1b This fixes the build under Dano/Zeta using the libbe_test target (and maybe others).
As a result, the app_server test environment can be run in Dano/Zeta, but doesn't
yet work correctly (no mouse messages or keyboard input).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:51:33 +00:00
Axel Dörfler
e37155c670 * The font list is now cached client-side. The app_server is only queried for
updates.
* Optimized retrieving the font list from the server.
* This greatly simplifies the app_server communication for getting the font
  list as well - there are now only 2 commands instead of 6.
* Moved extra font flags creation from ServerApp to FontStyle::Flags().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:19:40 +00:00
Axel Dörfler
41572514dd * Added BString version of LinkReceiver::ReadString().
* adopted this method for ServerLink as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:14:05 +00:00
Ingo Weinhold
ca9e5772c3 * Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for
  "haiku") -- added one more level of indirection to achieve that.
  (TARGET_LIBRARY_NAME_MAP -> *_LIBRARY_NAME_MAP_*).
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
  (auto-included when compiling something that uses the Be API for platform
  "host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
  which can be included when compiling something that can be built for both,
  Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
  under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
  to a BeOS compatible host platform target, with the exception, that instead
  of the host platform's libbe.so a special build of Haiku's libbe.so
  (libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
  Haiku's public app, interface, storage, and support kit headers are used
  when compiling. This replaces the less nice way in which the test app server
  and applications for this test environment were built.
  When building for platform "libbe_test", the library name "be" is
  autotranslated to "libbe_haiku.so". Thus most applications don't need
  special fiddling when them building them for the app server test environment;
  usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
  (e.g. source files not including the needed headers directly).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:07:25 +00:00
Axel Dörfler
6efb3f085f Added statvfs.h header and implemented statvfs() and fstatvfs() - both untested, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 13:47:55 +00:00
Axel Dörfler
42b5ae7db9 BFont::_GetExtraFlags() no longer returns a status value, but fills in default
values in case the server communication failed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 11:08:27 +00:00
Axel Dörfler
b2cc345461 More font work:
* Simplified server communication a bit: instead of separate queries for font
  direction, "is fixed", ... there is now a private extra flags field that is
  filled on demand.
* The server command names now describe what the command does, and are not simply
  named after the BFont method (AS_SET_FAMILY_AND_STYLE vs. AS_GET_FAMILY_AND_STYLE_IDS).
* Replaced B_SET_SYSFONT_{PLAIN|BOLD|FIXED} with a single B_GET_SYSTEM_FONTS.
* Rewrote Font.h and added our license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 11:02:39 +00:00
Stephan Aßmus
4f34cedfba also contains code and ideas from Stefano
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:33:09 +00:00
Stephan Aßmus
5083a8d56d stunning improvements to drawing, completely removed flickering, only minor visual problems remain, maybe needs testing with regard to targeted views being removed or the scrollbar being removed etc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14736 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:26:13 +00:00
Stephan Aßmus
0118ad76e1 * Painter uses the line_cap and join_mode settings of DrawState
* Painter implements DrawShape for stroking and filling BShape data
* Painter uses clipping to avoid problems with huge coordinates, the R5 app_server can be crashed by this.
  -> this should be added to more places as well like text rendering
* DrawingEngine uses the Painter to draw BShape data


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:23:40 +00:00
Stephan Aßmus
c325acedde just a bit of clean up and added const where appropriate
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:16:50 +00:00
Axel Dörfler
86ad4b9c5e First steps into on-demand font scanning. When you've installed lots of fonts, this
will speed up launching the app_server considerably (once it's done).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-06 18:58:09 +00:00
Stephan Aßmus
5ac57aebfb improved look and applied style guide, fixed redrawing in BWindows with synchronous controls, it wouldn't have mattered if Haiku didn't have anti-aliasing, override B_RETURN on keydown to disallow turning the control off
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 16:46:36 +00:00
Stephan Aßmus
e7869c4c74 renamed DisplayDriverPainter to DrawingEngine, removed tons of duplicated code, and - guess what - found some bugs while doing so... but nothing critical. This patch removes the former DisplayDriver API from libappserver.so, which I think breaks Decorator plug-ins for now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 18:22:22 +00:00
Axel Dörfler
4d18991268 Added a image_debug_lookup_user_symbol_address() that one day may find symbol names
in user images - right now, it only finds the image name and base address.
Fixed "images" debugger command - it actually acquired a mutex to dump the images...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 17:25:58 +00:00
Jérôme Duval
d05775b3bd added seteuid and setegid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 16:38:40 +00:00
Jérôme Duval
0680eec72c added two missing functions : seekdir and telldir
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 16:13:13 +00:00
Axel Dörfler
7b7c38a2a7 The "where" or "sc" command now switches the page directory to the specified thread
to be able to follow the stack trace into userland.
No symbols there, yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:58:04 +00:00
Stephan Aßmus
6ed894182f renamed DisplayDriverPainter.* to DrawingEngine.*
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:54:16 +00:00
Stephan Aßmus
58468dfed0 first step of geting rid of abstract DisplayDriver base class for less development overhead, DisplayDriverPainter is renamed to DrawingEngine
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:23:54 +00:00
Ingo Weinhold
15694b3032 Will take over the functionality of HaikuBuildCompatiblity.h, while that one
will make a BeOS platform more Haiku compatible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 14:48:35 +00:00
Axel Dörfler
aca4f50d1e Merged DrawData and LayerData to one class DrawState.
Removed that ambiguous second copy constructor and moved push state functionality
into a separate PushState() method. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 11:37:28 +00:00
Axel Dörfler
5abd5613d6 LayerData::prevState is now called fPreviousState and is now private. Added new method
PopState() to make this possible.
When a new layer is created, the font state of the desktop will now be set: this fixes
a bug I introduced when separating the font manager's default font and the desktop's
default font.
The scaling stuff looks pretty broken to me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 09:52:56 +00:00
Axel Dörfler
05bd1efe5b * the FontManager is now a looper (but doesn't do anything useful yet).
* moved the system default font functionality into the DesktopSettings class.
* ServerFont::SetStyle() is now a public method.
* Improved font fallback routines: they will never end up without a font if
  there is at least one font installed.
* fixed some minor bugs in the DecorManager.
* Decorator now get a DesktopSettings object passed - dunno if that's a good
  idea (since we'll have to open the DesktopSettings header), but it works
  for now (and something like this is probably needed anyway).
* a clean ServerFont is now set to the system default font - and not to the
  (user chosen) desktop default font anymore (since the font manager doesn't
  know about that one).
* Improved font directory scanning in the font manager a bit, it's now using
  find_directory() instead of hard-coded paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 17:03:36 +00:00
Axel Dörfler
8365d9ecd2 * A ServerFont is now always valid, bye-bye ServerFont::InitCheck().
* The FontFamily is no longer reference counting itself.
* SharedObject is now more useful and destructs itself when unused.
* Fixed FontStyle::GetHeight()/ServerFont::GetHeight() semantics.
* Simplified ServerFont constructors.
* Removed wrong function descriptions.
* FontStyleHeight is no longer used: the FontStyle is calculating the
  base font height on construction - this reduces the resolution a bit,
  but it's hopefully not causing any troubles (doesn't look like it,
  at least).
* A FontStyle now removes itself from its family on destruction.
* More cleanup, removed unused stuff like FontStyleHeight.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 13:10:28 +00:00
Ingo Weinhold
37a25a6ceb * Fail, if debug_thread() is invoked for the debug nub thread.
* To always be on the safe side, thread_hit_debug_event() now checks
  whether the thread is the debug nub thread.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 00:40:36 +00:00
Jérôme Duval
2726040fcb we can live without you, sysmacros.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 15:27:00 +00:00
Axel Dörfler
bdd34c028f Renamed the FontServer class to FontManager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 13:25:39 +00:00
Stephan Aßmus
26a2be8ba5 less overhead when byte count of string is already known
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 13:14:03 +00:00
Axel Dörfler
1156138b2f Removed unused files like PortMessage.cpp/h and Session.cpp/h.
Renamed LinkMsgReceiver.h and LinkMsgSender.h to LinkReceiver.h and LinkSender.h like
the classes they contain.
Split up PortLink.cpp/h into ServerLink.cpp/h and PortLink.cpp/h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 12:55:20 +00:00
Axel Dörfler
3eba9bd8b3 Renamed the global "ftlib" to gFreeTypeLibrary.
Removed the FTC_Manager for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 08:55:51 +00:00
Axel Dörfler
6f121769ad * Added and implemented AS_GET_FONT_FILE_FORMAT - currently, it returns always
B_TRUETYPE_WINDOWS, though.
* possibly returned an uninitialized error code in some BFont methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 18:21:04 +00:00
Axel Dörfler
b4f34cfb95 * style and family IDs are no longer just the index in their parent's lists (as
they can disappear and IDs should stay persistent at least as long as the
  system runs).
* destroying a FontStyle discards its FT_Face again.
* the font style and family names are now truncated to the appropriate length,
  so that they can always be used via the Be API.
* (char *) == (char *) hardly compares the string (but was probably introduced
  by me when I stopped FontFamily from accessing FontStyle privates
* removed FontServer::SaveList() - made no particular sense to me.
* removed superfluous "inline" keyword in the FontStyle definition.
* more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 17:49:01 +00:00
Axel Dörfler
b8cde4497e More font work:
* simplified BFont::SetFamily*() server communication - there is now only
  AS_SET_FAMILY_AND_STYLE left, but at least that one works correctly.
* BFont::fFace is now always updated correctly.
* Moved the fFace masking to the server - BFont doesn't know enough to do
  this correctly, anyway.
* Only one version of get_font_style() worked correctly.
* Font family/style ID and index were used completely mixed up - this
  would have become an issue as soon as the font list changes during
  runtime.
* Enabled AS_GET_FONT_DIRECTION again - missing functionality should only
  be taken into account on lowest level as long as it can be emulated.
* Made FontServer a bit clearer to use (more to come).
* fixed several allocation leaks in the font server communication.
* New FontStyle::Direction() method, that currently only returns
  B_FONT_LEFT_TO_RIGHT, though.
* more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 16:28:01 +00:00
Axel Dörfler
5234dfe1df Added the alternate ReadString() method to ServerLink as well.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 15:43:38 +00:00
Axel Dörfler
297cd250fa Followed Marcus' suggestion and made fHeight mutable - not nice, but cleaner
than casting away the const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 13:19:00 +00:00
Axel Dörfler
9b1ad6f45e Fixed a bunch of bugs in the font sub-system:
* BFont::Face() was almost always wrong - also on the server side,
  _TranslateStyleToFace() was broken.
* a clean font was not correctly initialized to be_plain_font
* BFont::GetFamilyAndStyle() did not work correctly if either family
  or style was NULL - which is allowed, and shouldn't have let it abort
  its task.
* FontServer::GetStyle() by ID did not work reliably under certain
  circumstances (but those were not reached with the current server)
* BFont::SetFamilyAndStyle() did not work when family was NULL, and
  it also never set fFace correctly.
* Introduced a FontFamily::GetStyleWithFace()
* Renamed some FontFamily/FontStyle methods from ie. GetID() to ID()
  to match the style used everywhere else in BeOS.
* Removed AS_SET_FAMILY_NAME as its no longer in use.
* Lots of cleanup and simplification.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 23:21:36 +00:00
Axel Dörfler
0083a1f3f5 Added an alternate ReadString() in case you know how large the string can get.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 20:04:59 +00:00
Axel Dörfler
0e1358bd5c Applied a patch from Alexander Deynichenko: added missing signal definitions.
That also includes some XSI signals, SIGPOLL and SIGVTALRM, dunno if we will every support
those in a useful way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 12:39:29 +00:00
Axel Dörfler
4d9b4412bd Added memccpy() - not there in BeOS, but part of the POSIX specs.
Contributed by Alexander Deynichenko.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 12:18:55 +00:00
Axel Dörfler
12119222aa struct entry_ref was used without defining it.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 20:30:58 +00:00
Axel Dörfler
9235adf794 The cpuid "extended features" in function 1/%ecx aren't Intel only anymore - my
AMD docs were not up to date. Thanks to Herve for the note.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 18:26:41 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Adi Oanca
412586888e cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 11:38:38 +00:00
Jérôme Duval
9744e7bb63 added a sys/sysmacros.h header (as on R5)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-28 11:43:56 +00:00
Jérôme Duval
a6786b1d3a remove unused header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-28 11:42:00 +00:00
Axel Dörfler
5030d60fe8 Connected the painter stuff to the temporary font lock work-around.
This seem to enhance the stability of the app_server by a magnitude (at least I can
now run apps like Installer and Media without an instant crash).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-28 09:52:26 +00:00
Rudolf Cornelissen
f1c7ec04ea added mode.flag 'TV_PRIMARY (1<<13)'. On dualhead cards you need to issue this flag to setup a TVout mode on the primary head: such a mode can be single- or dualhead. Note BTW that (most of) these custom flags will disappear somewhere in the future: when Haiku supports multiple graphics cards.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-27 20:08:44 +00:00
Rudolf Cornelissen
9be6619743 confirmed NVDAC2_TV_SETUP register to exist (tested NV11). Just saw 'real' (as much as is possible with beos currently :) dualhead running on a GF2MX400 using TVmode on the second head (as it has no VGA connector). Confirmed NV11 having a hardcursor on the second head, and having the capability to switch the overlay engine back and forth. Now I still have to update the TVout drivercode for real for this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-27 17:57:48 +00:00
Axel Dörfler
c2a52d2836 Added a temporary work-around to lift the FreeType problem we're seeing a bit:
Turns out we are using a single FT_Face object for a given font size throughout the
app_server - but the FT_Face object is not designed for a multi-threaded access, AFAICT.
For example, it only has a single glyph slot, that we were using from different threads.
This fix does not cover the renderer, however, which also uses that shared object; IOW
even though it will crash less often it will still crash because of this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-27 16:33:35 +00:00
Rudolf Cornelissen
0b3dc403c8 added status of two new i2c buses to shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-27 14:32:59 +00:00
Axel Dörfler
90ce9e8305 Added calls to read and write the MSR, the machine state register.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 23:39:38 +00:00
Axel Dörfler
8fcd6b8e61 * renamed smp_boot.c to smp.cpp
* there is now a "Disable Hyper-Threading" safemode in the boot loader
* the SMP & HT menu items are now added in smp.cpp - and are only added
  if the system supports one of them.
* more cleanup to smp_apic.h
* removed cpuid() from the boot loader's support.S - instead, it will now
  use the one from the kernel.
* added a very weak HT detection: if the MP config only listed one CPU,
  and this CPU supports HT, we enable the other logic processor manually -
  as this currently doesn't work, it's disabled, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 22:57:13 +00:00
Axel Dörfler
1c016e0e3f Cleaned up OS.h a bit more.
Return type of thread_func is now status_t instead of the previous int32.
Added some more cpuid_info fields - many fields aren't just reserved anymore.
"sysinfo" now supports the extended features of Intel CPUs, and also knows
the "HTT" bit of the standard features indicating the hyper-threading capability.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 22:46:30 +00:00
Jérôme Duval
d7cd6603b4 added pcmcia headers and command line tools from pcmcia-cs-3.2.8
tested ok on Dano
note that _IO* macros were redefined for the R5 target, the ones in Haiku aren't compatible with R5


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 20:43:11 +00:00
Axel Dörfler
ef7bac18bb Implemented call_all_cpus(), and get_cpuid() properly (tested only the latter, though).
The "data_ptr" parameter is now only freed if you specify SMP_MSG_FLAG_FREE_ARG
when sending the ICI message.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 18:18:11 +00:00
Axel Dörfler
6cd505cee7 Changed the boot procedure a bit.
Extracted scheduler_init() from start_scheduler() (which is now called scheduler_start()).
Moved scheduler related function prototypes from thread.h to the new scheduler.h.
Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 16:59:12 +00:00
Rudolf Cornelissen
5385dd2e3b added DPMS flags to shared_info
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 11:38:50 +00:00
Rudolf Cornelissen
9ae6a9220a added card_type NV47 (== G70 == GF7800)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 09:52:11 +00:00
Axel Dörfler
fde12d6407 Some cleanup: renamed the mp_ext_* structures to mp_base_* as they are
part of the base table, not the extended table.
Renamed some structure fields, variables to be clearer and nicer to read.
Removed some unused stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 21:37:40 +00:00
Axel Dörfler
0c67510ae1 Enabled SMP detection again - since it's very likely that it doesn't work on
your system, I've also added a "Disable SMP" safemode option. The NO_SMP
define is still there, and will be removed once SMP works flawlessly.
Prints out infos about the interrupt entries in the MP config.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 19:43:50 +00:00
Adi Oanca
70a4b5ce1e We don't need those message codes anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:20:51 +00:00
Axel Dörfler
3d5ecf962c Minor cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-22 16:53:49 +00:00