]> git.saurik.com Git - wxWidgets.git/commitdiff
Committing in .
authorJouk Jansen <joukj@hrem.nano.tudelft.nl>
Tue, 7 Mar 2000 09:00:27 +0000 (09:00 +0000)
committerJouk Jansen <joukj@hrem.nano.tudelft.nl>
Tue, 7 Mar 2000 09:00:27 +0000 (09:00 +0000)
 VMS/GTK compile support

 Modified Files:
  wxWindows/descrip.mms wxWindows/setup.h_vms
  wxWindows/samples/minimal/descrip.mms
  wxWindows/src/common/descrip.mms
  wxWindows/src/common/resource.cpp
  wxWindows/src/generic/descrip.mms
  wxWindows/src/gtk/dcclient.cpp wxWindows/src/gtk/filedlg.cpp
  wxWindows/src/gtk/fontdlg.cpp wxWindows/src/gtk/listbox.cpp
  wxWindows/src/gtk/tbargtk.cpp wxWindows/src/gtk/win_gtk.c
  wxWindows/src/unix/descrip.mms wxWindows/src/unix/fontenum.cpp
 Added Files:
  wxWindows/lib/vms_gtk.opt
  wxWindows/src/gtk/wx_gtk_vmsjackets.c
 ----------------------------------------------------------------------

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

23 files changed:
descrip.mms
lib/vms_gtk.opt [new file with mode: 0644]
samples/minimal/descrip.mms
setup.h_vms
src/common/descrip.mms
src/common/resource.cpp
src/generic/descrip.mms
src/gtk/dcclient.cpp
src/gtk/filedlg.cpp
src/gtk/fontdlg.cpp
src/gtk/listbox.cpp
src/gtk/tbargtk.cpp
src/gtk/win_gtk.c
src/gtk/wx_gtk_vmsjackets.c [new file with mode: 0644]
src/gtk1/dcclient.cpp
src/gtk1/filedlg.cpp
src/gtk1/fontdlg.cpp
src/gtk1/listbox.cpp
src/gtk1/tbargtk.cpp
src/gtk1/win_gtk.c
src/gtk1/wx_gtk_vmsjackets.c [new file with mode: 0644]
src/unix/descrip.mms
src/unix/fontenum.cpp

index 199fc4d4f1a8c74e98fba985d3040869c737e0ec..a6bee006c6241775d20436facf0e6ac6c9ab4ae2 100644 (file)
        define/job/trans=(concealed) wx_root "''wx_fuldir'"
        set def [.wxwindows]
 
-all : setup.h
+all :
+       make gtk
+       purge [...]
+       delete [...]*.obj;
+       make motif
+       purge [...]
+       delete [...]*.obj;
+
+gtk : setup.h
+       set default [.src.generic]
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
+       set default [-.common]
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
+       set default [-.unix]
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
+       set default [-.gtk]
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
+       set default [--.samples.minimal]
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
+
+motif : setup.h
        set default [.src.generic]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.common]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.unix]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.motif]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [--.demos.bombs]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [--.samples.caret]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.checklst]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.config]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.controls]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.dialogs]
-       $(MMS)$(MMSQUALIFIERS)
-       set default [-.image]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
+#      set default [-.image]
+#      $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.menu]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [-.minimal]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
        set default [--.utils.dialoged.src]
-       $(MMS)$(MMSQUALIFIERS)
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
+       set default [--]
 
 setup.h : setup.h_vms
        copy setup.h_vms setup.h
diff --git a/lib/vms_gtk.opt b/lib/vms_gtk.opt
new file mode 100644 (file)
index 0000000..f23fe6c
--- /dev/null
@@ -0,0 +1,11 @@
+wx_root:[wxwindows.lib]libwx_gtk.olb/lib
+sys$library:libjpeg.olb/lib
+sys$library:libpng.olb/lib
+sys$library:libz.olb/lib
+sys$library:libtiff.olb/lib
+X11:libxpm.olb/lib
+sys$common:[mozilla]libgtk.so/share
+sys$common:[mozilla]libgdk.so/share
+sys$common:[mozilla]libglib.so/share
+sys$common:[mozilla]vms_jackets.so/share
+sys$library:decw$xlibshr.exe/share
index d7e86d2e6a3ccc1a3ad623377c242a04d5d73dd0..c6d8de7863244304aa01d4ea9cd4830b5df7f93f 100644 (file)
 .ifdef __WXMOTIF__
 CXX_DEFINE = /define=(__WXMOTIF__=1)
 .else
