Revision: 75431
          http://sourceforge.net/p/brlcad/code/75431
Author:   starseeker
Date:     2020-04-17 13:07:50 +0000 (Fri, 17 Apr 2020)
Log Message:
-----------
Move more headers into local include dir

Modified Paths:
--------------
    brlcad/branches/dm-fb-merge/src/fbserv/fbserv.c
    brlcad/branches/dm-fb-merge/src/libdm/CMakeLists.txt
    brlcad/branches/dm-fb-merge/src/libdm/X/dm-X.c
    brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c
    brlcad/branches/dm-fb-merge/src/libdm/adc.c
    brlcad/branches/dm-fb-merge/src/libdm/axes.c
    brlcad/branches/dm-fb-merge/src/libdm/clip.c
    brlcad/branches/dm-fb-merge/src/libdm/color.c
    brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c
    brlcad/branches/dm-fb-merge/src/libdm/dm_obj.c
    brlcad/branches/dm-fb-merge/src/libdm/dm_util.c
    brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c
    brlcad/branches/dm-fb-merge/src/libdm/fb_obj.c
    brlcad/branches/dm-fb-merge/src/libdm/fb_paged_io.c
    brlcad/branches/dm-fb-merge/src/libdm/fb_rect.c
    brlcad/branches/dm-fb-merge/src/libdm/fb_util.c
    brlcad/branches/dm-fb-merge/src/libdm/fbserv_obj.c
    brlcad/branches/dm-fb-merge/src/libdm/glx/dm-ogl.c
    brlcad/branches/dm-fb-merge/src/libdm/glx/if_ogl.c
    brlcad/branches/dm-fb-merge/src/libdm/grid.c
    brlcad/branches/dm-fb-merge/src/libdm/if_disk.c
    brlcad/branches/dm-fb-merge/src/libdm/if_mem.c
    brlcad/branches/dm-fb-merge/src/libdm/if_remote.c
    brlcad/branches/dm-fb-merge/src/libdm/if_stack.c
    brlcad/branches/dm-fb-merge/src/libdm/labels.c
    brlcad/branches/dm-fb-merge/src/libdm/null/dm-Null.c
    brlcad/branches/dm-fb-merge/src/libdm/null/if_null.c
    brlcad/branches/dm-fb-merge/src/libdm/options.c
    brlcad/branches/dm-fb-merge/src/libdm/osgl/dm-osgl.cpp
    brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp
    brlcad/branches/dm-fb-merge/src/libdm/plot/dm-plot.c
    brlcad/branches/dm-fb-merge/src/libdm/postscript/dm-ps.c
    brlcad/branches/dm-fb-merge/src/libdm/qt/dm-qt.cpp
    brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp
    brlcad/branches/dm-fb-merge/src/libdm/rect.c
    brlcad/branches/dm-fb-merge/src/libdm/scale.c
    brlcad/branches/dm-fb-merge/src/libdm/tcl.c
    brlcad/branches/dm-fb-merge/src/libdm/tk/dm-tk.c
    brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c
    brlcad/branches/dm-fb-merge/src/libdm/txt/dm-txt.c
    brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c
    brlcad/branches/dm-fb-merge/src/libdm/wgl/dm-wgl.c
    brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c

Added Paths:
-----------
    brlcad/branches/dm-fb-merge/src/libdm/include/dm_xvars.h
    brlcad/branches/dm-fb-merge/src/libdm/include/private.h

Removed Paths:
-------------
    brlcad/branches/dm-fb-merge/src/libdm/dm_private.h
    brlcad/branches/dm-fb-merge/src/libdm/dm_xvars.h

Modified: brlcad/branches/dm-fb-merge/src/fbserv/fbserv.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/fbserv/fbserv.c     2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/fbserv/fbserv.c     2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -76,7 +76,7 @@
 #include "bsocket.h"
 #include "bio.h"
 
-#include "../libdm/dm_private.h" /* for _fb_disk_enable */
+#include "../libdm/include/private.h" /* for _fb_disk_enable */
 
 #include "bu/malloc.h"
 #include "bu/getopt.h"

Modified: brlcad/branches/dm-fb-merge/src/libdm/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/CMakeLists.txt        2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/CMakeLists.txt        2020-04-17 
13:07:50 UTC (rev 75431)
@@ -17,7 +17,7 @@
   )
 
 # local includes
-set(DM_LOCAL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} 
${CMAKE_CURRENT_SOURCE_DIR}/null ${PNG_INCLUDE_DIRS})
+set(DM_LOCAL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${PNG_INCLUDE_DIRS})
 
 BRLCAD_LIB_INCLUDE_DIRS(dm DM_INCLUDE_DIRS DM_LOCAL_INCLUDE_DIRS)
 
@@ -164,8 +164,8 @@
   X/dm-X.c
   X/dm-X.h
   X/if_X24.c
-  dm_private.h
-  dm_xvars.h
+  include/dm_xvars.h
+  include/private.h
   fontstash/LICENSE.fontstash
   fontstash/README.md
   fontstash/fontstash.h
@@ -197,7 +197,6 @@
   include/calltable.h
   )
 CMAKEFILES(${libdm_ignore_files})
-CMAKEFILES(dm_private.h)
 
 # Local Variables:
 # tab-width: 8

Modified: brlcad/branches/dm-fb-merge/src/libdm/X/dm-X.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/X/dm-X.c      2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/X/dm-X.c      2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -59,15 +59,15 @@
 #include "bu/endian.h"
 #include "bn.h"
 #include "dm.h"
-#include "dm-X.h"
-#include "dm-Null.h"
-#include "./dm_xvars.h"
+#include "./dm-X.h"
+#include "../null/dm-Null.h"
+#include "../include/dm_xvars.h"
 #include "dm.h"
 #include "./fb_X.h"
 
 #include "rt/solid.h"
 
-#include "dm_private.h"
+#include "../include/private.h"
 
 #define PLOTBOUND 1000.0       /* Max magnification in Rot matrix */
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c    2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c    2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -74,7 +74,7 @@
 #include "bu/file.h"
 #include "bu/malloc.h"
 #include "bu/str.h"
-#include "dm_private.h"
+#include "../include/private.h"
 #include "./fb_X.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/adc.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/adc.c 2020-04-17 12:46:38 UTC (rev 
75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/adc.c 2020-04-17 13:07:50 UTC (rev 
75431)
@@ -31,7 +31,7 @@
 #include "vmath.h"
 #include "dm.h"
 #include "dm/bview.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 static void
 dm_draw_ticks(struct dm *dmp, struct bview_adc_state *adcp, fastf_t angle)

