@DATABASE New Screen Library V1.50
$VER: NCS Screen Library V1.50 (9.01.1999) by Laboureur -> AlphaSOUND <- Frédéric
@NODE MAIN "New Screen Library"

    @{b}Screen V1.50 General Information:@{ub}

  * Blitz Basic II library number         : #169
  * Library size when linked to executable: 944 bytes
  * Number of commands                    : 24
  * Ressources automatically freed at end : Yes

  NInitScreen() must be put before any other screen functions
  or you will enjoy BIG crashs.

    @{b}Commands summary:@{ub}

  @{" NCloseScreen     " LINK NCloseScreen} Statement
  @{" NFindScreen      " LINK NFindScreen} Command (ScreenID)
  @{" NFindFrontScreen " LINK NFindFrontScreen} Command (ScreenID)
  @{" NHideScreen      " LINK NHideScreen} Statement
  @{" NInitScreen      " LINK NInitScreen} Command
  @{" NScreen          " LINK NScreen} Command (ScreenID)
  @{" NScreenDepth     " LINK NScreenDepth} Function (Word)
  @{" NScreenHeight    " LINK NScreenHeight} Function (Word)
  @{" NScreenID        " LINK NScreenID} Function (ScreenID)
  @{" NScreenRastPort  " LINK NScreenID} Function (RastPort)
  @{" NScreenWidth     " LINK NScreenWidth} Function (Word)
  @{" NShowScreen      " LINK NShowScreen} Statement
  @{" NSBarHeight      " LINK NSBarHeight} Function (Byte)
  @{" NSFontHeight     " LINK NSFontHeight} Function (Byte)
  @{" NSMouseX         " LINK NSMouseX} Function (Word)
  @{" NSMouseY         " LINK NSMouseY} Function (Word)
  @{" NUseScreen       " LINK NUseScreen} Statement
  @{" NViewPort        " LINK NViewPort} Function (Long)
  @{" NWbToScreen      " LINK NWbToScreen} Command (ScreenID)
  @{" NWBorderBottom   " LINK NWBorderBottom} Function (Byte)
  @{" NWBorderLeft     " LINK NWBorderLeft} Function (Byte)
  @{" NWBorderRight    " LINK NWBorderRight} Function (Byte)
  @{" NWBorderTop      " LINK NWBorderTop} Function (Byte)

@ENDNODE

