1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

9643 commits

Author SHA1 Message Date
Oliver James
3988d492ac Core: Move __DATE__ and __TIME__ into a dedicated TU 2024-06-07 09:23:23 +01:00
attila
57d1ad9ca6 Suppress GCC warnings related to the anonymous namespace used around choc::javascript
The warnings are emitted by GCC on Linux, since the commit
dbd3b4f34b.
2024-06-06 13:48:51 +02:00
attila
abdf9a6b75 Add WebView related helper classes for implementing AudioProcessorEditor::getControlParameterIndex 2024-06-06 13:48:51 +02:00
attila
d61e516bbc Add the parameterIndex property to all WebView related parameter ParameterAttachments
This affects the WebSliderParameterAttachment,
WebToggleButtonParameterAttachment, and WebComboBoxParameterAttachment
classes.
2024-06-06 13:48:51 +02:00
attila
0d8b05e8ee WebBrowserComponent: Enable click-through behaviour for WkWebView, add option to disable it
The default is enabled to behave similarly to NSViewComponentPeer. The
behaviour for the old Apple WebView is unchanged.
2024-06-06 13:48:51 +02:00
attila
4d2986ea59 Add new WebBrowserComponent option for file access control on Apple platforms
If allowAccessToEnclosingDirectory is set to true, it is now possible
for the WkWebView implementation to access sibling files relative to a
file specified with the file:// scheme.

This allows an iOS app to load an HTML file in the documents directory,
and that HTML file can reference and load image files inside the HTML
file's parent directory.
2024-06-06 13:48:51 +02:00
reuk
f764026626
ResizableWindow: Disable resizing border for desktop windows 2024-05-31 11:43:30 +01:00
reuk
659de5842f
Direct2D: Fix flickery resizing when using an internal resizer
Resizing using window manager functionality (e.g. clicking and dragging
in the non-client area) will send WM_SIZING to the window, which in turn
will enable continuous repainting in the D2D renderer until the resize
operation ends.

Continuous repainting is required in order for the window to display
correctly during the resize. Without continuous repainting, some frames
may not be completely painted, and may display with black areas,
producing a flickery effect.

When a resize is controlled entirely by the client, e.g. using the
corner resizer in the AudioPluginDemo standalone, WM_SIZING is never
posted. Instead, we assume that if the window has captured the cursor
during a setBounds call then it is probably resizing. We enable
continuous repainting in this case, and stop repainting once the window
releases the mouse.

