X11 / XWindows in Modula-2 
Author Message
 X11 / XWindows in Modula-2

Hello,

If you are programming on Linux and are interested in calling X11
directly in Modula-2, you may have a look at
http://www.*-*-*.com/ ~ccastle/XModula/index.html

I have put a set of files containing the Modula-2 full definitions
of the most important headers of X11 (X, Xlib, Xutil and Keysyms),
and some explanations on how to use with the compiler Mocka or
the Modula to C translator mtc.

Unfortunatly I have not enough time to test it strongly so there is
probably some bugs left.
I hope this may interest some of you anyway.

Nicky



Sat, 09 Mar 2002 03:00:00 GMT  
 X11 / XWindows in Modula-2


Quote:
> Hello,

> If you are programming on Linux and are interested in calling X11
> directly in Modula-2, you may have a look at
> http://thunder.prohosting.com/~ccastle/XModula/index.html

Stout fellow! I well may take a look presently.

-- Mark Morgan Lloyd

--
-- [Opinions above are the author's, not those of his employers or
colleagues]
--
-- ** Internet feed may be unreliable- please cc anything important by
email **



Sat, 09 Mar 2002 03:00:00 GMT  
 X11 / XWindows in Modula-2
XDS M2/O2 compilers for Unix come with X11/Motif definition modules
(2Mb total size) created with the help of H2D.

For instance:

(* Xm/AtomMgr.def  Oct 15  12:56:59  1996 *)
(* Copyright (c) 1996,1997 XDS Ltd, Russia. All rights reserved. *)

(* Converted from Xm/AtomMgr.h using H2D v1.16. *)

(* $RCSfile: AtomMgr.def,v $ $Revision: 4 $ $Date: 28.07.98 23:14 $ *)

<*+ M2ADDTYPES *>
<*+ M2EXTENSIONS *>
<*+ NOHEADER *>
<* IF NOT DEFINED(GENTYPEDEF) THEN *> <* NEW GENTYPEDEF+ *> <* END *>
<*+ CSTDLIB *>

DEFINITION MODULE ["C"] AtomMgr;

IMPORT SYSTEM, X, Xlib, Xt:=Intrinsic;
(* H2D:  Required IMPORT clause:
IMPORT AtomMgr, X, Xlib, Intrinsic;
*)

(*
 * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
 * ALL RIGHTS RESERVED
 *)

(*
 * Motif Release 1.2
 *)

(********    Public Function Declarations    ********)

PROCEDURE XmInternAtom ( display: Xlib.PtrDisplay; name: Xt.String;
                         only_if_exists: Xt.Boolean ): X.Atom;

PROCEDURE XmGetAtomName ( display: Xlib.PtrDisplay; atom: X.Atom ):
Xt.String;

(********    End Public Function Declarations    ********)

CONST
  XmNameToAtom = XmGetAtomName;

END AtomMgr.


Quote:
>Hello,

>If you are programming on Linux and are interested in calling X11
>directly in Modula-2, you may have a look at
>http://thunder.prohosting.com/~ccastle/XModula/index.html

>I have put a set of files containing the Modula-2 full definitions
>of the most important headers of X11 (X, Xlib, Xutil and Keysyms),
>and some explanations on how to use with the compiler Mocka or
>the Modula to C translator mtc.

>Unfortunatly I have not enough time to test it strongly so there is
>probably some bugs left.
>I hope this may interest some of you anyway.

>Nicky

----------------------------------------------------------
Dmitry V. Leskov     Phone     : +7 3832 39 78 24 (ext. 14)

JSC XDS
P.O. Box 415         Phone/fax : +7 3832 39 78 24

630090 Russia        Web       : http://www.xds.ru/



Sun, 10 Mar 2002 03:00:00 GMT  
 X11 / XWindows in Modula-2

Quote:
> XDS M2/O2 compilers for Unix come with X11/Motif definition modules
> (2Mb total size) created with the help of H2D.

Are they free ? The XDS package is commercial, isn't it?

The version I did was mainly for Mocka and mtc which are both
free (at least on Linux 386).

Also I'm wondering how HD2 has managed to translate the many
function of Xlib.h where only the type of the parameters are
given but no parameter name...

Nicky



Mon, 11 Mar 2002 03:00:00 GMT  
 X11 / XWindows in Modula-2


Quote:
> > XDS M2/O2 compilers for Unix come with X11/Motif definition modules
> > (2Mb total size) created with the help of H2D.

> Are they free ? The XDS package is commercial, isn't it?

I like what you're doing, don't be put off by the commercial vendors and
the "we can do this too" attitude. Make sure Rick knows about it for the
FAQ.

Have you looked at the m2f compiler yet?

-----8<-----
Hopefully it will reside in: tsx-11.mit.edu
/pub/linux/sources/usr.bin/m2f-3.8.tar.gz but if you are desperate you can
download it from: http://floppsie.comp.glam.ac.uk (under scatching an
itch). There is some brief info about m2f also at this site. Src/bin in
rpm format and src in tar.gz format.

m2f is covered by GPL. The Modula-2 compiler conforms to PIM Edition 2 and
it works well with GDB etc.
----->8-----

-- Mark Morgan Lloyd

--
-- [Opinions above are the author's, not those of his employers or
colleagues]
--
-- ** Internet feed may be unreliable- please cc anything important by
email **



Mon, 11 Mar 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. X11 in Modula-2

2. Modula-2 and Windows/X11

3. Eiffel and XWindows questions

4. XWindows and FORTH

5. XWindows, and FORTH

6. AIX vs. XWindows

7. OSF/Motif and XWindows support for Oberon-2 on VAX/VMS (H2O)

8. Preventing ved from using bold fonts under xwindows

9. US-VA-TysonsCorner: Secret/Ada/XWindows/HPUX/-#JD-0158PM082101-0400

10. SPERC Ada Bindings to Motif/XWindows

11. TeleUSE/Ada/Xwindows

12. XWINDOWS with ADA on PC

 

 
Powered by phpBB® Forum Software