2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: cmnrtns.h /main/5 1995/11/01 16:11:28 rswiston $ */
24 #include <Dt/IconFile.h>
25 /***************************************************************************/
29 /***************************************************************************/
31 #ifndef _CMNRTNS_H_INCLUDED
32 #define _CMNRTNS_H_INCLUDED
38 #define STORAGECLASS extern
42 /***************************************************************************/
44 /* Macro Declarations */
46 /***************************************************************************/
47 #define SET_ICONGADGET_ICON_AND_EXT(widIconGadget,pszIconFileName, pszBuffer) {\
48 sprintf(pszBuffer, "%s%s", pszIconFileName, bShowPixmaps ? PIXMAP_EXT : BITMAP_EXT); \
49 XtVaSetValues (widIconGadget, \
52 /*printf("setting icon to = '%s'\n", pszBuffer);*/ \
53 XtVaSetValues (widIconGadget, \
54 XmNimageName, pszBuffer, \
58 #define SET_ICONGADGET_ICON(widIconGadget,pszIconFileName) { \
59 /*printf("setting icon to = '%s'\n", pszIconFileName);*/ \
60 XtVaSetValues (widIconGadget, \
63 XtVaSetValues (widIconGadget, \
64 XmNimageName, pszIconFileName, \
68 #define FIND_ICONGADGET_ICON(pszIcon,pszFile,size) { \
69 pszFile = (char *)NULL; \
70 pszFile = _DtGetIconFileName(XtScreen(CreateActionAppShell), \
77 #define CHANGE_ICONGADGET_ICON(widIconGadget,buffer,name,size,type) { \
78 sprintf(buffer, "%s.%s.%s", name, size, type); \
79 if (check_file_exists(buffer)) { \
80 SET_ICONGADGET_ICON(widIconGadget, buffer); \
82 SET_ICONGADGET_ICON(widIconGadget, ""); \
86 #define SET_TOGGLEBUTTON(widToggleButton,bState) { \
87 XtVaSetValues (widToggleButton, \
92 /***************************************************************************/
94 /* Prototypes for functions */
96 /***************************************************************************/
98 ushort WriteDefinitionFile(char *, ActionData *);
99 ushort WriteActionFile(ActionData *);
100 void Change_IconGadget_IconType(Widget, char *);
101 void load_icons (Widget wid, XtPointer client_data,
102 XmFileSelectionBoxCallbackStruct *cbs);
103 void GetWidgetTextString(Widget, char **);
104 void PutWidgetTextString (Widget wid, char *pszText);
105 char * GetCoreName(char *pszFullName);
106 char **GetIconSearchPathList(void);
107 void FreeIconSearchPathList(char **);
108 void TurnOnHourGlassAllWindows();
109 void TurnOffHourGlassAllWindows();
110 char * ReplaceSpaces(char *pszName);
111 void SetIconData(Widget, char *, enum icon_size_range);
112 char * GetCorrectIconType(char *);
113 char * CreateMaskName(char *);
114 IconData * GetIconDataFromWid(Widget);
117 #endif /* _CMNRTNS_H_INCLUDED */