An alternative appropach would be to add some kind of start/stop resize
API to ComponentPeer. I'm currently reluctant to do that because the
ComponentPeer API is already so large.
2024-05-31 11:43:30 +01:00
reuk
adc63cecb1
Windows: Use new window hit-testing API to implement Windows window-management features like Aero Snap 2024-05-31 11:43:30 +01:00
reuk
bb47c6c99a
ComponentPeer: Fix typo in name of internal windowRepaintedExplicitly enum 2024-05-31 11:43:30 +01:00
reuk
edd5745d7f
DocumentWindow: Implement window hit-testing API 2024-05-31 11:43:30 +01:00
reuk
9a91ae2ab6
Component: Add API for window-control hit-testing 2024-05-31 11:43:30 +01:00
reuk
8a09ac37cb
ResizableWindow: Always set resizable flag, regardless of whether the window has a title bar 2024-05-31 11:43:29 +01:00
reuk
4201b76d15
ResizableWindow: Add const to virtual members 2024-05-31 11:43:29 +01:00
reuk
e12a1a75ac
ResizableWindow: Always recreate desktop window when updating resizability
Windows without titlebars may now be resizable, and therefore must be
recreated if resizing is enabled/disabled.
2024-05-31 11:43:29 +01:00
reuk
66a29f9762
GlyphArrangement: Avoid divide-by-zero in addFittedText 2024-05-31 11:43:29 +01:00
Matt Gonzalez
00c958ff3e
DirectWrite: Rework custom font collection loader
Removes redundant memory copies and sorts out issues with ownership of the font data
2024-05-31 11:43:29 +01:00
reuk
a59904af64
UUID: Add size() getter to facilitate safer access to bytes 2024-05-31 11:43:29 +01:00
reuk
d7788100d5
ModalComponentManager: Remove friendship with Component
This change makes it slightly easier to audit invariants of
ModalComponentManager, as we can now be certain that only member
functions of ModalComponentManager can access its data members.
2024-05-31 11:43:28 +01:00
Anthony Nicholls
24f3a91a35 Timer: Add a leak detector 2024-05-30 18:33:03 +01:00
Anthony Nicholls
98acf79859 Timer: Prevent assertion from the Shutdown detector 2024-05-30 18:33:03 +01:00
Anthony Nicholls
9b44fa750b Timer: Stop the timer thread on shutdown to prevent a potential hang on windows
This commit reverts commit: 9e9da250 as it introduced a regression.
On windows when exit is called on a dll it forcibly kills any threads
still running before destroying any static objects. This means if a
Timer object is static the timer thread will be killed. Later when the
static object is destroyed it will wait for the thread to exit, which
because the OS forcibly killed it will never come true.
2024-05-30 18:33:03 +01:00
attila
51955453ef Remove TextLayout::createNativeLayout() 2024-05-30 12:21:35 +01:00
Oliver James
38f299a054 TextLayout: Respect the ReadingDirection parameter of AttributedString 2024-05-30 12:21:35 +01:00
Oliver James
03e79f8f12 TextLayout: Use new shaping engine
By utilising ShapedText in the TextLayout implementation.
2024-05-29 15:11:57 +02:00
attila
30daa356ca ShapedText::Detail: Add getSimpleShapedText() 2024-05-29 15:11:57 +02:00
attila
d794fac44c SimpleShapedText: Fix line break behaviour with text trailing whitespaces
This fixes an issue with the text wrapping logic for text chunks ending
in a whitespace.

When trying to fit a text chunk, the logic works with two values: width
with trailing whitespace, and width without trailing whitespace.

When the trailingWhitespacesShouldFit option is false, the logic
checks if "withoutTrailingWhitespace" can still fit inside the remaining
width.

Prior to this fix, it then decremented the remaining width with
"withoutTrailingWhitespace", but it should have used
"withTrailingWhitespace" for the decrement operation, always, regardless
of the value of the withTrailingWhitespacesShouldFit option.

This mistake only caused an observable issue when multiple fonts were
used for the shaping operation, and a different font would be used
immediately after a whitespace falling at the end of a line.
2024-05-29 15:11:57 +02:00
attila
aee65c147e JustifiedText: Fix line spacing for multi-font text
Prior to this change, the spacing between line N and line N + 1 would be
lineHeight (N).

This resulted in incorrect spacing when using multiple fonts in a text.

This commit uses the correct spacing, which is
maxDescent (N) + maxAscent (N + 1). This is also the same rule that was
used by TextLayout prior to JUCE 8, and the rule that CoreText's
AttributedString features are using as a general rule.

Note: lineHeight (N) = maxAscent (N) + maxDescent (N).
2024-05-29 15:11:57 +02:00
Matt Gonzalez
99adac2871
Direct2D: Skip invalid path elements when converting a Path to a Geometry 2024-05-28 16:08:55 +01:00
Matt Gonzalez
77f6eb00ff
Direct2D: Reset pending clip list after setting device space origin
https://forum.juce.com/t/the-juce-8-preview-branch-is-available-now/60950/144?u=matt
2024-05-28 16:08:55 +01:00
Matt Gonzalez
dfb21da572
Direct2D: Use axis-aligned clip layer when possible in clipToImageAlpha 2024-05-28 16:08:55 +01:00
Matt Gonzalez
6ca54e8c97
Direct2D: Add debug check for axis-aligned clip layers
This is similar to the check performed by the D2D debug layer that will still work with the debug layer disabled.
2024-05-28 16:08:55 +01:00
reuk
2ca5fdf18d
Direct2D: Avoid continuous repainting when moving but not resizing windows 2024-05-28 11:28:51 +01:00
Tom Poole
722557693f
Add CHOC and QuickJS licensing information 2024-05-23 13:41:59 +01:00
Tom Poole
9883d0c48a
Add AAX license file 2024-05-23 13:41:59 +01:00
reuk
6bd300fe78
AAX: Bundle files from the AAX SDK 2024-05-23 13:41:58 +01:00
Oliver James
44a750df40 Unicode: Ignore punctuation when resolving implicit characters
This commit implements fix for an issue where mixed punctuation can be rendered in the wrong order.

