Dear list members,

with the attached patch I can compile the current cvs version of ngl on linux(x86_64,gcc 4.1.2).

The demo programs work apart from the fact that no windows show up:
I get all console output, but not a single window.

Now I am unsure how to proceed. Can you please give me some advice?

Thank you very much in advance,
Yours,

Johannes Gajdosik

PS: my last email had a wron attachment, sorry for that.
Index: bootstrap
===================================================================
RCS file: /cvs/ngl/ngl/bootstrap,v
retrieving revision 1.7
diff -u -r1.7 bootstrap
--- bootstrap	1 Oct 2005 12:26:38 -0000	1.7
+++ bootstrap	26 Feb 2008 06:18:46 -0000
@@ -30,19 +30,7 @@
 	DIE=1
 fi
 
-have_autoconf=false
-if autoconf --version < /dev/null > /dev/null 2>&1 ; then
-	autoconf_version=`autoconf --version | grep 'autoconf (GNU Autoconf)' | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
-	case $autoconf_version in
-		2.5[4-9])
-			have_autoconf=true
-			;;
-	esac
-fi
-if $have_autoconf ; then : ; else
-	echo "You need autoconf >= 2.54 installed to compile $PROJECT."
-	DIE=1
-fi
+have_autoconf=true
 
 automake=''
 for am in automake automake-1.7; do
Index: examples/module/module.cpp
===================================================================
RCS file: /cvs/ngl/ngl/examples/module/module.cpp,v
retrieving revision 1.6
diff -u -r1.6 module.cpp
--- examples/module/module.cpp	17 Mar 2003 23:52:01 -0000	1.6
+++ examples/module/module.cpp	26 Feb 2008 06:18:46 -0000
@@ -61,7 +61,10 @@
   for (i = 1; i < GetArgCount(); i++)
   {
     nglString name = GetArg(i);
-    void* sym = module.GetSymbol(name);
+
+
+//gaj    void* sym = module.GetSymbol(name);
+    void* sym = module.GetSymbol(name.GetChars());
 
     if (sym)
       NGL_OUT(_T("%s: %p\n"), name.GetChars(), sym);
Index: examples/path/path.cpp
===================================================================
RCS file: /cvs/ngl/ngl/examples/path/path.cpp,v
retrieving revision 1.13
diff -u -r1.13 path.cpp
--- examples/path/path.cpp	17 Nov 2003 16:17:50 -0000	1.13
+++ examples/path/path.cpp	26 Feb 2008 06:18:47 -0000
@@ -82,33 +82,33 @@
 void PathApp::Test()
 {
   // display pre-defined paths
-  NGL_OUT(_T("ePathCurrent: %s\n"), (const nglChar*)nglPath(ePathCurrent).GetPathName());
-  NGL_OUT(_T("ePathUser   : %s\n"), (const nglChar*)nglPath(ePathUser).GetPathName());
-  NGL_OUT(_T("ePathTemp   : %s\n"), (const nglChar*)nglPath(ePathTemp).GetPathName());
-  NGL_OUT(_T("ePathApp    : %s\n"), (const nglChar*)nglPath(ePathApp).GetPathName());
+  NGL_OUT(_T("ePathCurrent: %s\n"), nglPath(ePathCurrent).GetPathName().GetChars());
+  NGL_OUT(_T("ePathUser   : %s\n"), nglPath(ePathUser).GetPathName().GetChars());
+  NGL_OUT(_T("ePathTemp   : %s\n"), nglPath(ePathTemp).GetPathName().GetChars());
+  NGL_OUT(_T("ePathApp    : %s\n"), nglPath(ePathApp).GetPathName().GetChars());
   NGL_OUT(_T("\n"));
 
   // '+' operator test
   nglPath p1 = nglPath ("/usr/bin") + nglPath("perl");
-  NGL_OUT(_T("'/usr/bin'  +  'perl'  : %s\n"), (const nglChar*)p1.GetPathName());
+  NGL_OUT(_T("'/usr/bin'  +  'perl'  : %s\n"), p1.GetPathName().GetChars());
   nglPath p2 = nglPath ("/usr/bin/") + nglPath("perl");
-  NGL_OUT(_T("'/usr/bin/' +  'perl'  : %s\n"), (const nglChar*)p2.GetPathName());
+  NGL_OUT(_T("'/usr/bin/' +  'perl'  : %s\n"), p2.GetPathName().GetChars());
   nglPath p3 = nglPath ("/usr/bin") + nglPath("/perl");
-  NGL_OUT(_T("'/usr/bin'  + '/perl'  : %s\n"), (const nglChar*)p3.GetPathName());
+  NGL_OUT(_T("'/usr/bin'  + '/perl'  : %s\n"), p3.GetPathName().GetChars());
   nglPath p4 = nglPath ("/usr/bin/") + nglPath("/perl");
-  NGL_OUT(_T("'/usr/bin/' + '/perl'  : %s\n"), (const nglChar*)p4.GetPathName());
+  NGL_OUT(_T("'/usr/bin/' + '/perl'  : %s\n"), p4.GetPathName().GetChars());
   NGL_OUT(_T("\n"));
 
   // '+=' operator test
   nglPath q = nglPath (ePathTemp);
   q += nglString(_T("sub1"));
-  NGL_OUT(_T("+= 'sub1'   : %s\n"), (const nglChar*)q.GetPathName());
+  NGL_OUT(_T("+= 'sub1'   : %s\n"), q.GetPathName().GetChars());
   q += nglString(_T("/sub2"));
-  NGL_OUT(_T("+= '/sub2'  : %s\n"), (const nglChar*)q.GetPathName());
+  NGL_OUT(_T("+= '/sub2'  : %s\n"), q.GetPathName().GetChars());
   q += nglString(_T("sub3/"));
-  NGL_OUT(_T("+= 'sub3/'  : %s\n"), (const nglChar*)q.GetPathName());
+  NGL_OUT(_T("+= 'sub3/'  : %s\n"), q.GetPathName().GetChars());
   q += nglString(_T("/sub4/"));
-  NGL_OUT(_T("+= '/sub4/' : %s\n"), (const nglChar*)q.GetPathName());
+  NGL_OUT(_T("+= '/sub4/' : %s\n"), q.GetPathName().GetChars());
 }
 
 void PathApp::Stat()
@@ -122,16 +122,16 @@
   nglPathInfo info;
   nglPath test(GetArg(1));
   test.GetInfo(info);
-  NGL_OUT(_T("Name  : %s\n"), (const nglChar*)test.GetPathName());
-  NGL_OUT(_T("Parent: %s\n"), (const nglChar*)test.GetParentName());
-  NGL_OUT(_T("Node  : %s\n"), (const nglChar*)test.GetNodeName());
-  NGL_OUT(_T("Ext   : %s\n"), (const nglChar*)test.GetExtension());
-  NGL_OUT(_T("MIME  : %s\n"), (const nglChar*)test.GetMimeType());
+  NGL_OUT(_T("Name  : %s\n"), test.GetPathName().GetChars());
+  NGL_OUT(_T("Parent: %s\n"), test.GetParentName().GetChars());
+  NGL_OUT(_T("Node  : %s\n"), test.GetNodeName().GetChars());
+  NGL_OUT(_T("Ext   : %s\n"), test.GetExtension().GetChars());
+  NGL_OUT(_T("MIME  : %s\n"), test.GetMimeType().GetChars());
   nglPath abs = test.GetAbsolutePath();
-  NGL_OUT(_T("Abs.  : %s\n"), (const nglChar*)abs.GetPathName());
+  NGL_OUT(_T("Abs.  : %s\n"), abs.GetPathName().GetChars());
   nglPath canon = test;
   canon.Canonize();
-  NGL_OUT(_T("Canon.: %s\n"), (const nglChar*)canon.GetPathName());
+  NGL_OUT(_T("Canon.: %s\n"), canon.GetPathName().GetChars());
   NGL_OUT(_T("Exists: %s\n"), YESNO(info.Exists));
   if (info.Exists)
   {
@@ -150,7 +150,7 @@
     count = test.GetChildren (&children);
     NGL_OUT(_T("Children (%d total) :\n"), count);
     for (i = children.begin(); i != children.end(); i++)
-      NGL_OUT(_T("  %s\n"), (const nglChar*)(*i).GetPathName());
+      NGL_OUT(_T("  %s\n"), (*i).GetPathName().GetChars());
     children.clear();
   }
 }
@@ -164,7 +164,7 @@
   }
 
   nglPath* test = new nglPath(GetArg(1));
-  NGL_OUT(_T("Creating '%s' : %s\n"), (const nglChar*)test->GetPathName(), YESNO(test->Create()));
+  NGL_OUT(_T("Creating '%s' : %s\n"), test->GetPathName().GetChars(), YESNO(test->Create()));
   if (test->GetError())
     NGL_OUT(_T("Error: %s\n"), test->GetErrorStr());
   delete test;
@@ -183,7 +183,7 @@
     recurse = true;
 
   nglPath* test = new nglPath(GetArg(1));
-  NGL_OUT(_T("Deleting '%s' : %s\n"), (const nglChar*)test->GetPathName(), YESNO(test->Delete(recurse)));
+  NGL_OUT(_T("Deleting '%s' : %s\n"), test->GetPathName().GetChars(), YESNO(test->Delete(recurse)));
   if (test->GetError())
     NGL_OUT(_T("Error: %s\n"), test->GetErrorStr());
   delete test;
Index: examples/string/string.cpp
===================================================================
RCS file: /cvs/ngl/ngl/examples/string/string.cpp,v
retrieving revision 1.14
diff -u -r1.14 string.cpp
--- examples/string/string.cpp	2 Jun 2003 22:12:12 -0000	1.14
+++ examples/string/string.cpp	26 Feb 2008 06:18:47 -0000
@@ -202,11 +202,11 @@
   MyLog (_T("\nFormat\n"));
   nglString print1, print2, printformat(_T("test2: %d, '%s', %.4f"));
   ShowBool (print1.Format (_T("test1: %d, '%s', %.4f"), 42, _T("Hello !"), 3.1416f), print1);
-  ShowBool (print2.Format (printformat, 42, _T("Hello !"), 3.1416f), print2);
+  ShowBool (print2.Format (printformat.GetChars(), 42, _T("Hello !"), 3.1416f), print2);
 
   MyLog (_T("\nFormat (locale agnostic)\n"));
   ShowBool (print1.CFormat (_T("test1: %d, '%s', %.4f"), 42, _T("Hello !"), 3.1416f), print1);
-  ShowBool (print2.CFormat (printformat, 42, _T("Hello !"), 3.1416f), print2);
+  ShowBool (print2.CFormat (printformat.GetChars(), 42, _T("Hello !"), 3.1416f), print2);
 
   nglString s_a(_T("a"));
   nglString s_ab(_T("ab"));
@@ -314,10 +314,11 @@
   MyLog (_T(" %d: %d\n"), 1, opone[1]);
   MyLog (_T(" %d: %d\n"), 15, opone[15]);
 
-  MyLog (_T("\nType cast\n"));
-  MyLog (_T(" null : %d\n"), ((const nglChar*)null != NULL));
-  MyLog (_T(" empty: %d\n"), ((const nglChar*)empty != NULL));
-  MyLog (_T(" demo : %d\n"), ((const nglChar*)demo != NULL));
+//gaj: Where are the cast operators?
+//  MyLog (_T("\nType cast\n"));
+//  MyLog (_T(" null : %d\n"), ((const nglChar*)null != NULL));
+//  MyLog (_T(" empty: %d\n"), ((const nglChar*)empty != NULL));
+//  MyLog (_T(" demo : %d\n"), ((const nglChar*)demo != NULL));
 
 #ifndef _WIN32_
   Quit();
@@ -337,7 +338,7 @@
 void StringApp::Show (const nglString& rString, const nglChar* pExt)
 {
   int len = rString.GetLength();
-  const nglChar* out = (const nglChar*)rString;
+  const nglChar* out = rString.GetChars();
 
   if (pExt)
     MyLog (_T(" '%s' (%d) %s\n"), out, len, pExt);
Index: examples/window/UserWindow.cpp
===================================================================
RCS file: /cvs/ngl/ngl/examples/window/UserWindow.cpp,v
retrieving revision 1.15
diff -u -r1.15 UserWindow.cpp
--- examples/window/UserWindow.cpp	23 Apr 2005 14:42:44 -0000	1.15
+++ examples/window/UserWindow.cpp	26 Feb 2008 06:18:47 -0000
@@ -155,17 +155,20 @@
   return false;
 }
 
-void UserWindow::OnMouseClick (nglMouseInfo &rInfo)
+bool UserWindow::OnMouseClick (nglMouseInfo &rInfo)
 {
   IFLOG NGL_OUT(_T("* Clic (x: %d  y: %d  buttons: %s)\n"), rInfo.X, rInfo.Y, GetMouseButtons(rInfo.Buttons).GetChars());
+  return false;
 }
 
-void UserWindow::OnMouseUnclick (nglMouseInfo &rInfo)
+bool UserWindow::OnMouseUnclick (nglMouseInfo &rInfo)
 {
   IFLOG NGL_OUT(_T("* Unclic (x: %d  y: %d  buttons: %s)\n"), rInfo.X, rInfo.Y, GetMouseButtons(rInfo.Buttons).GetChars());
+  return false;
 }
 
-void UserWindow::OnMouseMove (int X, int Y)
+bool UserWindow::OnMouseMove (int X, int Y)
 {
   IFLOG NGL_OUT(_T("* Move (x: %d  y: %d)\n"), X, Y);
+  return false;
 }
Index: examples/window/UserWindow.h
===================================================================
RCS file: /cvs/ngl/ngl/examples/window/UserWindow.h,v
retrieving revision 1.7
diff -u -r1.7 UserWindow.h
--- examples/window/UserWindow.h	23 Apr 2005 14:42:44 -0000	1.7
+++ examples/window/UserWindow.h	26 Feb 2008 06:18:47 -0000
@@ -46,9 +46,12 @@
   void OnResize      (uint Width, uint Height);
   bool OnKeyDown     (nglKeyCode Key, nglChar Char);
   bool OnKeyUp       (nglKeyCode Key, nglChar Char);
-  void OnMouseClick  (nglMouseInfo& rInfo);
-  void OnMouseUnclick(nglMouseInfo& rInfo);
-  void OnMouseMove   (int X, int Y);
+//gaj  void OnMouseClick  (nglMouseInfo& rInfo);
+  bool OnMouseClick  (nglMouseInfo& rInfo);
+//gaj  void OnMouseUnclick(nglMouseInfo& rInfo);
+  bool OnMouseUnclick(nglMouseInfo& rInfo);
+//gaj  void OnMouseMove   (int X, int Y);
+  bool OnMouseMove   (int X, int Y);
 
 private:
   CursorModel mMyCursor;
Index: src/core/unix/nglWindow.cpp
===================================================================
RCS file: /cvs/ngl/ngl/src/core/unix/nglWindow.cpp,v
retrieving revision 1.56
diff -u -r1.56 nglWindow.cpp
--- src/core/unix/nglWindow.cpp	10 Jul 2006 15:14:54 -0000	1.56
+++ src/core/unix/nglWindow.cpp	26 Feb 2008 06:18:48 -0000
@@ -286,7 +286,11 @@
   }
 
   // Bind GLX context to window
-  if (!MakeCurrent(win))
+
+//gaj  if (!MakeCurrent(win))
+  if (!MakeCurrent())
+
+
     return;
   NGL_DEBUG( nglContext::Dump(NGL_LOG_INFO); )
 
@@ -954,10 +958,15 @@
       car = '\n';
   }
 
+//gaj
+const nglKeyEvent key_event(keycode, car,keycode);
+
   if (rEvent.type == KeyPress)
-    return CallOnKeyDown (keycode, car);
+//gaj    return CallOnKeyDown (keycode, car);
+    return CallOnKeyDown (key_event);
   else
-    return CallOnKeyUp (keycode, car);
+//gaj    return CallOnKeyUp (keycode, car);
+    return CallOnKeyUp (key_event);
 }
 
 void nglWindow::SetDeco (uint Deco)  // 0 or MWM_DECOR_ALL
Index: src/image/nglImagePNGCodec_shr.cpp
===================================================================
RCS file: /cvs/ngl/ngl/src/image/nglImagePNGCodec_shr.cpp,v
retrieving revision 1.24
diff -u -r1.24 nglImagePNGCodec_shr.cpp
--- src/image/nglImagePNGCodec_shr.cpp	5 Feb 2006 01:01:16 -0000	1.24
+++ src/image/nglImagePNGCodec_shr.cpp	26 Feb 2008 06:18:49 -0000
@@ -28,6 +28,11 @@
 #include "nglIStream.h"
 #include "nglOStream.h"
 
+// gaj: forward declaration
+void info_callback(png_structp png_ptr, png_infop info);
+void row_callback(png_structp png_ptr, png_bytep new_row, png_uint_32 row_num, int pass);
+void end_callback(png_structp png_ptr, png_infop info);
+
 
 class nglImagePNGCodec : public nglImageCodec
 {
@@ -321,11 +326,13 @@
   return true;
 }
 
-#ifdef _CARBON_
-void nglWritePNG( png_structp png_ptr, png_bytep data, long unsigned int length )
-#else
-void nglWritePNG( png_structp png_ptr, png_bytep data, unsigned int length )
-#endif
+void nglWritePNG( png_structp png_ptr, png_bytep data, png_size_t length )
+//gaj
+//#ifdef _CARBON_
+//void nglWritePNG( png_structp png_ptr, png_bytep data, long unsigned int length )
+//#else
+//void nglWritePNG( png_structp png_ptr, png_bytep data, unsigned int length )
+//#endif
 {
   ((nglOStream*)(png_get_io_ptr(png_ptr)))->Write( (png_byte *)data, (long int) length, 1 );
 }
_______________________________________________
https://mail.gna.org/listinfo/ngl-devel

Reply via email to