diff options
author | culler <culler> | 2021-04-21 14:33:08 (GMT) |
---|---|---|
committer | culler <culler> | 2021-04-21 14:33:08 (GMT) |
commit | 8ae33ca1eea9508220184d40c48774168f359de5 (patch) | |
tree | 3f5609ac20c89c4d1e5a159ddaf09dfd75c8bb67 /macosx/ttkMacOSXTheme.h | |
parent | ef5470780da9238e25f58e521c2147e156cf461c (diff) | |
parent | 95d45c95314c76807b895482f25ecf432b2896c1 (diff) | |
download | tk-8ae33ca1eea9508220184d40c48774168f359de5.zip tk-8ae33ca1eea9508220184d40c48774168f359de5.tar.gz tk-8ae33ca1eea9508220184d40c48774168f359de5.tar.bz2 |
Merge 8.7
Diffstat (limited to 'macosx/ttkMacOSXTheme.h')
-rw-r--r-- | macosx/ttkMacOSXTheme.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/macosx/ttkMacOSXTheme.h b/macosx/ttkMacOSXTheme.h index d12286d..2694c72 100644 --- a/macosx/ttkMacOSXTheme.h +++ b/macosx/ttkMacOSXTheme.h @@ -13,12 +13,25 @@ * Macros for handling drawing contexts. */ -#define BEGIN_DRAWING(d) { \ - TkMacOSXDrawingContext dc; \ - if (!TkMacOSXSetupDrawingContext((d), NULL, &dc)) {return;} -#define END_DRAWING \ +#define BEGIN_DRAWING(d) { \ + TkMacOSXDrawingContext dc; \ + if (!TkMacOSXSetupDrawingContext((d), NULL, &dc)) { \ + return; \ + } \ + +#define BEGIN_DRAWING_OR_REDRAW(d) { \ + TkMacOSXDrawingContext dc; \ + if (!TkMacOSXSetupDrawingContext((d), NULL, &dc)) { \ + NSView *view = TkMacOSXGetNSViewForDrawable(d); \ + while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} \ + [(TKContentView *)view addTkDirtyRect:[view bounds]]; \ + return; \ + } \ + +#define END_DRAWING \ TkMacOSXRestoreDrawingContext(&dc);} + #define HIOrientation kHIThemeOrientationNormal #define NoThemeMetric 0xFFFFFFFF |