Lots of small updates to GGIMesa, tracking LibGGI internals changes
authorJon Taylor <taylorj@ggi-project.org>
Sun, 11 Jun 2000 20:11:55 +0000 (20:11 +0000)
committerJon Taylor <taylorj@ggi-project.org>
Sun, 11 Jun 2000 20:11:55 +0000 (20:11 +0000)
src/mesa/drivers/ggi/default/genkgi_visual.c
src/mesa/drivers/ggi/default/linear.c
src/mesa/drivers/ggi/default/linear_15.c
src/mesa/drivers/ggi/default/linear_16.c
src/mesa/drivers/ggi/default/linear_24.c
src/mesa/drivers/ggi/default/linear_32.c
src/mesa/drivers/ggi/default/linear_8.c
src/mesa/drivers/ggi/default/stubs.c
src/mesa/drivers/ggi/display/fbdev_visual.c
src/mesa/drivers/ggi/ggimesa.c
src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h

index c30f15fdb090f98a58353223762392772e3fda11..17ef9679bb8b5aa455e3eb98b7a1f2a5ddacd059 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: genkgi_visual.c,v 1.6 2000/01/07 08:34:44 jtaylor Exp $
+/* $Id: genkgi_visual.c,v 1.7 2000/06/11 20:11:55 jtaylor Exp $
 ******************************************************************************
 
    genkgi_visual.c: visual handling for the generic KGI helper
@@ -106,7 +106,8 @@ static int changed(ggi_visual_t vis, int whatchanged)
        return 0;
 }
 
-int GGIdlinit(ggi_visual *vis, const char *args, void *argptr)
+static int GGIdlinit(ggi_visual *vis, struct ggi_dlhandle *dlh,
+                       const char *args, void *argptr, uint32 *dlret)
 {
        struct genkgi_priv_mesa *priv;
        char libname[256], libargs[256];
@@ -166,12 +167,24 @@ int GGIdlinit(ggi_visual *vis, const char *args, void *argptr)
 #endif 
        GGIMESADPRINT_CORE("display-fbdev-kgicon-mesa: GGIdlinit finished\n");
 
+       *dlret = GGI_DL_OPDRAW;
        return 0;
 }
 
-int GGIdlcleanup(ggi_visual *vis)
+int MesaGGIdl_fbdev(int func, void **funcptr)
 {
-       return 0;
+       switch (func) {
+               case GGIFUNC_open:
+                       *funcptr = GGIopen;
+                       return 0;
+               case GGIFUNC_exit:
+               case GGIFUNC_close:
+                       *funcptr = NULL;
+                       return 0;
+               default:
+                       *funcptr = NULL;
+       }
+       return GGI_ENOTFOUND;
 }
 
 #include <ggi/internal/ggidlinit.h>
index 6acdf4d801212180f0e9a14274dd40d9c45de317..e15a0db0508f59590171188339f9c7213ae8282a 100644 (file)
@@ -320,14 +320,28 @@ int GGIsetup_driver(GGIMesaContext ggictx,struct ggi_mesa_info *info)
        return 0;
 }
 
-int GGIdlinit(ggi_visual_t vis,const char *version,void *argptr)
+static int GGIopen(ggi_visual_t vis,struct ggi_dlhandle *dlh,
+                       const char *args,void *argptr, uint32 *dlret)
 {      
        LIBGGI_MESAEXT(vis)->setup_driver=GGIsetup_driver;
 
+       *dlret = GGI_DL_OPDRAW;
        return 0;
 }
 
-int GGIdlcleanup(ggi_visual_t vis)
+int DLOPENFUNC(int func, void **funcptr)
 {
-       return 0;
+       switch (func) {
+               case GGIFUNC_open:
+                       *funcptr = GGIopen;
+                       return 0;
+               case GGIFUNC_exit:
+               case GGIFUNC_close:
+                       *funcptr = NULL;
+                       return 0;
+               default:
+                       *funcptr = NULL;
+       }
+       return GGI_ENOTFOUND;
 }
+
index 05879d10a98a985942d7571cb4ca35e2f47cf48b..ead7cc58475dc1636948f7bdc2c53fb35091126f 100644 (file)
@@ -30,6 +30,7 @@
 
 #define FB_TYPE uint16
 #define FB_BITS 15
+#define DLOPENFUNC MesaGGIdl_linear_15
 
 #include "linear.c"
 
index 221891bf20f19676fced72874bd21ba4bd504c22..6028699bbc9c02b2d6a30df169743ba2515cbf8b 100644 (file)
@@ -30,6 +30,7 @@
 
 #define FB_TYPE uint16
 #define FB_BITS 16
+#define DLOPENFUNC MesaGGIdl_linear_16
 
 #include "linear.c"
 
index 0d315321f02ebae01e878c71e8ea6236f997f05b..7a2236f1241cef2b5e46d300d01fc67fcef0adda 100644 (file)
@@ -30,6 +30,7 @@
 
 #define FB_TYPE uint32
 #define FB_BITS 24
+#define DLOPENFUNC MesaGGIdl_linear_24
 
 #include "linear.c"
 
index d16a923b35993ade18930e5e6d0255bb53a35417..7cbf945f35953501cbcd3418d0a8749852286ad6 100644 (file)
@@ -30,6 +30,7 @@
 
 #define FB_TYPE uint32
 #define FB_BITS 32
+#define DLOPENFUNC MesaGGIdl_linear_32
 
 #include "linear.c"
 
index 19a3ee27e46309bd199c5c86bd2cb98916b271e8..9c7b5d712f0617098d74bd535ba7649c77d5c1f0 100644 (file)
@@ -30,6 +30,7 @@
 
 #define FB_TYPE uint8
 #define FB_BITS 8
+#define DLOPENFUNC MesaGGIdl_linear_8
 
 #include "linear.c"
 
index df9efb5c40cf8fe15271a2b4e6948f91fedaf734..f377532efd7a392271c470d2eb89d9b5211cbf38 100644 (file)
@@ -399,15 +399,28 @@ triangle_func ggiGetTriangleFunc(GLcontext *ctx)
        return GGItriangle_flat;        
 }
 
-int GGIdlinit(ggi_visual_t vis, const char *version, void *argptr)
+static int GGIopen(ggi_visual_t vis, struct ggi_dlhandle *dlh,
+                       const char *args, void *argptr, uint32 *dlret)
 { 
                LIBGGI_MESAEXT(vis)->update_state = GGIupdate_state;
        LIBGGI_MESAEXT(vis)->setup_driver = GGIsetup_driver;
 
+       *dlret = GGI_DL_OPDRAW;
        return 0;
 }
 
-int GGIdlcleanup(ggi_visual_t vis)
+int MesaGGIdl_stubs(int func, void **funcptr)
 {
-       return 0;
+       switch (func) {
+               case GGIFUNC_open:
+                       *funcptr = GGIopen;
+                       return 0;
+               case GGIFUNC_exit:
+               case GGIFUNC_close:
+                       *funcptr = NULL;
+                       return 0;
+               default:
+                       *funcptr = NULL;
+       }
+       return GGI_ENOTFOUND;
 }
index 8a375da66b946d3869d6563b697e5c476f401135..a861d815a6d8dd1127c67172b7616cc31abc7714 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fbdev_visual.c,v 1.5 2000/01/07 08:34:44 jtaylor Exp $
+/* $Id: fbdev_visual.c,v 1.6 2000/06/11 20:11:55 jtaylor Exp $
 ******************************************************************************
 
    display-fbdev-mesa: visual handling
@@ -39,6 +39,8 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 
+#define GGI_SYMNAME_PREFIX  "MesaGGIdl_"
+
 #ifdef HAVE_SYS_VT_H
 #include <sys/vt.h>
 #else
@@ -95,7 +97,7 @@ static int changed(ggi_visual_t vis, int whatchanged)
                                        continue;
                                }
                                
-                               lib = ggiExtensionLoadDL(vis, fname, args, NULL);
+                               lib = ggiExtensionLoadDL(vis, fname, args, NULL, GGI_SYMNAME_PREFIX);
                        }
                }
                break;
index ddd280931cc96b55492bc171d617875c5fe7245d..6e8dd47e7470e48fe94021cce13891bf78e67d1a 100644 (file)
@@ -552,7 +552,7 @@ static int changed(ggi_visual_t vis, int whatchanged)
                                        /* No special implementation for this sublib */
                                        continue;
                                }
-                               lib = ggiExtensionLoadDL(vis, fname, args, NULL);
+                               lib = ggiExtensionLoadDL(vis, fname, args, NULL, GGI_SYMNAME_PREFIX);
                        }
                } 
                break;
index 0589991ce9d3b9162da4f8cebd16eedb7fd144e9..ae4a3c5825a884ef3518c93cf718930a0f436b2c 100644 (file)
@@ -4,6 +4,8 @@
 #include <ggi/internal/internal.h>
 #include "ggimesa.h"
 
+#define GGI_SYMNAME_PREFIX  "MesaGGIdl_"
+
 extern ggi_extid ggiMesaID;
 
 ggifunc_setmode GGIMesa_setmode;