468 Commits
Author SHA1 Message Date
Neo 57b1e8a47a Merge pull request #176 from clang-retro/claude/project-thread-deqtlz
Haiku: build with R1/beta5 headers, COM ports in /dev/ports, clicks on a modal dialog's owner
2026-11-28 13:17:04 -08:00
Neo-DesktopandClaude Opus 5.5 7c56025a50 Merge main: use the Haiku port of #175, keep the fixes it does not have
main now has a Haiku backend (#175). This branch takes it in place of
its own backend (haiku_be.cpp and its CI job are removed), and keeps
only these changes on top of it:

- RTLD_NOLOAD and ESOCKTNOSUPPORT are optional, so that the library
  also builds with the headers of Haiku R1/beta5 (the sysroot of
  D-Modem's haiku_sysroot.py, which the D-Modem GUI uses).
- COMn is the nth serial port in /dev/ports.
- A click on a disabled window (the owner of a modal dialog) brings
  the dialog to the front and does not go to the window.
- docs/haiku.md tells these items.

Tested with the D-Modem GUI on Haiku R1/beta6 in QEMU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTJUdomcnCN8okhJSr
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 20:46:52 +00:00
Neo 0a6e7c313e Merge pull request #175 from clang-retro/claude/project-thread-gz3j3b
Port the library to Haiku with a native Be API backend
2026-11-28 12:20:14 -08:00
Neo-DesktopandClaude Opus 5.5 afdd9072cf ci: give the Haiku packages after the sysroot, with --cache first
argparse on the runner does not take positional arguments after
--cache CACHE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTJUdomcnCN8okhJSr
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 20:12:32 +00:00
Neo-DesktopandClaude Opus 5.5 3952742dcd port: add a Haiku backend and build for x86_64 Haiku
The portable layer and the library now build for x86_64-unknown-haiku
with the system's clang and a sysroot of Haiku's packages
(SYSROOT=..., STDLIB=). The Interface Kit shows the windows.

- haiku.h, haiku_be.cpp and backend_haiku.cpp: the backend, in two
  halves, as for Cocoa. The BApplication and each BWindow have their
  own threads; they queue the input for the program's thread. A click
  on a disabled window brings its modal dialog to the front.
- GetModuleFileName uses get_next_image_info (no /proc on Haiku), and
  the command line comes from __libc_argv.
- COMn is the nth device in /dev/ports. Haiku's fonts and
  ~/config/settings/libmfc are used.
- Guards for the errno values, SIOCATMARK, RTLD_NOLOAD and the CS5 to
  CS8 values that Haiku does not have or defines differently.
- The shared libraries link libbe, libnetwork and libbsd.
- docs/haiku.md, and the cross-haiku CI job, which builds the
  libraries.

Tested with the D-Modem GUI on Haiku R1/beta6 in QEMU: menus, dialogs,
modal dialogs, the keyboard, moving windows and the serial ports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTJUdomcnCN8okhJSr
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 20:06:36 +00:00
Neo-DesktopandClaude Opus 5.5 a15f4258d5 iotest: give the child 30 seconds to answer
In Haiku in QEMU, the child took more than the 5 seconds that the test
waited for its output once (the first start of the program). The loop
ends as soon as the output is there, so the test takes no longer where
the child starts quickly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUCocRdmh1id7SXNMg
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 20:03:32 +00:00
Neo-DesktopandClaude Opus 5.5 ff81f272a1 run-haiku-tests.sh: kill the VM when it does not take "stop"
A failure while the VM was still starting left the script waiting for
it until the CI job timed out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUCocRdmh1id7SXNMg
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 19:32:25 +00:00
Neo-DesktopandClaude Opus 5.5 458bf42973 Port the library to Haiku with a native Be API backend
The portable layer and the library now build for x86_64-unknown-haiku
and i586-pc-haiku with clang and a sysroot from clang-retro/unix-sdk.

The Haiku backend has two halves, as the Cocoa one has:
backend_haiku_be.cpp uses BApplication, BWindow, BView and BBitmap,
and backend_haiku.cpp connects them to the window manager of the
layer. The windows have no app_server border; the layer draws the
frame. Menus and tooltips float and do not take the focus. Keys,
modifiers, the mouse wheel, the cursor and the clipboard are mapped.

Other Haiku changes:
- the program path and argv come from the kernel and __libc_argv,
  as Haiku has no /proc;
- the fonts come from the Haiku font folders (Noto Sans for the UI);
- the registry file is polled, as there is no inotify or kqueue;
- CSIZE, SIOCATMARK, ETOOMANYREFS, malloc.h and the tolower macro;
- CAsyncSocket::GetSockName and GetPeerName fail for an address that
  is not IPv4, as on Windows (Haiku's sockaddr_in can hold an IPv6
  address).

samples/showcase is a small SDI program with dialogs and common
controls. tests/run-haiku-tests.sh builds the tests and runs them in
Haiku in QEMU (unix-sdk's haiku-vm.py), and takes screenshots of the
sample. CI runs them in the nightly image for x86_64 and builds them
for i586. docs/haiku.md describes the port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUCocRdmh1id7SXNMg
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 18:29:35 +00:00
Neo 5de614d1f4 Merge pull request #174 from clang-retro/claude/project-thread-8px763
port: include <cstdlib> for std::abs in winhelp_file.cpp
2026-11-28 05:59:32 -08:00
Neo-DesktopandClaude Opus 5.5 ca6065c6de port: include <cstdlib> for std::abs in winhelp_file.cpp
winhelp_file.cpp uses std::abs, but it includes only <stdlib.h>. With
the libc++ of the macosx10.4 sysroot, <stdlib.h> does not declare
std::abs, so the build for Mac OS X 10.4 stopped with "no member named
'abs' in namespace 'std'".

Add a CI job that builds the libraries for i386 and PowerPC Mac OS X
10.4 against the nightly macosx10.4 sysroot, so that CI finds a missing
include of this type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTLwxzpeGPkbLpNqXL
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 13:40:45 +00:00
Neo 0da0a5d171 Merge pull request #173 from clang-retro/claude/project-thread-ws9uve
Test thumb scrolling of a multiline edit control
2026-11-27 17:59:17 -08:00
Neo-DesktopandClaude Opus 5.5 9ea453002b Move the edit thumb-scroll test out of a platform-only block
TestEditThumbScroll was in a block that the mingw build leaves out, but
main calls it on every platform. Put it just before main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTDFNgD4oK9xbDsEGn
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 01:42:45 +00:00
Neo-DesktopandClaude Opus 5.5 f8177b3b7c Test thumb scrolling of a multiline edit control
WM_VSCROLL with SB_THUMBTRACK and SB_THUMBPOSITION must move the first
line to the thumb position, also when the control starts away from the
top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTDFNgD4oK9xbDsEGn
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 00:48:14 +00:00
Neo afbf874c0d Merge pull request #172 from clang-retro/claude/project-thread-ws9uve
Make typing in an edit control fast on a 68000
2026-11-27 16:40:38 -08:00
Neo-DesktopandClaude Opus 5.5 7a80e483f3 Make typing in an edit control fast on a 68000
- Fill pattern brushes a row at a time: a division for each pixel was
  most of the time of each key on a 68000, which divides in software.
- An edit control draws again only the lines that a change touches,
  not all of the control.
- SetScrollInfo draws only the scroll bar whose thumb looks different.
- The Mac event loop takes all the events that wait, so that keys typed
  fast are not lost from the small Event Manager queue.

In the 68k simulator, one key in MultiPad went from about 17 million
instructions to about 0.3 million.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTDFNgD4oK9xbDsEGn
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 00:15:38 +00:00
Neo ce65c2d715 Merge pull request #170 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 13:41:08 -08:00
Claude 2ffc3847c3 Draw controls with a visual style when the program asks for one
A program whose manifest asks for version 6 of the common controls, or
that runs with WINPORT_VISUAL_STYLES=1, now draws with a built-in visual
style of clang-retro's own: flat parts with one-pixel borders and slightly
rounded corners, in grays with the highlight color as accent.
WINPORT_VISUAL_STYLES=0 turns it off.

port/src/theme.cpp draws and measures the parts of the classes in the new
vsstyle.h and vssym32.h. uxtheme.cpp opens themes for those classes and
answers DrawThemeBackground, GetThemePartSize, GetThemeColor,
IsThemePartDefined and the rest from it; SetWindowTheme with empty
strings turns it off for a window. Buttons, edits, combo boxes, scroll
bars, progress bars, trackbars, spins, headers, tabs, toolbars, status
bars, rebar grippers and tree buttons draw with it, and the system colors
take its palette.

cmntest, whose manifest asks for the styles, checks the uxtheme calls.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 21:15:26 +00:00
Neo e4a2c14f0b Merge pull request #169 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 13:15:16 -08:00
Claude 364cca132f Blend translucent windows on X11 without a compositing manager
Without a compositing manager, a layered window on X11 got a bounding
shape for its fully clear pixels, but its alpha was not shown: a fading
splash or a half-transparent popup drew opaque.

X11 cannot blend windows by itself, so the backend now does what it
can: before such a window is mapped it takes a picture of the screen
under it from the root window, and draws the window's premultiplied
pixels over that picture. When the window moves, the part it covered
already comes from the old picture (the screen there shows the window
itself) and only the newly covered part is read from the root window.
The bounding and input shapes stay as they were. The picture does not
follow a window underneath that changes later; the README says so.

Checked on Xvfb with no compositing manager: a constant-alpha blue
window over a red and white checkerboard blends, and after a move the
checkerboard under it still lines up.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 20:58:20 +00:00
Neo 0aa63a297a Merge pull request #168 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 12:58:11 -08:00
Claude f43911208c Check GGO_METRICS against GDI_ERROR in wintest
What GetGlyphOutline returns for GGO_METRICS is not fixed: Windows
(and Wine, in the clang-dos run) give a size there, not 0. The test now
checks only that the call did not fail.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 20:41:38 +00:00
Claude ca68c74f22 Give glyph bitmaps and cubic outlines from GetGlyphOutline
GetGlyphOutline made only GGO_METRICS and GGO_NATIVE and refused the
rest with ERROR_NOT_SUPPORTED. Now it also gives:

- GGO_BITMAP, one bit for each pixel, and GGO_GRAY2_BITMAP,
  GGO_GRAY4_BITMAP and GGO_GRAY8_BITMAP, a byte of 0 to 4, 16 or 64,
  in rows on 4-byte bounds: the same coverage that text draws, so the
  built-in bitmap font has bitmaps too. A glyph with no ink gives none.
- GGO_BEZIER: each quadratic curve raised to a cubic one, in
  TT_PRIM_CSPLINE records, with the lines as before.
- With a matrix other than the identity, the glyph is drawn from its
  transformed outline (8 x 8 samples a pixel, nonzero fill), and the
  black box, the origin and the advance (gmCellIncX, gmCellIncY) are
  transformed too.

wintest checks each bitmap's size, levels and bits, a space, the cubic
records against the quadratic ones, and an O turned a quarter turn.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 20:26:51 +00:00
Neo 5d438f66e3 Merge pull request #167 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 12:26:42 -08:00
Claude 717d8ab053 Read icons whose images are PNG files
Windows Vista and later store large icon images (most often the
256 x 256 one) as PNG files inside icon resources and .ico files.
CreateIconFromResourceEx refused them; now such an image is decoded
with the stb_image that GDI+ already has and becomes the 32-bit DIB
with alpha that it stands for, with a mask set where the image is fully
clear. Resources, icon files (LoadImage with LR_LOADFROMFILE), OLE
pictures and the resource directory lookups all go through it.

wintest makes a 4 x 4 PNG icon with opaque, clear and half-transparent
rows, from bits with and without a size given and from an icon
file, and checks each row drawn on white.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 20:06:34 +00:00
Neo a0d71f5346 Merge pull request #165 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 12:06:25 -08:00
Claude 1adb44f7fc Draw OpenGL with the system's driver on Linux
On Linux, OpenGL programs drew only with softgl. Now, when the system
has an OpenGL driver whose renderer is hardware, the wgl functions make
their contexts there, as an installable client driver does on Windows:

- libEGL.so.1 is loaded when OpenGL is first used, so a program still
  needs no OpenGL library to start. The display is one of no window
  system (EGL_MESA_platform_surfaceless), else a device
  (EGL_EXT_platform_device), else the default one; the first with a
  hardware renderer is used.
- Each context draws into a pbuffer of the window's (or bitmap's)
  size. Before the picture goes to the window, it is read back into the
  buffer that opengl.cpp copies with GDI, keeping the program's pack
  states, pixel transfer, read buffer, read framebuffer and pack
  buffer. So it works the same on X11, Wayland and with no display.
- The program's gl functions are still softgl's, which call through
  the thread's dispatch table; a driver context points that table at
  the driver's functions. The makefile takes the table's order from
  port/softgl/src/dispatch.h (gl_names.inc), and a static_assert
  checks the size.
- The pixel formats lose PFD_GENERIC_FORMAT and give the driver's depth
  and stencil bits. wglGetProcAddress gives NULL for a vendor's
  function whose extension is not there, as EGL gives a stub for any
  name.

WINPORT_OPENGL=generic always uses softgl, and WINPORT_OPENGL=system
uses the driver even when its renderer is software (llvmpipe).
WINPORT_NO_EGL leaves it out. The README now says softgl gives OpenGL
1.5, not 1.1.

gltest runs once more over the system's driver where there is EGL,
and also checks a window that grows and the pixel states kept across
the read-back.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 19:43:55 +00:00
Neo 7df1b9ebf5 Merge pull request #164 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 11:43:45 -08:00
Claude 9a4a0ce656 Show every monitor
Programs now see all of the desktop's monitors instead of one screen:
RandR monitors (or Xinerama screens) on X11, every wl_output placed
with xdg-output on Wayland, and every NSScreen on macOS, the primary
first. The headless backend takes a layout from WINPORT_MONITORS
("1024x768+0+0,800x600+1024+100") for tests.

- MonitorFromPoint, MonitorFromRect and MonitorFromWindow pick by the
  largest overlap, with the NEAREST, PRIMARY and NULL fallbacks;
  GetMonitorInfo gives each rcMonitor, rcWork and \\.\DISPLAYn name;
  EnumDisplayMonitors clips and stops when the callback says so.
- EnumDisplayDevices, EnumDisplaySettingsEx and ChangeDisplaySettingsEx
  are new (with DISPLAY_DEVICE and the EDS_ and DM_POSITION values);
  the device mode of each monitor has its position.
- SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN, SM_CXVIRTUALSCREEN,
  SM_CYVIRTUALSCREEN and SM_CMONITORS follow the layout, and so does
  the default ClipCursor rectangle.
- A maximized window fills the work area of its own monitor.
- GetDpiForMonitor's MDT_RAW_DPI gives each monitor's own scale.

wintest lays out three monitors and checks the metrics, each lookup
with each flag, the info, enumeration with a clip, the devices and
modes, and a window maximized on the second monitor.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 19:24:24 +00:00
Neo 76e848c516 Merge pull request #163 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 11:24:14 -08:00
Neo c69dd933f6 Merge pull request #162 from clang-retro/claude/project-thread-vgls68
Add the Feature Pack's list, tab, property grid and shell controls
2026-11-27 11:23:51 -08:00
Claude c526ca98db Let a thread suspend itself as soon as it starts
A thread that calls SuspendThread on itself at once can run before
pthread_create has stored its handle in the Thread, so StopThread then
suspended (on macOS) or signalled (elsewhere) a thread that was not
there, and the thread ran on. core's "thread that holds itself" check
failed that way on macOS. A thread that stops itself now names itself
with pthread_self.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 19:07:29 +00:00
Claude 9dbafb925f Drag and drop with other programs
Drags from other programs now reach a window's OLE drop target, not
only WM_DROPFILES. The backend describes the drag (its files and text,
how to fetch them, where the answers go), and the window's thread hands
it to the target under it as a data object with CF_HDROP,
CF_UNICODETEXT and CF_TEXT, fetched when the target asks. A window that
takes files still gets WM_DROPFILES. The target's effect goes back to
the other program.

Drags this program starts with DoDragDrop are offered to other programs
once they leave its windows, as a URI list of their CF_HDROP files and
as text:

- On X11, the drag loop follows the pointer over other windows and acts
  as the XDND source: enter, position, status, drop, and the
  XdndSelection requests.
- On Wayland, the compositor runs the rest of the drag
  (wl_data_device.start_drag).
- On macOS, AppKit runs the rest of the drag (dragImage).

On Wayland and macOS a drag that comes back to the program's own
windows carries the original data object.

Incoming drags are handled as follows:

- On X11, through XDND, with any number of types, the source's action,
  and the keys held.
- On Wayland, through wl_data_device, with actions.
- On macOS, through the dragging pasteboard, with files and text.

Tried with a GTK 3 program on Xvfb and on Weston, in both directions
and out and back. dragtest hands drags in as a backend does: text onto
the view's COleDropTarget with the effects going back, and files onto
a window that takes them.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 18:52:29 +00:00
Neo d6df86f763 Merge pull request #161 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 10:52:18 -08:00
Claude 30443d0511 Merge remote-tracking branch 'origin/main' into claude/project-thread-vgls68 2026-11-27 18:35:34 +00:00
Neo 635b8f33b0 Merge pull request #160 from clang-retro/claude/project-thread-vgls68
Add the Feature Pack's base classes and standalone controls
2026-11-27 10:32:41 -08:00
Claude 0dbbd90608 Add the Feature Pack's list, tab, property grid and shell controls
CMFCListCtrl and CMFCHeaderCtrl sort by an overridable comparison and
mark the sorted columns; CMFCTabCtrl shows a window per tab in each of
the Feature Pack's tab styles; CMFCPropertyGridCtrl edits grouped values
in place; CMFCShellTreeCtrl and CMFCShellListCtrl browse the shell
namespace together.

CArray of CObject pointers now serializes. The CBT hook keeps
m_pWndInit set through PreSubclassWindow, as MFC does, so a control can
tell being created from being subclassed. The portable layer gains
SHGetFileInfo and a system image list of document and folder icons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-27 18:32:28 +00:00
Claude 18d34fba15 Read and write animated GIFs through GDI+
GDI+ now decodes every frame of a GIF, exposes them along
FrameDimensionTime with GdipImageGetFrameCount and
GdipImageSelectActiveFrame, and reports each frame's delay and the
loop count as PropertyTagFrameDelay and PropertyTagLoopCount. Saving
with EncoderSaveFlag set to EncoderValueMultiFrame starts a session
that GdipSaveAdd and GdipSaveAddImage extend and EncoderValueFlush
ends; a multi-frame image saved whole is written animated. Each frame
gets its own color table and graphic control extension, with a
NETSCAPE2.0 loop block. Property items can be read, set and removed.

atlutiltest saves, reloads and resaves a three-frame GIF.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 18:29:23 +00:00
Neo 2f5fbebea5 Merge pull request #159 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 10:29:15 -08:00
Claude 97105bf8ad Merge remote-tracking branch 'origin/main' into claude/project-thread-vgls68 2026-11-27 18:16:39 +00:00
Neo 20f970af48 Merge pull request #157 from clang-retro/claude/project-thread-vgls68
Add comdef.h's compiler COM support to the portable layer
2026-11-27 10:15:49 -08:00
Claude 1d1f5e18b3 Add the Feature Pack's base and standalone controls
CWinAppEx (its registry settings, window placement and the context menu,
keyboard, mouse, shell and tooltip managers), CSettingsStore and
CSettingsStoreSP, afxGlobalData, and the visual managers (classic, Office
XP, Windows, Office 2003, VS 2005, Office 2007, VS 2008, Windows 7).
They draw the standalone controls: CMFCButton, CMFCLinkCtrl,
CMFCMenuButton, CMFCColorButton with its palette, CMFCEditBrowseCtrl,
CMFCMaskedEdit, CMFCFontComboBox and CMFCSpinButtonCtrl.

The portable layer gains DrawState, TTM_SETTITLE and HIGHCONTRAST; CDC
gains DrawState's CBrush* overloads. fptest covers them on Windows and
natively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-27 18:02:06 +00:00
Claude 7053737847 Merge branch 'main' of https://github.com/clang-retro/mfc into claude/project-thread-vgls68
# Conflicts:
#	tests/run-tests.sh
2026-11-27 17:59:53 +00:00
Claude db36d8e272 Make and read shortcuts with IShellLink
CoCreateInstance(CLSID_ShellLink) now gives a shortcut object with
IShellLinkA and W, IPersistFile and IPersistStream. Shortcuts are kept
in Windows' .lnk format, so shortcuts made on Windows open here and the
other way round:
- the target as the LinkInfo's local path, in ANSI and UTF-16;
- the description, relative path, working directory, arguments and
  icon as UTF-16 strings, with the show command, hotkey, and the
  target's attributes, times and size in the header;
- reading also takes the target from the environment variables block.

SetPath expands %VARIABLES% and makes the path whole; GetIDList and
SetIDList go through the namespace's ID lists. Resolve finds a target
moved along with its shortcut by the relative path. A folder shows a
.lnk file as a link (SFGAO_LINK), and ShellExecute opens what a
shortcut points to. shlguid.h is new.

wintest checks every field through a file and a stream, the file's
header and LinkInfo, a moved target, a broken shortcut and SFGAO_LINK.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 17:49:23 +00:00
Neo 7eb2f1ef3e Merge pull request #158 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 09:49:14 -08:00
Claude 089e349d9d comdeftest: type its own smart pointers on MinGW, skip without comsupp
Older MinGW-w64 comdef.h types the IFooPtr smart pointers only where
__uuidof is the compiler's, and Ubuntu's MinGW-w64 has no
libcomsuppw.a, so the mingw-wine job could not build the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-27 17:47:03 +00:00
Claude 93a6e00f70 Suspend, resume and terminate running threads
SuspendThread now stops a running thread where it is: with Mach's
thread_suspend on macOS, and elsewhere with a signal whose handler waits
until the count is back to zero. ResumeThread counts down and lets it
go; a thread can suspend itself and be resumed by another. The count is
kept as on Windows (MAXIMUM_SUSPEND_COUNT, ERROR_SIGNAL_REFUSED).

TerminateThread stops a thread for good: before it starts, while it
runs, or while it is held. As on Windows, nothing it holds is let go
and its stack is not unwound; its handle is signaled with the exit code.

The cooperative threads of DOS and the classic Mac OS can still be held
only before they start.

core tests threads made suspended, held while running (and by
themselves), and terminated at each stage.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
2026-11-27 17:27:39 +00:00
Neo 5acb0a73aa Merge pull request #155 from clang-retro/claude/project-thread-jmt4ab
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 09:27:29 -08:00
Claude 6ff7d60f89 Add comdef.h's compiler COM support to the portable layer
comutil.h gives _bstr_t, _variant_t and _com_error, comip.h _com_ptr_t
with _com_IIID, and comdef.h the _com_dispatch_ helpers that #import
wrappers call plus the IFooPtr smart pointers for the system's
interfaces. They are header only: what Windows has in comsupp.lib is
inline, and _com_raise_error is weak so a program can replace it.

comdeftest runs the same checks on Windows (against MinGW's headers and
comsupp) and on Linux and macOS (against these).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-27 17:22:40 +00:00
Neo 659541fc61 Merge pull request #156 from clang-retro/claude/project-thread-vgls68
Add ATL's MMC snap-in and performance counter headers (atlsnap.h, atlperf.h)
2026-11-27 09:21:56 -08:00
Claude c32f5da314 Merge origin/main
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-27 17:07:48 +00:00