Commit Graph

49558 Commits

Author SHA1 Message Date
Adrien Destugues
f08d5477d8 Add Alpha Masking support in ClipToPicture
Use AGG to implement ClipToPicture in a faster and better way.
There are things missing in this initial implementation:
* No support for PushState/PopState saving and restoring the picture.
* No support for nested clipping through PushState
* The clipping doesn't happen where you expect it when using SetScale()
* There are artifacts when scrolling and resizing clipped views
* The implementation uses more memory than it needs, as the clipping
bitmap is stored as RGBA32, yet only the alpha channel is used
* The clipping bitmap is rendered more times than it needs to. We need
some caching here.
2014-01-28 15:42:21 +01:00
Adrien Destugues
d0fa6c78f4 BView: Allow resetting ClipToPicture
Just like for regions, ClipToPicture(NULL) removes any picture clipping
at the current state level (clipping in pushed states are not undone).
2014-01-28 15:39:36 +01:00
Adrien Destugues
049dd64e8e ClipToPicture test: add even more tests
* Allow scrolling the view,
* Add tests for ScaleBy and SetOrigin
* Add test for multiple clipping pictures using PushState.
2014-01-28 15:35:46 +01:00
Adrien Destugues
f1585e1484 Make ClipToPicture test more complete
* Add a test for ClipToInversePicture
* Add a test for ClipToPicture(NULL)
2014-01-28 14:01:42 +01:00
Adrien Destugues
5179b54a5e Update gcc4 Mesa packages for gcc2hybrid. 2014-01-28 09:03:35 +01:00
Pawel Dziepak
527da4ca8a x86[_64]: Separate bootloader and kernel GDT and IDT logic
From now on bootloader sets up its own minimal valid GDT and IDT. Then
the kernel replaces them with its own tables.
2014-01-28 00:44:02 +01:00
John Scipione
e646703a6e Pairs: Fix gcc4 build some more, include stdlib.h 2014-01-27 18:35:19 -05:00
Stephan Aßmus
be2f98062c Text stuff: Support extracting sub-paragraphs and documents
* Also some WIP towards integrating TextListener.
 * Everything untested.
 * Fixed a bug where copying to the clipboard had an extra line-break
   after each paragraph since the recent changes that made sure each
   paragraph ends in a line-break.
2014-01-27 23:21:02 +01:00
Stephan Aßmus
fef8b2637d TextListener: TextChangedEvent can be const 2014-01-27 23:21:02 +01:00
Stephan Aßmus
4bbad05e9d List.h: Make Remove() methods return bool.
The methods can't fail, but they return false for out-of-bounds index
or when the item was not contained in the list, which is sometimes helpful.
2014-01-27 23:21:01 +01:00
John Scipione
b42302c5d3 Shortcuts: Big style refactor
Update the style of this preference app to match Haiku’s coding guidelines.
Since this app used a completely different style this is a big commit, but,
there should be no behavioral changes.

Style changes include but are not limited to:
* private member variables use fMemberVariable style
* local variables and public member variables use camelCase style
* compare pointers to NULL explicitly
* compare integers against 0 explicitly
* always flank binary operators with spaces such as + - , / *
* pointer goes with type, not value or flanked by spaces
* lots of variable renaming especially for abbreviations
* comments start with a leading space, prefer lowercase unless full sentence
* space after keywords such as if and for and { and } on same line
* multi-line if statement style fixes
* remove trailing spaces
* 80 char fixes
* ... and many more, and I'm sure I missed some.

Add/update copyright headers giving credit where due, obviously this code
can’t be copyright Haiku, Inc. from 1999 since Haiku, Inc. didn’t exist
so this change attributes copyright to Jeremy Friesner from 1999-2009 and
Haiku, Inc. from 2009 onwards matching the long description of the rdef file.

