Commit Graph

114 Commits

Author SHA1 Message Date
Stefano Ceccherini a3d758e369 Added support for font settings in PictureDataWriter. Not used yet
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-13 11:14:47 +00:00
Marcus Overhagen 0b0ecfab90 Added "const" to many parameters.
Removed most data allocations/copying from PicturePlayer, ServerPicture now has to do this when converting coordinates.
Added additional functions to ViewLayer to copy&convert multiple BPoint, BRect, BRegion to Screen coordinates, those should be further optimized.
Removed some function call overhead.
Note: some functions of PicturePlayer don't appear to be implented by PictureDataWriter,


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 23:17:40 +00:00
Marcus Overhagen a20cecff60 removed unnecessary use of const_cast<> and (global) do_playback() function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 18:37:55 +00:00
Axel Dörfler cf2aeb201f * Implemented BDragger::{Show|Hide}AllDraggers() and its backend in the app_server.
This fixes bug #242. The value is currently stored in a separate file.
* Removed some unused codes from ServerProtocol.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-21 07:57:21 +00:00
Stefano Ceccherini c733893846 Greatly improved scrolling, and simplified the code too. Now scrolling
is done from inside the BMenu::_track() function, and not inside Pulse() 
anymore. Patch by Lucasz Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-29 07:01:08 +00:00
Michael Lotz f3001f6a1d Corrected comments. It's a 0 byte, not a NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 22:02:01 +00:00
Michael Lotz 3379428150 * Made UTF8 functions overflow safe
* Unified UTF8CountChars and UTF8ToLength and removed the latter
* Rewrote UTF8CountBytes to use the more safe algorithm from UTF8CountChars
* Removed the unsafe count_utf8_bytes() function

This should fix bug #839. Marcus can you please review?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 21:58:00 +00:00
Stefano Ceccherini 0c48fc7c74 Enable state synching for ServerPictures. Fixes bug 520
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-28 14:52:51 +00:00
Axel Dörfler 2628e60cbc Moved BMenuWindow, BMenuFrame, and BMenuScroller into the BPrivate namespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-22 11:52:18 +00:00
Stefano Ceccherini 27cc25083e First try at menu scrolling, courthesy of Łukasz Zemczak. Works more or less, although a bit buggy
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-20 20:19:55 +00:00
Stefano Ceccherini 7022e7903a added license
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-13 07:28:19 +00:00
Jérôme Duval 94acebc5d2 fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-12 23:25:40 +00:00
Stefano Ceccherini 420fe80e5c Moved picture data writing to its own class, thus simplifying code in
various places. Implemented SetLineMode op for BPicture, fixed shape 
drawing (I accidentally broke it in the previous commit).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-12 20:00:36 +00:00
Stefano Ceccherini ab757c7a3a our BPicture stream format wasn't compatible with R5 one.
Hopefully fixed all the problems. Reported by 
Marc Flerackers. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-09 21:53:45 +00:00
Stefano Ceccherini 938519a667 oops forgot to commit this
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 21:34:59 +00:00
Stefano Ceccherini 2f9eca855a moved Shape related defines to their own header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 21:20:38 +00:00
Stefano Ceccherini e372c1ba81 renaming...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-23 09:28:44 +00:00
Michael Pfeiffer 5c3281f91b Write print job to spool file. Not tested under Haiku. Seems to work fine with a simple R5 test application.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-08 18:08:12 +00:00
Axel Dörfler e04ec8626e * UTF8ToCharCode() only skipped 3 bytes for a 4 byte character.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-29 22:20:18 +00:00
Ithamar R. Adema d3eab0eb78 * Fix typo in declaration of BStringColumn.
(Args were declared: width,maxWidth,minWidth while the last 2 ones were the other way around)




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-09 22:04:16 +00:00
Ithamar R. Adema f9d5f90ecc Added missing ColumnTypes.cpp/.h to sourcetree, and added it to the build.
This should make our BColumnListView completely usable.
(ColumnTypes files were taken from imkit SVN)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-09 17:09:25 +00:00
Stefano Ceccherini 931aebe962 Deleting replicants now works
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-07 19:16:50 +00:00
Jérôme Duval 58ad2aba29 added BColumnListView to libbe.so
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-26 15:53:41 +00:00
Stefano Ceccherini cd39decc44 Added a filter to MenuField, so that mousedown messages caught by the inner menubar are redirected to the BMenuField's MouseDown() like happens on beos. That way we can track and invalidate correctly. Implemented Show/HidePopUpMarker
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-28 07:48:53 +00:00
Stefano Ceccherini c8773f97a0 Invalidate less in BMenuBar::FrameResized() and a bit more in _BMCMenuBar_::FrameResized(), removed unused _BMCItem_
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-10 19:29:35 +00:00
Stefano Ceccherini 7dce0c352e Removed unused stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-28 20:22:28 +00:00
Axel Dörfler 93820f1ea7 Renamed moreUTF8.h to utf8_functions.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 10:16:19 +00:00
Axel Dörfler 6d5488e18a * There is now a server_read_only_memory structure that is placed in a (surprise!)
read-only area shared between the Desktop and all applications.
* Right now, this area only contains the desktop colors, ie. B_PANEL_BACKGROUND_COLOR
  etc.; ui_color() no longer needs to ask the server for these colors.
* The ui_colors are now maintained by DesktopSettings, though ColorSet is still there.
* The default colors are now hardcoded once and for everyone in InterfaceDefs.h, ie.
  the app_server uses them as well.
