0N/A/*
2362N/A * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A/*
0N/A */
0N/A
0N/A#include <X11/IntrinsicP.h>
0N/A#include "XDrawingAreaP.h"
0N/A#include <Xm/XmP.h>
0N/A
0N/A#include <stdio.h>
4632N/A#include <stdlib.h>
0N/A
0N/A#ifdef DEBUG
0N/A#include <jvm.h> /* To get jio_fprintf() */
0N/A#endif
0N/A
0N/A/******************************************************************
0N/A *
0N/A * Provides Canvas widget which allows the X11 visual to be
0N/A * changed (the Motif DrawingArea restricts the visual to that
0N/A * of the parent widget).
0N/A *
0N/A ******************************************************************/
0N/A
0N/A
0N/Astatic XmNavigability WidgetNavigable();
0N/Astatic void ClassInitialize();
0N/A
0N/Astatic XmBaseClassExtRec baseClassExtRec = {
0N/A NULL,
0N/A NULLQUARK,
0N/A XmBaseClassExtVersion,
0N/A sizeof(XmBaseClassExtRec),
0N/A NULL, /* InitializePrehook */
0N/A NULL, /* SetValuesPrehook */
0N/A NULL, /* InitializePosthook */
0N/A NULL, /* SetValuesPosthook */
0N/A NULL, /* secondaryObjectClass */
0N/A NULL, /* secondaryCreate */
0N/A NULL, /* getSecRes data */
0N/A { 0 }, /* fastSubclass flags */
0N/A NULL, /* getValuesPrehook */
0N/A NULL, /* getValuesPosthook */
0N/A NULL, /* classPartInitPrehook */
0N/A NULL, /* classPartInitPosthook*/
0N/A NULL, /* ext_resources */
0N/A NULL, /* compiled_ext_resources*/
0N/A 0, /* num_ext_resources */
0N/A FALSE, /* use_sub_resources */
0N/A WidgetNavigable, /* widgetNavigable */
0N/A NULL /* focusChange */
0N/A};
0N/A
0N/AXDrawingAreaClassRec xDrawingAreaClassRec = {
0N/A{
0N/A /* Core class part */
0N/A
0N/A /* superclass */ (WidgetClass)&xmDrawingAreaClassRec,
0N/A /* class_name */ "XDrawingArea",
0N/A /* widget_size */ sizeof(XDrawingAreaRec),
0N/A /* class_initialize */ ClassInitialize,
0N/A /* class_part_initialize*/ NULL,
0N/A /* class_inited */ FALSE,
0N/A /* initialize */ NULL,
0N/A /* initialize_hook */ NULL,
0N/A /* realize */ XtInheritRealize,
0N/A /* actions */ NULL,
0N/A /* num_actions */ 0,
0N/A /* resources */ NULL,
0N/A /* num_resources */ 0,
0N/A /* xrm_class */ NULLQUARK,
0N/A /* compress_motion */ FALSE,
0N/A /* compress_exposure */ FALSE,
0N/A /* compress_enterleave*/ FALSE,
0N/A /* visible_interest */ FALSE,
0N/A /* destroy */ NULL,
0N/A /* resize */ XtInheritResize,
0N/A /* expose */ XtInheritExpose,
0N/A /* set_values */ NULL,
0N/A /* set_values_hook */ NULL,
0N/A /* set_values_almost */ XtInheritSetValuesAlmost,
0N/A /* get_values_hook */ NULL,
0N/A /* accept_focus */ NULL,
0N/A /* version */ XtVersion,
0N/A /* callback_offsets */ NULL,
0N/A /* tm_table */ NULL,
0N/A /* query_geometry */ NULL,
0N/A /* display_accelerator */ NULL,
0N/A /* extension */ (XtPointer)&baseClassExtRec
0N/A },
0N/A
0N/A { /* composite_class fields */
0N/A XtInheritGeometryManager, /* geometry_manager */
0N/A XtInheritChangeManaged, /* change_managed */
0N/A XtInheritInsertChild, /* insert_child */
0N/A XtInheritDeleteChild, /* delete_child */
0N/A NULL, /* extension */
0N/A },
0N/A
0N/A { /* constraint_class fields */
0N/A NULL, /* resource list */
0N/A 0, /* num resources */
0N/A 0, /* constraint size */
0N/A NULL, /* init proc */
0N/A NULL, /* destroy proc */
0N/A NULL, /* set values proc */
0N/A NULL, /* extension */
0N/A },
0N/A
0N/A { /* manager_class fields */
0N/A XtInheritTranslations, /* translations */
0N/A NULL, /* syn_resources */
0N/A 0, /* num_get_resources */
0N/A NULL, /* syn_cont_resources */
0N/A 0, /* num_get_cont_resources */
0N/A XmInheritParentProcess, /* parent_process */
0N/A NULL, /* extension */
0N/A },
0N/A
0N/A { /* drawingArea class */
0N/A /* extension */ NULL
0N/A },
0N/A
0N/A /* XDrawingArea class part */
0N/A {
0N/A /* extension */ NULL
0N/A }
0N/A};
0N/A
0N/AWidgetClass xDrawingAreaClass = (WidgetClass)&xDrawingAreaClassRec;
0N/A
0N/Astatic void ClassInitialize( void )
0N/A{
0N/A baseClassExtRec.record_type = XmQmotif ;
0N/A}
0N/A
0N/Astatic XmNavigability WidgetNavigable(Widget wid)
0N/A{
0N/A return XmCONTROL_NAVIGABLE;
0N/A}