Commit Graph

1639 Commits

Author SHA1 Message Date
Ingo Weinhold
3d5caf598e Fixed gcc 4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 20:56:35 +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
aabcf63973 When using "Message4", we don't need to flatten the BMessage into another buffer anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 14:34:56 +00:00
Stephan Aßmus
02ed46b0de * fixes the cursor handling after Axels changes, it crashed on real HW.
Axel, I think you didn't realise that _CursorFrame() gave and
invalid BRect for fCursorVisible=false, but that rect was used
to create the backup area, so it was buggy at that place. I removed
your checks for fCursorVisible in SetCursor() for cleaner code, but
left it in MoveCursor() because it might save a few cycles.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 10:29:06 +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
af8899c4bf Added support for not visible cursors - defaults to invisible now!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 19:50:19 +00:00
Axel Dörfler
a512a89b27 Fixed some memory leaks, fChars was never freed.
Now uses (nothrow) for fChars and checks if the allocation succeeded.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 15:50:42 +00:00
Axel Dörfler
9514d2e5e6 * introduced a global gInputServer object, so that you don't need to cast the
be_app object anymore.
* fixed some missing locks for the input device list.
* moved the input device list into the InputServer object - didn't make a lot
  of sense the way it was done before. Also moved registering/unregistering
  into the InputerServer class.
* Made the InputDeviceListItem class a bit more useful and encapsulated.
* cleanup, removed empty function documentation stubs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 15:35:36 +00:00
Stephan Aßmus
8f90c77db9 a quick fix for offscreen layers drawing region, ie BitmapDrawing works again
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 11:18:33 +00:00
Stephan Aßmus
a7ab4a2642 fix activation of windows
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 01:42:58 +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
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
Adi Oanca
9a3090b0ed this fixes the problem Axel signaled with the OK button in terminal's about box
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 18:10:54 +00:00
Axel Dörfler
a436bab2da Renamed fVisible2 and fFullVisible2 to fVisible and fFullVisible.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 17:56:51 +00:00
Axel Dörfler
5df853ea79 * Renamed Layer::GetWantedRegion() to GetOnScreenRegion().
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 17:50:39 +00:00
Axel Dörfler
618c515c4c * pruned Layer::PruneTree()
* the Layer destructor now deletes all of the layer's children
* WinBorder no longer has to delete its top layer, as it's also its child.
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 17:39:33 +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
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
Adi Oanca
d4e4f29a42 Cleanup after the old clipping code. Removed a few methods as others took their place. More cleanup to follow on tomorrow. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 21:24:53 +00:00
Adi Oanca
2c8cfe2dfc Bye-bye old clipping codesvn update Some cleanup to follow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 19:01:12 +00:00
Adi Oanca
d7467f6923 Fixed resize limits problem
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 18:09:49 +00:00
Axel Dörfler
474f33d137 Added missing header, applied style guide.
This file should probably still removed one day, or at least most of its functions
should either go away or somewhere else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 17:16:09 +00:00
Axel Dörfler
91c82a4957 Added missing newline.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 17:00:36 +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
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
Alexander G.M. Smith
84063c1f44 Added MIME type application/x-vnd.Be.URL.mailto to BeMail's supported types.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14721 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-06 20:39:13 +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
Alexander G.M. Smith
9c91a5f9d6 Now compiles for both Haiku and R5 targets. Also bumped the version
number to 3.0.3, just in case we want to do a new release soon with
this slightly better working version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 22:51:31 +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
Axel Dörfler
ec12c6fe6f Don't let ifdef's confuse the editor's function lookup.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:07:31 +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
Marcus Overhagen
051d07f0fc no longer free() a title pointer that wasn't malloced, but instead came from the outside (right from the middle of some port link stuff)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:11:26 +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
36deda69ba Got rid of sDesktop.
Moved AS_ACTIVATE_APP over to Desktop. _CursorThread() is currently dysfunctional (but not enabled anyway).
Minor cleanup (Desktop::WindowList() is now a BObjectList).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 19:35:46 +00:00
Axel Dörfler
959a5a68bc Removed global gDesktop variable - there is now an sDesktop variable in AppServer.cpp, but
that will go away, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 11:05:52 +00:00
Adi Oanca
ce2fbc6151 Fixed a mistake I did a couple hours ago. Thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 22:30:29 +00:00
Adi Oanca
fc0c33529d Added support for BRoster::ActivateApp(). Code not tested yet, but it should work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 20:05:18 +00:00
Adi Oanca
ac89958f6e Removed RootLayer::EnqueueMessage(). Added support for BWindow's EnableUpdates(), DisableUpdates(), NeedsUpdate() and SendBehind(). The last one does not work as expected, for the moment it sends the window to back, just as Activate(false) does.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 11:33:31 +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
31ec092be1 Introduced Layer::Activated() hook function. Moved some functionality from RootLayer to WinBorder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 11:15:47 +00:00
Adi Oanca
a577cf141f Immediately close app_server window after pressing close button in R5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 10:35:09 +00:00
Adi Oanca
9f0d28e921 Fixed a stupid bug when checking if the window order changed. Added support for BWindow::Activate(false). Added some debug support for Workspace::WMState. Simplified a bit code for sending a window to back.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 10:19:23 +00:00
Adi Oanca
fc9c02aa4f Made the new clipping code to use a single message to update client frame/bounds. ACTIVATED new clipping code! If someone notices problems please write to any list
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-28 17:04:31 +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
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
Adi Oanca
3e5b79a7c6 Send BMessages to Haiku's app_server instead of PortLink ones. This is untested, but should work fine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 18:44:48 +00:00
Adi Oanca
28d42d6e75 RootLayer thread receives BMessages only. Changed ViewHWInterface to send BMessages for input events
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 18:42:10 +00:00
Adi Oanca
557411309f preparing RootLayer thread to receive BMessages instead of PortLink ones
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 17:46:37 +00:00
Adi Oanca
3b19c4531d Introduced Layer::KeyDown/KeyUp/UnmappedKeyDown/UnmappedKeyUp/ModifiersChanged hooks. Simplified a bit RootLayer::KeyboardEventHandler().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 17:03:46 +00:00
Adi Oanca
9e5c574703 Layer::SendUpdateMsg() will tell us if sending _UPDATE_ message succeded. We'll use that information to clear WinBorder::fCumulativeRegion(server per-window dirty region) only on success.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:39:53 +00:00
Adi Oanca
66156adf92 In case SendMessageToClient() fails, it's good to know why
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:21:49 +00:00
Adi Oanca
182db85c0c Introduced Layer::MouseWheelChanged(). Cleaned up RootLayer::MouseEventHandler::case B_MOUSE_WHEEL_CHANGED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:11:50 +00:00
Adi Oanca
da4a68b7f5 RootLayer thread only handles input messages now. All other actions (move/resize/scroll/invalidate/etc) are performed by locking the RootLayer object and taking the respective action from the calling thread(usulay a ServerWindow one).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:02:23 +00:00
Adi Oanca
eead807371 removed Layer::fClassID
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 14:44:26 +00:00
Stephan Aßmus
dd79576b10 * fixed scrolling for the current clipping code, it brings
up a new problem, maybe Adi has an idea for the fix, see
  comment in the code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 13:06:38 +00:00