DEFINITION MODULE CyberGraphXD ;

(*$ IMPLEMENTATION := FALSE *)

FROM SYSTEM   IMPORT  ADDRESS ;
FROM UtilityD IMPORT  tagUser ;

IMPORT    ed : ExecD,
          gd : GraphicsD ;

(*                                                          *)
(*  Definition of CyberModeNode (Returned in AllocModeList) *)
(*                                                          *)

TYPE
  CyberModeNodePtr = POINTER TO CyberModeNode ;
  CyberModeNode = RECORD
    node           : ed.Node ;
    modeText       : ARRAY [0..gd.displayNameLen] OF CHAR ;
    displayID      : LONGCARD ;
    width,
    height,
    depth          : CARDINAL ;
    displayTagList : ADDRESS ;  (* taglist with extended ModeID information *)
  END (* RECORD *) ;

(*                                  *)
(* Parameters for GetCyberMapAttr() *)
(*                                  *)

TYPE
  CmaTags = (cmaDummy := tagUser,
             cmaXMod,               (* function returns BytesPerRow if its called with this parameter *)
             cmaBPPix,              (* BytesPerPixel shall be returned *)
             cmaDispAdr,            (* do not use this ! private tag *)
             cmaPixFmt,             (* the pixel format is returned *)
             cmaWidth,              (* returns width in pixels *)
             cmaHeight,             (* returns height in lines *)
             cmaDepth,              (* returns bits per pixel *)
             cmaIsCyberGfx          (* returns -1 if supplied bitmap is a cybergfx one *)
  ) ;

(*                                 *)
(* Parameters for GetCyberIDAttr() *)
(*                                 *)

TYPE
  CidaTags = (cidaDummy := tagUser,
              cidaPixFmt,           (* the pixel format is returned *)
              cidaWidth,            (* returns visible width in pixels *)
              cidaHeight,           (* returns visible height in lines *)
              cidaDepth,            (* returns bits per pixel *)
              cidaBPPix             (* BytesPerPixel shall be returned *)
  ) ;

(*                              *)
(* Tags for CyberModeRequest()  *)
(*                              *)

CONST cyberModeTB = tagUser + 40000H ;

(*            *)
(* FilterTags *)
(*            *)

CONST cmrMinDepth    = cyberModeTB+0;  (* Minimum depth for displayed screenmode *)
CONST cmrMaxDepth    = cyberModeTB+1;  (* Maximum depth  "       "        " *)
CONST cmrMinWidth    = cyberModeTB+2;  (* Minumum width  "       "        " *)
CONST cmrMaxWidth    = cyberModeTB+3;  (* Maximum width  "       "        " *)
CONST cmrMinHeight   = cyberModeTB+4;  (* Minumum height "       "        " *)
CONST cmrMaxHeight   = cyberModeTB+5;  (* Minumum height "       "        " *)
CONST cmrCModelArray = cyberModeTB+6;

CONST cmrWinTitle    = cyberModeTB+20;
CONST cmrOKText      = cyberModeTB+21;
CONST cmrCancelText  = cyberModeTB+22;

CONST cmrScreen      = cyberModeTB+30;  (* Screen you wish the Requester to open on *)

(*                            *)
(* Tags for BestCyberModeID() *)
(*                            *)

CONST cyberBestModeTB = tagUser + 50000H ;

(* FilterTags *)

CONST cbmidDepth         = cyberBestModeTB+0 ;
CONST cbmidNominalWidth  = cyberBestModeTB+1 ;
CONST cbmidNominalHeight = cyberBestModeTB+2 ;
CONST cbmidMonitorID     = cyberBestModeTB+3 ;

(*                                    *)
(* definition of divers pixel formats *)
(*                                    *)

CONST pixfmtLUT8    =  0 ;
CONST pixfmtRGB15   =  1 ;
CONST pixfmtBGR15   =  2 ;
CONST pixfmtRGB15PC =  3 ;
CONST pixfmtBGR15PC =  4 ;
CONST pixfmtRGB16   =  5 ;
CONST pixfmtBGR16   =  6 ;
CONST pixfmtRGB16PC =  7 ;
CONST pixfmtBGR16PC =  8 ;
CONST pixfmtRGB24   =  9 ;
CONST pixfmtBGR24   = 10 ;
CONST pixfmtARGB32  = 11 ;
CONST pixfmtBGRA32  = 12 ;
CONST pixfmtRGBA32  = 13 ;

(*                                                        *)
(* SrcRectangle formats defines for xxxPixelArray calls() *)
(*                                                        *)

CONST rectfmtRGB   = 0 ;
CONST rectfmtRGBA  = 1 ;
CONST rectfmtARGB  = 2 ;
CONST rectfmtLUT8  = 3 ;
CONST rectfmtGREY8 = 4 ;

(*                                    *)
(* Parameters for CVideoCtrlTagList() *)
(*                                    *)

CONST setvcDPMSLevel  = 88002001H ;

CONST dpmsOn      = 0 ;   (* Full operation *)
CONST dpmsStandby = 1 ;   (* Optional state of minimal power reduction *)
CONST dpmsSuspend = 2 ;   (* Significant reduction of power consumption *)
CONST dpmsOff     = 3 ;   (* Lowest level of power consumption *)

END CyberGraphXD .