Modified: brlcad/branches/dm-fb-merge/src/libdm/axes.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/axes.c        2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/axes.c        2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -33,7 +33,7 @@
 #include "raytrace.h"
 #include "dm.h"
 #include "dm/bview.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 
 #if defined(IF_OGL) || defined(IF_WGL)

Modified: brlcad/branches/dm-fb-merge/src/libdm/clip.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/clip.c        2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/clip.c        2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -30,7 +30,7 @@
 
 #include "vmath.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 /* XXX need to test more thoroughly
    #define ANGLE_EPSILON 0.0001

Modified: brlcad/branches/dm-fb-merge/src/libdm/color.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/color.c       2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/color.c       2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -34,7 +34,7 @@
 #include "vmath.h"
 
 #include "bu/malloc.h"
-#include "./dm_xvars.h"
+#include "./include/dm_xvars.h"
 
 
 /* Return the allocated pixel value that most closely represents

Modified: brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -30,15 +30,14 @@
 #include "tcl.h"
 #ifdef HAVE_TK
 #  include "tk.h"
-#  include "dm_xvars.h"
 #endif
 
 #include "vmath.h"
 #include "dm.h"
-#include "dm_private.h"
-
-#include "dm-Null.h"
 #include "rt/solid.h"
+#include "./include/private.h"
+#include "./include/dm_xvars.h"
+#include "./null/dm-Null.h"
 
 extern struct dm *plot_open(void *interp, int argc, const char *argv[]);
 extern struct dm *ps_open(void *interp, int argc, const char *argv[]);

Modified: brlcad/branches/dm-fb-merge/src/libdm/dm_obj.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/dm_obj.c      2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/dm_obj.c      2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -44,27 +44,24 @@
 #include "rt/geom.h"
 #include "rt/solid.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
+#include "./include/dm_xvars.h"
 
 #ifdef DM_X
-#  include "./dm_xvars.h"
 #  include <X11/Xutil.h>
 #  include "X/dm-X.h"
 #endif /* DM_X */
 
 #ifdef DM_TK
-#  include "./dm_xvars.h"
 #  include "tk.h"
 #  include "tk/dm-tk.h"
 #endif /* DM_TK */
 
 #ifdef DM_OGL
-#  include "./dm_xvars.h"
 #  include "glx/dm-ogl.h"
 #endif /* DM_OGL */
 
 #ifdef DM_WGL
-#  include "./dm_xvars.h"
 #  include <tkwinport.h>
 #  include "wgl/dm-wgl.h"
 #endif /* DM_WGL */