Added myself to the authors section of the files in the clv directory.
2014-01-27 16:18:02 -05:00
Alexander von Gluck IV
87784cafb8 vesa: Fix tracking of device opens / closes
* Don't raise the open_count when the open fails
2014-01-27 21:12:18 +00:00
Alexander von Gluck IV
3347bc1431 intel_extreme: Fix tracking of device opens / closes
* Don't raise the open_count when the open fails
2014-01-27 21:12:17 +00:00
Alexander von Gluck IV
01696cd951 radeon_hd: Fix tracking of device opens / closes
* Don't raise the open_count when the open fails
* Remove the kdl command on uninit
2014-01-27 21:12:16 +00:00
John Scipione
d4474f3a28 Pairs: fix gcc4 build 2014-01-27 15:45:56 -05:00
John Scipione
051d89e19c IconSaver: bump max icon count to 384
300 wasn’t enough
2014-01-27 15:13:28 -05:00
John Scipione
8165696e02 IconSaver: fix potential memory leak
delete icon doesn’t do anything, delete[] data does.
2014-01-27 15:12:42 -05:00
John Scipione
4a0dcb5bfa IconSaver: remove extra space 2014-01-27 15:11:59 -05:00
John Scipione
fdc0552997 IconSaver: add authors to authors list
…already in copyright statements
2014-01-27 14:35:15 -05:00
John Scipione
97e1b053b6 Pairs: store vector icons, new size menu
* Search for vector icons from MIME database once at start,
  limit to application super-type, this fulfills a TODO in the code
* Use a std::map keyed by a hash to avoid duplicate icons
  eliminating _HasBitmap()
* Store the vector representation and then only build bitmaps
  when needed
* Convert uses of int to int32
* Convert from using BList to BObjectList, simplified cleanup
* Rename variables and methods to not abbreviate/be more clear
  e.g. fPosX, fPosY => fPositionX, fPositionY
  e.g. _GenerateCardPos() => _GenerateCardPositions()
* Renamed PairsTopButton to PairsButton
* Integrate Size submenu into New menu item.
  Size menu item goes away, you can select New to get a new game at
  the current difficulty, or, you can drill down in the New menu to
  choose from Beginner, Intermediate, or Expert.
* Add new Size menu to set the icon size: Small (32x32), Medium (64x64),
  or Large (128x128). Default is medium
* Rename MENU_SIZE message constant to MENU_DIFFICULTY for clarity
* Eliminate PairsGlobal.h, distribute constants to appropriate files.
2014-01-27 14:17:36 -05:00
John Scipione
0933046655 Pairs: update version number to 0.9-gamma 2014-01-27 14:02:14 -05:00
John Scipione
c6b0a589df Pairs: Style fixes and update copyright headers.
Update long description in rdef
2014-01-27 14:02:14 -05:00
Jérôme Duval
bfdb2a4938 scsi_periph: check block_size against zero in io().
* should help with #10466
2014-01-27 19:46:11 +01:00
Jérôme Duval
06254ef863 app_server: adjust Freetype dependency.
* added DrawingContext.cpp and ServerCursor.cpp
2014-01-27 18:07:54 +01:00
Ingo Weinhold
73ac4cdc3f truncate_string(): Be a lot laxer wrt. rounding incaccuracies
Instead of 1/10000 we now add 1/128 to the width to compensate for
rounding inaccuracies. Due to the limited float mantissa precision
(23 bit) the previous value would already have no effect for relatively
small widths (>= 128).

Fixes #10455.
2014-01-27 16:29:08 +01:00
Adrien Destugues
50df6e9824 Add missing pipe character in KDL keymap.
For non-US keyboards, the extra 102th/105th key is used to reach \. But,
we also need it to report | when shifted (this is the key left to
"enter").

This affects only USB keyboards. Thanks to gordoncjp for reporting!
2014-01-27 10:57:11 +01:00
Adrien Destugues
a36c1c0590 Fix clip_to_picture test app
* We want the text to be drawn on the clipping bitmap with alpha
blending, to get an useful mask.
2014-01-27 10:57:10 +01:00
Stephan Aßmus
f429142df9 Paragraph::Remove() Keep last remaining span as empty span. 2014-01-27 10:42:31 +01:00
Pawel Dziepak
819824e020 kernel/{x86, vm}: Add more error checks in VM initialization 2014-01-27 05:36:30 +01:00
Pawel Dziepak
931ce674a9 scheduler: Fix core unassignment 2014-01-27 05:36:30 +01:00
Pawel Dziepak
7adce94d45 scheduler: Check team user time timers before entering scheduler
User timers may cause another thread to become ready in which case we would
like this to happen before scheduler_reschedule() chooses next thread to
be executed.
2014-01-27 05:36:30 +01:00
Alexander von Gluck IV
27c7c040de HaikuPortsCross: Add rest of needed bootstrap packages for PowerPC 2014-01-26 14:33:11 -06:00
Alexander von Gluck IV
800d5376f9 package kit: Disable curl requirement on bootstrap build
* As per the mailing list.
* Introduce HAIKU_BOOTSTRAP_BUILD define to sources
  to let them know they are taking part in a bootstrap