+.ifdef __WXGTK__
+CXX_DEFINE = /define=(__WXGTK__=1)
+.else
 CXX_DEFINE =
 .endif
+.endif
 
 .suffixes : .cpp
 
@@ -20,11 +24,24 @@ CXX_DEFINE =
        cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
 
 all :
+.ifdef __WXMOTIF__
        $(MMS)$(MMSQUALIFIERS) minimal.exe
+.else
+.ifdef __WXGTK__
+       $(MMS)$(MMSQUALIFIERS) minimal_gtk.exe
+.endif
+.endif
 
-minimal.exe : minimal.obj
 .ifdef __WXMOTIF__
+minimal.exe : minimal.obj
        cxxlink minimal,[--.lib]vms/opt
+.else
+.ifdef __WXGTK__
+minimal_gtk.exe : minimal.obj
+       ass link.lis sys$output
+       cxxlink/exec=minimal_gtk.exe minimal,[--.lib]vms_gtk/opt
+       deass sys$output
+.endif
 .endif
 
 minimal.obj : minimal.cpp
index 0c4d7e852f40c889bca01fd5926e91071060f3db..db5e934a305ef3b25bafaa13f1e8ca1ce7130b44 100644 (file)
@@ -68,7 +68,7 @@
 #undef YYTEXT_POINTER
 
 /* Define this if your version of GTK+ is greater than 1.2 */
-#undef __WXGTK12__
+#define __WXGTK12__ 1
 
 /* Define this if your version of GTK+ is greater than 1.3 */
 #undef __WXGTK13__
index 00060a80614c688cacd9f4fad7e23ad03ac6065b..d312a208108059354bbb8489c8e561315e05a32e 100644 (file)
 .ifdef __WXMOTIF__
 CXX_DEFINE = /define=(__WXMOTIF__=1)
 .else
+.ifdef __WXGTK__
+CXX_DEFINE = /define=(__WXGTK__=1)
+.else
 CXX_DEFINE =
 .endif
+.endif
 
 YACC=bison/yacc
 
@@ -231,6 +235,11 @@ all : $(SOURCES)
 .ifdef __WXMOTIF__
        library [--.lib]libwx_motif.olb $(OBJECTS)
        library [--.lib]libwx_motif.olb $(OBJECTS1)
+.else
+.ifdef __WXGTK__
+       library [--.lib]libwx_gtk.olb $(OBJECTS)
+       library [--.lib]libwx_gtk.olb $(OBJECTS1)
+.endif
 .endif
 
 parser.obj : parser.c lexer.c
index b162f9abcc50402cff585fcc53c148f72c46fd25..27305db69a31288fbba2413d823b94238d90b495 100644 (file)
@@ -2477,7 +2477,9 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
         return wxBitmap(name, bitmapType);
       }
     }
