getting a handle on a SCREENPTR for Poplog X facilities. 
Author Message
 getting a handle on a SCREENPTR for Poplog X facilities.

There are several procedures in the Poplog+X package that need
a SCREENPTR, such as

XWidthOfScreen(SCREENPTR) -> INT                             [procedure]
XHeightOfScreen(SCREENPTR) -> INT                            [procedure]
XWidthMMOfScreen(SCREENPTR) -> INT                           [procedure]
XHeightMMOfScreen(SCREENPTR) -> INT                          [procedure]
etc.
See REF XT_LIBS

I found it extraordinarily difficult to find out how to get hold of
a SCREENPTR, but eventually came up with this hack:
-----------------------------------------------------------------------
uses xlib;
uses xpt_screeninfo;

;;; This holds the default screenptr
lvars screenptr = false;

define active default_screen_ptr() -> ptr;
    ;;; guaranteed to return a reasonable SCREENPTR
    lvars ptr;
    if screenptr then
        screenptr -> ptr
    else
        XptDefaultSetup();
        XtScreen($-propsheet_utils$-create_shell()) ->> ptr
            -> screenptr
    endif;
enddefine;
-----------------------------------------------------------------------

The active variable default_screen_ptr can be used as argument to the
above procedures (if you are dealing with only one screen). If anyone
has found a better solution, please let me know. This one works from
pop11, but not from basepop11, as it uses a propsheet utility.

Thanks.
Aaron



Fri, 31 May 1996 18:26:12 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. tclX handles facility

2. New errno handling seems to speed up poplog

3. Getting window handle of AXControlSite

4. VW: getting a graphics handle (easy question?)

5. Alert Keys On AppFrame Not Getting Handled

6. Getting a progs handle

7. Getting file handle referencing character device

8. Windows - getting Tkinter or wxPython window handle?

9. Getting the Window Handle in VW2.5

10. getting window handle (MS Windows) from PPST

11. HANDLE == USIGNED or HANDLE == USHORT

12. Block handling tips (was : File handling tips )

 

 
Powered by phpBB® Forum Software