2014-01-26 10:42:37 -06:00
Stephan Aßmus
6f173f11f3 TextDocument: Don't leave empty paragraphs when inserting line-breaks.
Instead, add one empty TextSpan. This commit resolves the last of the
very obvious problems when editing. More subtle ones may still surface.
2014-01-26 15:20:02 +01:00
Stephan Aßmus
90d1cbe3e4 ParagraphLayout: Handle empty paragraphs.
Add one LineInfo for the empty TextSpan, if they have one. This gives the
layout a height for the one, empty line.
2014-01-26 15:20:01 +01:00
Stephan Aßmus
3627434d2b MarkupParser: Make sure added paragraphs are valid
They need to contain at least one TextSpan, even if empty.
2014-01-26 15:20:01 +01:00
Stephan Aßmus
bd68f78d47 Paragraph: Cache length 2014-01-26 15:20:00 +01:00
Ingo Weinhold
bf3d27539b Add Haiku repository config only optionally
The HAIKU_ADD_HAIKU_REPOSITORY_CONFIG build variable can be set to add
the Haiku repository config to the image.
2014-01-26 15:11:15 +01:00
Ingo Weinhold
902fd96ce2 MimeInfoUpdater: Don't touch the MIME DB
Use the new SetIconForType() and SetSupportedTypes() versions and
request the MIME DB not to be updated. This changes the
update_mime_info() and mimeset (without -a/-A) behavior in that they
only modify the (application) file attributes, now. Addresses #10453.
2014-01-26 13:43:05 +01:00
Ingo Weinhold
0973f2a791 libbe_build: Sync BAppFileInfo 2014-01-26 13:43:05 +01:00
Ingo Weinhold
c41356fab5 BAppFileInfo: Add method versions that don't touch the MIME DB
Add SetSupportedTypes() and SetIcon[ForType]() versions with an
additional bool updateMimeDB parameter. If false, the method doesn't
update the MIME DB entries for the type.
2014-01-26 13:43:04 +01:00
Ingo Weinhold
3b07762c54 BAppFileInfo: Coding style update
Also remove doxygen comments.
2014-01-26 13:43:04 +01:00
Stephan Aßmus
9de9ccde67 TextEditor: Two style fixes. 2014-01-26 11:24:56 +01:00
Stephan Aßmus
aa1800bb89 TextDocumentLayout: Remove any extra ParagraphLayouts ...
... when adapting to changes in the TextDocument. There should be more
explicit listener support for keeping the TextDocumentLayout in sync with
the document.
2014-01-26 11:23:20 +01:00
Stephan Aßmus
66b61b4784 MarkupParser: Fixed issue with last paragraph...
... when the last char of the markup is \n, it shall yield one last
paragraph that is empty (doesn't contain the \n which is still part
of the preceding paragraph).
2014-01-26 11:16:37 +01:00
Stephan Aßmus
e9d9561cfb TextDocumentLayout: Text offset at end of last paragraph...
... now yields the last paragraph index and does not subtract
the paragraph length from the text offset.
2014-01-26 11:11:26 +01:00
Stephan Aßmus
38c65defc5 MarkupParser: Don't append line-break to last paragraph. 2014-01-26 11:10:28 +01:00
Alexander von Gluck IV
547466c035 ppc: Add icu HaikuPortsCross package
* Work towards resolving #10240
2014-01-25 23:44:18 -06:00
Ingo Weinhold
ee2974dadb mime/Database: Add SetIcon[ForType]() BBitmap* version
When switching AppMetaMimeCreator from BMimeType to Database the
SetIcon[ForType]() calls with a BBitmap* ended up calling the vector
icon version with the icon_size as the data size argument, thus not only
not writing the bitmap icon attributes, but also clobbering the vector
icon attribute.
2014-01-25 11:53:47 +01:00
Ingo Weinhold
6ef57ae2a9 pkgman: Add full-sync command
* BSolver/LibsolvSolver: Add FullSync() method. It uses libsolv's
SOLVER_DISTUPGRADE mode.
* BPackageManager: Add FullSync() using the new solver mode.
* pkgman: Add full-sync command.

The new command is similar to the update command without arguments, just
more aggressive, allowing downgrading or even removal of packages, to
match the state of the repositories. Just like "update" it doesn't work
properly yet.
2014-01-25 10:47:35 +01:00