mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
ui/app: fix a few C signatures and a comment typo
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -4,4 +4,4 @@ __attribute__ ((visibility ("hidden"))) int gio_renderbufferStorage(CFTypeRef ct
|
|||||||
__attribute__ ((visibility ("hidden"))) int gio_presentRenderbuffer(CFTypeRef ctx, GLenum buffer);
|
__attribute__ ((visibility ("hidden"))) int gio_presentRenderbuffer(CFTypeRef ctx, GLenum buffer);
|
||||||
__attribute__ ((visibility ("hidden"))) int gio_makeCurrent(CFTypeRef ctx);
|
__attribute__ ((visibility ("hidden"))) int gio_makeCurrent(CFTypeRef ctx);
|
||||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createContext(void);
|
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createContext(void);
|
||||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLLayer();
|
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLLayer(void);
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ CFTypeRef gio_createContext(void) {
|
|||||||
return CFBridgingRetain(ctx);
|
return CFBridgingRetain(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
CFTypeRef gio_createGLLayer() {
|
CFTypeRef gio_createGLLayer(void) {
|
||||||
CAEAGLLayer *layer = [[CAEAGLLayer layer] init];
|
CAEAGLLayer *layer = [[CAEAGLLayer layer] init];
|
||||||
if (layer == nil) {
|
if (layer == nil) {
|
||||||
return nil;
|
return nil;
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLView();
|
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLView(void);
|
||||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_contextForView(CFTypeRef viewRef);
|
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_contextForView(CFTypeRef viewRef);
|
||||||
__attribute__ ((visibility ("hidden"))) void gio_makeCurrentContext(CFTypeRef ctx);
|
__attribute__ ((visibility ("hidden"))) void gio_makeCurrentContext(CFTypeRef ctx);
|
||||||
__attribute__ ((visibility ("hidden"))) void gio_flushContextBuffer(CFTypeRef ctx);
|
__attribute__ ((visibility ("hidden"))) void gio_flushContextBuffer(CFTypeRef ctx);
|
||||||
__attribute__ ((visibility ("hidden"))) void gio_clearCurrentContext();
|
__attribute__ ((visibility ("hidden"))) void gio_clearCurrentContext(void);
|
||||||
__attribute__ ((visibility ("hidden"))) void gio_lockContext(CFTypeRef ctxRef);
|
__attribute__ ((visibility ("hidden"))) void gio_lockContext(CFTypeRef ctxRef);
|
||||||
__attribute__ ((visibility ("hidden"))) void gio_unlockContext(CFTypeRef ctxRef);
|
__attribute__ ((visibility ("hidden"))) void gio_unlockContext(CFTypeRef ctxRef);
|
||||||
|
|||||||
+1
-1
@@ -102,7 +102,7 @@ CVDisplayLinkRef displayLink;
|
|||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
CFTypeRef gio_createGLView() {
|
CFTypeRef gio_createGLView(void) {
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
NSOpenGLPixelFormatAttribute attr[] = {
|
NSOpenGLPixelFormatAttribute attr[] = {
|
||||||
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
|
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Android's logcat already include timstamps.
|
// Android's logcat already includes timestamps.
|
||||||
log.SetFlags(log.Flags() &^ log.LstdFlags)
|
log.SetFlags(log.Flags() &^ log.LstdFlags)
|
||||||
logFd(C.ANDROID_LOG_INFO, os.Stdout.Fd())
|
logFd(C.ANDROID_LOG_INFO, os.Stdout.Fd())
|
||||||
logFd(C.ANDROID_LOG_ERROR, os.Stderr.Fd())
|
logFd(C.ANDROID_LOG_ERROR, os.Stderr.Fd())
|
||||||
|
|||||||
+1
-1
@@ -12,6 +12,6 @@ __attribute__ ((visibility ("hidden"))) CGFloat gio_viewWidth(CFTypeRef viewRef)
|
|||||||
__attribute__ ((visibility ("hidden"))) CGFloat gio_viewHeight(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_setAnimating(CFTypeRef viewRef, BOOL anim);
|
||||||
__attribute__ ((visibility ("hidden"))) void gio_updateDisplayLink(CFTypeRef viewRef, CGDirectDisplayID dispID);
|
__attribute__ ((visibility ("hidden"))) void gio_updateDisplayLink(CFTypeRef viewRef, CGDirectDisplayID dispID);
|
||||||
__attribute__ ((visibility ("hidden"))) CGFloat gio_getPixelsPerDP();
|
__attribute__ ((visibility ("hidden"))) CGFloat gio_getPixelsPerDP(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -67,7 +67,7 @@ static CGFloat getPointsPerDP(NSScreen *screen) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pixels pr dp.
|
// Pixels pr dp.
|
||||||
CGFloat gio_getPixelsPerDP() {
|
CGFloat gio_getPixelsPerDP(void) {
|
||||||
NSScreen *screen = [NSScreen mainScreen];
|
NSScreen *screen = [NSScreen mainScreen];
|
||||||
return [screen backingScaleFactor] * getPointsPerDP(screen);
|
return [screen backingScaleFactor] * getPointsPerDP(screen);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user