Deleted: brlcad/branches/dm-fb-merge/src/libdm/dm_private.h
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/dm_private.h  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/dm_private.h  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -1,328 +0,0 @@
-/*                    D M _ P R I V A T E . H
- * BRL-CAD
- *
- * Copyright (c) 2014-2020 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-/** @file dm_private.h
- *
- * Internal header for the display manager library.
- *
- */
-
-#include "common.h"
-
-#ifndef DM_PRIVATE_H
-#define DM_PRIVATE_H
-
-#include <limits.h> /* For INT_MAX */
-#include <stdlib.h>
-
-#include "vmath.h"
-#include "dm.h"
-
-#include "./include/calltable.h"
-
-#define DM_MIN (-2048)
-#define DM_MAX (2047)
-
-#define DM_O(_m) offsetof(struct dm_impl, _m)
-
-#define GED_MAX 2047.0
-#define GED_MIN -2048.0
-#define GED_RANGE 4095.0
-#define INV_GED 0.00048828125
-#define INV_4096 0.000244140625
-
-/*
- * Display coordinate conversion:
- * GED is using -2048..+2048,
- * X is 0..width, 0..height
- */
-#define DIVBY4096(x) (((double)(x))*INV_4096)
-#define GED_TO_Xx(_dmp, x) ((int)((DIVBY4096(x)+0.5)*_dmp->i->dm_width))
-#define GED_TO_Xy(_dmp, x) ((int)((0.5-DIVBY4096(x))*_dmp->i->dm_height))
-#define Xx_TO_GED(_dmp, x) ((int)(((x)/(double)_dmp->i->dm_width - 0.5) * 
GED_RANGE))
-#define Xy_TO_GED(_dmp, x) ((int)((0.5 - (x)/(double)_dmp->i->dm_height) * 
GED_RANGE))
-
-/* +-2048 to +-1 */
-#define GED_TO_PM1(x) (((fastf_t)(x))*INV_GED)
-
-#ifdef IR_KNOBS
-#  define NOISE 16             /* Size of dead spot on knob */
-#endif
-
-/* Line Styles */
-#define DM_SOLID_LINE 0
-#define DM_DASHED_LINE 1
-
-/* Colors */
-#define DM_COLOR_HI    ((short)230)
-#define DM_COLOR_LOW   ((short)0)
-#define DM_BLACK_R     DM_COLOR_LOW
-#define DM_BLACK_G     DM_COLOR_LOW
-#define DM_BLACK_B     DM_COLOR_LOW
-#define DM_RED_R       DM_COLOR_HI
-#define DM_RED_G       DM_COLOR_LOW
-#define DM_RED_B       DM_COLOR_LOW
-#define DM_BLUE_R      DM_COLOR_LOW
-#define DM_BLUE_G      DM_COLOR_LOW
-#define DM_BLUE_B      DM_COLOR_HI
-#define DM_YELLOW_R    DM_COLOR_HI
-#define DM_YELLOW_G    DM_COLOR_HI
-#define DM_YELLOW_B    DM_COLOR_LOW
-#define DM_WHITE_R     DM_COLOR_HI
-#define DM_WHITE_G     DM_COLOR_HI
-#define DM_WHITE_B     DM_COLOR_HI
-#define DM_BLACK       DM_BLACK_R, DM_BLACK_G, DM_BLACK_B
-#define DM_RED         DM_RED_R, DM_RED_G, DM_RED_B
-#define DM_BLUE                DM_BLUE_R, DM_BLUE_G, DM_BLUE_B
-#define DM_YELLOW      DM_YELLOW_R, DM_YELLOW_G, DM_YELLOW_B
-#define DM_WHITE       DM_WHITE_R, DM_WHITE_G, DM_WHITE_B
-
-#define DM_COPY_COLOR(_dr, _dg, _db, _sr, _sg, _sb) {\
-       (_dr) = (_sr);\
-       (_dg) = (_sg);\
-       (_db) = (_sb); }
-#define DM_SAME_COLOR(_dr, _dg, _db, _sr, _sg, _sb)(\
-       (_dr) == (_sr) &&\
-       (_dg) == (_sg) &&\
-       (_db) == (_sb))
-#if defined(DM_X) || defined(DM_OGL)
-#define DM_REVERSE_COLOR_BYTE_ORDER(_shift, _mask) {   \
-       _shift = 24 - _shift;                           \
-       switch (_shift) {                               \
-           case 0:                                     \
-               _mask >>= 24;                           \
-               break;                                  \
-           case 8:                                     \
-               _mask >>= 8;                            \
-               break;                                  \
-           case 16:                                    \
-               _mask <<= 8;                            \
-               break;                                  \
-           case 24:                                    \
-               _mask <<= 24;                           \
-               break;                                  \
-       }                                               \
-    }
-#else
-/* Do nothing */
-#define DM_REVERSE_COLOR_BYTE_ORDER(_shift, _mask)
-#endif
-
-
-
-#if defined(DM_OGL) || defined(DM_WGL)
-#define Ogl_MV_O(_m) offsetof(struct modifiable_ogl_vars, _m)
-
-struct modifiable_ogl_vars {
-    struct dm *this_dm;
-    int cueing_on;
-    int zclipping_on;
-    int zbuffer_on;
-    int lighting_on;
-    int transparency_on;
-    int fastfog;
-    double fogdensity;
-    int zbuf;
-    int rgb;
-    int doublebuffer;
-    int depth;
-    int debug;
-    struct bu_vls log;
-    double bound;
-    int boundFlag;
-};
-#endif
-
-
-__BEGIN_DECLS
-
-int
-drawLine3D(struct dm *dmp, point_t pt1, point_t pt2, const char *log_bu, float 
*wireColor);
-
-int
-drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag, const 
char *log_bu, float *wireColor);
-
-int
-drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, fastf_t Y2, 
const char *log_bu);
-
-int
-draw_Line3D(struct dm *dmp, point_t pt1, point_t pt2);
-
-void
-flip_display_image_vertically(unsigned char *image, size_t width, size_t 
height);
-
-void
-dm_generic_hook(const struct bu_structparse *sdp,
-       const char *name,
-       void *base,
-       const char *value,
-       void *data);
-
-/* declare all the possible interfaces */
-#ifdef IF_X
-FB_EXPORT extern struct fb X24_interface;
-#endif
-#ifdef IF_OGL
-FB_EXPORT extern struct fb ogl_interface;
-#endif
-#ifdef IF_OSGL
-FB_EXPORT extern struct fb osgl_interface;
-#endif
-#ifdef IF_WGL
-FB_EXPORT extern struct fb wgl_interface;
-#endif
-#ifdef IF_TK
-FB_EXPORT extern struct fb tk_interface;
-#endif
-#ifdef IF_QT
-FB_EXPORT extern struct fb qt_interface;
-#endif
-#ifdef IF_REMOTE
-FB_EXPORT extern struct fb remote_interface; /* not in list[] */
-#endif
-
-/* Always included */
-FB_EXPORT extern struct fb debug_interface, disk_interface, stk_interface;
-FB_EXPORT extern struct fb memory_interface, fb_null_interface;
-
-
-/* Shared memory (shmget et. al.) key common to multiple framebuffers */
-#define SHMEM_KEY 42
-
-/* Maximum memory buffer allocation.
- *
- * Care must be taken as this can result in a large default memory
- * allocation that can have an impact on performance or minimum system
- * requirements.  For example, 20*1024 results in a 20480x20480 buffer
- * and a 1.6GB allocation.  Using 32*1024 results in a 4GB allocation.
- */
-#define FB_XMAXSCREEN 20*1024 /* 1.6GB */
-#define FB_YMAXSCREEN 20*1024 /* 1.6GB */
-
-/* setting to 1 turns on general intrface debugging for all fb types */
-#define FB_DEBUG 0
-
-__BEGIN_DECLS
-
-/*
- * Structure of color map in shared memory region.  Has exactly the
- * same format as the SGI hardware "gammaramp" map Note that only the
- * lower 8 bits are significant.
- */
-struct fb_cmap {
-    short cmr[256];
-    short cmg[256];
-    short cmb[256];
-};
-
-
-/*
- * This defines the format of the in-memory framebuffer copy.  The
- * alpha component and reverse order are maintained for compatibility
- * with /dev/sgi
- */
-struct fb_pixel {
-    unsigned char blue;
-    unsigned char green;
-    unsigned char red;
-    unsigned char alpha;
-};
-
-
-/* Clipping structure for zoom/pan operations */
-struct fb_clip {
-    int xpixmin;       /* view clipping planes clipped to pixel memory space*/
-    int xpixmax;
-    int ypixmin;
-    int ypixmax;
-    int xscrmin;       /* view clipping planes */
-    int xscrmax;
-    int yscrmin;
-    int yscrmax;
-    double oleft;      /* glOrtho parameters */
-    double oright;
-    double otop;
-    double obottom;
-};
-
-/*
- * Some functions and variables we couldn't hide.
- * Not for general consumption.
- */
-FB_EXPORT extern int _fb_disk_enable;
-FB_EXPORT extern int fb_sim_readrect(struct fb *ifp, int xmin, int ymin, int 
_width, int _height, unsigned char *pp);
-FB_EXPORT extern int fb_sim_writerect(struct fb *ifp, int xmin, int ymin, int 
_width, int _height, const unsigned char *pp);
-FB_EXPORT extern int fb_sim_bwreadrect(struct fb *ifp, int xmin, int ymin, int 
_width, int _height, unsigned char *pp);
-FB_EXPORT extern int fb_sim_bwwriterect(struct fb *ifp, int xmin, int ymin, 
int _width, int _height, const unsigned char *pp);
-FB_EXPORT extern int fb_sim_view(struct fb *ifp, int xcenter, int ycenter, int 
xzoom, int yzoom);
-FB_EXPORT extern int fb_sim_getview(struct fb *ifp, int *xcenter, int 
*ycenter, int *xzoom, int *yzoom);
-FB_EXPORT extern int fb_sim_cursor(struct fb *ifp, int mode, int x, int y);
-FB_EXPORT extern int fb_sim_getcursor(struct fb *ifp, int *mode, int *x, int 
*y);
-
-
-
-__END_DECLS
-
-/************************************************/
-/* dm-*.c macros for autogenerating common code */
-/************************************************/
-
-#define HIDDEN_DM_FUNCTION_PROTOTYPES(_dmtype) \
-    HIDDEN int _dmtype##_close(struct dm *dmp); \
-    HIDDEN int _dmtype##_drawBegin(struct dm *dmp); \
-    HIDDEN int _dmtype##_drawEnd(struct dm *dmp); \
-    HIDDEN int _dmtype##_normal(struct dm *dmp); \
-    HIDDEN int _dmtype##_loadMatrix(struct dm *dmp, fastf_t *mat, int 
which_eye); \
-    HIDDEN int _dmtype##_drawString2D(struct dm *dmp, char *str, fastf_t x, 
fastf_t y, int size, int use_aspect); \
-    HIDDEN int _dmtype##_drawLine2D(struct dm *dmp, fastf_t x_1, fastf_t y_1, 
fastf_t x_2, fastf_t y_2); \
-    HIDDEN int _dmtype##_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2); 
\
-    HIDDEN int _dmtype##_drawLines3D(struct dm *dmp, int npoints, point_t 
*points, int sflag); \
-    HIDDEN int _dmtype##_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y); \
-    HIDDEN int _dmtype##_drawPoint3D(struct dm *dmp, point_t point); \
-    HIDDEN int _dmtype##_drawPoints3D(struct dm *dmp, int npoints, point_t 
*points); \
-    HIDDEN int _dmtype##_drawVList(struct dm *dmp, struct bn_vlist *vp); \
-    HIDDEN int _dmtype##_draw(struct dm *dmp, struct bn_vlist 
*(*callback_function)(void *), void **data); \
-    HIDDEN int _dmtype##_setFGColor(struct dm *dmp, unsigned char r, unsigned 
char g, unsigned char b, int strict, fastf_t transparency); \
-    HIDDEN int _dmtype##_setBGColor(struct dm *dmp, unsigned char r, unsigned 
char g, unsigned char b); \
-    HIDDEN int _dmtype##_setLineAttr(struct dm *dmp, int width, int style); \
-    HIDDEN int _dmtype##_configureWin_guts(struct dm *dmp, int force); \
-    HIDDEN int _dmtype##_configureWin(struct dm *dmp, int force);              
      \
