This file is indexed.

/usr/include/xview_private/cnvs_impl.h is in xviewg-dev 3.2p1.4-28.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*      @(#)cnvs_impl.h 20.43 93/06/28 SMI      */
/*
 *	(c) Copyright 1989 Sun Microsystems, Inc. Sun design patents 
 *	pending in the U.S. and foreign countries. See LEGAL_NOTICE 
 *	file for terms of the license.
 */

#include <xview/pkg.h>
#include <xview/attrol.h>
#include <xview/canvas.h>
#include <xview_private/portable.h>

#ifdef OW_I18N
#include <xview_private/i18n_impl.h>
#include <xview/frame.h>
#include <xview/panel.h>
#endif /*OW_I18N*/

#define	CANVAS_PRIVATE(c)	XV_PRIVATE(Canvas_info, Xv_canvas, c)
#define	CANVAS_PUBLIC(canvas)	XV_PUBLIC(canvas)

#define	CANVAS_VIEW_PRIVATE(c)	XV_PRIVATE(Canvas_view_info, Xv_canvas_view, c)
#define	CANVAS_VIEW_PUBLIC(canvas_view)	XV_PUBLIC(canvas_view)


#define	BIT_FIELD(field)	unsigned field : 1


typedef void	(*Function)();

#ifdef OW_I18N
/*
 * pew (PreEdit Window) data structure, this will be hanging off on
 * the parent frame using XV_KEY_DATA.
 */
typedef struct {
    Frame	frame;
    Panel	panel;
    Panel_item	ptxt;
    int		reference_count;
    int		active_count;
} Canvas_pew;
#endif /* OW_I18N */

typedef struct {
    Canvas	public_self;	/* back pointer to public self */
    int		margin;		/* view pixwin margin */
    int		width, height;
    int		min_paint_width;
    int		min_paint_height;
    Function 	repaint_proc;
    Function 	resize_proc;
    Attr_avlist	paint_avlist; 	/* cached pw avlist on create */
    Attr_avlist	paint_end_avlist;

    struct {
	BIT_FIELD(auto_expand);		/* auto expand canvas with window */
	BIT_FIELD(auto_shrink);		/* auto shrink canvas with window */
	BIT_FIELD(fixed_image);		/* canvas is a fixed size image */
	BIT_FIELD(retained);		/* canvas is a retained window */
	BIT_FIELD(created);		/* first paint window is created */
	BIT_FIELD(x_canvas);		/* treat canvas as an X drawing surface */
	BIT_FIELD(no_clipping);		/* ignore clip rects on repaint */
	BIT_FIELD(cms_repaint);         /* generate repaint on cms changes */
#ifdef OW_I18N
	BIT_FIELD(preedit_exist);       /* keep track of preedit status */
#endif
    } status_bits;

#ifdef OW_I18N
    /*
     * pe_cache is used to cache the current preedit string for each canvas.
     * Since all canvasses in a frame share the preedit window, but
     * we show the string for the canvas that has the focus, we need to
     * cache for each canvas.
     */
    XIC		ic;			/* cache the ic */
    XIMPreeditDrawCallbackStruct *pe_cache; /* cache current preedit string */
    Canvas_pew	*pew;			/* handle to preedit window (Frame) */
    Canvas_paint_window	focus_pwin;	/* Last paint win which had a focus */
#ifdef FULL_R5
    XIMStyle	     xim_style;
#endif /*FULL_R5*/
#endif /*OW_I18N*/
} Canvas_info;

typedef struct {
    Canvas_view	public_self;	/* back pointer to public self */
    Canvas_info		*private_canvas;
    Xv_Window		paint_window;
} Canvas_view_info;


#define	status(canvas, field)		((canvas)->status_bits.field)
#define	status_set(canvas, field)	status(canvas, field) = TRUE
#define	status_reset(canvas, field)	status(canvas, field) = FALSE

Pkg_private  Attr_attribute  canvas_context_key;
Pkg_private  Attr_attribute  canvas_view_context_key;

#ifdef OW_I18N
/*
 * The following variables are declared as Attr_attribute, because
 * they are used in as keys XV_KEY_DATA for the frame.
 */
/*
 * preedit window (frame_cmd) hanging off from parent frame.
 */
Pkg_private  Attr_attribute  canvas_pew_key;
#endif /*OW_I18N*/

/* from canvas_input.c */
Pkg_private Notify_value	canvas_view_event();
Pkg_private Notify_value	canvas_paint_event();

/* from canvas_set.c */
Pkg_private Xv_opaque	canvas_set_avlist();

/* from canvas_get.c */
Pkg_private Xv_opaque	canvas_get_attr();

/* from canvas_resze.c */
Pkg_private void		canvas_resize_paint_window();

/* from canvas_scroll.c */
Pkg_private void	canvas_scroll();
Pkg_private void	canvas_set_scrollbar_object_length();
/* from canvas.c */
Pkg_private int      canvas_init();
Pkg_private int      canvas_destroy();
/*from canvas_view.c */
Pkg_private int      canvas_view_init();
Pkg_private Xv_opaque        canvas_view_get();
Pkg_private Xv_opaque        canvas_paint_get();
Pkg_private Xv_opaque        canvas_paint_set();
Pkg_private int      canvas_view_destroy();

#ifdef OW_I18N
/*
 * Warning: Accessing panel callbacks from behind.
 */
Xv_private void				 panel_preedit_display();
Xv_private XIMPreeditDrawCallbackStruct	*panel_get_preedit();
Xv_private void				 panel_set_preeedit();
Xv_private				 panel_text_start();
Xv_private				 panel_text_done();

/*
 * XIM Preedit callback routines.
 */
Pkg_private void			 canvas_preedit_start();
Pkg_private void			 canvas_preedit_draw();
Pkg_private void			 canvas_preedit_done();

/*
 * Support routines for the pew (PreEdit display Window).
 */
EXTERN_FUNCTION (Pkg_private Canvas_pew *canvas_create_pew, (Frame frame));
EXTERN_FUNCTION (Pkg_private Notify_value canvas_pew_destory,
			(Notify_client client,	Destroy_status status));
EXTERN_FUNCTION (Pkg_private Notify_value canvas_pew_event_proc,
			(Window parent_win, Event *event,
			 Notify_arg arg, Notify_event_type type));
#endif /* OW_I18N */