1 #ifndef CLIB_INTUITION_PROTOS_H
    2 #define CLIB_INTUITION_PROTOS_H
    3 /*
    4 	intuition.library C prototypes
    5 
    6 	Copyright © 2002-2020 The MorphOS Development Team, All Rights Reserved.
    7 */
    8 
    9 #if defined(__ixemul__) && !defined(__IXEMUL_EXEC_MIXING_ALLOWED)
   10 # error "Mixing ixemul and native library calls is not supported. Native application should be built with -noixemul"
   11 #endif
   12 
   13 #ifndef INTUITION_INTUITION_H
   14 # include <intuition/intuition.h>
   15 #endif
   16 
   17 #ifndef INTUITION_CLASSES_H
   18 # include <intuition/classes.h>
   19 #endif
   20 
   21 #ifndef INTUITION_CGHOOKS_H
   22 # include <intuition/cghooks.h>
   23 #endif
   24 
   25 #ifndef INTUITION_CLASSUSR_H
   26 # include <intuition/classusr.h>
   27 #endif
   28 
   29 
   30 #ifdef __cplusplus
   31 extern "C" {
   32 #endif /* __cplusplus */
   33 
   34 VOID OpenIntuition( VOID );
   35 VOID Intuition( struct InputEvent *iEvent );
   36 UWORD AddGadget( struct Window *window, struct Gadget *gadget, ULONG position );
   37 BOOL ClearDMRequest( struct Window *window );
   38 VOID ClearMenuStrip( struct Window *window );
   39 VOID ClearPointer( struct Window *window );
   40 BOOL CloseScreen( struct Screen *screen );
   41 VOID CloseWindow( struct Window *window );
   42 LONG CloseWorkBench( VOID );
   43 VOID CurrentTime( ULONG *seconds, ULONG *micros );
   44 BOOL DisplayAlert( ULONG alertNumber, CONST_STRPTR string, ULONG height );
   45 VOID DisplayBeep( struct Screen *screen );
   46 BOOL DoubleClick( ULONG sSeconds, ULONG sMicros, ULONG cSeconds, ULONG cMicros );
   47 VOID DrawBorder( struct RastPort *rp, CONST struct Border *border, LONG leftOffset, LONG topOffset );
   48 VOID DrawImage( struct RastPort *rp, struct Image *image, LONG leftOffset, LONG topOffset );
   49 VOID EndRequest( struct Requester *requester, struct Window *window );
   50 struct Preferences *GetDefPrefs( struct Preferences *preferences, LONG size );
   51 struct Preferences *GetPrefs( struct Preferences *preferences, LONG size );
   52 VOID InitRequester( struct Requester *requester );
   53 struct MenuItem *ItemAddress( CONST struct Menu *menuStrip, ULONG menuNumber );
   54 BOOL ModifyIDCMP( struct Window *window, ULONG flags );
   55 VOID ModifyProp( struct Gadget *gadget, struct Window *window, struct Requester *requester, ULONG flags, ULONG horizPot, ULONG vertPot, ULONG horizBody, ULONG vertBody );
   56 VOID MoveScreen( struct Screen *screen, LONG dx, LONG dy );
   57 VOID MoveWindow( struct Window *window, LONG dx, LONG dy );
   58 VOID OffGadget( struct Gadget *gadget, struct Window *window, struct Requester *requester );
   59 VOID OffMenu( struct Window *window, ULONG menuNumber );
   60 VOID OnGadget( struct Gadget *gadget, struct Window *window, struct Requester *requester );
   61 VOID OnMenu( struct Window *window, ULONG menuNumber );
   62 struct Screen *OpenScreen( CONST struct NewScreen *newScreen );
   63 struct Window *OpenWindow( CONST struct NewWindow *newWindow );
   64 ULONG OpenWorkBench( VOID );
   65 VOID PrintIText( struct RastPort *rp, CONST struct IntuiText *iText, LONG left, LONG top );
   66 VOID RefreshGadgets( struct Gadget *gadgets, struct Window *window, struct Requester *requester );
   67 UWORD RemoveGadget( struct Window *window, struct Gadget *gadget );
   68 
   69 VOID ReportMouse( LONG flag, struct Window *window );
   70 BOOL Request( struct Requester *requester, struct Window *window );
   71 VOID ScreenToBack( struct Screen *screen );
   72 VOID ScreenToFront( struct Screen *screen );
   73 BOOL SetDMRequest( struct Window *window, struct Requester *requester );
   74 BOOL SetMenuStrip( struct Window *window, struct Menu *menu );
   75 VOID SetPointer( struct Window *window, UWORD *pointer, LONG height, LONG width, LONG xOffset, LONG yOffset );
   76 VOID SetWindowTitles( struct Window *window, CONST_STRPTR windowTitle, CONST_STRPTR screenTitle );
   77 VOID ShowTitle( struct Screen *screen, LONG showIt );
   78 VOID SizeWindow( struct Window *window, LONG dx, LONG dy );
   79 struct View *ViewAddress( VOID );
   80 struct ViewPort *ViewPortAddress( CONST struct Window *window );
   81 VOID WindowToBack( struct Window *window );
   82 VOID WindowToFront( struct Window *window );
   83 BOOL WindowLimits( struct Window *window, LONG widthMin, LONG heightMin, ULONG widthMax, ULONG heightMax );
   84 
   85 struct Preferences *SetPrefs( CONST struct Preferences *preferences, LONG size, LONG inform );
   86 
   87 LONG IntuiTextLength( CONST struct IntuiText *iText );
   88 BOOL WBenchToBack( VOID );
   89 BOOL WBenchToFront( VOID );
   90 
   91 BOOL AutoRequest( struct Window *window, CONST struct IntuiText *body, CONST struct IntuiText *posText, CONST struct IntuiText *negText, ULONG pFlag, ULONG nFlag, ULONG width, ULONG height );
   92 VOID BeginRefresh( struct Window *window );
   93 struct Window *BuildSysRequest( struct Window *window, CONST struct IntuiText *body, CONST struct IntuiText *posText, CONST struct IntuiText *negText, ULONG flags, ULONG width, ULONG height );
   94 VOID EndRefresh( struct Window *window, LONG complete );
   95 VOID FreeSysRequest( struct Window *window );
   96 
   97 LONG MakeScreen( struct Screen *screen );
   98 LONG RemakeDisplay( VOID );
   99 LONG RethinkDisplay( VOID );
  100 
  101 APTR AllocRemember( struct Remember **rememberKey, ULONG size, ULONG flags );
  102 VOID FreeRemember( struct Remember **rememberKey, LONG reallyForget );
  103 
  104 ULONG LockIBase( ULONG dontknow );
  105 VOID UnlockIBase( ULONG ibLock );
  106 
  107 LONG GetScreenData( APTR buffer, ULONG size, ULONG type, CONST struct Screen *screen );
  108 VOID RefreshGList( struct Gadget *gadgets, struct Window *window, struct Requester *requester, LONG numGad );
  109 UWORD AddGList( struct Window *window, struct Gadget *gadget, ULONG position, LONG numGad, struct Requester *requester );
  110 UWORD RemoveGList( struct Window *remPtr, struct Gadget *gadget, LONG numGad );
  111 VOID ActivateWindow( struct Window *window );
  112 VOID RefreshWindowFrame( struct Window *window );
  113 BOOL ActivateGadget( struct Gadget *gadgets, struct Window *window, struct Requester *requester );
  114 VOID NewModifyProp( struct Gadget *gadget, struct Window *window, struct Requester *requester, ULONG flags, ULONG horizPot, ULONG vertPot, ULONG horizBody, ULONG vertBody, LONG numGad );
  115 
  116 LONG QueryOverscan( ULONG displayID, struct Rectangle *rect, LONG oScanType );
  117 VOID MoveWindowInFrontOf( struct Window *window, struct Window *behindWindow );
  118 VOID ChangeWindowBox( struct Window *window, LONG left, LONG top, LONG width, LONG height );
  119 struct Hook *SetEditHook( struct Hook *hook );
  120 LONG SetMouseQueue( struct Window *window, ULONG queueLength );
  121 VOID ZipWindow( struct Window *window );
  122 
  123 struct Screen *LockPubScreen( CONST_STRPTR name );
  124 VOID UnlockPubScreen( CONST_STRPTR name, struct Screen *screen );
  125 struct List *LockPubScreenList( VOID );
  126 VOID UnlockPubScreenList( VOID );
  127 STRPTR NextPubScreen( CONST struct Screen *screen, STRPTR namebuf );
  128 VOID SetDefaultPubScreen( CONST_STRPTR name );
  129 UWORD SetPubScreenModes( ULONG modes );
  130 UWORD PubScreenStatus( struct Screen *screen, ULONG statusFlags );
  131 
  132 struct RastPort *ObtainGIRPort( struct GadgetInfo *gInfo );
  133 VOID ReleaseGIRPort( struct RastPort *rp );
  134 VOID GadgetMouse( struct Gadget *gadget, struct GadgetInfo *gInfo, WORD *mousePoint );
  135 VOID GetDefaultPubScreen( STRPTR nameBuffer );
  136 LONG EasyRequestArgs( struct Window *window, CONST struct EasyStruct *easyStruct, ULONG *idcmpPtr, CONST APTR args );
  137 #if !defined(USE_INLINE_STDARG)
  138 LONG EasyRequest( struct Window *window, CONST struct EasyStruct *easyStruct, ULONG *idcmpPtr, ... );
  139 #endif
  140 struct Window *BuildEasyRequestArgs( struct Window *window, CONST struct EasyStruct *easyStruct, ULONG idcmp, CONST APTR args );
  141 #if !defined(USE_INLINE_STDARG)
  142 struct Window *BuildEasyRequest( struct Window *window, CONST struct EasyStruct *easyStruct, ULONG idcmp, ... );
  143 #endif
  144 LONG SysReqHandler( struct Window *window, ULONG *idcmpPtr, LONG waitInput );
  145 struct Window *OpenWindowTagList( CONST struct NewWindow *newWindow, CONST struct TagItem *tagList );
  146 #if !defined(USE_INLINE_STDARG)
  147 struct Window *OpenWindowTags( CONST struct NewWindow *newWindow, ULONG tag1Type, ... );
  148 #endif
  149 struct Screen *OpenScreenTagList( CONST struct NewScreen *newScreen, CONST struct TagItem *tagList );
  150 #if !defined(USE_INLINE_STDARG)
  151 struct Screen *OpenScreenTags( CONST struct NewScreen *newScreen, ULONG tag1Type, ... );
  152 #endif
  153 
  154 VOID DrawImageState( struct RastPort *rp, struct Image *image, LONG leftOffset, LONG topOffset, ULONG state, CONST struct DrawInfo *drawInfo );
  155 BOOL PointInImage( ULONG point, struct Image *image );
  156 VOID EraseImage( struct RastPort *rp, struct Image *image, LONG leftOffset, LONG topOffset );
  157 
  158 APTR NewObjectA( struct IClass *classPtr, CONST_STRPTR classID, CONST struct TagItem *tagList );
  159 #if !defined(USE_INLINE_STDARG)
  160 APTR NewObject( struct IClass *classPtr, CONST_STRPTR classID, ULONG tag1, ... );
  161 #endif
  162 
  163 VOID DisposeObject( APTR object );
  164 ULONG SetAttrsA( APTR object, CONST struct TagItem *tagList );
  165 #if !defined(USE_INLINE_STDARG)
  166 ULONG SetAttrs( APTR object, ULONG tag1, ... );
  167 #endif
  168 
  169 ULONG GetAttr( ULONG attrID, APTR object, ULONG *storagePtr );
  170 
  171 ULONG SetGadgetAttrsA( struct Gadget *gadget, struct Window *window, struct Requester *requester, CONST struct TagItem *tagList );
  172 #if !defined(USE_INLINE_STDARG)
  173 ULONG SetGadgetAttrs( struct Gadget *gadget, struct Window *window, struct Requester *requester, ULONG tag1, ... );
  174 #endif
  175 
  176 APTR NextObject( APTR objectPtrPtr );
  177 struct IClass *MakeClass( CONST_STRPTR classID, CONST_STRPTR superClassID, CONST struct IClass *superClassPtr, ULONG instanceSize, ULONG flags );
  178 VOID AddClass( struct IClass *classPtr );
  179 
  180 struct DrawInfo *GetScreenDrawInfo( struct Screen *screen );
  181 VOID FreeScreenDrawInfo( struct Screen *screen, struct DrawInfo *drawInfo );
  182 
  183 BOOL ResetMenuStrip( struct Window *window, struct Menu *menu );
  184 VOID RemoveClass( struct IClass *classPtr );
  185 BOOL FreeClass( struct IClass *classPtr );
  186 
  187 struct ScreenBuffer *AllocScreenBuffer( struct Screen *sc, struct BitMap *bm, ULONG flags );
  188 VOID FreeScreenBuffer( struct Screen *sc, struct ScreenBuffer *sb );
  189 ULONG ChangeScreenBuffer( struct Screen *sc, struct ScreenBuffer *sb );
  190 VOID ScreenDepth( struct Screen *screen, ULONG flags, APTR reserved );
  191 VOID ScreenPosition( struct Screen *screen, ULONG flags, LONG x1, LONG y1, LONG x2, LONG y2 );
  192 VOID ScrollWindowRaster( struct Window *win, LONG dx, LONG dy, LONG xMin, LONG yMin, LONG xMax, LONG yMax );
  193 VOID LendMenus( struct Window *fromwindow, struct Window *towindow );
  194 ULONG DoGadgetMethodA( struct Gadget *gad, struct Window *win, struct Requester *req, Msg message );
  195 #if !defined(USE_INLINE_STDARG)
  196 ULONG DoGadgetMethod( struct Gadget *gad, struct Window *win, struct Requester *req, ULONG methodID, ... );
  197 #endif
  198 VOID SetWindowPointerA( struct Window *win, CONST struct TagItem *taglist );
  199 #if !defined(USE_INLINE_STDARG)
  200 VOID SetWindowPointer( struct Window *win, ULONG tag1, ... );
  201 #endif
  202 BOOL TimedDisplayAlert( ULONG alertNumber, CONST_STRPTR string, ULONG height, ULONG time );
  203 VOID HelpControl( struct Window *win, ULONG flags );
  204 
  205 /*** V50 ***/
  206 ULONG GetSkinInfoAttrA( struct DrawInfo *dri , ULONG attr, struct TagItem *taglist );
  207 #if !defined(USE_INLINE_STDARG)
  208 ULONG GetSkinInfoAttr( struct DrawInfo *dri , ULONG attr, ULONG tag1, ... );
  209 #endif
  210 ULONG GetDrawInfoAttr( struct DrawInfo *drawinfo, ULONG attr, ULONG *errorPtr );
  211 VOID WindowAction( struct Window *windw, ULONG action, struct TagItem *tags );
  212 BOOL TransparencyControl( struct Window *window, ULONG method, struct TagItem *tags);
  213 VOID ScrollWindowRasterNoFill( struct Window *win, LONG dx, LONG dy, LONG xMin, LONG yMin, LONG xMax, LONG yMax );
  214 Boopsiobject **GetMonitorList( struct TagItem *tags );
  215 void FreeMonitorList( Boopsiobject **list );
  216 ULONG ScreenbarControlA( struct TagItem *tags );
  217 #if !defined(USE_INLINE_STDARG)
  218 ULONG ScreenbarControl( ULONG tag1, ... );
  219 #endif
  220 Boopsiobject **GetMonitorModesList( Boopsiobject *monitor, struct TagItem *tags );
  221 void FreeMonitorModesList( Boopsiobject **list );
  222 Boopsiobject *GetMonitorMode( CONST_STRPTR monitorName, LONG width, LONG height, LONG depth, struct TagItem *tags );
  223 #ifdef __cplusplus
  224 }
  225 #endif /* __cplusplus */
  226 
  227 
  228 #endif /* CLIB_INTUITION_PROTOS_H */