~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to routines/X11/Xaw/Template.c

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XConsortium: Template.c,v 1.4 91/02/17 16:18:42 converse Exp $ */
 
2
 
 
3
/* Copyright    Massachusetts Institute of Technology   1987, 1988
 
4
 *
 
5
 * Permission to use, copy, modify, distribute, and sell this software and its
 
6
 * documentation for any purpose is hereby granted without fee, provided that
 
7
 * the above copyright notice appear in all copies and that both that
 
8
 * copyright notice and this permission notice appear in supporting
 
9
 * documentation, and that the name of M.I.T. not be used in advertising or
 
10
 * publicity pertaining to distribution of the software without specific,
 
11
 * written prior permission.  M.I.T. makes no representations about the
 
12
 * suitability of this software for any purpose.  It is provided "as is"
 
13
 * without express or implied warranty.
 
14
 *
 
15
 * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 
16
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
 
17
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
18
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 
19
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 
20
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
21
 *
 
22
 */
 
23
 
 
24
#include <X11/IntrinsicP.h>
 
25
#include <X11/StringDefs.h>
 
26
#include "TemplateP.h"
 
27
 
 
28
static XtResource resources[] = {
 
29
#define offset(field) XtOffsetOf(TemplateRec, template.field)
 
30
    /* {name, class, type, size, offset, default_type, default_addr}, */
 
31
    { XtNtemplateResource, XtCTemplateResource, XtRTemplateResource,
 
32
          sizeof(char*), offset(resource), XtRString, (XtPointer) "default" },
 
33
#undef offset
 
34
};
 
35
 
 
36
static void TemplateAction(/* Widget, XEvent*, String*, Cardinal* */);
 
37
 
 
38
static XtActionsRec actions[] =
 
39
{
 
40
  /* {name, procedure}, */
 
41
    {"template",        TemplateAction},
 
42
};
 
43
 
 
44
static char translations[] =
 
45
"<Key>:         template()      \n\
 
46
";
 
47
 
 
48
TemplateClassRec templateClassRec = {
 
49
  { /* core fields */
 
50
    /* superclass               */      (WidgetClass) &widgetClassRec,
 
51
    /* class_name               */      "Template",
 
52
    /* widget_size              */      sizeof(TemplateRec),
 
53
    /* class_initialize         */      NULL,
 
54
    /* class_part_initialize    */      NULL,
 
55
    /* class_inited             */      FALSE,
 
56
    /* initialize               */      NULL,
 
57
    /* initialize_hook          */      NULL,
 
58
    /* realize                  */      XtInheritRealize,
 
59
    /* actions                  */      actions,
 
60
    /* num_actions              */      XtNumber(actions),
 
61
    /* resources                */      resources,
 
62
    /* num_resources            */      XtNumber(resources),
 
63
    /* xrm_class                */      NULLQUARK,
 
64
    /* compress_motion          */      TRUE,
 
65
    /* compress_exposure        */      TRUE,
 
66
    /* compress_enterleave      */      TRUE,
 
67
    /* visible_interest         */      FALSE,
 
68
    /* destroy                  */      NULL,
 
69
    /* resize                   */      NULL,
 
70
    /* expose                   */      NULL,
 
71
    /* set_values               */      NULL,
 
72
    /* set_values_hook          */      NULL,
 
73
    /* set_values_almost        */      XtInheritSetValuesAlmost,
 
74
    /* get_values_hook          */      NULL,
 
75
    /* accept_focus             */      NULL,
 
76
    /* version                  */      XtVersion,
 
77
    /* callback_private         */      NULL,
 
78
    /* tm_table                 */      translations,
 
79
    /* query_geometry           */      XtInheritQueryGeometry,
 
80
    /* display_accelerator      */      XtInheritDisplayAccelerator,
 
81
    /* extension                */      NULL
 
82
  },
 
83
  { /* template fields */
 
84
    /* empty                    */      0
 
85
  }
 
86
};
 
87
 
 
88
WidgetClass templateWidgetClass = (WidgetClass)&templateClassRec;