home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-09-09 | 3.2 KB | 107 lines | [TEXT/CWIE] |
- // A profile window
- //
- // David Hayward
- // Developer Technical Support
- // AppleLink: DEVSUPPORT
- //
- // Copyrite 1995, Apple Computer,Inc
- //
- // This file contains the getter/setter routines for
- // the ProfileDataHdl fields of a profile window.
- //
- // 12/13/94 david first cut
-
-
- #include "win.h"
- #include "winProfileGetSet.h"
-
-
- /*------------------------------------------------------------------------------*\
- GetProfileRef / SetProfileRef
- *------------------------------------------------------------------------------*
- These routines get and set the ProfileRef field of the ProfileDataHdl
- of the winRecord.
- \*------------------------------------------------------------------------------*/
- CMProfileRef GetProfileRef ( winHandle win )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return nil;
- return (**data).ProfileRef ;
- }
- void SetProfileRef ( winHandle win, CMProfileRef prof )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return ;
- (**data).ProfileRef = prof ;
- }
-
-
- /*------------------------------------------------------------------------------*\
- GetProfileIndex / SetProfileIndex
- *------------------------------------------------------------------------------*
- These routines get and set the Index field of the ProfileDataHdl
- of the winRecord.
- \*------------------------------------------------------------------------------*/
- unsigned long GetProfileIndex ( winHandle win )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return nil;
- return (**data).Index ;
- }
- void SetProfileIndex ( winHandle win, unsigned long index )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return ;
- (**data).Index = index ;
- }
-
-
- /*------------------------------------------------------------------------------*\
- GetProfileMode / SetProfileMode
- *------------------------------------------------------------------------------*
- These routines get and set the Mode field of the ProfileDataHdl
- of the winRecord.
- \*------------------------------------------------------------------------------*/
- unsigned long GetProfileMode ( winHandle win )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return nil;
- return (**data).Mode ;
- }
- void SetProfileMode ( winHandle win, unsigned long mode )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return ;
- (**data).Mode = mode ;
- }
-
- #if TryGettingAnEditableProfileName
- /*------------------------------------------------------------------------------*\
- GetProfileNameTEH / SetProfileNameTEH
- *------------------------------------------------------------------------------*
- These routines get and set the NameTEH field of the ProfileDataHdl
- of the winRecord.
- \*------------------------------------------------------------------------------*/
- TEHandle GetProfileNameTEH ( winHandle win )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return nil;
- return (**data).NameTEH ;
- }
- void SetProfileNameTEH ( winHandle win, TEHandle nameTEH )
- {
- ProfileDataHdl data ;
- data = (ProfileDataHdl) GetWinData( win ) ;
- if ( data==nil ) return ;
- (**data).NameTEH = nameTEH ;
- }
- #endif
-
-