/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef HEADLESS
#include <X11/IntrinsicP.h>
#include "VDrawingAreaP.h"
#endif /* !HEADLESS */
#include <stdio.h>
#include <stdlib.h>
#ifdef __linux__
/* XXX: Shouldn't be necessary. */
#include "awt_p.h"
#endif /* __linux__ */
/******************************************************************
*
* Provides Canvas widget which allows the X11 visual to be
* changed (the Motif DrawingArea restricts the visual to that
* of the parent widget).
*
******************************************************************/
/******************************************************************
*
* VDrawingArea Widget Resources
*
******************************************************************/
#ifndef HEADLESS
{
};
static void Realize();
static void Destroy ();
NULL,
sizeof(XmBaseClassExtRec),
NULL, /* InitializePrehook */
NULL, /* SetValuesPrehook */
NULL, /* InitializePosthook */
NULL, /* SetValuesPosthook */
NULL, /* secondaryObjectClass */
NULL, /* secondaryCreate */
NULL, /* getSecRes data */
{ 0 }, /* fastSubclass flags */
NULL, /* getValuesPrehook */
NULL, /* getValuesPosthook */
NULL, /* classPartInitPrehook */
NULL, /* classPartInitPosthook*/
NULL, /* ext_resources */
NULL, /* compiled_ext_resources*/
0, /* num_ext_resources */
FALSE, /* use_sub_resources */
NULL, /* widgetNavigable */
NULL, /* focusChange */
NULL /* wrapper_data */
};
{
/* Core class part */
/* class_name */ "VDrawingArea",
/* widget_size */ sizeof(VDrawingAreaRec),
/* class_initialize */ NULL,
/* class_part_initialize*/ NULL,
/* class_inited */ FALSE,
/* initialize */ NULL,
/* initialize_hook */ NULL,
/* realize */ Realize,
/* actions */ NULL,
/* num_actions */ 0,
/* resources */ resources,
/* xrm_class */ NULLQUARK,
/* compress_motion */ FALSE,
/* compress_exposure */ FALSE,
/* compress_enterleave*/ FALSE,
/* visible_interest */ FALSE,
/* destroy */ Destroy,
/* resize */ XtInheritResize,
/* expose */ XtInheritExpose,
/* set_values */ SetValues,
/* set_values_hook */ NULL,
/* set_values_almost */ XtInheritSetValuesAlmost,
/* get_values_hook */ NULL,
/* accept_focus */ NULL,
/* version */ XtVersion,
/* callback_offsets */ NULL,
/* tm_table */ NULL,
/* query_geometry */ NULL,
/* display_accelerator */ NULL,
/* extension */ NULL
},
{ /* composite_class fields */
XtInheritGeometryManager, /* geometry_manager */
XtInheritChangeManaged, /* change_managed */
XtInheritInsertChild, /* insert_child */
XtInheritDeleteChild, /* delete_child */
NULL, /* extension */
},
{ /* constraint_class fields */
NULL, /* resource list */
0, /* num resources */
0, /* constraint size */
NULL, /* init proc */
NULL, /* destroy proc */
NULL, /* set values proc */
NULL, /* extension */
},
{ /* manager_class fields */
XtInheritTranslations, /* translations */
NULL, /* syn_resources */
0, /* num_get_resources */
NULL, /* syn_cont_resources */
0, /* num_get_cont_resources */
XmInheritParentProcess, /* parent_process */
NULL, /* extension */
},
{ /* drawingArea class */
/* extension */ NULL
},
/* VDrawingArea class part */
{
/* extension */ NULL
}
};
static Boolean
{
#ifdef DEBUG
#endif
}
return (False);
}
int
{
int i;
for (i = 0; i < count; i++)
if (colormap_windows [i] == parentWindow)
return i;
return -1;
}
static void
Widget w;
{
int count;
int i;
#ifdef DEBUG
#endif
/* 4328588:
* Since we have our own Realize() function, we don't execute the one for
* our super-super class, XmManager, and miss the code which checks that
* height and width != 0. I've added that here. -bchristi
*/
*value_mask, attributes );
/* Need to add this window to the list of Colormap windows */
return;
}
&colormap_windows, &count);
/* If status is zero, add this window and shell to the list
of colormap Windows */
if (status == 0) {
new_colormap_windows [0] = XtWindow (w);
} else {
/* Check if parent is already in the list */
if (count > 0)
sizeof (Window));
new_colormap_windows [0] = XtWindow (w);
for (i = 0; i < count; i++)
} else { /* parent already in list, just add new window */
sizeof (Window));
new_colormap_windows [0] = XtWindow (w);
for (i = 0; i < count; i++)
}
}
}
static void
{
int count;
int listEntry;
int i;
int j;
/* Need to get this window's parent shell first */
return;
}
&colormap_windows, &count);
/* If status is zero, then there were no colormap windows for
the parent ?? */
if (status == 0)
return;
/* Remove this window from the list of colormap windows */
count);
j = 0;
for (i = 0; i < count; i++) {
if (i == listEntry)
continue;
new_colormap_windows [j] = colormap_windows [i];
j++;
}
}
#endif /* !HEADLESS */