FileCharacteristics.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: FileCharacteristics.h /main/5 1995/11/01 16:07:48 rswiston $ */
  24. /*******************************************************************************
  25. FileCharacteristics.h
  26. This header file is included by FileCharacteristics.c
  27. *******************************************************************************/
  28. #ifndef _FILECHARACTERISTICS_H_INCLUDED
  29. #define _FILECHARACTERISTICS_H_INCLUDED
  30. #include <stdio.h>
  31. #include <Xm/Xm.h>
  32. #include <Xm/MwmUtil.h>
  33. #include <Xm/DialogS.h>
  34. #include <Xm/MenuShell.h>
  35. #include "UxXt.h"
  36. #include <Xm/RowColumn.h>
  37. #include <Xm/Form.h>
  38. #include <Xm/ToggleBG.h>
  39. #include <Xm/TextF.h>
  40. #include <Xm/Label.h>
  41. #include <Xm/PushBG.h>
  42. #include <Xm/Form.h>
  43. /*******************************************************************************
  44. The definition of the context structure:
  45. If you create multiple copies of your interface, the context
  46. structure ensures that your callbacks use the variables for the
  47. correct copy.
  48. For each swidget in the interface, each argument to the Interface
  49. function, and each variable in the Interface Specific section of the
  50. Declarations Editor, there is an entry in the context structure.
  51. and a #define. The #define makes the variable name refer to the
  52. corresponding entry in the context structure.
  53. *******************************************************************************/
  54. #if 0
  55. typedef struct
  56. {
  57. Widget UxFC_OkButton;
  58. Widget UxFC_ClearButton;
  59. Widget UxFC_CancelButton;
  60. Widget UxFC_HelpButton;
  61. Widget UxFC_MainLabel;
  62. Widget UxFC_NamePatternLabel;
  63. Widget UxFC_PermissionLabel;
  64. Widget UxFC_PermissionToggle;
  65. Widget UxFC_ContentsLabel;
  66. Widget UxFC_ContentsBox;
  67. Widget UxFC_TypeRowColumn;
  68. Widget UxFC_StartByteLabel;
  69. Widget UxFC_TypeLabel;
  70. Widget UxFC_ContentsPatternLabel;
  71. Widget UxFC_EndByteLabel;
  72. Widget UxFC_ContentsToggle;
  73. Widget UxFC_NameOrPathToggle;
  74. swidget UxUxParent;
  75. } _UxCFileCharacteristics;
  76. #ifdef CONTEXT_MACRO_ACCESS
  77. static _UxCFileCharacteristics *UxFileCharacteristicsContext;
  78. #define FC_OkButton UxFileCharacteristicsContext->UxFC_OkButton
  79. #define FC_ClearButton UxFileCharacteristicsContext->UxFC_ClearButton
  80. #define FC_CancelButton UxFileCharacteristicsContext->UxFC_CancelButton
  81. #define FC_HelpButton UxFileCharacteristicsContext->UxFC_HelpButton
  82. #define FC_MainLabel UxFileCharacteristicsContext->UxFC_MainLabel
  83. #define FC_NamePatternLabel UxFileCharacteristicsContext->UxFC_NamePatternLabel
  84. #define FC_PermissionLabel UxFileCharacteristicsContext->UxFC_PermissionLabel
  85. #define FC_PermissionToggle UxFileCharacteristicsContext->UxFC_PermissionToggle
  86. #define FC_ContentsLabel UxFileCharacteristicsContext->UxFC_ContentsLabel
  87. #define FC_ContentsBox UxFileCharacteristicsContext->UxFC_ContentsBox
  88. #define FC_TypeRowColumn UxFileCharacteristicsContext->UxFC_TypeRowColumn
  89. #define FC_StartByteLabel UxFileCharacteristicsContext->UxFC_StartByteLabel
  90. #define FC_TypeLabel UxFileCharacteristicsContext->UxFC_TypeLabel
  91. #define FC_ContentsPatternLabel UxFileCharacteristicsContext->UxFC_ContentsPatternLabel
  92. #define FC_EndByteLabel UxFileCharacteristicsContext->UxFC_EndByteLabel
  93. #define FC_ContentsToggle UxFileCharacteristicsContext->UxFC_ContentsToggle
  94. #define FC_NameOrPathToggle UxFileCharacteristicsContext->UxFC_NameOrPathToggle
  95. #define UxParent UxFileCharacteristicsContext->UxUxParent
  96. #endif /* CONTEXT_MACRO_ACCESS */
  97. extern Widget FileCharacteristics;
  98. extern Widget FC_PermissionText;
  99. extern Widget FC_AndLabel2;
  100. extern Widget FC_ContentsPatternText;
  101. extern Widget FC_StringToggle;
  102. extern Widget FC_ByteToggle;
  103. extern Widget FC_ShortToggle;
  104. extern Widget FC_LongToggle;
  105. extern Widget FC_StartByteTextField;
  106. extern Widget FC_EndByteTextField;
  107. extern Widget FC_NameOrPathText;
  108. extern Widget FC_AndLabel1;
  109. #endif
  110. /*******************************************************************************
  111. Declarations of global functions.
  112. *******************************************************************************/
  113. Widget create_FileCharacteristics(swidget _UxUxParent);
  114. void GetPermissionsPattern(char **ppszPermPattern);
  115. void init_FileCharacteristics_dialog_fields(FiletypeData *pFtD);
  116. void clear_FileCharacteristics_dialog_fields(void);
  117. void ParseAndUpdateID(FiletypeData *pFtD);
  118. Boolean FileCharCheckFields(void);
  119. #endif /* _FILECHARACTERISTICS_H_INCLUDED */