-    return wxNullBitmap;
+#ifndef __WXGTK__
+     return wxNullBitmap;
+#endif
   }
   else
   {
index 0b2b86e7e26978d2d2fbb9c3b914f8f65acd7f5c..aa0b2f263cca48c4062ec9908c665b131f3ff93f 100644 (file)
 .ifdef __WXMOTIF__
 CXX_DEFINE = /define=(__WXMOTIF__=1)
 .else
+.ifdef __WXGTK__
+CXX_DEFINE = /define=(__WXGTK__=1)
+.else
 CXX_DEFINE =
 .endif
+.endif
 
 .suffixes : .cpp
 
@@ -38,7 +42,6 @@ OBJECTS = \
                listctrl.obj,\
                logg.obj,\
                msgdlgg.obj,\
-               notebook.obj,\
                numdlgg.obj,\
                panelg.obj,\
                plot.obj,\
@@ -51,7 +54,6 @@ OBJECTS = \
                sashwin.obj,\
                scrolwin.obj,\
                splitter.obj,\
-               statline.obj,\
                statusbr.obj,\
                tbarsmpl.obj,\
                tabg.obj,\
@@ -101,11 +103,21 @@ SOURCES = \
                treectrl.cpp,\
                wizard.cpp
 
+.ifdef __WXMOTIF__
+OBJECTS0=,statline.obj,\
+               notebook.obj
+.else
+OBJECTS0=
+.endif
 
 all : $(SOURCES)
-       $(MMS)$(MMSQUALIFIERS) $(OBJECTS)
+       $(MMS)$(MMSQUALIFIERS) $(OBJECTS)$(OBJECTS0)
 .ifdef __WXMOTIF__
-       library/crea [--.lib]libwx_motif.olb $(OBJECTS)
+       library/crea [--.lib]libwx_motif.olb $(OBJECTS)$(OBJECTS0)
+.else
+.ifdef __WXGTK__
+       library/crea [--.lib]libwx_gtk.olb $(OBJECTS)
+.endif
 .endif
 
 busyinfo.obj : busyinfo.cpp
index 6817a326bf02c7a02d2b7d20b602153137d5e4cc..1dbaf55b39bcf3d0fe50e7709f878a9d90378b23 100644 (file)
@@ -1452,13 +1452,14 @@ void wxWindowDC::SetPen( const wxPen &pen )
         {
             for (int i = 0; i < req_nb_dash; i++)
                 real_req_dash[i] = req_dash[i] * width;
-            gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
+            gdk_gc_set_dashes( m_penGC, 0, (gint8*) real_req_dash,
+                             req_nb_dash );
             delete[] real_req_dash;
         }
         else
         {
             // No Memory. We use non-scaled dash pattern...
-            gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
+            gdk_gc_set_dashes( m_penGC, 0, (gint8*)req_dash, req_nb_dash );
         }
     }
 #endif
index c1c2c6f3e8a17fdd4ee7181e74ba2ef3aab2d2d1..558746b221ed81b54319e0168981def181dc1793 100644 (file)
 #include "wx/intl.h"
 #include "wx/generic/msgdlgg.h"
 
+
+#ifdef __VMS__
+#define gtk_file_selection_hide_fileop_buttons gtk_file_selection_hide_fileop_
+#endif
 #include <gtk/gtk.h>
 
 //-----------------------------------------------------------------------------
index 0cd7791011314b621de8df7b715ed59457674f39..1298601a79de994b22c6b726c7896c9097eb4dfd 100644 (file)
 #include "wx/debug.h"
 #include "wx/msgdlg.h"
 
+#ifdef __VMS__
+#define gtk_font_selection_dialog_get_type gtk_font_selection_dialog_get_t
+#define gtk_font_selection_dialog_get_font gtk_font_selection_dialog_get_f
+#define gtk_font_selection_dialog_get_font_name gtk_font_selection_dialog_getnf
+#endif
 #include <gtk/gtk.h>
 
 //-----------------------------------------------------------------------------
index c140ad2ddf39f34a32a83a19803482f8d573bbed..4f29dfdb2b2719133887dd22dd746d9d290a82d4 100644 (file)
 #include "wx/tooltip.h"
 #endif
 
-#include <gdk/gdk.h>
+#ifdef __VMS__
+#define gtk_scrolled_window_add_with_viewport gtk_scrolled_window_add_with_vi
+#define gtk_container_set_focus_vadjustment gtk_container_set_focus_vadjust
+#define gtk_scrolled_window_get_vadjustment gtk_scrolled_window_get_vadjust
+#endif
+# include <gdk/gdk.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
index de64297fd4b1eb265aa2ee011a093c99ed079041..6e58b78a54a97c4bfbb7fa0265c548fdebf01f9c 100644 (file)
@@ -26,6 +26,9 @@
 
 #include "wx/frame.h"
 
+#ifdef __VMS__
+#define gtk_pixmap_set_build_insensitive gtk_pixmap_set_build_insensitiv
+#endif
 #include "glib.h"
 #include "gdk/gdk.h"
 #include "gtk/gtk.h"
