Silverfrost Forums

Welcome to our forums

Handles?

1 Sep 2016 6:30 #17952

ClearWin+ functions returning integer(7) values

ADD_GRAPHICS_ICON@ CLEARWIN_INFO@ CREATE_CURSOR@ CREATE_BITMAP@ CREATE_ICON@ CREATE_INTERPROCESS_SHAERMEM@ CREATE_SHARED_MEMORY@ CREATE_WINDOW@ DOWNLOAD@ GET_BITMAP_DC@ GET_GRAPHICS_DC@ GET_WINDOW_HANDLE@ HANDLE_FROM_CONTROL_NAME@ IDENTIFY_WINDOW_HANDLE@ IMPORT_BMP@ IMPORT_GIF@ IMPORT_PCX@ MAKE_BITMAP@ MAKE_ICON@ MAP_FILE_FOR_READING@ MAP_FILE_FOR_READ_WRITE@ MOVIE_PLAYING@ OPEN_INTERPROCESS_SHAREMEM@ OPEN_WAV_FILE_READ@ OPEN_WAV_FILE_WRITE@ SET_DEFAULT_WINDOW@ START_THREAD@ WINDOWS_INSTANCE@ WINDOW_HANDLE@

ClearWin+ subroutines returning an integer(7) value via its argument

GET_CURRENT_DC@

ClearWin+ subprograms with integer(7) input arguments (the first argument except where stated)

ADD_ACCELERATOR@ ADD_ACCELERATOR1@ ATTACH_BITMAP_PALETTE@ (both arguments) CHANGE_HYPERTEXT@ CHANGE_PEN@ CLEAR_BITMAP@ IDENTIFY_WINDOW_HANDLE@ RELEASE_BITMAP_DC@ REMOVE_ACCELERATOR@ REMOVE_BITMAP@ REMOVE_ICON@ REPLACE_ENHANCED_MENU@ REPLACE_ENHANCED_POPUP_MENU@ SELECT_GRAPHICS_OBJ_BY_WINDOW@ SELECT_PALETTE@ (second argument) SET_CONTROL_VISIBILITY@ SET_HIGHLIGHTED@ SET_MOUSE_CURSOR_POSITION@

1 Sep 2016 6:34 #17953

Tank you, Paul, that is what I was missing. Erwin

1 Sep 2016 12:54 #17954

Seems that an 8-byte handle allows a lot of windows elements to be individually addressed ...

1 Sep 2016 1:03 #17955

In this context, a 'handle' is a pointer to (an address of) a block of data that defines an object such as a Window, a bitmap etc..

2 Sep 2016 4:04 #17956

Could I suggest that FTN95.chm needs a section on 'Handles'. When I come back to my clearwin+ code, I keep getting confused as to the type of handle that is being described for Clearwin+ format codes, functions and subroutines. I know I have made this request before, but an overview of the handle types that are used would certainly help.

What we need to understand is:

  • Is the handle value supplied or returned
  • What byte size is the handle.
  • what related routines and format codes use this handle.
  • for handles being supplied, where does their value come from.

I concede, I am lazy and should learnt this, but I don't remember this stuff and typically FTN95.chm doesn't clearly spell this out.

The list that Paul has provided is a great start. It needs to be collected and easily found. The function information can be found in clearwin.ins, but the subroutine arguments info is in ftn95.chm, which needs updating. I often have 2 copied of FTN95 help open to help understand.

John

ps: I have always wanted to rewrite FTN95.chm for routines and replace kind=?. with INTEGER*n. When we solve this one, could we also have an update for DIB, as my recollection is there are 2 groups of routines for DIB, which don't speak to one another. I try to avoid these as I know I will have to search the help info to update on what I keep forgetting! Scary what I keep forgetting !

2 Sep 2016 5:54 #17957

Thanks John. We are aware that work needs to be done in this area. It is simply a matter of ordering priorities. Our immediate aim is to release a fully functional 64 bit compiler as soon as possible and to fill the gap in the documentation by providing a rapid response to questions on this Forum.