-    HIDDEN int _dmtype##_setLight(struct dm *dmp, int lighting_on); \
-    HIDDEN int _dmtype##_setTransparency(struct dm *dmp, int transparency_on); 
\
-    HIDDEN int _dmtype##_setDepthMask(struct dm *dmp, int depthMask_on); \
-    HIDDEN int _dmtype##_setZBuffer(struct dm *dmp, int zbuffer_on); \
-    HIDDEN int _dmtype##_setWinBounds(struct dm *dmp, fastf_t *w); \
-    HIDDEN int _dmtype##_debug(struct dm *dmp, int lvl); \
-    HIDDEN int _dmtype##_beginDList(struct dm *dmp, unsigned int list); \
-    HIDDEN int _dmtype##_endDList(struct dm *dmp); \
-    HIDDEN int _dmtype##_drawDList(struct dm *dmp, unsigned int list); \
-    HIDDEN int _dmtype##_freeDLists(struct dm *dmp, unsigned int list, int 
range); \
-    HIDDEN int _dmtype##_getDisplayImage(struct dm *dmp, unsigned char 
**image);
-
-#endif /* DM_PRIVATE_H */
-
-/*
- * Local Variables:
- * tab-width: 8
- * mode: C
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */

Modified: brlcad/branches/dm-fb-merge/src/libdm/dm_util.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/dm_util.c     2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/dm_util.c     2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -25,7 +25,7 @@
 #include "bn.h"
 #include "dm.h"
 
-#include "./dm_private.h"
+#include "./include/private.h"
 
 #  ifdef HAVE_GL_GL_H
 #    include <GL/gl.h>

Deleted: brlcad/branches/dm-fb-merge/src/libdm/dm_xvars.h
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/dm_xvars.h    2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/dm_xvars.h    2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -1,92 +0,0 @@
-/*                          D M _ X V A R S . H
- * BRL-CAD
- *
- * Copyright (c) 1993-2020 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-/** @addtogroup libstruct dm */
-/** @{ */
-/** @file dm_xvars.h
- *
- */
-#ifndef DM_DM_XVARS_H
-#define DM_DM_XVARS_H
-
-#include "common.h"
-
-#ifdef HAVE_X11_XLIB_H
-#  include <X11/Xlib.h>
-#  include <X11/Xutil.h>
-#endif
-
-#ifdef HAVE_TK
-#  include "tk.h"
-#  define HAVE_X11_TYPES 1
-#endif
-#ifdef IF_WGL
-#include "tkWinInt.h"
-#endif
-
-#if !defined(HAVE_TK) && !defined(TK_WINDOW_TYPEDEF)
-typedef void *Tk_Window;
-#  define TK_WINDOW_TYPEDEF 1
-#endif
-
-#if !defined(HAVE_X11_TYPES) && !defined(HAVE_X11_XLIB_H)
-typedef long Display;
-typedef long Window;
-typedef long Colormap;
-#endif
-
-#define XVARS_MV_O(_m) offsetof(struct dm_xvars, _m)
-
-#define INIT_XCOLOR(c) memset((c), 0, sizeof(XColor))
-
-/* FIXME: this structure really should not be variable-width and it
- * does not allow multiple interfaces to be simultaneously compiled.
- */
-struct dm_xvars {
-    Display *dpy;
-    Window win;
-    Tk_Window top;
-    Tk_Window xtkwin;
-    int depth;
-    Colormap cmap;
-#ifdef IF_WGL
-    PIXELFORMATDESCRIPTOR *vip;
-    HFONT fontstruct;
-    HDC  hdc;      /* device context of device that OpenGL calls are to be 
drawn on */
-#endif
-#if defined(DM_X) || defined (DM_OGL)
-    XVisualInfo *vip;
-    XFontStruct *fontstruct;
-#endif
-    int devmotionnotify;
-    int devbuttonpress;
-    int devbuttonrelease;
-};
-
-#endif /* DM_DM_XVARS_H */
-/** @} */
-/*
- * Local Variables:
- * mode: C
- * tab-width: 8
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */

Modified: brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -49,7 +49,7 @@
 #include "bu/exit.h"
 
 #include "vmath.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 /**

Modified: brlcad/branches/dm-fb-merge/src/libdm/fb_obj.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/fb_obj.c      2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/fb_obj.c      2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -42,7 +42,7 @@
 #include "bu/getopt.h"
 #include "bu/malloc.h"
 #include "bu/str.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 /* defined in libfb/tcl.c */

Modified: brlcad/branches/dm-fb-merge/src/libdm/fb_paged_io.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/fb_paged_io.c 2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/fb_paged_io.c 2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -33,7 +33,7 @@
 
 #include "bu/color.h"
 #include "bu/log.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/fb_rect.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/fb_rect.c     2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/fb_rect.c     2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -33,7 +33,7 @@
 
 #include "bu/color.h"
 #include "bu/log.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/fb_util.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/fb_util.c     2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/fb_util.c     2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -31,7 +31,7 @@
 
 #include <stdio.h>
 
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/fbserv_obj.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/fbserv_obj.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/fbserv_obj.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -40,7 +40,7 @@
 #include "dm.h"
 
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 
 static struct fb *curr_fbp;            /* current framebuffer pointer */

