~ubuntu-branches/ubuntu/quantal/openmotif/quantal

« back to all changes in this revision

Viewing changes to lib/Xm/IconBoxP.h

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Bauer
  • Date: 2010-06-23 12:12:31 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100623121231-u89gxdp51sg9wjj2
Tags: 2.3.0-1
* New Maintainer (Closes: #379258) 
* Acknowledge NMU changes
* New upstream release (Closes: #494375)
* Get rid of security patches as they are already part of new upstream
  release (00-xpmvuln.openmotif.patch, 342092-CVE-2005-3964.patch)
* Bump Standards to 3.8.4
* Added {misc:Depends} to make the package lintian cleaner
* Fix weak-library-dev-dependency by adding ${binary:Version}) for the
  -dev Package of openmotif
* Let package depend on autotools-dev to use newer autotools-helper-files
* Work around an autoconf-bug (Gentoo-Bug #1475)
* Added Client-side anti-aliased fonts support via XFT
* Added UTF-8 and UTF8_STRING atom support
* Ability to show text and pixmaps in Label, LabelGadget and all
  derived widgets
* Support of PNG/JPEG image formats in the same way as XPM is supported
* Increase FILE_OFFSET_BITS to 64 to show files >2GB in file-selector
  Idea taken from Magne Oestlyngen (Closes: #288537)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *    Copyright 1990, 1992 -- Integrated Computer Solutions, Inc.
 
3
 *
 
4
 *                     All Rights Reserved.
 
5
 *
 
6
 * AUTHOR: Chris D. Peterson
 
7
 *
 
8
 */
 
9
 
 
10
#ifndef _XmIconBoxP_h
 
11
#define _XmIconBoxP_h
 
12
 
 
13
#if defined(VMS) || defined(__VMS)
 
14
#include <X11/apienvset.h>
 
15
#endif
 
16
 
 
17
/************************************************************
 
18
*       INCLUDE FILES
 
19
*************************************************************/
 
20
#include <Xm/ManagerP.h>
 
21
#include <Xm/IconBox.h>
 
22
 
 
23
#ifdef __cplusplus
 
24
extern "C" {
 
25
#endif
 
26
 
 
27
/************************************************************
 
28
*       TYPEDEFS AND DEFINES
 
29
*************************************************************/
 
30
 
 
31
 
 
32
/*
 
33
 * Hack to get around naming conventions.  The XmConstraintPartOffset macro
 
34
 * requires our contraint part structure to have this name
 
35
 */
 
36
#define XmIconBoxConstraintPart IconInfo
 
37
 
 
38
/*
 
39
 * Access macros for widget instance fields
 
40
 */
 
41
#define XmIconBox_min_v_cells(w)        (((XmIconBoxWidget)(w))->box.min_v_cells)
 
42
#define XmIconBox_min_h_cells(w)        (((XmIconBoxWidget)(w))->box.min_h_cells)
 
43
#define XmIconBox_v_margin(w)   (((XmIconBoxWidget)(w))->box.v_margin)
 
44
#define XmIconBox_h_margin(w)   (((XmIconBoxWidget)(w))->box.h_margin)
 
45
#define XmIconBox_min_cell_width(w)  (((XmIconBoxWidget)(w))->box.min_cell_width)
 
46
#define XmIconBox_min_cell_height(w) (((XmIconBoxWidget)(w))->box.min_cell_height)
 
47
#define XmIconBox_cell_width(w) (((XmIconBoxWidget)(w))->box.cell_width)
 
48
#define XmIconBox_cell_height(w)        (((XmIconBoxWidget)(w))->box.cell_height)
 
49
 
 
50
#define XmIconBoxC_cell_x(w)      (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.cell_x)
 
51
#define XmIconBoxC_cell_y(w)      (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.cell_y)
 
52
#define XmIconBoxC_pref_width(w)  (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.pref_width)
 
53
#define XmIconBoxC_pref_height(w) (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.pref_height)
 
54
 
 
55
/************************************************************
 
56
*       MACROS
 
57
*************************************************************/
 
58
 
 
59
/************************************************************
 
60
*       GLOBAL DECLARATIONS
 
61
*************************************************************/
 
62
 
 
63
typedef struct {
 
64
    XtPointer extension;        /* Just in case we need it later. */
 
65
} XmIconBoxClassPart;
 
66
 
 
67
typedef struct _XmIconBoxClassRec {
 
68
    CoreClassPart               core_class;
 
69
    CompositeClassPart          composite_class;
 
70
    ConstraintClassPart         constraint_class;
 
71
    XmManagerClassPart          manager_class;
 
72
    XmIconBoxClassPart          box_class;
 
73
} XmIconBoxClassRec;
 
74
 
 
75
typedef struct {
 
76
    /* resources */
 
77
 
 
78
    Dimension min_v_cells;      /* Default number of cells in the vert dir. */
 
79
    Dimension min_h_cells;      /* Default number of cells in the horiz dir. */
 
80
    Dimension v_margin;         /* Amount of space to leave between cells */
 
81
    Dimension h_margin;         /* and window edges. */
 
82
    Dimension min_cell_width;   /* Minimum width of the cells. */
 
83
    Dimension min_cell_height;  /* Minimum height of the cells. */
 
84
 
 
85
    /* private state */
 
86
 
 
87
    Dimension cell_width;       /* Width and height of all cells. */
 
88
    Dimension cell_height;
 
89
 
 
90
} XmIconBoxPart;
 
91
 
 
92
 
 
93
typedef struct _XmIconBoxRec {
 
94
    CorePart            core;
 
95
    CompositePart       composite;
 
96
    ConstraintPart      constraint;
 
97
    XmManagerPart       manager;
 
98
    XmIconBoxPart       box;
 
99
} XmIconBoxRec;
 
100
 
 
101
typedef struct _IconInfo {
 
102
 
 
103
    /*
 
104
     * Resources.
 
105
     */
 
106
 
 
107
    short cell_x;               /* X location of this icon in cell space. */
 
108
    short cell_y;               /* Y location of this icon in cell space. */
 
109
 
 
110
    /*
 
111
     * Private state.
 
112
     */
 
113
 
 
114
    Dimension pref_width, pref_height; /* The preferred size of this widget. */
 
115
} IconInfo;
 
116
 
 
117
typedef struct _XmIconBoxConstraintsRec {
 
118
    XmManagerConstraintPart     manager;
 
119
    IconInfo                    icon;
 
120
} XmIconBoxConstraintsRec, *XmIconBoxConstraints;
 
121
 
 
122
/************************************************************
 
123
*       EXTERNAL DECLARATIONS
 
124
*************************************************************/
 
125
 
 
126
extern XmIconBoxClassRec xmIconBoxClassRec;
 
127
 
 
128
/************************************************************
 
129
*       STATIC DECLARATIONS
 
130
*************************************************************/
 
131
 
 
132
#ifdef __cplusplus
 
133
}       /* Closes scope of 'extern "C"' declaration */
 
134
#endif
 
135
 
 
136
#if defined(VMS) || defined(__VMS)
 
137
#include <X11/apienvrst.h>
 
138
#endif
 
139
 
 
140
#endif /* _XmIconBoxP_h */