summaryrefslogtreecommitdiff
path: root/src/nsterm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nsterm.h')
-rw-r--r--src/nsterm.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/nsterm.h b/src/nsterm.h
index c2965cfcc0f..ae940ec5b4f 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -278,9 +278,9 @@ char const * nstrace_fullscreen_type_name (int);
#define NSTRACE_WHEN(cond, ...) \
- __attribute__((cleanup(nstrace_restore_global_trace_state))) \
+ __attribute__ ((cleanup (nstrace_restore_global_trace_state))) \
int nstrace_saved_enabled_global = nstrace_enabled_global; \
- __attribute__((cleanup(nstrace_leave))) \
+ __attribute__ ((cleanup (nstrace_leave))) \
int nstrace_enabled = nstrace_enabled_global && (cond); \
if (nstrace_enabled) { ++nstrace_depth; } \
else { nstrace_enabled_global = 0; } \
@@ -746,9 +746,11 @@ enum ns_return_frame_mode
CGColorSpaceRef colorSpace;
IOSurfaceRef currentSurface;
CGContextRef context;
+ bool doubleBuffered;
}
-- (id) initWithColorSpace: (CGColorSpaceRef)cs;
+- (id) initWithDoubleBuffered: (bool)db;
- (void) setColorSpace: (CGColorSpaceRef)cs;
+- (void) setDoubleBuffered: (bool)db;
- (CGContextRef) getContext;
@end
#endif
@@ -996,6 +998,11 @@ struct ns_output
/* Non-zero if we are doing an animation, e.g. toggling the tool bar. */
int in_animation;
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ /* Is the frame double buffered? */
+ bool double_buffered;
+#endif
+
#ifdef NS_IMPL_GNUSTEP
/* Zero if this is the first time a toolbar has been updated on this
frame. */
@@ -1030,6 +1037,10 @@ struct x_output
#define FRAME_FONT(f) ((f)->output_data.ns->font)
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#define FRAME_DOUBLE_BUFFERED(f) ((f)->output_data.ns->double_buffered)
+#endif
+
#ifdef __OBJC__
#define XNS_SCROLL_BAR(vec) ((id) xmint_pointer (vec))
#else
@@ -1169,6 +1180,7 @@ extern void ns_retain_object (void *obj);
extern void *ns_alloc_autorelease_pool (void);
extern void ns_release_autorelease_pool (void *);
extern const char *ns_get_defaults_value (const char *key);
+extern void ns_init_pool (void);
extern void ns_init_locale (void);
/* in nsmenu */
@@ -1278,7 +1290,7 @@ extern char gnustep_base_version[]; /* version tracking */
/* Little utility macros */
#define IN_BOUND(min, x, max) (((x) < (min)) \
? (min) : (((x)>(max)) ? (max) : (x)))
-#define SCREENMAXBOUND(x) (IN_BOUND (-SCREENMAX, x, SCREENMAX))
+#define SCREENMAXBOUND(x) IN_BOUND (-SCREENMAX, x, SCREENMAX)
#ifdef NS_IMPL_COCOA