Modified: brlcad/branches/dm-fb-merge/src/libdm/glx/dm-ogl.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/glx/dm-ogl.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/glx/dm-ogl.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -75,15 +75,14 @@
 
 #include "vmath.h"
 #include "bn.h"
+#include "rt/solid.h"
 #include "dm.h"
-#include "dm-ogl.h"
-#include "dm-Null.h"
-#include "./dm_xvars.h"
-#include "dm.h"
+#include "../null/dm-Null.h"
+#include "../include/dm_xvars.h"
 #include "./fb_ogl.h"
-#include "rt/solid.h"
+#include "./dm-ogl.h"
 
-#include "./dm_private.h"
+#include "../include/private.h"
 
 #define ENABLE_POINT_SMOOTH 1
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/glx/if_ogl.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/glx/if_ogl.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/glx/if_ogl.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -81,7 +81,7 @@
 #include "bu/parallel.h"
 #include "bu/snooze.h"
 #include "bu/str.h"
-#include "dm_private.h"
+#include "../include/private.h"
 #include "dm.h"
 #include "./fb_ogl.h"
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/grid.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/grid.c        2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/grid.c        2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -29,7 +29,7 @@
 
 #include "vmath.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 void
 dm_draw_grid(struct dm *dmp, struct bview_grid_state *ggsp, fastf_t scale, 
mat_t model2view, fastf_t base2local)

Modified: brlcad/branches/dm-fb-merge/src/libdm/if_disk.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/if_disk.c     2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/if_disk.c     2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -31,7 +31,7 @@
 #include "bu/log.h"
 #include "bu/str.h"
 #include "bu/log.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/if_mem.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/if_mem.c      2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/if_mem.c      2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -37,7 +37,7 @@
 #include "bu/log.h"
 #include "bu/str.h"
 #include "bu/log.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/if_remote.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/if_remote.c   2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/if_remote.c   2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -52,7 +52,7 @@
 #include "bu/str.h"
 #include "bu/log.h"
 #include "pkg.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/if_stack.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/if_stack.c    2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/if_stack.c    2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -35,7 +35,7 @@
 #include "bu/log.h"
 #include "bu/str.h"
 #include "bu/log.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Copied: brlcad/branches/dm-fb-merge/src/libdm/include/dm_xvars.h (from rev 
75430, brlcad/branches/dm-fb-merge/src/libdm/dm_xvars.h)
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/include/dm_xvars.h                    
        (rev 0)
+++ brlcad/branches/dm-fb-merge/src/libdm/include/dm_xvars.h    2020-04-17 
13:07:50 UTC (rev 75431)
@@ -0,0 +1,92 @@
+/*                          D M _ X V A R S . H
+ * BRL-CAD
+ *
+ * Copyright (c) 1993-2020 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @addtogroup libstruct dm */
+/** @{ */
+/** @file dm_xvars.h
+ *
+ */
+#ifndef DM_DM_XVARS_H
+#define DM_DM_XVARS_H
+
+#include "common.h"
+
+#ifdef HAVE_X11_XLIB_H
+#  include <X11/Xlib.h>
+#  include <X11/Xutil.h>
+#endif
+
+#ifdef HAVE_TK
+#  include "tk.h"
+#  define HAVE_X11_TYPES 1
+#endif
+#ifdef IF_WGL
+#include "tkWinInt.h"
+#endif
+
+#if !defined(HAVE_TK) && !defined(TK_WINDOW_TYPEDEF)
+typedef void *Tk_Window;
+#  define TK_WINDOW_TYPEDEF 1
+#endif
+
+#if !defined(HAVE_X11_TYPES) && !defined(HAVE_X11_XLIB_H)
+typedef long Display;
+typedef long Window;
+typedef long Colormap;
+#endif
+
+#define XVARS_MV_O(_m) offsetof(struct dm_xvars, _m)
+
+#define INIT_XCOLOR(c) memset((c), 0, sizeof(XColor))
+
+/* FIXME: this structure really should not be variable-width and it
+ * does not allow multiple interfaces to be simultaneously compiled.
+ */
+struct dm_xvars {
+    Display *dpy;
+    Window win;
+    Tk_Window top;
+    Tk_Window xtkwin;
+    int depth;
+    Colormap cmap;
+#ifdef IF_WGL
+    PIXELFORMATDESCRIPTOR *vip;
+    HFONT fontstruct;
+    HDC  hdc;      /* device context of device that OpenGL calls are to be 
drawn on */
+#endif
+#if defined(DM_X) || defined (DM_OGL)
+    XVisualInfo *vip;
+    XFontStruct *fontstruct;
+#endif
+    int devmotionnotify;
+    int devbuttonpress;
+    int devbuttonrelease;
+};
+
+#endif /* DM_DM_XVARS_H */
+/** @} */
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */

Copied: brlcad/branches/dm-fb-merge/src/libdm/include/private.h (from rev 
75430, brlcad/branches/dm-fb-merge/src/libdm/dm_private.h)
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/include/private.h                     
        (rev 0)
