patches and fax application
- From: Marc van Kempen <marc bowtie nl>
- To: gtk-list redhat com
- Cc: petm xcf berkeley edu, gnome nuclecu unam mx
- Subject: patches and fax application
- Date: Mon, 08 Sep 1997 10:47:13 +0200
Hi,
I've started on a fax application using gtk. However there did
not seem to be a way to make a monochrome bitmap with gdk, so
I added a function to gdk to do this. Patch is attached below.
If this could have been done without this new function, then
please enlighten me ;)
There is also another problem with the library, glib doesn't seem
to pick up that I don't have a strsignal() function. This is
on FreeBSD. Where should I look for this?
Regards,
Marc.
PS.
The application can be found at http://www.bowtie.nl/gnfax
It is targeted at mgetty+sendfax, and at this point it
can read and display faxes, but is very alpha.
diff -r -c orig/gtk+-U1/gdk/gdk.h gtk+-U1/gdk/gdk.h
*** orig/gtk+-U1/gdk/gdk.h Sun Aug 3 00:26:46 1997
--- gtk+-U1/gdk/gdk.h Mon Sep 8 10:04:12 1997
***************
*** 263,268 ****
--- 263,272 ----
/* Images
*/
+ GdkImage* gdk_image_new_bitmap(GdkVisual *,
+ gpointer,
+ gint,
+ gint);
GdkImage* gdk_image_new (GdkImageType type,
GdkVisual *visual,
gint width,
diff -r -c orig/gtk+-U1/gdk/gdkimage.c gtk+-U1/gdk/gdkimage.c
*** orig/gtk+-U1/gdk/gdkimage.c Sun Apr 27 06:00:42 1997
--- gtk+-U1/gdk/gdkimage.c Mon Sep 8 10:03:34 1997
***************
*** 74,79 ****
--- 74,118 ----
}
}
+ GdkImage *
+ gdk_image_new_bitmap(GdkVisual *visual, gpointer data, gint w, gint h)
+ /*
+ * Desc: create a new bitmap image
+ */
+ {
+ Visual *xvisual;
+ GdkImage *image;
+ GdkImagePrivate *private;
+
+ private = g_new(GdkImagePrivate, 1);
+ image = (GdkImage *) private;
+
+ private->xdisplay = gdk_display;
+ private->image_put = gdk_image_put_normal;
+
+ image->type = GDK_IMAGE_NORMAL;
+ image->visual = visual;
+ image->width = w;
+ image->height = h;
+ image->depth = 1;
+
+ xvisual = ((GdkVisualPrivate*) visual)->xvisual;
+ private->ximage = XCreateImage(private->xdisplay, xvisual, 1, XYBitmap,
+ 0, 0, w ,h, 8, 0);
+ private->ximage->data = data;
+
+ private->ximage->bitmap_bit_order = MSBFirst;
+ private->ximage->byte_order = MSBFirst;
+
+ image->byte_order = MSBFirst;
+ image->mem = private->ximage->data;
+ image->bpl = private->ximage->bytes_per_line;
+ image->bpp = 1;
+
+ return(image);
+ } /* gdk_image_new_bitmap() */
+
+
GdkImage*
gdk_image_new (GdkImageType type,
GdkVisual *visual,
----------------------------------------------------
Marc van Kempen BowTie Technology
Email: marc@bowtie.nl WWW & Databases
tel. +31 40 2 43 20 65
fax. +31 40 2 44 21 86 http://www.bowtie.nl
----------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]