Commit Graph

1056 Commits

Author SHA1 Message Date
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
Stefano Ceccherini
d2718b5d34 we write family and style as an uint32, so we should read it as an uint32 too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 21:54:41 +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
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
96709e443e One more now superfluous roundf() removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 14:09:55 +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
Stephan Aßmus
4cfc480f5d no longer valid with new way of setting user clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 00:24:37 +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
Ingo Weinhold
56436a1ab8 GCC 4 fix. Might have changed the semantics, but I refuse to hurt
my brain by trying to understand code using gotos. People, learn
structured programming!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 17:49:05 +00:00
Stefano Ceccherini
25922abe74 reduced the directwindow semaphore timeout to half a second. Now we checks for < B_OK in the semaphore acquisition, to handle every error condition
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 11:00:57 +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
dfd5b49996 * last change set window title to "Unnamed Window" if the title was empty - but
that's probably not wanted, as a window without a title is perfectly okay.
* AS_CREATE_WINDOW will now return a proper error code on failure.
* The title read from the link is no longer adopted by the ServerWindow constructor,
  but copied - while the previous version was a bit faster, this is a lot cleaner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 13:06:22 +00:00
Axel Dörfler
13e525e302 WinBorder::SetName() now also triggers rebuilding the decorator region - IOW BWindow::SetTitle()
should now work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 11:03:33 +00:00
Stefano Ceccherini
df555388b9 Don't look for bugs in other people's code. The bug is in your code. IOW BDirectWindow apps now work fine :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:45:45 +00:00
Stephan Aßmus
c5522d81d8 * added SetUserClipping() and DrawingRegion(), which is used for
handling client defined clipping. The client clipping stays in local coords,
  which greatly simplyfies things. We ought to find a way to reduce the number
  of regions needed per Layer. I just added another one...
* renamed a few "lay"s to "child".
* used the new client added clipping in ServerWindow


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:19:32 +00:00
Stephan Aßmus
41f78f7884 the current clipping is the combined user defined clipping from all previous states
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:14:58 +00:00
Stefano Ceccherini
b2cc1487d1 Send notifications for directwindow when a window is moved
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:10:03 +00:00
Axel Dörfler
8f5f0ec4b1 * fixed case for WinBorder::MouseDown() if there is no layer below the mouse - might
not even be a valid condition, but seems to happen.
* style cleanup...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 22:30:43 +00:00
Adi Oanca
e2ad4ab9b2 Not in mood for too much coding, I had a look through the code tonight. And guess what? Like Stefano
the other day, I discovered, not a bug, but how to invalidate only the area that requires it when
changing window order (selecting or moving to back a window). Stuppid me, that stuff didn't worked
because I forgot how windows were arranged in the list returned by Workspace::GetWMState(). I was
iterating the wrong way! :-)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 21:52:59 +00:00
Axel Dörfler
0964291534 Added message filter to the CardView; it now intercepts all messages, so that "Command-Q"
will no longer quit the haiku_app_server, but the application running in the server.
"Print Key" now also works as expected.
Only switching workspaces continues to use "Control-Fx" in the test environment. Under
Haiku, it now uses "Command-Fx" as on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 18:37:55 +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
Axel Dörfler
831a01f893 FontStyles are now also orded, but not alphabetically: their faces determine
the order, regular fonts come first, then bold, and then italics.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 15:48:37 +00:00
Axel Dörfler
36a37b76d6 The font family list is now sorted - besides the obvious advantage for the user,
this also allows binary searching the families (which is now done, too).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 15:33: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
Stephan Aßmus
5211328a37 turn off on-screen debugging for now, the errors it reported are not that critical, and printing the debug info itself could lead to problems
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 13:38:22 +00:00
Stephan Aßmus
0d660a960b handle errors when reading from the link, at least for the bigger items, it should be enough to just check the error in the last call to Read(), since previous errors are kept in the Link
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 13:37:08 +00:00
Axel Dörfler
7c3d8ad0c7 * added a call to png_set_strip_alpha() which could fix the alpha channel
problem we're seeing (at least I couldn't reproduce the problem anymore).
* SaveToPNG() now returns an error code.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 23:52:27 +00:00
Adi Oanca
76d68e8ad8 More cleanup.
* moved code from Layer::do_MoveBy/do_ResizeBy/do_ScrollBy into
Layer::MoveBy/ResizeBy/ScrollBy()
* removed do_Move/Resize/ScrollBy()
* removed WinBorder::_ResizeBy()




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 20:14:52 +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
2fe84ae95f Now AS_GET_DEFAULT_SYSTEM_FONT actually returns the default font as used
by the app_server (ie. also if it's a fallback font).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 19:22:21 +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
16f782ccbd Implemented AS_SET_SYSTEM_FONT.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 19:14:13 +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
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
Stephan Aßmus
f8e33ed5bd fixed current pen position, thanks to Stefano for spotting this one, I looked very hard in the same place, but didn't see it :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 13:28:15 +00:00
Stefano Ceccherini
ba48e86927 Removed leftover
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:55:27 +00:00
Stefano Ceccherini
e16b3f2972 friend is bad. Protected, even.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:48:13 +00:00
Axel Dörfler
e3343885bb Even if Adi really don't like it, it's perfectly okay to resize or move a layer before
adding it to its parent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:48:06 +00:00
Stefano Ceccherini
8fbbd37f83 Added some code for notifying client BDirectWindows that the window was moved or resized. Currently commented because of other problems. Looks like the windows bounds are not changed if a MoveBy() is called before the window is shown. Removed unneeded includes. Small changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:26:47 +00:00
Stefano Ceccherini
602d0ba42c Remove IPoint.cpp from the build as no one needs it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:25:31 +00:00
Axel Dörfler
d08f8a6e68 Upon construction, the font is not locked by the drawing engine, so we better lock it ourselves.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 19:29:05 +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
Adi Oanca
02414ebd4e Cleanup.
* removed old Convert{To|From}{Parent|Top} methods. They were replaced by
Convert{To|From}{Parent|Screen}(type *data)
* removed some unused methods from Layer class.
* re-aranged Layer's class declaration - grouped methods
* made all Layer's members private.
* renamed a few private methods from method_name _MethodName




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 17:38:07 +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
Stefano Ceccherini
0266d3fd18 Made ServerWindow::_HandleDirectConnection() a public method. It will be called from WinBorder too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 08:32:32 +00:00
Axel Dörfler
3a222bcbec Adi's changes broke layer resizing before they are attached to the layer hierarchy.
Also fixed a drop into the debugger when starting Tracker: fRootLayer is now NULL
in the constructor of WinBorder - which is not fatal, as we only wanted to get
the screen size (which was formerly managed by RootLayer).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 01:39:59 +00:00
Stephan Aßmus
971ed3de1e * origin in DrawState is now the summed up origin, when setting it,
use the origin from the previous state as a start
* this fixes scrolling again (minus redrawing too much stuff,
  this is left for Adi :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 01:16:15 +00:00