HOOPS/3dGS I.M. Interface

     << Back      Full Index      Forward >>


msw.h

00001 /*
00002  * Copyright (c) 1998 by Tech Soft 3D, LLC.
00003  * The information contained herein is confidential and proprietary to
00004  * Tech Soft 3D, LLC., and considered a trade secret as defined under
00005  * civil and criminal statutes.  Tech Soft 3D shall pursue its civil
00006  * and criminal remedies in the event of unauthorized use or misappropriation
00007  * of its trade secrets.  Use of this information by anyone other than
00008  * authorized employees of Tech Soft 3D, LLC. is granted only under a
00009  * written non-disclosure agreement, expressly prescribing the scope and
00010  * manner of such use.
00011  *
00012  * $Id: msw_8h-source.html,v 1.29 2008-03-10 07:09:28 stage Exp $
00013  */
00014 
00015 #ifndef MSW_H_DEFINED
00016 #include "driver.h"
00017 
00018 #ifndef HD_WINDOWS_DEFINED
00019 #   ifdef TRUE
00020 #       undef TRUE
00021 #       define TRUE 1
00022 #   endif
00023 #   ifndef WIN32_LEAN_AND_MEAN
00024 #       define WIN32_LEAN_AND_MEAN
00025 #   endif
00026 #   include <windows.h>
00027 #   define HD_WINDOWS_DEFINED
00028 #endif
00029 
00030 struct W32_Font_Stenciled {
00031     float yscale;
00032     int Aheight;
00033     int real_ysize;
00034     int descent;
00035     int max_char_width;
00036 
00037     LOGFONT log_font;
00038     HFONT hFont;
00039 
00040     long original_lfWidth;
00041 
00042     float ratio;
00043     long height_fudge;
00044 
00045     int alt_real_ysize;
00046     float alt_rotation;
00047     float alt_width;
00048     float alt_slant;
00049     LOGFONT alt_log_font; 
00050     HFONT alt_hFont;
00051     int alt_descent;
00052     int alt_max_char_width;
00053 };
00054 
00055 
00056 struct Windows_World{
00057     HINSTANCE   caller_instance;
00058     HINSTANCE   resource_instance;
00059 };
00060 
00061 EXTERNAL HOOPS_API Windows_World _windows_world;
00062 #   define MY(a) (_windows_world.a)
00063 
00064 
00065 struct Pen_User {
00066     Pen_User       alter        *next_user;
00067     HT_Display_Context alter    *dc;
00068 };
00069 
00070 
00071 struct Pen_Cache {
00072     Pen_Cache           *next_pen_cache;
00073     DWORD               pen_style;
00074     DWORD               pen_width;
00075     DWORD               pen_rgbColor;
00076     HPEN                pen_handle;
00077     HT_Line_Style const *line_style;
00078     Pen_User            *next_user;
00079 };
00080 
00081 
00082 struct Brush_User {
00083     Brush_User                  *next_user;
00084     HT_Display_Context const    *dc;
00085 };
00086 
00087 
00088 struct Brush_Cache {
00089     Brush_Cache                 *next_brush_cache;
00090     short                       brush_style;
00091     int                         brush_pattern_index;
00092     union {
00093         COLORREF                colorref_color;
00094         HT_Integer32            whole_thing;
00095         HT_Whichever_Color      whichever_color;
00096     }                           brush_fg_color;
00097     HT_Whichever_Color          brush_bg_color;
00098     int                         brush_incarnation;
00099     HBRUSH                      brush_handle;
00100     Brush_User                  *next_user;
00101 };
00102 
00103 
00104 struct HT_Log_Font_Item {
00105     HT_Log_Font_Item    *next;
00106     LOGFONT             log_font;
00107     char                *name;
00108     char                *specific;
00109     float               aheight;
00110     float               vspace;
00111     float               ratio;
00112     HT_Integer32        trans_flags;
00113     HT_Text_Encoding    encoding;
00114 };
00115 
00116 struct Sized_Font {
00117     LOGFONT const       *base_font;
00118     long                max_char_width;
00119     float               ratio;
00120     void *              w32_font_steciled; /*W32_Font_Stenciled*/
00121 };
00122 
00123 struct Font_User {
00124     Font_User                   *next_user;
00125     HT_Display_Context const    *dc;
00126 };
00127 
00128 
00129 struct Font_Cache {
00130     Font_Cache          *next_font_cache;
00131     HFONT               font_handle;
00132     LOGFONT const       *base_font;
00133     long                font_size;
00134     long                font_escapement;
00135     float               width_scale;
00136     Font_User           *next_user;
00137 };
00138 
00139 
00140 struct HDI_Library_Data {
00141     HINSTANCE                   library;
00142     FARPROC                     routine;
00143     int                         count;
00144     HDI_Library_Data            **backlink,
00145                                 *next;
00146 };
00147 
00148 
00149 typedef BOOL (FAR WINAPI *Wing_Bit_Blt_Action)(HDC, int, int, int, int,HDC, int, int);
00150 typedef HDC (FAR WINAPI *Wing_Create_Dc_Action)(void);
00151 typedef BOOL (FAR WINAPI *Wing_Recommend_Dib_Format_Action)(BITMAPINFO far *);
00152 typedef HBITMAP (FAR WINAPI *Wing_Create_Bitmap_Action)(HDC, BITMAPINFO far *,void far *);
00153 typedef UINT (FAR WINAPI *Wing_Set_Dib_Color_Table_Action)(HDC, UINT, UINT,RGBQUAD far *);
00154 typedef HBITMAP (FAR WINAPI *Create_Dib_Section_Action)(HDC, const BITMAPINFO *,UINT, VOID **, HANDLE,DWORD);
00155 
00156 typedef enum {
00157     nt,
00158     win32s,
00159     win95,
00160     win98
00161 } OS_Types;
00162 
00163 
00164 struct System_Data {
00165     OS_Types                            os_type;
00166 
00167     char                                ini_app_name[4096];
00168     char                                ini_file_name[4096];
00169     HKEY                                ini_key;
00170 
00171     /*
00172      * Patterns that can be shared by all instances
00173      * of the MSW driver.  The bit patterns are
00174      * precious GDI resources.  The line patterns are
00175      * not, but are included for convenience.
00176      */
00177     HBITMAP                             *bit_patterns;
00178     
00179     /*
00180      * hooks are GLOBAL_FUNCTION and optional
00181      */
00182     FARPROC                             next_getmessage_hook;
00183     FARPROC                             getmessage_inst;
00184     int                                 hook_count;
00185 
00186     HANDLE                              timer_thread;
00187     DWORD                               id_thread;
00188     volatile bool                       euthanize_timer;
00189 
00190     FARPROC                             printer_abort;
00191     BOOL                                user_abort;
00192     HWND                                handle_dialog_print;
00193 
00194     char                                print_app_name[80];
00195 
00196     unsigned char                       mapped8_remap_cube[8];
00197 
00198     /*
00199      * We need to share brushes and pen among COMPATABLE
00200      * instances - there are three catagories that exist
00201      */
00202     int                                 screen_pen_count;
00203     int                                 screen_pens_in_use;
00204     Pen_Cache                           screen_pen_cache;
00205     int                                 screen_brush_count;
00206     int                                 screen_brushes_in_use;
00207     Brush_Cache                         screen_brush_cache;
00208     int                                 screen_font_count;
00209     int                                 screen_fonts_in_use;
00210     Font_Cache                          screen_font_cache;
00211 
00212 
00213     BOOL                                in_error_routine;
00214 
00215     bool                                msw_hoops_class;
00216     bool                                ogl_hoops_class;
00217     bool                                d3d_hoops_class;
00218 
00219     /* Direct3D global data */
00220     void                                *d3d_shared_data;
00221     /* OpenGL global data */
00222     void                                *ogl_context_list;
00223 
00224     HDI_Library_Data                    *library_list;
00225     bool                                update_in_progress;
00226 
00227     HT_Log_Font_Item                    *font_list;
00228 };
00229 
00230 
00231 #define MSW_H_DEFINED   1
00232 #endif /* MSW_H_DEFINED */
Main Index
HOOPS/3dGS I.M. Interface

     << Back      Full Index      Forward >>