+++ brlcad/branches/dm-fb-merge/src/libdm/include/private.h     2020-04-17 
13:07:50 UTC (rev 75431)
@@ -0,0 +1,328 @@
+/*                    D M _ P R I V A T E . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2014-2020 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file private.h
+ *
+ * Internal header for the display manager library.
+ *
+ */
+
+#include "common.h"
+
+#ifndef DM_PRIVATE_H
+#define DM_PRIVATE_H
+
+#include <limits.h> /* For INT_MAX */
+#include <stdlib.h>
+
+#include "vmath.h"
+#include "dm.h"
+
+#include "./calltable.h"
+
+#define DM_MIN (-2048)
+#define DM_MAX (2047)
+
+#define DM_O(_m) offsetof(struct dm_impl, _m)
+
+#define GED_MAX 2047.0
+#define GED_MIN -2048.0
+#define GED_RANGE 4095.0
+#define INV_GED 0.00048828125
+#define INV_4096 0.000244140625
+
+/*
+ * Display coordinate conversion:
+ * GED is using -2048..+2048,
+ * X is 0..width, 0..height
+ */
+#define DIVBY4096(x) (((double)(x))*INV_4096)
+#define GED_TO_Xx(_dmp, x) ((int)((DIVBY4096(x)+0.5)*_dmp->i->dm_width))
+#define GED_TO_Xy(_dmp, x) ((int)((0.5-DIVBY4096(x))*_dmp->i->dm_height))
+#define Xx_TO_GED(_dmp, x) ((int)(((x)/(double)_dmp->i->dm_width - 0.5) * 
GED_RANGE))
+#define Xy_TO_GED(_dmp, x) ((int)((0.5 - (x)/(double)_dmp->i->dm_height) * 
GED_RANGE))
+
+/* +-2048 to +-1 */
+#define GED_TO_PM1(x) (((fastf_t)(x))*INV_GED)
+
+#ifdef IR_KNOBS
+#  define NOISE 16             /* Size of dead spot on knob */
+#endif
+
+/* Line Styles */
+#define DM_SOLID_LINE 0
+#define DM_DASHED_LINE 1
+
+/* Colors */
+#define DM_COLOR_HI    ((short)230)
+#define DM_COLOR_LOW   ((short)0)
+#define DM_BLACK_R     DM_COLOR_LOW
+#define DM_BLACK_G     DM_COLOR_LOW
+#define DM_BLACK_B     DM_COLOR_LOW
+#define DM_RED_R       DM_COLOR_HI
+#define DM_RED_G       DM_COLOR_LOW
+#define DM_RED_B       DM_COLOR_LOW
+#define DM_BLUE_R      DM_COLOR_LOW
+#define DM_BLUE_G      DM_COLOR_LOW
+#define DM_BLUE_B      DM_COLOR_HI
+#define DM_YELLOW_R    DM_COLOR_HI
+#define DM_YELLOW_G    DM_COLOR_HI
+#define DM_YELLOW_B    DM_COLOR_LOW
+#define DM_WHITE_R     DM_COLOR_HI
+#define DM_WHITE_G     DM_COLOR_HI
+#define DM_WHITE_B     DM_COLOR_HI
+#define DM_BLACK       DM_BLACK_R, DM_BLACK_G, DM_BLACK_B
+#define DM_RED         DM_RED_R, DM_RED_G, DM_RED_B
+#define DM_BLUE                DM_BLUE_R, DM_BLUE_G, DM_BLUE_B
+#define DM_YELLOW      DM_YELLOW_R, DM_YELLOW_G, DM_YELLOW_B
+#define DM_WHITE       DM_WHITE_R, DM_WHITE_G, DM_WHITE_B
+
+#define DM_COPY_COLOR(_dr, _dg, _db, _sr, _sg, _sb) {\
+       (_dr) = (_sr);\
+       (_dg) = (_sg);\
+       (_db) = (_sb); }
+#define DM_SAME_COLOR(_dr, _dg, _db, _sr, _sg, _sb)(\
+       (_dr) == (_sr) &&\
+       (_dg) == (_sg) &&\
+       (_db) == (_sb))
+#if defined(DM_X) || defined(DM_OGL)
+#define DM_REVERSE_COLOR_BYTE_ORDER(_shift, _mask) {   \
+       _shift = 24 - _shift;                           \
+       switch (_shift) {                               \
+           case 0:                                     \
+               _mask >>= 24;                           \
+               break;                                  \
+           case 8:                                     \
+               _mask >>= 8;                            \
+               break;                                  \
+           case 16:                                    \
+               _mask <<= 8;                            \
+               break;                                  \
+           case 24:                                    \
+               _mask <<= 24;                           \
+               break;                                  \
+       }                                               \
+    }
+#else
+/* Do nothing */
+#define DM_REVERSE_COLOR_BYTE_ORDER(_shift, _mask)
+#endif
+
+
+
+#if defined(DM_OGL) || defined(DM_WGL)
+#define Ogl_MV_O(_m) offsetof(struct modifiable_ogl_vars, _m)
+
+struct modifiable_ogl_vars {
+    struct dm *this_dm;
+    int cueing_on;
+    int zclipping_on;
+    int zbuffer_on;
+    int lighting_on;
+    int transparency_on;
+    int fastfog;
+    double fogdensity;
+    int zbuf;
+    int rgb;
+    int doublebuffer;
+    int depth;
+    int debug;
+    struct bu_vls log;
+    double bound;
+    int boundFlag;
+};
+#endif
+
+
+__BEGIN_DECLS
+
+int
+drawLine3D(struct dm *dmp, point_t pt1, point_t pt2, const char *log_bu, float 
*wireColor);
+
+int
+drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag, const 
char *log_bu, float *wireColor);
+
+int
+drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, fastf_t Y2, 
const char *log_bu);
+
+int
+draw_Line3D(struct dm *dmp, point_t pt1, point_t pt2);
+
+void
+flip_display_image_vertically(unsigned char *image, size_t width, size_t 
height);
+
+void
+dm_generic_hook(const struct bu_structparse *sdp,
+       const char *name,
+       void *base,
+       const char *value,
+       void *data);
+
+/* declare all the possible interfaces */
+#ifdef IF_X
+FB_EXPORT extern struct fb X24_interface;
+#endif
+#ifdef IF_OGL
+FB_EXPORT extern struct fb ogl_interface;
+#endif
+#ifdef IF_OSGL
+FB_EXPORT extern struct fb osgl_interface;
+#endif
+#ifdef IF_WGL
+FB_EXPORT extern struct fb wgl_interface;
+#endif
+#ifdef IF_TK
+FB_EXPORT extern struct fb tk_interface;
+#endif
+#ifdef IF_QT
+FB_EXPORT extern struct fb qt_interface;
+#endif
+#ifdef IF_REMOTE
+FB_EXPORT extern struct fb remote_interface; /* not in list[] */
+#endif
+
+/* Always included */
+FB_EXPORT extern struct fb debug_interface, disk_interface, stk_interface;
+FB_EXPORT extern struct fb memory_interface, fb_null_interface;
+
+
+/* Shared memory (shmget et. al.) key common to multiple framebuffers */
+#define SHMEM_KEY 42
+
+/* Maximum memory buffer allocation.
+ *
+ * Care must be taken as this can result in a large default memory
+ * allocation that can have an impact on performance or minimum system
+ * requirements.  For example, 20*1024 results in a 20480x20480 buffer
+ * and a 1.6GB allocation.  Using 32*1024 results in a 4GB allocation.
+ */
+#define FB_XMAXSCREEN 20*1024 /* 1.6GB */
+#define FB_YMAXSCREEN 20*1024 /* 1.6GB */
+
+/* setting to 1 turns on general intrface debugging for all fb types */
+#define FB_DEBUG 0
+
+__BEGIN_DECLS
+
+/*
+ * Structure of color map in shared memory region.  Has exactly the
+ * same format as the SGI hardware "gammaramp" map Note that only the
+ * lower 8 bits are significant.
+ */
+struct fb_cmap {
+    short cmr[256];
+    short cmg[256];
+    short cmb[256];
+};
+
+
+/*
+ * This defines the format of the in-memory framebuffer copy.  The
+ * alpha component and reverse order are maintained for compatibility
+ * with /dev/sgi
+ */
+struct fb_pixel {
+    unsigned char blue;
+    unsigned char green;
+    unsigned char red;
+    unsigned char alpha;
+};
+
+
+/* Clipping structure for zoom/pan operations */
+struct fb_clip {
+    int xpixmin;       /* view clipping planes clipped to pixel memory space*/
+    int xpixmax;
+    int ypixmin;
+    int ypixmax;
+    int xscrmin;       /* view clipping planes */
+    int xscrmax;
+    int yscrmin;
+    int yscrmax;
+    double oleft;      /* glOrtho parameters */
+    double oright;
+    double otop;
+    double obottom;
+};
+
+/*
+ * Some functions and variables we couldn't hide.
+ * Not for general consumption.
+ */
+FB_EXPORT extern int _fb_disk_enable;
+FB_EXPORT extern int fb_sim_readrect(struct fb *ifp, int xmin, int ymin, int 
_width, int _height, unsigned char *pp);
+FB_EXPORT extern int fb_sim_writerect(struct fb *ifp, int xmin, int ymin, int 
_width, int _height, const unsigned char *pp);
+FB_EXPORT extern int fb_sim_bwreadrect(struct fb *ifp, int xmin, int ymin, int 
_width, int _height, unsigned char *pp);
+FB_EXPORT extern int fb_sim_bwwriterect(struct fb *ifp, int xmin, int ymin, 
int _width, int _height, const unsigned char *pp);
+FB_EXPORT extern int fb_sim_view(struct fb *ifp, int xcenter, int ycenter, int 
xzoom, int yzoom);
+FB_EXPORT extern int fb_sim_getview(struct fb *ifp, int *xcenter, int 
*ycenter, int *xzoom, int *yzoom);
+FB_EXPORT extern int fb_sim_cursor(struct fb *ifp, int mode, int x, int y);
+FB_EXPORT extern int fb_sim_getcursor(struct fb *ifp, int *mode, int *x, int 
*y);
+
+
+
+__END_DECLS
+
+/************************************************/
+/* dm-*.c macros for autogenerating common code */
+/************************************************/
+
+#define HIDDEN_DM_FUNCTION_PROTOTYPES(_dmtype) \
+    HIDDEN int _dmtype##_close(struct dm *dmp); \
+    HIDDEN int _dmtype##_drawBegin(struct dm *dmp); \
+    HIDDEN int _dmtype##_drawEnd(struct dm *dmp); \
+    HIDDEN int _dmtype##_normal(struct dm *dmp); \
+    HIDDEN int _dmtype##_loadMatrix(struct dm *dmp, fastf_t *mat, int 
which_eye); \
+    HIDDEN int _dmtype##_drawString2D(struct dm *dmp, char *str, fastf_t x, 
fastf_t y, int size, int use_aspect); \
+    HIDDEN int _dmtype##_drawLine2D(struct dm *dmp, fastf_t x_1, fastf_t y_1, 
fastf_t x_2, fastf_t y_2); \
+    HIDDEN int _dmtype##_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2); 
\
+    HIDDEN int _dmtype##_drawLines3D(struct dm *dmp, int npoints, point_t 
*points, int sflag); \
+    HIDDEN int _dmtype##_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y); \
+    HIDDEN int _dmtype##_drawPoint3D(struct dm *dmp, point_t point); \
+    HIDDEN int _dmtype##_drawPoints3D(struct dm *dmp, int npoints, point_t 
*points); \
+    HIDDEN int _dmtype##_drawVList(struct dm *dmp, struct bn_vlist *vp); \
+    HIDDEN int _dmtype##_draw(struct dm *dmp, struct bn_vlist 
*(*callback_function)(void *), void **data); \
+    HIDDEN int _dmtype##_setFGColor(struct dm *dmp, unsigned char r, unsigned 
char g, unsigned char b, int strict, fastf_t transparency); \
+    HIDDEN int _dmtype##_setBGColor(struct dm *dmp, unsigned char r, unsigned 
char g, unsigned char b); \
+    HIDDEN int _dmtype##_setLineAttr(struct dm *dmp, int width, int style); \
+    HIDDEN int _dmtype##_configureWin_guts(struct dm *dmp, int force); \
+    HIDDEN int _dmtype##_configureWin(struct dm *dmp, int force);              
      \
