@ GNU AS assembler header file for TaskManager
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:46:01 2012
@ Jonathan Coxhead, jonathan@doves.demon.co.uk, 22 May 1995

@ OSLib---efficient, type-safe, transparent, extensible,
@ register-safe API coverage of RISC OS
@ 
@ Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
@ 
@ Licence:
@ 
@    OSLib is free software; you can redistribute it and/or modify
@ it under the terms of the GNU General Public License as published by
@ the Free Software Foundation; either version 1, or (at your option)
@ any later version - and this with the following clarification and
@ special exception:
@ 
@    Linking this library statically or dynamically with other modules
@ is making a combined work based on this library. Thus, the terms
@ and conditions of the GNU General Public License cover the whole
@ combination.
@ 
@    As a special exception, the copyright holders of this library
@ give you permission to link this library with independent modules
@ to produce an executable, regardless of the license terms of these
@ independent modules, and to copy and distribute the resulting
@ executable under terms of your choice, provided that you also meet,
@ for each linked independent module, the terms and conditions of the
@ license of that module. An independent module is a module which is
@ not derived from or based on this library. If you modify this
@ library, you may extend this exception to your version of the library,
@ but you are not obliged to do so. If you do not wish to do so, delete
@ this exception statement from your version.
@ 
@    OSLib is distributed in the hope that it will be useful,
@ but WITHOUT ANY WARRANTY; without even the implied warranty of
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@ GNU General Public License for more details.
@ 
@    You should have received a copy of the GNU General Public License
@ along with this programme; if not, write to the Free Software
@ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef TaskManager_Hdr
#  define TaskManager_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

#  ifndef Get_Wimp
#    define Get_Wimp
#    include "oslib/Wimp.Hdr"
#  endif

@Symbols for constants
#  define TaskManager_NameLimit 0x20
#  define TaskManager_ModuleTask 0x1
#  define TaskManager_DraggableSlot 0x2
#  define TaskManager_ShutdownExitOnly 0x1
#  define TaskManager_ShutdownNoPreQuit 0x2
#  define TaskManager_ShutdownPortablePowerDown 0x4
#  define TaskManager_ShutdownSendMessage 0x8
#  define TaskManager_ShutdownIgnoreUpCalls 0x10
#  define TaskManager_ShutdownReboot 0x20
#  define TaskManager_ShutdownPowerOff 0x40
#  define TaskManager_GroupOverview 0x0
#  define TaskManager_GroupRequired 0x1000
#  define TaskManager_GroupSubsidiary 0x2000
#  define TaskManager_GroupCommercial 0x3000
#  define TaskManager_GroupFreeware 0x4000
#  define TaskManager_GroupUser 0x5000
#  define TaskManager_GroupMask 0xf000

@Symbols for structure offsets and sizes
        .struct 0
        .skip   Bits
TaskManager_Flags              : 

        .struct 0
TaskManager_Task_task          : .skip   Wimp_T
TaskManager_Task_name          : .skip   Ptr
TaskManager_Task_slot_size     : .skip   Int
TaskManager_Task_flags         : .skip   TaskManager_Flags
TaskManager_Task               : 

        .struct 0
        .skip   Bits
TaskManager_ShutdownFlags      : 

        .struct 0
        .skip   Bits
TaskManager_GroupID            : 


@Symbols for SWI's and SWI reason codes
.set XTaskManager_TaskNameFromHandle,0x62680
.set TaskManager_TaskNameFromHandle,0x42680
   @Entry
   @  R0 = task (Wimp_T)
   @Exit
   @  R0 -> name (String)

.set XTaskManager_EnumerateTasks,0x62681
.set TaskManager_EnumerateTasks,0x42681
   @Entry
   @  R0 = context (Int)
   @  R1 = task (pointer to TaskManager_Task)
   @  R2 = size (Int)
   @Exit
   @  R0 = context_out (Int)
   @  R1 -> end (Char)
   @  R2 corrupted

.set XTaskManager_Shutdown,0x62682
.set TaskManager_Shutdown,0x42682
   @Entry
   @  R0 = flags (TaskManager_ShutdownFlags)

.set XTaskManager_StartTask,0x62683
.set TaskManager_StartTask,0x42683
   @Entry
   @  R0 -> path_name (Char)

#  define Service_TaskManagerAcknowledgements 0x42680
   @Entry
   @  R1 = &42680
   @  R2 = add_message (pointer to code)

#endif
