home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / ColorSync 2.5.1 SDK / Sample Code / CSDemo 2.5 / CSDemoSources / winProfIDGetSet.c < prev    next >
Encoding:
Text File  |  1998-09-09  |  2.4 KB  |  85 lines  |  [TEXT/CWIE]

  1. // A profile window
  2. //
  3. // David Hayward 
  4. // Developer Technical Support
  5. // AppleLink: DEVSUPPORT
  6. //
  7. // Copyrite 1995, Apple Computer,Inc
  8. //
  9. // This file contains the getter/setter routines for
  10. // the ProfileDataHdl fields of a profile window.
  11. // 
  12. // 12/13/94    david    first cut
  13.  
  14.  
  15. #include "win.h"
  16. #include "winProfIDGetSet.h"
  17.  
  18.  
  19. /*------------------------------------------------------------------------------*\
  20.     GetProfIDIDHdl / SetProfIDIDHdl
  21.  *------------------------------------------------------------------------------*
  22.         These routines get and set the IDHdl field of the ProfIDDataHdl
  23.         of the winRecord.
  24. \*------------------------------------------------------------------------------*/
  25. CMProfileIdentifier** GetProfIDIDHdl ( winHandle win )
  26. {
  27.     ProfIDDataHdl    data ;
  28.         data = (ProfIDDataHdl) GetWinData( win ) ;
  29.     if ( data==nil ) return nil;
  30.     return (**data).IDHdl ;
  31. }
  32. void SetProfIDIDHdl ( winHandle win, CMProfileIdentifier** IDHdl )
  33. {    
  34.     ProfIDDataHdl    data ;
  35.     data = (ProfIDDataHdl) GetWinData( win ) ;
  36.     if ( data==nil ) return ;
  37.     (**data).IDHdl = IDHdl ;
  38. }
  39.  
  40.  
  41. /*------------------------------------------------------------------------------*\
  42.     GetProfIDIndex / SetProfIDIndex
  43.  *------------------------------------------------------------------------------*
  44.         These routines get and set the Index field of the ProfIDDataHdl
  45.         of the winRecord.
  46. \*------------------------------------------------------------------------------*/
  47. unsigned long GetProfIDIndex ( winHandle win )
  48. {
  49.     ProfIDDataHdl    data ;
  50.         data = (ProfIDDataHdl) GetWinData( win ) ;
  51.     if ( data==nil ) return nil;
  52.     return (**data).Index ;
  53. }
  54. void SetProfIDIndex ( winHandle win, unsigned long index )
  55. {    
  56.     ProfIDDataHdl    data ;
  57.     data = (ProfIDDataHdl) GetWinData( win ) ;
  58.     if ( data==nil ) return ;
  59.     (**data).Index = index ;
  60. }
  61.  
  62.  
  63. /*------------------------------------------------------------------------------*\
  64.     GetProfIDMode / SetProfIDMode
  65.  *------------------------------------------------------------------------------*
  66.         These routines get and set the Mode field of the ProfIDDataHdl
  67.         of the winRecord.
  68. \*------------------------------------------------------------------------------*/
  69. unsigned long GetProfIDMode ( winHandle win )
  70. {
  71.     ProfIDDataHdl    data ;
  72.         data = (ProfIDDataHdl) GetWinData( win ) ;
  73.     if ( data==nil ) return nil;
  74.     return (**data).Mode ;
  75. }
  76. void SetProfIDMode ( winHandle win, unsigned long mode )
  77. {    
  78.     ProfIDDataHdl    data ;
  79.     data = (ProfIDDataHdl) GetWinData( win ) ;
  80.     if ( data==nil ) return ;
  81.     (**data).Mode = mode ;
  82. }
  83.  
  84.  
  85.