+    HIDDEN int _dmtype##_setLight(struct dm *dmp, int lighting_on); \
+    HIDDEN int _dmtype##_setTransparency(struct dm *dmp, int transparency_on); 
\
+    HIDDEN int _dmtype##_setDepthMask(struct dm *dmp, int depthMask_on); \
+    HIDDEN int _dmtype##_setZBuffer(struct dm *dmp, int zbuffer_on); \
+    HIDDEN int _dmtype##_setWinBounds(struct dm *dmp, fastf_t *w); \
+    HIDDEN int _dmtype##_debug(struct dm *dmp, int lvl); \
+    HIDDEN int _dmtype##_beginDList(struct dm *dmp, unsigned int list); \
+    HIDDEN int _dmtype##_endDList(struct dm *dmp); \
+    HIDDEN int _dmtype##_drawDList(struct dm *dmp, unsigned int list); \
+    HIDDEN int _dmtype##_freeDLists(struct dm *dmp, unsigned int list, int 
range); \
+    HIDDEN int _dmtype##_getDisplayImage(struct dm *dmp, unsigned char 
**image);
+
+#endif /* DM_PRIVATE_H */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */

Modified: brlcad/branches/dm-fb-merge/src/libdm/labels.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/labels.c      2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/labels.c      2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -30,7 +30,7 @@
 #include "rt/geom.h"
 #include "rt/solid.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 /*
  * Put labels on the vertices of the currently edited solid.

Modified: brlcad/branches/dm-fb-merge/src/libdm/null/dm-Null.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/null/dm-Null.c        2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/null/dm-Null.c        2020-04-17 
13:07:50 UTC (rev 75431)
@@ -30,8 +30,8 @@
 #include "tcl.h"
 #include "vmath.h"
 #include "dm.h"
-#include "dm-Null.h"
-#include "dm_private.h"
+#include "../null/dm-Null.h"
+#include "../include/private.h"
 
 
 int

Modified: brlcad/branches/dm-fb-merge/src/libdm/null/if_null.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/null/if_null.c        2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/null/if_null.c        2020-04-17 
13:07:50 UTC (rev 75431)
@@ -33,7 +33,7 @@
 #include <stdio.h>
 
 #include "bu/log.h"
-#include "dm_private.h"
+#include "../include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/options.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/options.c     2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/options.c     2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -32,7 +32,7 @@
 #include "bu/getopt.h"
 #include "vmath.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 int
 dm_processOptions(struct dm *dmp, struct bu_vls *init_proc_vls, int argc, char 
**argv)