@NODE NFindScreen

    @{b}SYNTAX@{ub}
  ScreenID.l = NFindScreen(#Screen, ScreenName$)

    @{b}COMMAND@{ub}
  Find the default public screen and return  its  ScreenID  pointer.
  If the ScreenID is NULL, no public screens can be found.

  You can specify a ScreenName$, so it will look in the public screen
  list to show if the screen is opened, and if yes will catch it !

  #Screen = Number to indentifie the screen later.
  ScreenName$ = Name of the screen to find. If null name passed "", it will
  return the default public screen.

@ENDNODE


@NODE NFindFrontScreen

    @{b}SYNTAX@{ub}
  ScreenID.l = NFindFrontScreen(#Screen)

    @{b}COMMAND@{ub}
  Find the front most screen  and  return  its  ScreenID. If the
  ScreenID is NULL, no screens can be found (!).

  #Screen = Number to indentifie the screen later.

@ENDNODE


@NODE NWbToScreen

    @{b}SYNTAX@{ub}
  ScreenID.l = NWbToScreen(#Screen)

    @{b}FUNCTION@{ub}
  Try to find the Workbench screen and return its ScreenID. If the
  ScreenID is NULL, the Workbench screen is not found.

  #Screen = Number to indentifie the screen later.

@ENDNODE


@NODE NScreen

    @{b}SYNTAX@{ub}
  ScreenID.l = NScreen(#Screen, Width, Height, Depth, TagList)

    @{b}FUNCTION@{ub}
  Open a new screen and return its ScreenID. If the ScreenID is NULL,
  the screen can't be opened. The new opened screen become the current
  used screen (no need of NUseScreen function).

    #Screen = Number to indentifie the screen later.

  Here is a quick list of all valid screentags (for more details, consult the
  commodore autodocs):

  #SA_Left      ; Traditional screen positions and dimensions
  #SA_Top       ;
  #SA_Width     ;
  #SA_Height    ;

  #SA_Depth     ; Screen BitMap Depth
  #SA_DetailPen ; serves as Default For windows, too
  #SA_BlockPen  ;
  #SA_Title     ; Default Screen title

  #SA_Colors    ;

  #SA_ErrorCode ; ti_Data points To LONG error code (values below)
  #SA_Font      ;
  #SA_SysFont   ; Selects one of the preferences system fonts:
                ;  0 - old DefaultFont, fixed-width
                ;  1 - WB Screen preferred font
  #SA_Type      ;
  #SA_BitMap    ;
  #SA_PubName   ;

  #SA_PubSig    ; Task ID AND signal For being notified that
  #SA_PubTask   ; the last Window has closed On a public Screen.

  #SA_DisplayID ;
  #SA_DClip     ;
  #SA_Overscan  ; Set To one of the OSCAN_

;
; *** booleans ***
;

  #SA_ShowTitle  =$80000036 ; boolean equivalent To flag SHOWTITLE
  #SA_Behind     =$80000037 ; boolean equivalent To flag SCREENBEHIND
  #SA_Quiet      =$80000038 ; boolean equivalent To flag SCREENQUIET
  #SA_AutoScroll =$80000039 ; boolean equivalent To flag AUTOSCROLL
  #SA_Pens       =$8000003A ; Pointer To ~0 terminated UWORD array, as
                          ; found in struct DrawInfo

  #SA_FullPalette ;

; For V39+ (Rom 3.0+)
  #SA_ColorMapEntries ;
  #SA_Parent          ;
  #SA_Draggable       ;

  #SA_Exclusive       ;
  #SA_SharePens       ;
  #SA_BackFill        ;
  #SA_Interleaved     ;
  #SA_Colors32        ;
  #SA_VideoContro     ;
  #SA_FrontChild      ;
  #SA_BackChild       ;
  #SA_LikeWorkbench   ;
  #SA_MinimizeISG     ;


  @{b}NOTE: the amigalibs.res file must be entered in the compiler/option window.
  If you want to use the Rom3.0+ Tags, you must use the NLibs.res file too.@{ub}

@ENDNODE


@NODE NSMouseX

    @{b}SYNTAX@{ub}
  x.w = NSMouseX

    @{b}FUNCTION@{ub}
  Return the actual mouse position in pixel relative to the left of the used screen.

@ENDNODE


@NODE NSMouseY

    @{b}SYNTAX@{ub}
  y.w = NSMouseY

    @{b}FUNCTION@{ub}
  Return the mouse position in pixel relative to the top of the used screen.

@ENDNODE


@NODE NScreenDepth

    @{b}SYNTAX@{ub}
  Result.w = NScreenDepth

    @{b}FUNCTION@{ub}
  Return the depth of the used screen.

@ENDNODE


@NODE NScreenWidth

    @{b}SYNTAX@{ub}
  width.w = NScreenWidth

    @{b}FUNCTION@{ub}
  Return the width in pixel of the used screen.

@ENDNODE


@NODE NScreenHeight

    @{b}SYNTAX@{ub}
  height.w = NScreenHeight

    @{b}FUNCTION@{ub}
  Return the height in pixel of the used screen.

@ENDNODE


@NODE NShowScreen

    @{b}SYNTAX@{ub}
  NShowScreen

    @{b}STATEMENT@{ub}
  Put the used screen to the front of the display.

@ENDNODE


@NODE NHideScreen

    @{b}SYNTAX@{ub}
  NHideScreen

    @{b}STATEMENT@{ub}
  Put the used screen to the back of the display.

@ENDNODE


@NODE NUseScreen

    @{b}SYNTAX@{ub}
  NUseScreen(#Screen)

    @{b}STATEMENT@{ub}
  Change the used screen to the given #Screen number.

@ENDNODE


@NODE NViewPort

    @{b}SYNTAX@{ub}
  Result.l = NViewPort

    @{b}FUNCTION@{ub}
  Return the viewport of the used screen. This function is written
  to get easely the screen's viewport and should be used only
  by advanced programmers which want access to all the OS functions.

@ENDNODE


@NODE NSBarHeight

    @{b}SYNTAX@{ub}
  Result.b = NSBarHeight

    @{b}FUNCTION@{ub}
  Return the used screen menu bar height. Useful to adjust windows
  just under it (for example).

@ENDNODE


@NODE NSFontHeight

    @{b}SYNTAX@{ub}
  Result.b = NSFontHeight

    @{b}FUNCTION@{ub}
  Return the font height of the used screen.

@ENDNODE


@NODE NWBorderTop

    @{b}SYNTAX@{ub}
  Result.b = NWBorderTop

    @{b}FUNCTION@{ub}
  Return the window border top which will be opened on this
  screen. The result include the Font height, ie the border
  window with a title.

@ENDNODE


@NODE NWBorderBottom

    @{b}SYNTAX@{ub}
  Result.b = NWBorderBottom

    @{b}FUNCTION@{ub}
  Return the window border bottom which will be opened on this screen.

@ENDNODE


@NODE NWBorderLeft

    @{b}SYNTAX@{ub}
  Result.b = NWBorderLeft

    @{b}FUNCTION@{ub}
  Return the window border left which will be opened on this screen.

@ENDNODE


@NODE NWBorderRight

    @{b}SYNTAX@{ub}
  Result.b = NWBorderRight

    @{b}FUNCTION@{ub}
  Return the window border right which will be opened on this screen.

@ENDNODE


@NODE NCloseScreen

    @{b}SYNTAX@{ub}
  NCloseScreen(#Screen)

    @{b}STATEMENT@{ub}
  Close the given screen.

@ENDNODE


@NODE NInitScreen

    @{b}SYNTAX@{ub}
  result.l = NInitScreen(#NumScreenMax)

    @{b}FUNCTION@{ub}
  Init all the Screen environnement for later use.  You  must  put  this
  functions  on  top  of your source code if you want to use the NScreen
  commands.You can test the result to see if the Window envirronement is
  right initialized.

  #NumScreenMax : Maximum number of screen to handle.

@ENDNODE


@NODE NScreenID

    @{b}SYNTAX@{ub}
  ScreenID.l = NScreenID

    @{b}FUNCTION@{ub}
  Return the Intuition Screen pointer. Very useful.

@ENDNODE


@NODE NScreenRastPort

    @{b}SYNTAX@{ub}
  ScreenRP.l = NScreenRastPort

    @{b}FUNCTION@{ub}
  Return the current Screen RastPort. It allows to use the Drawing
  fonctions directly on the screen bitmap:

  Example

    NDrawingOutput NScreenRastPort ; Set the drawing function output
                                   ; on the current screen

    NBoxFill 10, 10, 100, 100      ; This box will be drawed on the screen


@ENDNODE



