home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / utils / StdTypIO.h < prev    next >
C/C++ Source or Header  |  1997-04-02  |  10KB  |  214 lines

  1. /*====START_GENERATED_PROLOG======================================
  2.  */
  3. /*
  4.  *   COMPONENT_NAME: odmri
  5.  *
  6.  *   CLASSES: none
  7.  *
  8.  *   ORIGINS: 82,27
  9.  *
  10.  *
  11.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12.  *   All Rights Reserved
  13.  *   Licensed Materials - Property of IBM
  14.  *   US Government Users Restricted Rights - Use, duplication or
  15.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16.  *
  17.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23.  *   OR PERFORMANCE OF THIS SOFTWARE.
  24.  */
  25. /*====END_GENERATED_PROLOG========================================
  26.  */
  27. // @(#) 1.7 com/src/utils/include/StdTypIO.h, odmri, od96os2, odos29712d 1/22/97 16:45:44 [ 3/21/97 17:21:10 ]
  28. /*
  29.         File:           StdTypIO.h
  30.  
  31.         Contains:       functions for read/writing standard typed values from/to storage units
  32.  
  33.         Owned by:       Tantek Eelik
  34.  
  35.         Copyright:      c 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  36.  
  37. */
  38.  
  39. #ifndef _STDTYPIO_
  40. #define _STDTYPIO_
  41.  
  42.  
  43. #ifndef _ODTYPES_
  44. #include <ODTypes.h>
  45. #endif
  46.  
  47. #ifndef _ODMVCLNK_
  48. #include <ODMvcLnk.h>
  49. #endif
  50.  
  51. //==============================================================================
  52. // Classes used by this interface
  53. //==============================================================================
  54.  
  55. #ifdef __cplusplus
  56.         class   ODStorageUnit;
  57.         class   ODTypeList;
  58. #else
  59.         #ifndef SOM_ODStorageUnit_h
  60.         #include <StorageU.h>
  61.         #endif
  62. #endif
  63.  
  64. //==============================================================================
  65. // Function prototypes
  66. //==============================================================================
  67.  
  68. #ifdef _OD_IMPL_SHARE_UTILS_
  69. #pragma import on
  70. #endif
  71.  
  72. #ifdef __cplusplus
  73. extern "C" {
  74. #endif
  75.  
  76. _DLLIMPORTEXPORT_ ODBoolean     ODGetBooleanProp(Environment* ev,
  77.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  78. _DLLIMPORTEXPORT_ void          ODSetBooleanProp(Environment* ev,
  79.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  80.                                 ODBoolean value);
  81.  
  82. _DLLIMPORTEXPORT_ ODUShort      ODGetUShortProp(Environment* ev,
  83.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  84. _DLLIMPORTEXPORT_ void          ODSetUShortProp(Environment* ev,
  85.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  86.                                 ODUShort value);
  87.  
  88. _DLLIMPORTEXPORT_ ODSShort      ODGetSShortProp(Environment* ev,
  89.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  90. _DLLIMPORTEXPORT_ void          ODSetSShortProp(Environment* ev,
  91.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  92.                                 ODSShort value);
  93.  
  94. _DLLIMPORTEXPORT_ ODULong               ODGetULongProp(Environment* ev,
  95.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  96. _DLLIMPORTEXPORT_ void          ODSetULongProp(Environment* ev,
  97.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  98.                                 ODULong value);
  99.  
  100. _DLLIMPORTEXPORT_ ODSLong               ODGetSLongProp(Environment* ev,
  101.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  102. _DLLIMPORTEXPORT_ void          ODSetSLongProp(Environment* ev,
  103.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  104.                                 ODSLong value);
  105.  
  106. _DLLIMPORTEXPORT_ ODISOStr      ODGetISOStrProp(Environment* ev,
  107.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  108.                                 ODISOStr value, ODULong* size);
  109. _DLLIMPORTEXPORT_ void          ODSetISOStrProp(Environment* ev,
  110.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  111.                                 ODISOStr value);
  112.  
  113. _DLLIMPORTEXPORT_ void          ODGetTypeListProp(Environment* ev,
  114.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  115.                                 ODTypeList* typeList);
  116. _DLLIMPORTEXPORT_ void          ODSetTypeListProp(Environment* ev,
  117.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  118.                                 ODTypeList* typeList);
  119.  
  120. // ODGetITextProp works as follows: the value returned is that of the
  121. // name param passed in if name is not null.  If name is null, a structure of
  122. // the necessary size is allocated.
  123.  
  124. _DLLIMPORTEXPORT_ ODIText*      ODGetITextProp(Environment* ev,
  125.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  126.                                 ODIText* name);
  127. _DLLIMPORTEXPORT_ void          ODSetITextProp(Environment* ev,
  128.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  129.                                 ODIText* name);
  130.  
  131. _DLLIMPORTEXPORT_ ODTime                ODGetTime_TProp(Environment* ev,
  132.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  133. _DLLIMPORTEXPORT_ void          ODSetTime_TProp(Environment* ev,
  134.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  135.                                 ODTime value);
  136.  
  137. _DLLIMPORTEXPORT_ ODPoint*      ODGetPointProp(Environment* ev,
  138.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  139.                                 ODPoint* value);
  140. _DLLIMPORTEXPORT_ void          ODSetPointProp(Environment* ev,
  141.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  142.                                 ODPoint* value);
  143.  
  144. _DLLIMPORTEXPORT_ ODRect*               ODGetRectProp(Environment* ev,
  145.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  146.                                 ODRect* value);
  147. _DLLIMPORTEXPORT_ void          ODSetRectProp(Environment* ev,
  148.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  149.                                 ODRect* value);
  150.  
  151. _DLLIMPORTEXPORT_ ODID          ODGetStrongSURefProp(Environment* ev,
  152.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  153. _DLLIMPORTEXPORT_ void          ODSetStrongSURefProp(Environment* ev,
  154.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  155.                                 ODID id);
  156.  
  157. _DLLIMPORTEXPORT_ ODID          ODGetWeakSURefProp(Environment* ev,
  158.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  159. _DLLIMPORTEXPORT_ void          ODSetWeakSURefProp(Environment* ev,
  160.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  161.                                 ODID id);
  162.  
  163. _DLLIMPORTEXPORT_ ODPolygon*    ODGetPolygonProp(Environment* ev,
  164.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  165.                                 ODPolygon* value);
  166. _DLLIMPORTEXPORT_ void          ODSetPolygonProp(Environment* ev,
  167.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  168.                                 const ODPolygon* value);
  169.  
  170. _DLLIMPORTEXPORT_ ODMatrix*     ODGetMatrixProp(Environment* ev,
  171.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  172.                                 ODMatrix* value);
  173. _DLLIMPORTEXPORT_ void          ODSetMatrixProp(Environment* ev,
  174.                                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  175.                                 ODMatrix* value);
  176.  
  177. #ifdef _PLATFORM_MACINTOSH_
  178. //--------------------------------------------------------------------
  179. // Icon Family I/O
  180. //--------------------------------------------------------------------
  181.  
  182. // Note: ODIconFamily is a platform specific type, so these two functions
  183. // will have platform specific implementations. -TE
  184.  
  185. enum {                                                  // For use with iconMask parameter:
  186.         kAllIconsMask    = 0xFFFFFFFF,  // All icons usable on this platform
  187.         kBWIconsMask     = 0x0421               // 1 bit deep, 16,32,64 pixels wide
  188. };
  189.  
  190. /*      Expected values for the ODValueType begin with "OpenDoc:Type:IconFamily:"
  191.         followed by the name of a platform. These are defined in StdTypes.idl as
  192.         kODIconFamilyMac, kODIconFamilyWin, kODIconFamilyOS2, kODIconFamilyAIX, etc.
  193.         If you only specify kODIconFamily, the current platform's type will be used.
  194. */
  195.  
  196. ODIconFamily    ODGetIconFamilyProp(Environment* ev,
  197.                                         ODStorageUnit* su, ODPropertyName prop,
  198.                                         ODValueType val, ODULong iconMask);
  199. void                    ODSetIconFamilyProp(Environment* ev,
  200.                                         ODStorageUnit* su, ODPropertyName prop,
  201.                                         ODValueType val, ODIconFamily iconFamily,
  202.                                         ODBoolean deleteOtherPlatformIcons);
  203. #endif  // MACINTOSH
  204.  
  205. #ifdef __cplusplus
  206. } /* extern "C" */
  207. #endif
  208.  
  209. #ifdef _OD_IMPL_SHARE_UTILS_
  210. #pragma import off
  211. #endif
  212.  
  213. #endif // _STDTYPIO_
  214.