index 44f804dc2d80ac016c58b2c1a4a9b9d50b4a2d15..f97158acf9f60c12a47a49c31db0a41ed6db6aee 100644 (file)
 /////////////////////////////////////////////////////////////////////////// */
 
 #include "wx/gtk/win_gtk.h"
+#ifdef __VMS
+#define gtk_widget_get_child_requisition gtk_widget_get_child_requisitio
+#define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT
+#endif
 #include "gtk/gtksignal.h"
 #include "gtk/gtkprivate.h"
 #include "gdk/gdkx.h"
diff --git a/src/gtk/wx_gtk_vmsjackets.c b/src/gtk/wx_gtk_vmsjackets.c
new file mode 100644 (file)
index 0000000..e19cafb
--- /dev/null
@@ -0,0 +1,40 @@
+#include <gdk/gdk.h>
+
+void GDK_BEEP (void)
+{
+   gdk_beep();
+}
+
+GdkBitmap* GDK_BITMAP_CREATE_FROM_DATA (GdkWindow   *window,
+                                        const gchar *data,
+                                        gint         width,
+                                        gint         height)
+{
+   return gdk_bitmap_create_from_data  (window,
+                                        data,
+                                        width,
+                                        height);
+}
+
+void      GDK_BITMAP_UNREF             (GdkBitmap  *pixmap)
+{
+   gdk_bitmap_unref            (pixmap);
+}
+
+gint    GDK_CHAR_HEIGHT    (GdkFont        *font,
+                            gchar           character)
+{
+   return gdk_char_height    (font,
+                            character);
+}
+
+GdkColormap* GDK_COLORMAP_GET_SYSTEM     (void)
+{
+   return gdk_colormap_get_system();
+}
+
+GdkVisual*   GDK_COLORMAP_GET_VISUAL      (GdkColormap    *colormap)
+{
+   return gdk_colormap_get_visual      (colormap);
+}
+
index 6817a326bf02c7a02d2b7d20b602153137d5e4cc..1dbaf55b39bcf3d0fe50e7709f878a9d90378b23 100644 (file)
@@ -1452,13 +1452,14 @@ void wxWindowDC::SetPen( const wxPen &pen )
         {
             for (int i = 0; i < req_nb_dash; i++)
                 real_req_dash[i] = req_dash[i] * width;
-            gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
+            gdk_gc_set_dashes( m_penGC, 0, (gint8*) real_req_dash,
+                             req_nb_dash );
             delete[] real_req_dash;
         }
         else
         {
             // No Memory. We use non-scaled dash pattern...
-            gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
+            gdk_gc_set_dashes( m_penGC, 0, (gint8*)req_dash, req_nb_dash );
         }
     }
 #endif
index c1c2c6f3e8a17fdd4ee7181e74ba2ef3aab2d2d1..558746b221ed81b54319e0168981def181dc1793 100644 (file)
 #include "wx/intl.h"
 #include "wx/generic/msgdlgg.h"
 
+
+#ifdef __VMS__
+#define gtk_file_selection_hide_fileop_buttons gtk_file_selection_hide_fileop_
+#endif
 #include <gtk/gtk.h>
 
 //-----------------------------------------------------------------------------
index 0cd7791011314b621de8df7b715ed59457674f39..1298601a79de994b22c6b726c7896c9097eb4dfd 100644 (file)
 #include "wx/debug.h"
 #include "wx/msgdlg.h"
 
+#ifdef __VMS__
+#define gtk_font_selection_dialog_get_type gtk_font_selection_dialog_get_t
+#define gtk_font_selection_dialog_get_font gtk_font_selection_dialog_get_f
+#define gtk_font_selection_dialog_get_font_name gtk_font_selection_dialog_getnf
+#endif
 #include <gtk/gtk.h>
 
 //-----------------------------------------------------------------------------
index c140ad2ddf39f34a32a83a19803482f8d573bbed..4f29dfdb2b2719133887dd22dd746d9d290a82d4 100644 (file)
 #include "wx/tooltip.h"
 #endif
 
