summaryrefslogtreecommitdiffstats
path: root/tksao/tkutil
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2020-03-31 19:55:01 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2020-03-31 19:55:01 (GMT)
commitc3a65c37b2b537f91626a8153ae7761f0a49a3aa (patch)
treed09dfaedad087bb33cff9ca418eb5b26e2a5bd52 /tksao/tkutil
parent67a88378bc07ac6c2dc251117891c1d127842698 (diff)
downloadblt-c3a65c37b2b537f91626a8153ae7761f0a49a3aa.zip
blt-c3a65c37b2b537f91626a8153ae7761f0a49a3aa.tar.gz
blt-c3a65c37b2b537f91626a8153ae7761f0a49a3aa.tar.bz2
clean up code
Diffstat (limited to 'tksao/tkutil')
-rw-r--r--tksao/tkutil/gridbase.C5
-rw-r--r--tksao/tkutil/tkutil.h2
-rw-r--r--tksao/tkutil/tkx11.C30
-rw-r--r--tksao/tkutil/tkx11.h30
4 files changed, 4 insertions, 63 deletions
diff --git a/tksao/tkutil/gridbase.C b/tksao/tkutil/gridbase.C
index 87e846d..af795b5 100644
--- a/tksao/tkutil/gridbase.C
+++ b/tksao/tkutil/gridbase.C
@@ -3,7 +3,6 @@
// For conditions of distribution and use, see copyright notice in "copyright"
#include "util.h"
-#include "tkx11.h"
#include "tkutil.h"
#include "gridbase.h"
#include "attribute.h"
@@ -267,6 +266,8 @@ void GridBase::psColor(Attribute* attr)
}
#ifdef MAC_OSX_TK
+#include <macosxlib.h>
+
int GridBase::macosxLine(int n, float* x, float* y)
{
if (n<2 || !x || !y)
@@ -317,6 +318,8 @@ int GridBase::macosxText(const char* txt, float x, float y,
#endif
#ifdef __WIN32
+#include <win32lib.h>
+
int GridBase::win32Line(int n, float* x, float* y)
{
if (n<2 || !x || !y)
diff --git a/tksao/tkutil/tkutil.h b/tksao/tkutil/tkutil.h
index aa4560b..3a9208c 100644
--- a/tksao/tkutil/tkutil.h
+++ b/tksao/tkutil/tkutil.h
@@ -18,8 +18,6 @@
#include <iomanip>
using namespace std;
-#define STRCMP(which,str,cnt) (!strncmp(toConstLower(which), str, cnt) && strlen(which)==cnt)
-
#ifndef __CYGWIN__
static const double M_TWOPI = 2*M_PI;
#endif
diff --git a/tksao/tkutil/tkx11.C b/tksao/tkutil/tkx11.C
deleted file mode 100644
index 7e87269..0000000
--- a/tksao/tkutil/tkx11.C
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (C) 1999-2020
-// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
-// For conditions of distribution and use, see copyright notice in "copyright"
-
-#include <tk.h>
-
-#include "tkx11.h"
-
-#if defined (MAC_OSX_TK) || (_WIN32)
-#include <tkInt.h>
-
-int XSetClipRectangles(Display *d, GC gc, int clip_x_origin, int clip_y_origin,
- XRectangle* rectangles, int n, int ordering)
-{
- TkRegion clipRgn = TkCreateRegion();
-
- while (n--) {
- XRectangle rect = *rectangles;
-
- rect.x += clip_x_origin;
- rect.y += clip_y_origin;
- TkUnionRectWithRegion(&rect, clipRgn, clipRgn);
- rectangles++;
- }
- TkSetRegion(d, gc, clipRgn);
- TkDestroyRegion(clipRgn);
- return 1;
-}
-
-#endif
diff --git a/tksao/tkutil/tkx11.h b/tksao/tkutil/tkx11.h
deleted file mode 100644
index 7406420..0000000
--- a/tksao/tkutil/tkx11.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (C) 1999-2020
-// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
-// For conditions of distribution and use, see copyright notice in "copyright"
-
-// important note: needs to be included first as X11 defs are here
-
-#ifndef __tkx11_h__
-#define __tkx11_h__
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#ifdef _WIN32
-#include <win32lib.h>
-#endif
-
-#ifdef MAC_OSX_TK
-#include <macosxlib.h>
-void XXWarpPointer(Display* display, Window src_w, Window dest_w,
- int src_x, int src_y,
- unsigned int src_width, unsigned int src_height,
- int dest_x, int dest_y);
-#endif
-
-#if defined (MAC_OSX_TK) || (_WIN32)
-int XSetClipRectangles(Display *d, GC gc, int clip_x_origin, int clip_y_origin,
- XRectangle* rectangles, int n, int ordering);
-#endif
-
-#endif