2 Sep 2016 6:15 #17958

I recomment ti include INTEGER(HANDLE) in the next release as a compiler function. CW_HANDLE is a little confusing because it is used for MS handles only.

From the documentation one point is open for me: Can I expect 64-bit support for OpenGL ?

Erwin

2 Sep 2016 6:47 #17959

To find all calls of the listed ClearWin functions and subroutines in the source files, the followind batch file might be helpfull

call tfs  ADD_GRAPHICS_ICON 
call tfs  CLEARWIN_INFO 
call tfs  CREATE_CURSOR 
call tfs  CREATE_BITMAP 
call tfs  CREATE_ICON 
call tfs  CREATE_INTERPROCESS_SHAERMEM 
call tfs  CREATE_SHARED_MEMORY 
call tfs  CREATE_WINDOW 
call tfs  DOWNLOAD 
call tfs  GET_BITMAP_DC 
call tfs  GET_GRAPHICS_DC 
call tfs  GET_WINDOW_HANDLE 
call tfs  HANDLE_FROM_CONTROL_NAME 
call tfs  IDENTIFY_WINDOW_HANDLE 
call tfs  IMPORT_BMP 
call tfs  IMPORT_GIF 
call tfs  IMPORT_PCX 
call tfs  MAKE_BITMAP 
call tfs  MAKE_ICON 
call tfs  MAP_FILE_FOR_READING 
call tfs  MAP_FILE_FOR_READ_WRITE 
call tfs  MOVIE_PLAYING 
call tfs  OPEN_INTERPROCESS_SHAREMEM 
call tfs  OPEN_WAV_FILE_READ 
call tfs  OPEN_WAV_FILE_WRITE 
call tfs  SET_DEFAULT_WINDOW 
call tfs  START_THREAD 
call tfs  WINDOWS_INSTANCE 
call tfs  WINDOW_HANDLE 

call tfs  GET_CURRENT_DC 

call tfs  ADD_ACCELERATOR 
call tfs  ADD_ACCELERATOR1 
call tfs  ATTACH_BITMAP_PALETTE 
call tfs  CHANGE_HYPERTEXT 
call tfs  CHANGE_PEN 
call tfs  CLEAR_BITMAP 
call tfs  IDENTIFY_WINDOW_HANDLE 
call tfs  RELEASE_BITMAP_DC 
call tfs  REMOVE_ACCELERATOR 
call tfs  REMOVE_BITMAP 
call tfs  REMOVE_ICON 
call tfs  REPLACE_ENHANCED_MENU 
call tfs  REPLACE_ENHANCED_POPUP_MENU 
call tfs  SELECT_GRAPHICS_OBJ_BY_WINDOW 
call tfs  SELECT_PALETTE 
call tfs  SET_CONTROL_VISIBILITY 
call tfs  SET_HIGHLIGHTED 
call tfs  SET_MOUSE_CURSOR_POSITION

with tfs.bat:

findstr /i /n /s /c:%1 *.f90

This procedure scans the current directory and all subdirectories

Erwin

3 Sep 2016 6:45 #17961

The ClearWin+ interface for OpenGL is supported for 64 bit FTN95 applications.

24 Sep 2016 7:47 #18026

What about Resize_Window@ and Change_Button_Text@ if the handle has been set using %lc ? or Update_Window@ and Window_Update@ if the handle has been set using %hw ? or Set_Max_Lines@ if the handle has been set using %`cw ?

26 Sep 2016 7:24 #18031

Sorry that these routines were omitted from the list.

RESIZE_WINDOW@ and CHANGE_BUTTON_TEXT@ typically use %hw or %lc values for the first argument and so are INTEGER*8.

SET_MAX_LINES@ and UPDATE_WINDOW@ are for 'ClearWin' (%cw) windows and also take INTEGER*8 values for the first argument.

No change is required for WINDOW_UPDATE@. This routine passes any variable as a reference (an address) so it will automatically be passed with the right size.

Please login to reply.