-#include <gdk/gdk.h>
+#ifdef __VMS__
+#define gtk_scrolled_window_add_with_viewport gtk_scrolled_window_add_with_vi
+#define gtk_container_set_focus_vadjustment gtk_container_set_focus_vadjust
+#define gtk_scrolled_window_get_vadjustment gtk_scrolled_window_get_vadjust
+#endif
+# include <gdk/gdk.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
index de64297fd4b1eb265aa2ee011a093c99ed079041..6e58b78a54a97c4bfbb7fa0265c548fdebf01f9c 100644 (file)
@@ -26,6 +26,9 @@
 
 #include "wx/frame.h"
 
+#ifdef __VMS__
+#define gtk_pixmap_set_build_insensitive gtk_pixmap_set_build_insensitiv
+#endif
 #include "glib.h"
 #include "gdk/gdk.h"
 #include "gtk/gtk.h"
index 44f804dc2d80ac016c58b2c1a4a9b9d50b4a2d15..f97158acf9f60c12a47a49c31db0a41ed6db6aee 100644 (file)
 /////////////////////////////////////////////////////////////////////////// */
 
 #include "wx/gtk/win_gtk.h"
+#ifdef __VMS
+#define gtk_widget_get_child_requisition gtk_widget_get_child_requisitio
+#define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT
+#endif
 #include "gtk/gtksignal.h"
 #include "gtk/gtkprivate.h"
 #include "gdk/gdkx.h"
diff --git a/src/gtk1/wx_gtk_vmsjackets.c b/src/gtk1/wx_gtk_vmsjackets.c
new file mode 100644 (file)
index 0000000..e19cafb
--- /dev/null
@@ -0,0 +1,40 @@
+#include <gdk/gdk.h>
+
+void GDK_BEEP (void)
+{
+   gdk_beep();
+}
+
+GdkBitmap* GDK_BITMAP_CREATE_FROM_DATA (GdkWindow   *window,
+                                        const gchar *data,
+                                        gint         width,
+                                        gint         height)
+{
+   return gdk_bitmap_create_from_data  (window,
+                                        data,
+                                        width,
+                                        height);
+}
+
+void      GDK_BITMAP_UNREF             (GdkBitmap  *pixmap)
+{
+   gdk_bitmap_unref            (pixmap);
+}
+
+gint    GDK_CHAR_HEIGHT    (GdkFont        *font,
+                            gchar           character)
+{
+   return gdk_char_height    (font,
+                            character);
+}
+
+GdkColormap* GDK_COLORMAP_GET_SYSTEM     (void)
+{
+   return gdk_colormap_get_system();
+}
+
+GdkVisual*   GDK_COLORMAP_GET_VISUAL      (GdkColormap    *colormap)
+{
+   return gdk_colormap_get_visual      (colormap);
+}
+
index 4a08ab7d431b118a44c48033d9eb651a10551287..338d2e82f0d05d4bee057b206f9086fcf6613cc0 100644 (file)
 .ifdef __WXMOTIF__
 CXX_DEFINE = /define=(__WXMOTIF__=1)
 .else
+.ifdef __WXGTK__
+CXX_DEFINE = /define=(__WXGTK__=1)
+.else
 CXX_DEFINE =
 .endif
+.endif
 
 .suffixes : .cpp
 
@@ -45,6 +49,10 @@ all : $(SOURCES)
        $(MMS)$(MMSQUALIFIERS) $(OBJECTS)
 .ifdef __WXMOTIF__
        library [--.lib]libwx_motif.olb $(OBJECTS)
+.else
+.ifdef __WXGTK__
+       library [--.lib]libwx_gtk.olb $(OBJECTS)
+.endif
 .endif
 
 dialup.obj : dialup.cpp
index a1d374896eee08ef33c08ab9ca2fa7124d2c5d7e..a9960f0709832900898e6ab2846d59dbab5b9920 100644 (file)
 #include "wx/fontenum.h"
 #include "wx/fontutil.h"
 
+#ifdef __VMS__ // Xlib.h for VMS is not (yet) compatible with C++
+               // The resulting warnings are switched off here
+#pragma message disable nosimpint
+#endif
 #include <X11/Xlib.h>
+#ifdef __VMS__
+#pragma message enable nosimpint
+#endif
 
 // ----------------------------------------------------------------------------
 // private functions