* Desktop::Init() can now also return an error (but that is not yet accounted for).
* Cleaned up InterfaceDefs.h.
* Fixed wrong include in moreUTF8.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-25 20:12:06 +00:00
Axel Dörfler 621a832488 * Renamed ViewAux.h header to ViewPrivate.h.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-23 15:55:15 +00:00
Stefano Ceccherini 05e515d56c hopefully improved menu tracking. Among other things, this fixes bug 461
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 17:56:21 +00:00
Axel Dörfler 21c8c925d8 * With Rudolf's information about relocating overlays, I changed the way memory
is managed for those bitmaps:
  - the shared client memory mechanism is used to allocate a small overlay_client_data
    structure that contains the actual buffer and a semaphore that you have acquire in
    order to access it.
  - LockBits()/UnlockBits() now have a function: you need to call them before accessing
    the overlay buffer, and you need to keep that lock until you're done with it.
* The overlay cookie is now an extra member of the ServerBitmap class.
* Removed fInitialized from ServerBitmap - IsValid() now just checks the buffer associated
  with the bitmap.
* ViewLayer::Draw() will now handle overlay bitmaps specially and will draw the overlay
  color instead of any contents (this is currently in ugly pink, but will become some
  dark color later on).
* All what's missing from actually being able to use overlays now is to configure
  them so that they are shown on screen. VLC will now show an empty pink window when
  overlay video is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 16:41:12 +00:00
Stefano Ceccherini ce1efe4ce6 forgot to commit this changed header, sorry
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-15 12:55:39 +00:00
Stefano Ceccherini 4185bd8b34 Hopefully simplified BMenu/BMenuWindow relationship and made it more robust.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 13:06:47 +00:00
Stephan Aßmus af3ac4e80f replaced usage of floor() and ceil() to convert from
BRect to clipping_rect with simple C casts. I think this
is more adequate, since clipping_rects are used for
pixel indices. This change fixes some graphics problems too,
it appears that cursor coords are fractional on Haiku, even
with a normal mouse. In Playground, this resulted in the
hit points being rendered wrongly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:26:17 +00:00
Stephan Aßmus 8e89843efc * when the client constrained the clipping on a view, the server used to
take an empty region as an indication to remove the clipping, but on R5,
  this is actually valid... this patch fixes the problem
* the ViewState::clipping_region is now consistently used to memorize
  the user defined clipping of the view state instead of being sometimes
  used to cache the current view clipping


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 18:57:44 +00:00
Michael Lotz bdc6f9e7ef * Fixed a swapping bug for 16 bit colorspaces
* Added some comments
* Added some checking to avoid noop shifts
* Added buffer length checks
* Implemented (as Stephan suggested) a version of ConvertBits() that takes offsets.
This new version allows to move a region of the source into a region (possibly not at the same point) on the dest while converting colorspaces on the fly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 23:53:33 +00:00
Michael Lotz b09e53fae0 Wrote a new color conversion engine. It's 2-5 times faster than the old one (depending on colorspaces) and about half in size.
I've put it into ColorConversion.cpp and moved PaletteConverter there too, cleaning up Bitmap.cpp.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 05:01:15 +00:00
Stefano Ceccherini 2c11ec31c8 BMenuItem also draws ctrl bitmap if needed, BTextView::AutoResize implemented more correctly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 19:31:09 +00:00
Stefano Ceccherini da2e259d76 added a constant
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 19:10:33 +00:00
Michael Lotz 20a4e7265c * Changed the AGGTextRenderer to use the new UTF8 handling
* Added more char codes to is_white_space(), should be all I think

Sorry if I stepped on your toes Stephan, but I wanted these changes flushed before I leave for holidays :-).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-23 09:04:26 +00:00
Stefano Ceccherini 38690d41b0 Renamed TPicture class to PicturePlayer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 21:38:53 +00:00
Michael Lotz 9e7948f45e * Fixed locking of the FT_Face by moving it into Get/PutTransformedFace()
* Removed the FaceGetter as it was only needed for locking
* Cleaned up TruncateString()
* Fixed a typo in moreUTF8.h

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 17:42:18 +00:00
Michael Lotz db5734a452 More work on the BFont special functions.
* Reworked functions like GetEscapements(), GetBoundingBoxesAsString() and GetGlyphShapes() completely
* Made the ServerFont functions uniform in their prototypes and cleaned out unnecessary arguments
* Added new UTF8 handling functions to moreUTF8.h that are now used by ServerFont
* Put the common transformations of the FT_Face into an own GetTransformedFace() to lessen code duplication

In other words, ServerFont is now cleaned and handles UTF8 pretty efficiently. Some ToDo's are still left though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 23:36:59 +00:00
Stefano Ceccherini 61ba5a32c1 Added some code to draw "empty" in empty menus. Not working for the
moment, but committing since it's too late to continue working, and at 
least the window is resized correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 22:27:46 +00:00
Stefano Ceccherini 9e8d2dd28b Removed PicturePlayer, it only contains code duplicated from TPicture. Some cleanups for BPicture. This commit also completes previous commit for BMenu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 21:39:07 +00:00
Stefano Ceccherini f9f970d98c Yesterday's commit triggered some other visual bugs: hopefully fixed them all. A disabled menufield now doesn't open its associated menu anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 09:31:27 +00:00
Stefano Ceccherini d69c048704 No longer needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:13:31 +00:00
Axel Dörfler 71b550889e Moved dw_sync_data to a private header DirectWindowPrivate.h and renamed it to direct_window_sync_data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:36:38 +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 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