T.R | Title | User | Personal Name | Date | Lines |
---|
475.1 | SDL is not SDML | LDP::WEAVER | Laboratory Data Products/Science | Fri Mar 24 1989 18:12 | 6 |
| Have you tried installing the latest SDL (I assume you meant SDL
and not SDML!). I had a problem installing FORTRAN libraries once
when I had an old version of SDL on the system.
-Dave
|
475.2 | | STAR::ORGOVAN | Vince Orgovan | Fri Mar 24 1989 21:29 | 184 |
| RE: .0
I'm not sure why you think the Xlib macro definitions are botched.
The following MACRO version of helloworld is crude, but it runs
for me. If there are problems with the MACRO definitions, please
QAR them.
.title helloworld DECwindows macro example program
.ident 'X-1'
;
; To assemble and run:
;
; $ library/create/macro xlibdef.mlb sys$library:decw$xlibdef.mar
; $ macro helloworld+xlibdef/lib
; $ link helloworld,sys$input/opt
; sys$share:decw$xlibshr/share
; ^Z
; $ set display /create/node=mytube
; $ run helloworld
;
;
; Macro Defintions
;
$xlibdef ; DECwindows Xlib definitions
.psect _$data,noexe,wrt
NULL = 0
xevent: .long ;XEvent pointer
xgcv: .blkb x$c_gcvl_size ;XGCValues
xsize: .blkb x$c_szhn_size ;XSizeHints
fntnam: .asciz /-ADOBE-NEW CENTURY SCHOOLBOOK-MEDIUM-R-NORMAL--*-140-*-*-P-*/
wmname: .asciz /helloworld/
messag: .ascic /Click here to exit/<NULL>
.psect _$code,exe,nowrt,pic
.entry START,0
;
; Open the display connection to the DECwindows server
;
pushl #0 ;display name is NULL
calls #1,G^xopendisplay ;open the display connnection
movl r0,r8 ;save returned display ptr
;
; Ask Xlib for some general information we'll need later
;
pushl r8 ;display argument
calls #1,G^xdefaultscreen ;get default screen number
movl r0,r7 ;save screen number
pushl r7 ;screen number
pushl r8 ;display argument
calls #2,G^xrootwindow ;get root window
movl r0,r5 ;save root window
pushl r7 ;screen number
pushl r8 ;display argument
calls #2,G^xblackpixel ;get black pixel
movl r0,r4 ;save black pixel
pushl r7 ;screen number
pushl r8 ;display argument
calls #2,G^xwhitepixel ;get white pixel
movl r0,r3 ;save white pixel
;
; Create a simple window
;
pushl r0 ;white background
pushl r4 ;black border
pushl #1 ;1 pixel border
pushl #50 ;height = 50 pixels
pushl #150 ;width = 150 pixels
pushl #200 ;y = 200
pushl #200 ;x = 200
pushl r5 ;parent = root
pushl r8 ;display argument
calls #9,G^xcreatesimplewindow ;create the window
movl r0,r6 ;save window id
;
; Set the window manager hints
;
moval xsize,r2 ;point to XSizeHints
movl #200,x$l_szhn_x(r2) ;x size hint = 200
movl #200,x$l_szhn_x(r2) ;y size hint = 200
movl #150,x$l_szhn_width(r2) ;width = 150
movl #50,x$l_szhn_height(r2) ;height = 50
movl #<x$m_us_position ! x$m_us_size>,x$l_szhn_flags(r2);
pushl r2 ;XSizeHints
pushl r6 ;window id
pushl r8 ;display arguemnt
calls #3,G^xsetnormalhints ;set normal wm hints
pushal wmname ;title bar name
pushl r6 ;window id
pushl r8 ;display arguemnt
calls #3,G^xstorename ;store window name
;
; Map the window
;
pushl r6 ;window id
pushl r8 ;display argument
calls #2,G^xmapwindow ;map the window
;
; Create a graphics context
;
moval xgcv,r2 ;point to XGCValues
movl r4,x$l_gcvl_foreground(r2) ;black foreground
movl r3,x$l_gcvl_background(r2) ;white background
pushl r2 ;XGCValues
pushl #<x$m_gc_foreground ! x$m_gc_background> ;values mask
pushl r6 ;drawable = window id
pushl r8 ;display argument
calls #4,G^xcreategc ;create a GC
movl r0,r2 ;save the GC
;
; Load a font and set it into the GC
;
pushal fntnam ;font name
pushl r8 ;display argument
calls #2,G^xloadfont ;load the font
pushl r0 ;font ID
pushl r2 ;GC
pushl r8 ;display argument
calls #3,G^xsetfont ;set font into GC
;
; Ask to receive buttonpress and exposure events
;
pushl <x$m_button_press ! x$m_exposure>
pushl r6 ;window ID
pushl r8 ;display argument
calls #2,G^xselectinput ;select input events
;
; Wait for an event
;
10$: pushal xevent ;pointer to XEvent
pushl r8 ;display argument
calls #2,G^xnextevent ;get the next event
moval xevent,r1 ;point to XEvent
cmpl x$l_anyv_type(r1),#x$c_button_press; buttonpress event?
beqlu 20$ ;branch to exit if yes
;
; Process all events except buttonpress by clearing the window
; and redrawing the message string.
;
pushl r6 ;window ID
pushl r8 ;display argument
calls #2,G^xclearwindow ;clear the window
movzbl messag,r3 ;get length
pushl r3 ;length
pushal messag+1 ;string to draw
pushl #30 ;y offset
pushl #20 ;x offset
pushl r2 ;GC
pushl r6 ;window ID
pushl r8 ;display argument
calls #7,G^xdrawimagestring ;draw the string
brb 10$ ;go wait for another event
;
; Close the display connection
;
20$: pushl r8 ;display argument
calls #1,G^XCloseDisplay ;close the display connection
movl #1,r0 ;return success
ret
.END START
|
475.3 | Here's what he's talking about | DSM::CRAIG | Nice computers don't go down :-) | Sun Mar 26 1989 10:26 | 33 |
|
I'm the system manager for the cluster Russ works on, here's a snippet
of SYS$LIBRARY:DECW$XLIBDEF.MAR from the DECwindows system we've
installed (VMS 5.0-2D1). We also installed the net kit for VMS V5.1 on
another system with the same result. As you can see, this is not valid
MACRO code.
Bob
; **************************************************************************************************
; Created 5-OCT-1988 18:14:03 by VAX-11 SDL X3.2-2 Source: 25-OCT-1987 18:06:34 DECW$LIBSRESD
; **************************************************************************************************
.MACRO $xlibdef,..EQU=<=>,..COL=<:> ; IDENT V1-00
x$c_protocol'..equ'11
x$c_protocol_revision'..equ'0
x$c_none'..equ'0 ; universal null resource or null atom
x$c_parent_relative'..equ'1 ; background pixmap in CreateWindlow
; and ChangeWindowAttributes
x$c_copy_from_parent'..equ'0 ; border pixmap in CreateWindow
; and ChangeWindowAttributes
; special VisualID and special window
; class passed to CreateWindow
x$c_pointer_window'..equ'0 ; destination window in SendEvent
x$c_input_focus'..equ'1 ; destination window in SendEvent
x$c_pointer_root'..equ'1 ; focus window in SetInputFocus
x$c_any_property_type'..equ'0 ; special Atom, passed to GetProperty
x$c_any_key'..equ'0 ; special Key Code, passed to GrabKey
x$c_any_button'..equ'0 ; special Button Code, passed to Grab Button
x$c_all_temporary'..equ'0 ; special Resource DI passed to KillClient
etc...
|
475.4 | looks like good macro to me... | STAR::HOBBS | Chevalier du roi soleil | Sun Mar 26 1989 12:22 | 7 |
| Try this:
$ macro/object=t.obj sys$library:decw$xlibdef.mar+sys$input:
$xlibdef
.end
$
|
475.5 | | STAR::ORGOVAN | Vince Orgovan | Tue Mar 28 1989 19:36 | 9 |
| RE: .3 "this is not valid MACRO code"
Re-read my example in .2. Note especially the first line under the
assembly and run instructions, i.e. the one that creates a macro
library from the provided definitions file.
This stuff really works. Please try it on your system so that you
can see it for yourself.
|
475.6 | Thanks and an anomaly encounter of the puzzling kind | MLARIA::WHITE | Russ White | Thu Mar 30 1989 10:40 | 50 |
| > This stuff really works. Please try it on your system so that you
> can see it for yourself.
My apologies and thanks.....
I have gotten portions of this up and running....
Problem turned out to be a feature of MACROs and logicals....
Things got intertwined and pointers to files got confused...
Attempting to use inclusion without invocation (which is what
results) almost works, but not quite....
I've gotten things like CreateSimplewindow Up ALMOST....
I'm still getting things like LINK-SHARE_TOO-BIG error messages
when I do things like X$FLUSH (when I wish to force things out
after mapping, but before event handlers were written/set up)
Odd message... I couldn't even find it in the VMS manual (V5.0)
File is created as a library to be invoked by YASI (-
YET ANOTHER (soon to be) SHARED IMAGE)
Process used:
macro/obj/lis xlibdef+myfile
lib/create myfile myfile
build (links to image and image calls to my library)
These are then called (separately from beyond the interface)
Call X$OPENdisplay
Call Get_defaults
| X$Default Screen
| X$Root Window
| X$White_Pixel
| X$Black_Pixel
Call X$CreateSimpleWindow
Call X$MapWindow
[Optionally, Set Window Name, Set icon name]
Call X$Flush
Error Appears (Window does also)
Same seen for using next event
Any thoughts?
Russ White
|
475.7 | Still having one problem here | MLARIA::WHITE | Russ White | Wed Apr 12 1989 19:30 | 37 |
|
I'm still getting things like LINK-SHARE_TOO-BIG error messages
when I do things like X$FLUSH (when I wish to force things out
after mapping, but before event handlers were written/set up)
Odd message... I couldn't even find it in the VMS manual (V5.0)
File is created as a library to be invoked by YASI (-
YET ANOTHER (soon to be) SHARED IMAGE)
Process used:
macro/obj/lis xlibdef+myfile
lib/create myfile myfile
build (links to image and image calls to my library)
These are then called (separately from beyond the interface)
Call X$OPENdisplay
Call Get_defaults
| X$Default Screen
| X$Root Window
| X$White_Pixel
| X$Black_Pixel
Call X$CreateSimpleWindow
Call X$MapWindow
[Optionally, Set Window Name, Set icon name]
Call X$Flush
Error Appears (Window does also)
Same seen for using next event
I'm still running into this .... Any suggestions
|
475.8 | Hiccoughing trying to load fonts | MLARIA::WHITE | Russ White | Wed Apr 12 1989 19:42 | 71 |
|
Yet another perplexing problem:
I am running under VMS V5.0 which implies FT2 of DECwindows
(Not VMS 5.1 yet..... UNfortunately, I can't do much about it)
The following two code fragments are from a prototype interface
that I'm trying to build.
I am getting the following errors when calling them, I tried them as
a single routine, with the same results. Does anyone have a suggested
font available (generically or by default). (Or what am I screwing up,
it seems kosher)
Thanks for any help possible
Russ White
I get the following errors:
X error event returned from server: font or color name does not exist
Failed request major op code 45 X_OpenFont
Failed request minor op code 0 (if applicable)
ResourceID 0x700008 in failed request (if applicable)
[This is returned in R0 by Load Font]
Serial number
X error event received from server: parameter not a Font
Failed request major opcode 56 X_ChangeGC
Failed minor opcode 0
ResourceID 010004a in failed request (if applicable)
A broader question, How does one find out what fonts are available
from Xlib. I haven't found this anywhere in the manuals.
FONT_ID:: .long 0
FNTNAM:: .ASCID /-ADOBE-NEW CENTURY SCHOOLBOOK-MEDIUM-R-NORMAL--*-140-*-*-P-*/ ;Default (cribbed)
; Create the window graphic context
.PSECT dsm$xwin$code,NOWRT,SHR
.ENTRY XLBC8GC, ^M<R2,R3,R4,R5,R6,R7,R8,R9,R10,R11>
MOVL @20(AP),foreg_color ; update scratch copy
MOVL @24(AP),backg_color ; update temp. copies
MOVL #<x$m_gc_foreground ! x$m_gc_background>,xgcv_mask ; operation Mask
MOVAL XGCV,R2
MOVL @20(AP),x$L_gcvl_foreground(R2)
MOVL @24(AP),x$L_gcvl_background(R2)
PUSHL R2
PUSHAL xgcv_mask
PUSHL 16(AP) ; Push Window Id
PUSHL 12(AP) ; Push Display id
CALLS #4,G^X$Create_GC
MOVL R0,SAVE_GCV ; For future possible use
MOVL R0, @28(AP) ; Return GC Value to Caller
MOVL #1,R0 ; Return Sucess
RET
; Create the window graphic context
.PSECT dsm$xwin$code,NOWRT,SHR
.ENTRY XLBSTFT, ^M<R2,R3,R4,R5,R6,R7,R8,R9,R10,R11>
PUSHAL FNTNAM ; Change this to pointee from Font String @24(AP)
PUSHL 12(AP) ; display_id
CALLS #2,G^X$LOAD_FONT
MOVL R0,FONT_ID
PUSHAL FONT_ID ; Font_id
PUSHL 20(AP) ; Graphic Context Value
PUSHL 12(AP) ; display_id
CALLS #3,G^X$SET_FONT
BISL #1,R0 ; Since DECwindows Returns 0 Success
RET
|
475.9 | | STAR::ORGOVAN | Vince Orgovan | Wed Apr 12 1989 20:56 | 6 |
| Use X$LIST_FONTS to find out what fonts are present on a given
server. Note that due to some last minute changes in the MIT
font naming standard that all the font names that DECwindows
uses changed between FT2 and VMS V5.1. Looks like you're trying
to use a new font name with an old font server.
|
475.10 | Problem with DECtoolkit MACRO definition files | DEMON::MARTIN | Ronald J. Martin (aka. - Q) | Sat Apr 29 1989 18:14 | 28 |
| I, too, am having some problems with the MACRO definition files. My
problem is with the toolkit definition file. I have created a macro
library. When I invoke the macro to define the toolkit symbols, there
are 12 'Symbol exceeds 31 characters' errors.
Here is a small portion of the .LIS file:
; Libraries
.LIBRARY /SOURCE:[000000]DECW$DWT/
; External definitions
$xtkdef
%MACRO-W-ILLSYMLEN, Symbol exceeds 31 characters
00DA
%MACRO-W-ILLSYMLEN, Symbol exceeds 31 characters
0FAF
:
(etc.)
Has this problem been resolved, or should I file a QAR?
- Ron Martin
|
475.11 | | STAR::ORGOVAN | Vince Orgovan | Sun Apr 30 1989 17:03 | 5 |
| RE: .10 DECtoolkit MACRO definition files give "symbol exceeds 31
chars" error.
Please enter a QAR for this in the DECWINDOWS-IFT database.
|
475.12 | 31 char error compiliing Macro bindings... | R2ME2::BOLGATZ | | Mon May 01 1989 11:14 | 6 |
| Ron --
Which version of DECwindows are you running?
thanks
|
475.13 | More on the MACRO errors ... | DEMON::MARTIN | Ronald J. Martin (aka. - Q) | Tue May 02 1989 13:02 | 16 |
|
Oops! Sorry for not including that in my original message.
We are running Decwindows V5.1
Also, I would like to add a correction:
o The file DECW$DWTDEF produces 11 warnings and
o the file DECW$DWTWIDGETDEF produces 12 warnings
(Again, the warning messages are 'symbol exceeds 31 characters')
- Ron
|
475.14 | fixed in DECWindows V2
| RTL::BOLGATZ | | Tue May 02 1989 13:06 | 4 |
| that's what I thought -- the V2 Macro include files compile cleanly...
Jay
|
475.15 | FIXED???? Not fixed in VMS 5.4-4HW!! | CSC32::M_TURNER | | Thu Jul 19 1990 16:24 | 26 |
| I don't think this problem has ever been fixed!! I have a small
program that includes just 1 of the 11 symbol definitions from
sys$library:decw$dwtdef.mar file and it still gets a message that
the symbol is too long. I'm currently running on a T5.4-4HW VMS
system. Here is the code:
.title status_line
.MACRO $xtkdef,..EQU=<=>,..COL=<:> ; IDENT V1-00
.SAVE
.PSECT $xtkdef _STRCONST PIC,CON,REL,NOEXE,GBL,SHR,RD,NOWRT,LONG
S_DWT$C_NCREATE_POPUP_CHILD_PROC'..equ'20
DWT$C_NCREATE_POPUP_CHILD_PROC'..col'
.ASCII /createPopupChildProc/
.RESTORE
.ENDM
$xtkdef
.entry status_line,^m<>
MOVL #1,R0
$EXIT_S R0
.END status_line
I plan to QAR this, but thought people should know.
Mark
|
475.16 | | PSW::WINALSKI | There's no hesion like COHESION | Fri Jul 20 1990 21:00 | 3 |
| Better QAR it, then.
--PSW
|