From e054c9a591a344e05b0cedaf285dc8e0a3aed7a0 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 10 Aug 2015 11:18:45 +0200 Subject: Fixed winDonePicture --- Linux_C_12/cpicture_121.c | 22 +--------------------- Linux_C_12/cpicture_121.h | 5 ++--- ospicture.icl | 5 +++-- pictCCall_12.dcl | 2 +- pictCCall_12.icl | 15 +++++++-------- 5 files changed, 14 insertions(+), 35 deletions(-) diff --git a/Linux_C_12/cpicture_121.c b/Linux_C_12/cpicture_121.c index 542bf24..08ccf5e 100644 --- a/Linux_C_12/cpicture_121.c +++ b/Linux_C_12/cpicture_121.c @@ -150,10 +150,7 @@ void WinInitPicture (gint size, gint mode, gint pr, gint pg, gint pb, printf("WinInitPicture -- returning\n"); } /* WinInitPicture */ -void WinDonePicture (GdkDrawable *inDraw, OS ios, - gint *size, gint *mode, gint *pr, gint *pg, gint *pb, gint *br, - gint *bg, gint *bb, gint *x, gint *y, CLEAN_STRING *fname, - gint *fstyle, gint *fsize, GdkDrawable **outDraw, OS* oos) +void WinDonePicture(GdkDrawable *inDraw, OS ios, GdkDrawable **outDraw, OS* oos) { GdkPoint *p; PangoContext *pc; @@ -193,17 +190,6 @@ void WinDonePicture (GdkDrawable *inDraw, OS ios, theClipRgn = NULL; } - *size = penSize; - *mode = penMode; - - *pr = penColor.red/257; - *pg = penColor.green/257; - *pb = penColor.blue/257; - - *br = backColor.red/257; - *bg = backColor.green/257; - *bb = backColor.blue/257; - /* inDraw may not have font context */ *outDraw = inDraw; if (! inDrawIsWidget) @@ -219,12 +205,6 @@ void WinDonePicture (GdkDrawable *inDraw, OS ios, fontDesc = pango_context_get_font_description(pc); - InternalGetPenPos(inDraw, x, y); - - *fname = cleanstring(pango_font_description_get_family(fontDesc)); - *fstyle= pango_font_description_get_style(fontDesc); - *fsize = pango_font_description_get_size(fontDesc); - g_object_unref(G_OBJECT(pc)); if (! inDrawIsWidget) { diff --git a/Linux_C_12/cpicture_121.h b/Linux_C_12/cpicture_121.h index d6b564a..2b08ef9 100644 --- a/Linux_C_12/cpicture_121.h +++ b/Linux_C_12/cpicture_121.h @@ -18,9 +18,8 @@ void WinInitPicture (int size, int mode, int pr, int pg, int pb, CLEAN_STRING fname, int fstyle, int fsize, int ox, int oy, OSPictContext inDraw, OS os, OSPictContext *outDraw, OS *oos); -extern void WinDonePicture (OSPictContext,OS,int*,int*,int*,int*,int*, - int*,int*,int*,int*,int*,CLEAN_STRING*,int*,int*, - OSPictContext*,OS*); + +void WinDonePicture(GdkDrawable *, OS, GdkDrawable **, OS*); extern void WinClipRgnPicture(OSRgnHandle,OSPictContext,OS, OSPictContext*,OS*); diff --git a/ospicture.icl b/ospicture.icl index f0cfe01..ddc236f 100644 --- a/ospicture.icl +++ b/ospicture.icl @@ -77,8 +77,9 @@ where unpackPicture :: !*Picture -> (!Origin,!*Pen,!Bool,!OSPictContext,!*OSToolbox) unpackPicture {pictOrigin,pictPen,pictToScreen,pictContext,pictToolbox} // PA: intend to use simplified version of winDonePicture; crashes for some reason. - # (_,_,_,_,_,_,(hdc,tb)) = winDonePicture (pictContext,pictToolbox) -// # (hdc,tb) = WinDonePicture (pictContext,pictToolbox) +// CS: done (cause of crash still unknown). +// # (_,_,_,_,_,_,(hdc,tb)) = winDonePicture (pictContext,pictToolbox) + # (hdc,tb) = winDonePicture (pictContext,pictToolbox) = (pictOrigin,pictPen,pictToScreen,hdc,tb) peekPicture :: !*Picture -> (!Origin,!*Pen,!Bool,!OSPictContext,!*OSToolbox) diff --git a/pictCCall_12.dcl b/pictCCall_12.dcl index 1bb37d5..1f5aae2 100644 --- a/pictCCall_12.dcl +++ b/pictCCall_12.dcl @@ -164,5 +164,5 @@ winGetClipRgnPicture :: !PIC -> (!HRGN,!PIC) // Operation to retrieve the winDeleteObject :: !Int !*OSToolbox -> *OSToolbox -winDonePicture :: !PIC -> ( !Int, !Int, !RGBcolor, !RGBcolor, !Pt, !Fnt, !PIC) +winDonePicture :: !PIC -> !PIC winInitPicture :: !Int !Int !RGBcolor !RGBcolor !Pt !Fnt !Pt !PIC -> PIC diff --git a/pictCCall_12.icl b/pictCCall_12.icl index b235b70..8e8163e 100644 --- a/pictCCall_12.icl +++ b/pictCCall_12.icl @@ -749,15 +749,14 @@ winDeleteObject _ _ .end } - -winDonePicture :: !PIC -> (!Int,!Int,!RGBcolor,!RGBcolor,!Pt,!Fnt,!PIC) +winDonePicture :: !PIC -> !PIC winDonePicture _ - = code - { - .inline WinDonePicture - ccall WinDonePicture "II-IIIIIIIIIISIIII" - .end - } + = code + { + .inline WinDonePicture + ccall WinDonePicture "pp-pp" + .end + } winInitPicture :: !Int !Int !RGBcolor !RGBcolor !Pt !Fnt !Pt !PIC -> PIC winInitPicture _ _ _ _ _ _ _ _ -- cgit v1.2.3