Modified: brlcad/branches/dm-fb-merge/src/libdm/osgl/dm-osgl.cpp
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/osgl/dm-osgl.cpp      2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/osgl/dm-osgl.cpp      2020-04-17 
13:07:50 UTC (rev 75431)
@@ -56,7 +56,7 @@
 #include "./dm_xvars.h"
 #include "dm.h"
 #include "rt/solid.h"
-#include "./dm_private.h"
+#include "./private.h"
 
 #include "./fb_osgl.h"
 #include "dm-osgl.h"

Modified: brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp      2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp      2020-04-17 
13:07:50 UTC (rev 75431)
@@ -45,7 +45,7 @@
 
 #include "./fb_osgl.h"
 extern "C" {
-#include "dm_private.h"
+#include "private.h"
 }
 
 #define DIRECT_COLOR_VISUAL_ALLOWED 0

Modified: brlcad/branches/dm-fb-merge/src/libdm/plot/dm-plot.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/plot/dm-plot.c        2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/plot/dm-plot.c        2020-04-17 
13:07:50 UTC (rev 75431)
@@ -42,13 +42,13 @@
 #include "raytrace.h"
 #include "dm.h"
 
-#include "dm-plot.h"
-#include "dm-Null.h"
+#include "./dm-plot.h"
+#include "../null/dm-Null.h"
 
 #include "rt/solid.h"
 #include "bn/plot3.h"
 
-#include "./dm_private.h"
+#include "../include/private.h"
 
 #if defined(HAVE_POPEN) && !defined(HAVE_POPEN_DECL) && !defined(popen)
 extern FILE *popen(const char *command, const char *type);

Modified: brlcad/branches/dm-fb-merge/src/libdm/postscript/dm-ps.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/postscript/dm-ps.c    2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/postscript/dm-ps.c    2020-04-17 
13:07:50 UTC (rev 75431)
@@ -42,12 +42,12 @@
 #include "raytrace.h"
 
 #include "dm.h"
-#include "dm-ps.h"
-#include "dm-Null.h"
+#include "./dm-ps.h"
+#include "../null/dm-Null.h"
 
 #include "rt/solid.h"
 
-#include "./dm_private.h"
+#include "../include/private.h"
 
 #define EPSILON 0.0001
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/qt/dm-qt.cpp
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/qt/dm-qt.cpp  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/qt/dm-qt.cpp  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -37,7 +37,7 @@
 #include "bu/vls.h"
 #include "bu/parse.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "private.h"
 #include "./dm_xvars.h"
 #include "dm-Null.h"
 #include "./fb_qt.h"

Modified: brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -35,7 +35,7 @@
 #include <ctype.h>
 
 #include "dm.h"
-#include "dm_private.h"
+#include "private.h"
 #include "./fb_qt.h"
 #include "bu/malloc.h"
 #include "bu/file.h"

Modified: brlcad/branches/dm-fb-merge/src/libdm/rect.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/rect.c        2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/rect.c        2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -29,7 +29,7 @@
 
 #include "vmath.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 void
 dm_draw_rect(struct dm *dmp, struct bview_interactive_rect_state *grsp)

Modified: brlcad/branches/dm-fb-merge/src/libdm/scale.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/scale.c       2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/scale.c       2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -33,7 +33,7 @@
 #include "bn.h"
 #include "raytrace.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "./include/private.h"
 
 void
 dm_draw_scale(struct dm *dmp,

Modified: brlcad/branches/dm-fb-merge/src/libdm/tcl.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/tcl.c 2020-04-17 12:46:38 UTC (rev 
75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/tcl.c 2020-04-17 13:07:50 UTC (rev 
75431)
@@ -41,8 +41,8 @@
 #include "bu/cmd.h"
 #include "bu/log.h"
 #include "bu/vls.h"
-#include "dm_private.h"
 /* private headers */
+#include "./include/private.h"
 #include "brlcad_version.h"
 
 /* from libdm/query.c */

Modified: brlcad/branches/dm-fb-merge/src/libdm/tk/dm-tk.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/tk/dm-tk.c    2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/tk/dm-tk.c    2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -59,10 +59,10 @@
 #include "vmath.h"
 #include "bn.h"
 #include "dm.h"
-#include "dm-tk.h"
-#include "dm-Null.h"
-#include "../dm_xvars.h"
-#include "dm_private.h"
+#include "./dm-tk.h"
+#include "../null/dm-Null.h"
+#include "../include/dm_xvars.h"
+#include "../include/private.h"
 #include "rt/solid.h"
 
 #define PLOTBOUND 1000.0       /* Max magnification in Rot matrix */

Modified: brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c    2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c    2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -43,8 +43,8 @@
 #include "bu/log.h"
 #include "bu/snooze.h"
 
-#include "dm_private.h"
 #include "dm.h"
+#include "../include/private.h"
 
 
 Tcl_Interp *fbinterp;

Modified: brlcad/branches/dm-fb-merge/src/libdm/txt/dm-txt.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/txt/dm-txt.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/txt/dm-txt.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -30,7 +30,7 @@
 #include "tcl.h"
 #include "vmath.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "../include/private.h"
 
 
 struct dm *

Modified: brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c        2020-04-17 
12:46:38 UTC (rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c        2020-04-17 
13:07:50 UTC (rev 75431)
@@ -33,7 +33,7 @@
 
 #include "bu/color.h"
 #include "bu/log.h"
-#include "dm_private.h"
+#include "./include/private.h"
 #include "dm.h"
 
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/wgl/dm-wgl.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/wgl/dm-wgl.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/wgl/dm-wgl.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -42,14 +42,14 @@
 #include "vmath.h"
 #include "bn.h"
 #include "dm.h"
-#include "dm-Null.h"
-#include "dm-wgl.h"
-#include "./dm_xvars.h"
+#include "rt/solid.h"
+#include "../null/dm-Null.h"
+#include "./dm-wgl.h"
+#include "../include/dm_xvars.h"
 #include "dm.h"
 #include "./fb_wgl.h"
-#include "rt/solid.h"
 
-#include "./dm_private.h"
+#include "../include/private.h"
 
 #define ENABLE_POINT_SMOOTH 1
 

Modified: brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c  2020-04-17 12:46:38 UTC 
(rev 75430)
+++ brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c  2020-04-17 13:07:50 UTC 
(rev 75431)
@@ -60,7 +60,7 @@
 #include "rt/geom.h"
 #include "raytrace.h"
 #include "dm.h"
-#include "dm_private.h"
+#include "../include/private.h"
 #include "./fb_wgl.h"
 
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to