Don't use -import argument as fprintf format
[nedit.git] / Microline / XmL / XmL.h
blob38e4240ff5ad76de063bfd57858eb66bf638c100
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is the Microline Widget Library, originally made available under the NPL by Neuron Data <http://www.neurondata.com>.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * In addition, as a special exception to the GNU GPL, the copyright holders
38 * give permission to link the code of this program with the Motif and Open
39 * Motif libraries (or with modified versions of these that use the same
40 * license), and distribute linked combinations including the two. You
41 * must obey the GNU General Public License in all respects for all of
42 * the code used other than linking with Motif/Open Motif. If you modify
43 * this file, you may extend this exception to your version of the file,
44 * but you are not obligated to do so. If you do not wish to do so,
45 * delete this exception statement from your version.
47 * ***** END LICENSE BLOCK ***** */
50 #ifndef XmLH
51 #define XmLH
53 #include <Xm/Xm.h>
55 #if defined(__cplusplus) || defined(c_plusplus)
56 #define XmL_CPP 1
57 #endif
59 #if defined(_STDC_) || defined(__STDC__) || defined(XmL_CPP)
60 #ifndef _NO_PROTO
61 #define XmL_ANSIC 1
62 #endif
63 #endif
65 #define XmLVERSION_301
67 #ifdef XmL_CPP
68 extern "C" {
69 #endif
71 /* shared resources */
73 #define XmNautoSelect "autoSelect"
74 #define XmCAutoSelect "AutoSelect"
75 #define XmNblankBackground "blankBackground"
76 #define XmCBlankBackground "BlankBackground"
77 #define XmNdebugLevel "debugLevel"
78 #define XmCDebugLevel "DebugLevel"
80 /* Folder resources */
82 #define XmNacceptResize "acceptResize"
83 #define XmCAcceptResize "AcceptResize"
84 #define XmNactiveTab "activeTab"
85 #define XmCActiveTab "ActiveTab"
86 #define XmNblankBackgroundPixmap "blankBackgroundPixmap"
87 #define XmCBlankBackgroundPixmap "BlankBackgroundPixmap"
88 #define XmNcornerDimension "cornerDimension"
89 #define XmCCornerDimension "CornerDimension"
90 #define XmNcornerStyle "cornerStyle"
91 #define XmCCornerStyle "CornerStyle"
92 #define XmRCornerStyle "CornerStyle"
93 #define XmNinactiveBackground "inactiveBackground"
94 #define XmCInactiveBackground "InactiveBackground"
95 #define XmNinactiveForeground "inactiveForeground"
96 #define XmCInactiveForeground "InactiveForeground"
97 #define XmNpixmapMargin "pixmapMargin"
98 #define XmCPixmapMargin "PixmapMargin"
99 #define XmCFolderResizePolicy "FolderResizePolicy"
100 #define XmRFolderResizePolicy "FolderResizePolicy"
101 #define XmNrotateWhenLeftRight "rotateWhenLeftRight"
102 #define XmCRotateWhenLeftRight "RotateWhenLeftRight"
103 #define XmNtabBarHeight "tabBarHeight"
104 #define XmCTabBarHeight "TabBarHeight"
105 #define XmNminTabWidth "minTabWidth"
106 #define XmCminTabWidth "MinTabWidth"
107 #define XmNmaxTabWidth "maxTabWidth"
108 #define XmCmaxTabWidth "MaxTabWidth"
109 #define XmNtabCount "tabCount"
110 #define XmCTabCount "TabCount"
111 #define XmNtabPlacement "tabPlacement"
112 #define XmCTabPlacement "TabPlacement"
113 #define XmRTabPlacement "TabPlacement"
114 #define XmNtabsPerRow "tabsPerRow"
115 #define XmCTabsPerRow "TabsPerRow"
116 #define XmNtabTranslations "tabTranslations"
117 #define XmNtabWidgetList "tabWidgetList"
118 #define XmNtabWidgetClass "tabWidgetClass"
119 #define XmCTabWidgetClass "TabWidgetClass"
121 /* Folder Constraint resources */
123 #define XmNtabFreePixmaps "tabFreePixmaps"
124 #define XmCTabFreePixmaps "TabFreePixmaps"
125 #define XmNtabInactivePixmap "tabInactivePixmap"
126 #define XmCTabInactivePixmap "TabInactivePixmap"
127 #define XmNtabManagedName "tabManagedName"
128 #define XmCTabManagedName "TabManagedName"
129 #define XmNtabManagedWidget "tabManagedWidget"
130 #define XmCTabManagedWidget "TabManagedWidget"
131 #define XmNtabPixmap "tabPixmap"
132 #define XmCTabPixmap "TabPixmap"
134 /* Folder callbacks */
136 typedef struct
138 int reason;
139 XEvent *event;
140 int pos;
141 int allowActivate;
142 int layoutNeeded;
143 } XmLFolderCallbackStruct;
145 /* Folder defines */
147 #define XmCORNER_NONE 0
148 #define XmCORNER_LINE 1
149 #define XmCORNER_ARC 2
151 #define XmFOLDER_TOP 0
152 #define XmFOLDER_LEFT 1
153 #define XmFOLDER_BOTTOM 2
154 #define XmFOLDER_RIGHT 3
156 #define XmRESIZE_STATIC 10
157 #define XmRESIZE_DYNAMIC 11
158 #define XmRESIZE_PACK 12
160 /* Grid resources */
162 #define XmNaddCallback "addCallback"
163 #define XmNallowColumnHide "allowColumnHide"
164 #define XmCAllowColumnHide "AllowColumnHide"
165 #define XmNallowColumnResize "allowColumnResize"
166 #define XmCAllowColumnResize "AllowColumnResize"
167 #define XmNallowDragSelected "allowDragSelected"
168 #define XmCAllowDragSelected "AllowDragSelected"
169 #define XmNallowDrop "allowDrop"
170 #define XmCAllowDrop "AllowDrop"
171 #define XmNallowRowHide "allowRowHide"
172 #define XmCAllowRowHide "AllowRowHide"
173 #define XmNallowRowResize "allowRowResize"
174 #define XmCAllowRowResize "AllowRowResize"
175 #define XmNbottomFixedCount "bottomFixedCount"
176 #define XmCBottomFixedCount "BottomFixedCount"
177 #define XmNbottomFixedMargin "bottomFixedMargin"
178 #define XmCBottomFixedMargin "BottomFixedMargin"
179 #define XmNcellDefaults "cellDefaults"
180 #define XmCCellDefaults "CellDefaults"
181 #define XmNcellDrawCallback "cellDrawCallback"
182 #define XmNcellDropCallback "cellDropCallback"
183 #define XmNcellFocusCallback "cellFocusCallback"
184 #define XmNcellPasteCallback "cellPasteCallback"
185 #define XmNdeleteCallback "deleteCallback"
186 #define XmNdeselectCallback "deselectCallback"
187 #define XmNeditCallback "editCallback"
188 #define XmNeditTranslations "editTranslations"
189 #define XmNfooterColumns "footerColumns"
190 #define XmCFooterColumns "FooterColumns"
191 #define XmNfooterRows "footerRows"
192 #define XmCFooterRows "FooterRows"
193 #define XmNglobalPixmapHeight "globalPixmapHeight"
194 #define XmCGlobalPixmapHeight "GlobalPixmapHeight"
195 #define XmNglobalPixmapWidth "globalPixmapWidth"
196 #define XmCGlobalPixmapWidth "GlobalPixmapWidth"
197 #define XmCGridSelectionPolicy "GridSelectionPolicy"
198 #define XmRGridSelectionPolicy "GridSelectionPolicy"
199 #define XmRGridSizePolicy "GridSizePolicy"
200 #define XmNheadingColumns "headingColumns"
201 #define XmCHeadingColumns "HeadingColumns"
202 #define XmNheadingRows "headingRows"
203 #define XmCHeadingRows "HeadingRows"
204 #define XmNhiddenColumns "hiddenColumns"
205 #define XmCHiddenColumns "HiddenColumns"
206 #define XmNhiddenRows "hiddenRows"
207 #define XmCHiddenRows "HiddenRows"
208 #define XmNhighlightRowMode "highlightRowMode"
209 #define XmCHighlightRowMode "HighlightRowMode"
210 #define XmNhorizontalSizePolicy "horizontalSizePolicy"
211 #define XmCHorizontalSizePolicy "HorizontalSizePolicy"
212 #define XmNhsbDisplayPolicy "hsbDisplayPolicy"
213 #define XmCHsbDisplayPolicy "HsbDisplayPolicy"
214 #define XmNimmediateDraw "immediateDraw"
215 #define XmCImmediateDraw "ImmediateDraw"
216 #define XmNlayoutFrozen "layoutFrozen"
217 #define XmCLayoutFrozen "LayoutFrozen"
218 #define XmNleftFixedCount "leftFixedCount"
219 #define XmCLeftFixedCount "LeftFixedCount"
220 #define XmNleftFixedMargin "leftFixedMargin"
221 #define XmCLeftFixedMargin "LeftFixedMargin"
222 #define XmNrightFixedCount "rightFixedCount"
223 #define XmCRightFixedCount "RightFixedCount"
224 #define XmNrightFixedMargin "rightFixedMargin"
225 #define XmCRightFixedMargin "RightFixedMargin"
226 #define XmNscrollBarMargin "scrollBarMargin"
227 #define XmCScrollBarMargin "ScrollBarMargin"
228 #define XmNscrollCallback "scrollCallback"
229 #define XmNscrollColumn "scrollColumn"
230 #define XmCScrollColumn "ScrollColumn"
231 #define XmNscrollRow "scrollRow"
232 #define XmCScrollRow "ScrollRow"
233 #define XmNsimpleHeadings "simpleHeadings"
234 #define XmCSimpleHeadings "SimpleHeadings"
235 #define XmNsimpleWidths "simpleWidths"
236 #define XmCSimpleWidths "SimpleWidths"
237 #ifndef XmNselectCallback /* OM 2.2.3 defines this too. */
238 #define XmNselectCallback "selectCallback"
239 #endif
240 #define XmNselectForeground "selectForeground"
241 #define XmCSelectForeground "SelectForeground"
242 #define XmNselectBackground "selectBackground"
243 #define XmCSelectBackground "SelectBackground"
244 #define XmNshadowRegions "shadowRegions"
245 #define XmCShadowRegions "ShadowRegions"
246 #define XmNtextWidget "textWidget"
247 #define XmCTextWidget "TextWidget"
248 #define XmNtoggleTopColor "toggleTopColor"
249 #define XmCToggleTopColor "ToggleTopColor"
250 #define XmNtoggleBottomColor "toggleBottomColor"
251 #define XmCToggleBottomColor "ToggleBottomColor"
252 #define XmNtoggleSize "toggleSize"
253 #define XmCToggleSize "ToggleSize"
254 #define XmNtopFixedCount "topFixedCount"
255 #define XmCTopFixedCount "TopFixedCount"
256 #define XmNtopFixedMargin "topFixedMargin"
257 #define XmCTopFixedMargin "TopFixedMargin"
258 #define XmNtraverseTranslations "traverseTranslations"
259 #define XmNuseAverageFontWidth "useAverageFontWidth"
260 #define XmCUseAverageFontWidth "UseAverageFontWidth"
261 #define XmNverticalSizePolicy "verticalSizePolicy"
262 #define XmCVerticalSizePolicy "VerticalSizePolicy"
263 #define XmNvisibleColumns "visibleColumns"
264 #define XmCVisibleColumns "VisibleColumns"
265 #define XmNvisibleRows "visibleRows"
266 #define XmCVisibleRows "VisibleRows"
267 #define XmNvsbDisplayPolicy "vsbDisplayPolicy"
268 #define XmCVsbDisplayPolicy "VsbDisplayPolicy"
269 #define XmNiconSpacing "iconSpacing"
270 #define XmCIconSpacing "IconSpacing"
273 /* XFE Additions */
274 #define XmNhideUnhideButtons "hideUnhideButtons"
275 #define XmCHideUnhideButtons "HideUnhideButtons"
276 #define XmNsingleClickActivation "singleClickActivation"
277 #define XmCSingleClickActivation "SingleClickActivation"
278 #define XmNuseTextWidget "useTextWidget"
279 #define XmCUseTextWidget "UseTextWidget"
280 #define XmNcolumnSortType "columnSortType"
281 #define XmCColumnSortType "ColumnSortType"
282 #define XmRColumnSortType "ColumnSortType"
283 #if 0
284 #define XmNhideButtonTranslations "hideButtonTranslations"
285 #define XmNunhideButtonTranslations "unhideButtonTranslations"
286 #endif /*0*/
287 #define XmNminColumnWidth "minColumnWidth"
288 #define XmCMinColumnWidth "MinColumnWidth"
290 #define XmNenterCellCallback "enterCellCallback"
291 #define XmNleaveCellCallback "leaveCellCallback"
293 #define XmNenterGridCallback "enterGridCallback"
294 #define XmNleaveGridCallback "leaveGridCallback"
296 /* Grid Row/Column/Cell resources */
298 #define XmNrow "row"
299 #define XmCGridRow "row"
300 #define XmNrowHeight "rowHeight"
301 #define XmCRowHeight "RowHeight"
302 #define XmNrowPtr "rowPtr"
303 #define XmNrowRangeEnd "rowRangeEnd"
304 #define XmCRowRangeEnd "RowRangeEnd"
305 #define XmNrowRangeStart "rowRangeStart"
306 #define XmCRowRangeStart "RowRangeStart"
307 #define XmNrowSizePolicy "rowSizePolicy"
308 #define XmCRowSizePolicy "RowSizePolicy"
309 #define XmNrowStep "rowStep"
310 #define XmCRowStep "RowStep"
311 #define XmNrowType "rowType"
312 #define XmCRowType "RowType"
313 #define XmRRowType "RowType"
314 #define XmNrowUserData "rowUserData"
316 #define XmNcolumn "column"
317 #define XmCGridColumn "Column"
318 #define XmNcolumnPtr "columnPtr"
319 #define XmNcolumnRangeEnd "columnRangeEnd"
320 #define XmCColumnRangeEnd "ColumnRangeEnd"
321 #define XmNcolumnRangeStart "columnRangeStart"
322 #define XmCColumnRangeStart "ColumnRangeStart"
323 #define XmNcolumnResizable "columnResizable"
324 #define XmCColumnResizable "ColumnResizable"
325 #define XmNcolumnSizePolicy "columnSizePolicy"
326 #define XmCColumnSizePolicy "ColumnSizePolicy"
327 #define XmNcolumnHidden "columnHidden"
328 #define XmCColumnHidden "ColumnHidden"
329 #define XmNcolumnStep "columnStep"
330 #define XmCColumnStep "ColumnStep"
331 #define XmNcolumnType "columnType"
332 #define XmCColumnType "ColumnType"
333 #define XmRColumnType "ColumnType"
334 #define XmNcolumnWidth "columnWidth"
335 #define XmCColumnWidth "ColumnWidth"
336 #define XmNcolumnUserData "columnUserData"
338 #define XmNcellAlignment "cellAlignment"
339 #define XmCCellAlignment "CellAlignment"
340 #define XmRCellAlignment "CellAlignment"
341 #define XmNcellBackground "cellBackground"
342 #define XmCCellBackground "CellBackground"
343 #define XmRCellBorderType "CellBorderType"
344 #define XmNcellBottomBorderType "cellBottomBorderType"
345 #define XmCCellBottomBorderType "CellBottomBorderType"
346 #define XmNcellBottomBorderColor "cellBottomBorderColor"
347 #define XmCCellBottomBorderColor "CellBottomBorderColor"
348 #define XmNcellColumnSpan "cellColumnSpan"
349 #define XmCCellColumnSpan "CellColumnSpan"
350 #define XmNcellEditable "cellEditable"
351 #define XmCCellEditable "CellEditable"
352 #define XmNcellForeground "cellForeground"
353 #define XmCCellForeground "CellForeground"
354 #define XmNcellFontList "cellFontList"
355 #define XmCCellFontList "CellFontList"
356 #define XmNcellLeftBorderType "cellLeftBorderType"
357 #define XmCCellLeftBorderType "CellLeftBorderType"
358 #define XmNcellLeftBorderColor "cellLeftBorderColor"
359 #define XmCCellLeftBorderColor "CellLeftBorderColor"
360 #define XmNcellMarginBottom "cellMarginBottom"
361 #define XmCCellMarginBottom "CellMarginBottom"
362 #define XmNcellMarginLeft "cellMarginLeft"
363 #define XmCCellMarginLeft "CellMarginLeft"
364 #define XmNcellMarginRight "cellMarginRight"
365 #define XmCCellMarginRight "CellMarginRight"
366 #define XmNcellMarginTop "cellMarginTop"
367 #define XmCCellMarginTop "CellMarginTop"
368 #define XmNcellPixmap "cellPixmap"
369 #define XmCCellPixmap "CellPixmap"
370 #define XmNcellPixmapMask "cellPixmapMask"
371 #define XmCCellPixmapMask "CellPixmapMask"
372 #define XmNcellRightBorderType "cellRightBorderType"
373 #define XmCCellRightBorderType "CellRightBorderType"
374 #define XmNcellRightBorderColor "cellRightBorderColor"
375 #define XmCCellRightBorderColor "CellRightBorderColor"
376 #define XmNcellRowSpan "cellRowSpan"
377 #define XmCCellRowSpan "CellRowSpan"
378 #define XmNcellString "cellString"
379 #define XmNcellToggleSet "cellToggleSet"
380 #define XmCCellToggleSet "CellToggleSet"
381 #define XmNcellTopBorderType "cellTopBorderType"
382 #define XmCCellTopBorderType "CellTopBorderType"
383 #define XmNcellTopBorderColor "cellTopBorderColor"
384 #define XmCCellTopBorderColor "CellTopBorderColor"
385 #define XmNcellType "cellType"
386 #define XmCCellType "CellType"
387 #define XmRCellType "CellType"
388 #define XmNcellUserData "cellUserData"
390 /* Grid callbacks */
392 typedef struct _XmLGridDrawStruct
394 GC gc;
395 XRectangle *cellRect;
396 Dimension topMargin;
397 Dimension bottomMargin;
398 Dimension leftMargin;
399 Dimension rightMargin;
400 Pixel foreground;
401 Pixel background;
402 Pixel selectForeground;
403 Pixel selectBackground;
404 XmFontList fontList;
405 unsigned char alignment;
406 Boolean drawSelected;
407 int drawFocusType;
408 XmStringDirection stringDirection;
409 } XmLGridDrawStruct;
411 typedef struct _XmLGridCallbackStruct
413 int reason;
414 XEvent *event;
415 unsigned char rowType, columnType;
416 int row, column;
417 XRectangle *clipRect;
418 XmLGridDrawStruct *drawInfo;
419 void *object;
420 } XmLGridCallbackStruct;
422 #define XmCR_ADD_ROW 900
423 #define XmCR_ADD_COLUMN 901
424 #define XmCR_ADD_CELL 902
425 #define XmCR_CELL_DRAW 903
426 #define XmCR_CELL_DROP 904
427 #define XmCR_CELL_FOCUS_IN 905
428 #define XmCR_CELL_FOCUS_OUT 906
429 #define XmCR_CELL_PASTE 907
430 #define XmCR_CONF_TEXT 908
431 #define XmCR_PREF_WIDTH 909
432 #define XmCR_DELETE_ROW 910
433 #define XmCR_DELETE_COLUMN 911
434 #define XmCR_DELETE_CELL 912
435 #define XmCR_EDIT_BEGIN 913
436 #define XmCR_EDIT_INSERT 914
437 #define XmCR_EDIT_CANCEL 915
438 #define XmCR_EDIT_COMPLETE 916
439 #define XmCR_FREE_VALUE 917
440 #define XmCR_RESIZE_ROW 918
441 #define XmCR_RESIZE_COLUMN 919
442 #define XmCR_PREF_HEIGHT 920
443 #define XmCR_SCROLL_ROW 921
444 #define XmCR_SCROLL_COLUMN 922
445 #define XmCR_SELECT_CELL 923
446 #define XmCR_SELECT_COLUMN 924
447 #define XmCR_SELECT_ROW 925
448 #define XmCR_DESELECT_CELL 926
449 #define XmCR_DESELECT_COLUMN 927
450 #define XmCR_DESELECT_ROW 928
452 /* xfe added callback reason */
453 #define XmCR_RESIZE_GRID 929
454 #define XmCR_SHOW_POPUP 930
455 #define XmCR_SINGLECLICK 931
457 #define XmCR_ENTER_CELL 931
458 #define XmCR_ENTER_GRID 932
459 #define XmCR_LEAVE_CELL 933
460 #define XmCR_LEAVE_GRID 934
462 /* Grid defines */
464 #define XmCONTENT 0
465 #define XmHEADING 1
466 #define XmFOOTER 2
467 #define XmALL_TYPES 3
468 #define XmINVALID_TYPE 4
470 #define XmICON_CELL 0
471 #define XmPIXMAP_CELL 1
472 #define XmSTRING_CELL 2
474 #define XmBORDER_NONE 0
475 #define XmBORDER_LINE 1
476 #define XmBORDER_DASH 2
478 #define XmFORMAT_DELIMITED 1
479 #define XmFORMAT_XL 2
480 #define XmFORMAT_PAD 3
481 #define XmFORMAT_PASTE 4
482 #define XmFORMAT_DROP 5
484 #define XmSELECT_NONE 1
485 #define XmSELECT_SINGLE_ROW 2
486 #define XmSELECT_BROWSE_ROW 3
487 #define XmSELECT_MULTIPLE_ROW 4
488 #define XmSELECT_CELL 5
490 #define XmDRAW_FOCUS_NONE 1
491 #define XmDRAW_FOCUS_CELL 2
492 #define XmDRAW_FOCUS_LEFT 3
493 #define XmDRAW_FOCUS_MID 4
494 #define XmDRAW_FOCUS_RIGHT 5
496 #define XmTRAVERSE_EXTEND_DOWN 20
497 #define XmTRAVERSE_EXTEND_LEFT 21
498 #define XmTRAVERSE_EXTEND_RIGHT 22
499 #define XmTRAVERSE_EXTEND_UP 23
500 #define XmTRAVERSE_PAGE_DOWN 24
501 #define XmTRAVERSE_PAGE_LEFT 25
502 #define XmTRAVERSE_PAGE_RIGHT 26
503 #define XmTRAVERSE_PAGE_UP 27
504 #define XmTRAVERSE_TO_BOTTOM 28
505 #define XmTRAVERSE_TO_TOP 29
507 #define XmALIGNMENT_LEFT 0
508 #ifndef XmALIGNMENT_CENTER
509 #define XmALIGNMENT_CENTER 1
510 #endif
511 #define XmALIGNMENT_RIGHT 2
512 #define XmALIGNMENT_TOP_LEFT 3
513 #define XmALIGNMENT_TOP 4
514 #define XmALIGNMENT_TOP_RIGHT 5
515 #define XmALIGNMENT_BOTTOM_LEFT 6
516 #define XmALIGNMENT_BOTTOM 7
517 #define XmALIGNMENT_BOTTOM_RIGHT 8
519 /* xfe additions */
520 #define XmSORT_NONE 0
521 #define XmSORT_ASCENDING 1
522 #define XmSORT_DESCENDING 2
524 /* Progress resources */
526 #define XmNcompleteValue "completeValue"
527 #define XmCCompleteValue "CompleteValue"
528 #define XmNnumBoxes "numBoxes"
529 #define XmCNumBoxes "NumBoxes"
530 #define XmNmeterStyle "meterStyle"
531 #define XmCMeterStyle "MeterStyle"
532 #define XmRMeterStyle "MeterStyle"
533 #define XmNshowPercentage "showPercentage"
534 #define XmCShowPercentage "ShowPercentage"
535 #define XmNshowTime "showTime"
536 #define XmCShowTime "ShowTime"
538 /* Progress defines */
540 #define XmMETER_BAR 0
541 #define XmMETER_BOXES 1
543 /* Tree resources */
545 #define XmNcollapseCallback "collapseCallback"
546 #define XmNconnectingLineColor "connectingLineColor"
547 #define XmCConnectingLineColor "ConnectingLineColor"
548 #define XmNexpandCallback "expandCallback"
549 #define XmNlevelSpacing "levelSpacing"
550 #define XmCLevelSpacing "LevelSpacing"
551 #define XmNplusMinusColor "plusMinusColor"
552 #define XmCPlusMinusColor "PlusMinusColor"
553 #define XmNrowExpands "rowExpands"
554 #define XmCRowExpands "RowExpands"
555 #define XmNrowIsExpanded "rowIsExpanded"
556 #define XmCRowIsExpanded "RowIsExpanded"
557 #define XmNrowLevel "rowLevel"
558 #define XmCRowLevel "RowLevel"
559 #define XmNignorePixmaps "ignorePixmaps"
560 #define XmCIgnorePixmaps "IgnorePixmaps"
562 /* Tree callbacks */
564 typedef struct
566 int level;
567 Boolean expands;
568 Boolean isExpanded;
569 Pixmap pixmap, pixmask;
570 XmString string;
571 } XmLTreeRowDefinition;
573 #define XmCR_COLLAPSE_ROW 950
574 #define XmCR_EXPAND_ROW 951
576 /* Backwards compatibility */
578 #ifdef XmLBACKWARDS_COMPATIBILITY
580 #define XmNfooterColumnCount "footerColumns"
581 #define XmNfooterRowCount "footerRows"
582 #define XmNheadingColumnCount "headingColumns"
583 #define XmNheadingRowCount "headingRows"
584 #define XmNcellBottomBorderPixel "cellBottomBorderColor"
585 #define XmCCellBottomBorderPixel "CellBottomBorderColor"
586 #define XmNcellLeftBorderPixel "cellLeftBorderColor"
587 #define XmCCellLeftBorderPixel "CellLeftBorderColor"
588 #define XmNcellRightBorderPixel "cellRightBorderColor"
589 #define XmCCellRightBorderPixel "CellRightBorderColor"
590 #define XmNcellTopBorderPixel "cellTopBorderColor"
591 #define XmCCellTopBorderPixel "CellTopBorderColor"
593 #define XmTEXT_CELL 250
594 #define XmLABEL_CELL 251
596 typedef void XmLCGridRow;
597 typedef void XmLCGridColumn;
598 typedef void XmLCGridCell;
600 #endif
602 /* Utility defines */
604 #define XmDRAWNB_ARROW 0
605 #define XmDRAWNB_ARROWLINE 1
606 #define XmDRAWNB_DOUBLEARROW 2
607 #define XmDRAWNB_SQUARE 3
608 #define XmDRAWNB_DOUBLEBAR 4
609 #define XmDRAWNB_STRING 5
610 #define XmDRAWNB_SMALLARROW 6
612 #define XmDRAWNB_RIGHT 0
613 #define XmDRAWNB_LEFT 1
614 #define XmDRAWNB_UP 2
615 #define XmDRAWNB_DOWN 3
617 #define XmSTRING_RIGHT 0
618 #define XmSTRING_LEFT 1
619 #define XmSTRING_UP 2
620 #define XmSTRING_DOWN 3
622 enum { XmLRectInside, XmLRectOutside, XmLRectPartial };
624 typedef struct
626 int pos;
627 } XmLArrayItem;
629 typedef struct _XmLArrayRec *XmLArray;
631 typedef struct
633 char *name;
634 unsigned char value;
635 } XmLStringToUCharMap;
637 /* Utility functions */
639 typedef int (*XmLSortCompareFunc)(void *userData, void *l, void *r);
640 typedef int (*XmLArrayCompareFunc)(void *, void **, void **);
642 XmLArray XmLArrayNew(char autonumber, char growFast);
643 void XmLArrayFree(XmLArray array);
644 void XmLArrayAdd(XmLArray array, int pos, int count);
645 int XmLArrayDel(XmLArray array, int pos, int count);
646 int XmLArraySet(XmLArray array, int pos, void *item);
647 void *XmLArrayGet(XmLArray array, int pos);
648 int XmLArrayGetCount(XmLArray array);
649 int XmLArrayMove(XmLArray array, int newPos, int pos, int count);
650 int XmLArrayReorder(XmLArray array, int *newPositions,
651 int pos, int count);
652 int XmLArraySort(XmLArray array, XmLArrayCompareFunc compare,
653 void *userData, int pos, int count);
654 Boolean XmLCvtStringToUChar(Display *dpy, char *resname,
655 XmLStringToUCharMap *map, XrmValuePtr fromVal, XrmValuePtr toVal);
656 int XmLDateDaysInMonth(int m, int y);
657 int XmLDateWeekDay(int m, int d, int y);
658 void XmLDrawnButtonSetType(Widget w, int drawnType, int drawnDir);
659 void XmLDrawToggle(Widget w, Boolean state, Dimension size,
660 unsigned char alignment, GC gc, Pixel backgroundColor,
661 Pixel topColor, Pixel bottomColor, Pixel checkColor,
662 XRectangle *rect, XRectangle *clipRect);
663 XmFontList XmLFontListCopyDefault(Widget widget);
664 void XmLFontListGetDimensions(XmFontList fontList, short *width,
665 short *height, Boolean useAverageWidth);
666 void XmLInitialize(void);
667 int XmLMessageBox(Widget w, char *string, Boolean okOnly);
668 void XmLPixmapDraw(Widget w, Pixmap pixmap, Pixmap pixmask,
669 int pixmapWidth, int pixmapHeight, unsigned char alignment,
670 GC gc, XRectangle *rect, XRectangle *clipRect);
671 int XmLRectIntersect(XRectangle *r1, XRectangle *r2);
672 Widget XmLShellOfWidget(Widget w);
673 void XmLSort(void *base, int numItems, unsigned int itemSize,
674 XmLSortCompareFunc, void *userData);
675 void XmLStringDraw(Widget w, XmString string, XmStringDirection stringDir,
676 XmFontList fontList, unsigned char alignment, GC gc,
677 XRectangle *rect, XRectangle *clipRect);
678 void XmLStringDrawDirection(Display *dpy, Window win, XmFontList fontlist,
679 XmString string, GC gc, int x, int y, Dimension width,
680 unsigned char alignment, unsigned char layout_direction,
681 unsigned char drawing_direction);
682 void XmLWarning(Widget w, char *msg);
684 #ifdef XmL_CPP
686 #endif
687 #endif