Aros/Developer/Docs/Libraries/ScreenNotify

Introduction
You can get some notifications on status changes for your screen (like screen to front/screen to back) with screen notify messages

You can get the following messages:

SNOTIFY_AFTER_OPENSCREEN   /* screen has been opened */ SNOTIFY_BEFORE_CLOSESCREEN  /* going to close screen */ SNOTIFY_AFTER_OPENWB     /* Workbench is open */ SNOTIFY_BEFORE_CLOSEWB    /* Workbench is going to be closed */ SNOTIFY_AFTER_OPENWINDOW   /* new window */ SNOTIFY_BEFORE_CLOSEWINDOW  /* window is going to be closed */ SNOTIFY_PUBSCREENSTATE    /* PubScreenState */ SNOTIFY_LOCKPUBSCREEN     /* LockPubScreen */ SNOTIFY_SCREENDEPTH      /* ScreenDepth */ SNOTIFY_AFTER_CLOSESCREEN   /* notify after CloseScreen */ SNOTIFY_AFTER_CLOSEWINDOW   /* dto. CloseWindow */ SNOTIFY_BEFORE_OPENSCREEN   /* notify before OpenScreen */ SNOTIFY_BEFORE_OPENWINDOW   /* dto. OpenWindow */ SNOTIFY_BEFORE_OPENWB     /* like OPENSCREEN */ SNOTIFY_AFTER_CLOSEWB     /* like CLOSESCREEN */ SNOTIFY_WAIT_REPLY      /* wait for reply before taking action */ SNOTIFY_UNLOCKPUBSCREEN    /* UnlockPubScreen */ SNOTIFY_BEFORE_UPDATEINTUITION /* Intuition is going to be updated */ SNOTIFY_AFTER_UPDATEINTUITION /* Intuition is updated */

Examples
FireScreenNotifyMessageCode((IPTR) screen, SNOTIFY_SCREENDEPTH, flags, IntuitionBase);