mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
396a538afe
Before this change, Gio tries hard to come up with a reasonable UI scale factor on desktop OSes derived from the physical dimensions and resolution of connected monitors. Gio also attempts to detect the user specified system UI scale and apply it. However, all that is complex and misguided: - The UI scale should not depend on whatever monitor is connected at program startup - For multiple monitors, it's unclear which one to base the scale off. - Applying both a monitor derived scale *and* the user specified scale is wrong, because the user scale is relative to some fixed scale, not Gio's derived scale. - With an automatic scale, Gio does not respect user preference and will not have a similar scale to other programs on the desktop. Get rid of the the automatic UI scale detection and rely only on the user scale. Updates gio#53 Signed-off-by: Elias Naur <mail@eliasnaur.com>
18 lines
756 B
C
18 lines
756 B
C
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
#ifndef _OS_MACOS_H
|
|
#define _OS_MACOS_H
|
|
|
|
#define GIO_MOUSE_MOVE 1
|
|
#define GIO_MOUSE_UP 2
|
|
#define GIO_MOUSE_DOWN 3
|
|
|
|
__attribute__ ((visibility ("hidden"))) void gio_main(CFTypeRef viewRef, const char *title, CGFloat width, CGFloat height);
|
|
__attribute__ ((visibility ("hidden"))) CGFloat gio_viewWidth(CFTypeRef viewRef);
|
|
__attribute__ ((visibility ("hidden"))) CGFloat gio_viewHeight(CFTypeRef viewRef);
|
|
__attribute__ ((visibility ("hidden"))) void gio_setAnimating(CFTypeRef viewRef, BOOL anim);
|
|
__attribute__ ((visibility ("hidden"))) void gio_updateDisplayLink(CFTypeRef viewRef, CGDirectDisplayID dispID);
|
|
__attribute__ ((visibility ("hidden"))) CGFloat gio_getViewBackingScale(CFTypeRef viewRef);
|
|
|
|
#endif
|