Commit Graph

1000 Commits

Author SHA1 Message Date
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
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
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
b574c74121 opList is uint32
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:17:40 +00:00
Stephan Aßmus
7dd038f405 calling _ResizeBy with zero offset doesn't do anything
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:16:12 +00:00
Stephan Aßmus
19ae7ecce0 sorry, forgotten in previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:14:47 +00:00
Stephan Aßmus
a38aedd980 no longer needed, moved to painter test folder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:13:12 +00:00
Stephan Aßmus
f9129d56a7 updated license header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:11:58 +00:00
Stephan Aßmus
c00fc4e31a default to B_MITER_JOIN too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:11:02 +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
Adi Oanca
ac4f06c5c6 Fixed invalidation with new clipping code. Only what's needed is
redrawn/invalidated now, with a single exception which I am working
on(when changing the front window the whole window area is invalidated
not just the region that became visible). The old Clipping code is broken
now. I will remove it in the next days.

Actual changes:
* removed Layer::GetWantedRegion() - was badly implemented.
* made Layer::_GetWantedRegion public and renamed it to: you guessed! :-)

* introduced Layer::MarkForRebuild(), TriggerRebuild(). You want to
calculate the new clipping regions, mark an area and then call
TRiggerRebuild() which will rebuild the visible regions for the current
Layer and all its descendants.

* for a Layer to redraw some parts of it, use
RootLayer::MarkForRedraw() to mark a region and then
RootLayer::TriggerRedraw() to see the changes (or send _UPDATE_ message in
case of a WinBorder).






git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-06 17:47:06 +00:00
Marcus Overhagen
4b1aabf67e I don't know why, but when starting Tracker there is no root layer here
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 21:24:51 +00:00
Jérôme Duval
428ebf6d5f myRootLayer can be NULL for offscreen bitmaps, fixes crash on Media preferences
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 22:48:51 +00:00
Stephan Aßmus
b2f2cb6203 simplified coordinate conversion from/to screen by removing duplicated code, Adi was there a reason to check for RootLayer before conversion or was this left-over?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 19:51:38 +00:00
Stephan Aßmus
d79939116c fixed build for old clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 19:50:34 +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
Marcus Overhagen
f38c001e56 Assigned names to "some BLocker"s to aid debugging.
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 16:56:15 +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
Stephan Aßmus
13cff625f0 cleanup and removable of large portions of code duplication, fCurrentLayer and fCurrentLayer->CurrentState() are checked in _DispatchMessage already, so _DispatchGraphicsMessage() assumes they are valid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:45:16 +00:00
Stephan Aßmus
55e764c7f6 update license
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:41:44 +00:00
Stephan Aßmus
e422da6973 fix build for old clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:39:12 +00:00
Axel Dörfler
962b688433 Forgot to update Layer::Scale(), too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:27:41 +00:00
Axel Dörfler
cb24f13bb0 The current graphics state of a Layer can now be retrieved by the new CurrentState() method.
ServerWindow is now using that method instead of directly accessing a Layer member.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 12:15:36 +00:00
Axel Dörfler
2c2fd7b237 Fixed scale calculation. The scaling is still ignored for the drawing coordinations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 12:01:44 +00:00
Axel Dörfler
1be1c7ccdf Fixed (again) the crash that happened when you quit the app_server in the test environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 11:57:43 +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
7490bd32f1 Now also uses the fallback family when the usual default font couldn't be found.
This hides a problem with the view states that the next commit will fix :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 09:49:25 +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
Axel Dörfler
c9ff9a39d0 ServerFont::StringWidth() did not set the size of the face, and could therefore
return wrong results. Activated it again to work-around the possible font deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 00:04:18 +00:00
Axel Dörfler
f1d3628119 Apparently, ServerFont::StringWidth() doesn't work for fixed width fonts...
Will look into this later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 14:55:51 +00:00
Axel Dörfler
cf550035dd This works around a deadlock that frequently happened when working with menus (font stuff).
I should start investigate this one more deeply some time...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 14:37:17 +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
382049ca6f fix build of server for test environment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 13:15:36 +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
52d97df59c The FontStyle now gives its locker a name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 10:51:46 +00:00
Axel Dörfler
5d1bd031a2 Fixed some communication mismatches I introduced earlier: we are no longer sending
whole font_family/style strings (each 64 bytes), but only strings, because they
are usually shorter than 64 bytes.
This should fix the StyleEdit problems Stefano were seeing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 09:50:51 +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
fb2d4d51a7 Removed unused variable (copy&paste remains...).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 08:54:56 +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
Stefano Ceccherini
f3aa24ede7 Corrected the clipping region for BDirectWindow. The stripped down Stars demo now works.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 18:13:10 +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
Stefano Ceccherini
0c378a5714 Thanks to latest changes, BDirectWindow now draws something. Though, looks like either the clipping region is wrong, or the app_server overwrites what the BDirectWindow app writes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 09:53:47 +00:00
Marcus Overhagen
1334ab4721 just some work, made sure to preserve app_server coding style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:57:52 +00:00
Marcus Overhagen
d317ba7488 real men don't do any error checking
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:41:40 +00:00
Marcus Overhagen
094efed434 restored 14604
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:32:49 +00:00