A regression test has been added to catch this in the future.
2024-05-23 12:54:13 +01:00
Oliver James
0b60559905 Unicode: Perform major refactor
This commit encapsulates the following:
* Removal of public Unicode classes.
* Move to new 'blob' generated data format.
* Fix issue where numerical characters would be assigned incorrect bidirectional levels, resulting in them rendering in the wrong order.
* Adds a unit test for the number ordering issue.
* Refactor of Bidirectional and Line breaking algorithms.
2024-05-23 12:54:13 +01:00
reuk
6b89bb6f91
Font: Fix result of getDescent(), which was incorrect when font height was set in points 2024-05-20 12:49:56 +01:00
reuk
365e8a235d
Font: Remove unnecessary conversion from point-height to juce-height when using FontOptions 2024-05-20 12:49:56 +01:00
reuk
5b2f9d4019
GraphicsContext: Avoid attempting to paint empty rectangles in all renderers 2024-05-20 12:49:56 +01:00
reuk
06137fb7f5
Direct2D: Slightly shrink excluded clip regions in order to draw transformed opaque components without border artefacts 2024-05-20 12:49:55 +01:00
reuk
e11b8f5ccb
CoreGraphics: Slightly shrink excluded clip regions in order to draw transformed opaque components without border artefacts
Previously, drawing an opaque, scaled component with CoreGraphics could
lead to visible artefacts around the edge of the component.

When drawing the parent of an opaque component, the area covered by the
opaque component is excluded from the clip region. If the clip region is
non-integral when transformed into device space, anti-aliasing will be
applied on the edges of the clip region. Similarly, when drawing the
opaque component itself, anti-aliasing will be applied at the edges of
the component. When the two drawings are superimposed, the foreground
anti-aliased pixels will be blended with the background anti-aliased
pixels, leading to a noticeable border around the component. Ideally,
only the foreground anti-aliasing should be applied, and the background
should not be anti-aliased around its edges.
2024-05-20 12:49:55 +01:00
reuk
bd2aea9676
AffineTransform: Add isOnlyTranslationOrScale() helper 2024-05-20 12:49:55 +01:00
reuk
592df26ff0
ComponentHelpers: Refactor clipObscuredRegions 2024-05-20 12:49:55 +01:00
reuk
78521395f2
AAX Client: Add more ignored warnings for Clang on Windows 2024-05-20 12:49:55 +01:00
reuk
72c7fd3070
CoreAudio: Allow non-combined devices to restart successfully 2024-05-20 12:49:55 +01:00
reuk
f2449cb092
CoreAudioIODevice: Make stopAndGetLastCallback() private 2024-05-20 12:49:55 +01:00
reuk
0444e3d69c
EdgeTable: Avoid reinterpret_cast in multiplyLevels 2024-05-20 12:49:55 +01:00
reuk
ce0fe3dc1e
EdgeTable: Keep better track of buffer memory ranges
Occasionally, on Linux, Address Sanitizer can complain about a memory
region overlap in the arguments to memcpy, originating in
EdgeTable::intersectWithEdgeTableLine. I haven't been able to reproduce
this personally.

The final memcpy call in this function requires there to be
"srcNum1 * 2" valid entries after the current "src1" ptr, and none of
those entries may overlap with the area starting at "temp".

On inspection, I think that the memory region being read is too large.
At the point of the call, src1 will point to a LineItem::level, not
LineItem::x, so there will actually be (srcNum1 * 2 - 1) valid items
following it.

All this pointer arithmetic is very difficult to understand. In an
effort to make this function slightly more understandable, I've switched
to using Spans to delineate lines of the table, which makes it easier to
keep track of the size of each line.
2024-05-20 12:49:55 +01:00