#ifndef _DPSScrolledWindowP_H
#define _DPSScrolledWindowP_H
#include <DPS/DPSScrollW.h>
typedef enum {DSWStart, DSWDrawingVisible, DSWDrewVisible,
DSWDrawingBackground, DSWDone} DSWDrawingStage;
typedef struct {
DPSContext context;
int area_width;
int area_height;
float scale;
float *ctm_ptr;
float *inv_ctm_ptr;
Pixmap backing_pixmap;
Pixmap feedback_pixmap;
DPSGState window_gstate;
DPSGState backing_gstate;
DPSGState feedback_gstate;
float *dirty_areas;
short num_dirty_areas;
int pixmap_limit;
int absolute_pixmap_limit;
int watch_progress_delay;
Boolean use_backing_pixmap;
Boolean use_feedback_pixmap;
Boolean watch_progress;
Boolean minimal_drawing;
Boolean document_size_pixmaps;
Boolean application_scrolling;
XtCallbackList setup_callback;
XtCallbackList expose_callback;
XtCallbackList background_callback;
XtCallbackList feedback_callback;
XtCallbackList resize_callback;
Widget scrolled_window;
Widget h_scroll;
Widget v_scroll;
Widget drawing_area;
float ctm[6];
float orig_inv_ctm[6];
float inv_ctm[6];
int x_offset, y_offset;
int feedback_width, feedback_height;
float drawing_width, drawing_height;
int unscaled_width, unscaled_height;
int pixmap_width, pixmap_height;
float scroll_pic_x, scroll_pic_y;
int scroll_win_x, scroll_win_y;
int scroll_x, scroll_y;
int scroll_h_value, scroll_v_value;
int scroll_h_size, scroll_v_size;
int scroll_h_max, scroll_v_max;
int origin_x, origin_y;
int *pending_expose;
short num_pending_expose;
short pending_expose_size;
float *pending_dirty;
short num_pending_dirty;
short pending_dirty_size;
float *current_drawing;
short num_current_drawing;
short current_drawing_size;
short dirty_areas_size;
float *prev_dirty_areas;
short prev_dirty_areas_size;
short num_prev_dirty_areas;
float *scratch;
short num_scratch;
short scratch_size;
GC ge_gc;
GC no_ge_gc;
XtWorkProcId work;
XtPointer start_feedback_data;
XtPointer continue_feedback_data;
DSWDrawingStage drawing_stage;
Boolean use_saved_scroll;
Boolean context_inited;
Boolean doing_feedback;
Boolean feedback_displayed;
Boolean big_pixmap;
Boolean scrolling;
} DPSScrolledWindowPart;
typedef struct _DPSScrolledWindowRec {
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
DPSScrolledWindowPart sw;
} DPSScrolledWindowRec;
#if defined(__cplusplus) || defined(c_plusplus)
typedef "C" {
#endif
typedef void (*DSWSetScaleProc) (Widget w, double scale,
long fixedX, long fixedY);
typedef void (*DSWScrollPointProc) (Widget w, double psX, double psY,
long xX, long xY);
typedef void (*DSWScrollByProc) (Widget w, long dx, long dy);
typedef void (*DSWScrollToProc) (Widget w, long x, long y);
typedef void (*DSWSetScaleAndScrollProc) (Widget w, double scale,
double psX, double psY,
long xX, long xY);
typedef void (*DSWConvertXToPSProc) (Widget w, long xX, long xY,
float *psX, float *psY);
typedef void (*DSWConvertPSToXProc) (Widget w, double psX, double psY,
int *xX, int *xY);
typedef void (*DSWAddToDirtyAreaProc) (Widget w, float *rect, long n);
typedef Boolean (*DSWTakeFeedbackPixmapProc) (Widget w, Pixmap *p,
int *width, int *height,
int *depth, Screen **screen);
typedef Boolean (*DSWGiveFeedbackPixmapProc) (Widget w, Pixmap p,
int width, int height,
int depth, Screen *screen);
typedef void (*DSWStartFeedbackDrawingProc) (Widget w,
XtPointer start_feedback_data);
typedef void (*DSWEndFeedbackDrawingProc) (Widget w, Bool restore_window);
typedef void (*DSWSetFeedbackDirtyAreaProc) (Widget w, float *rects, int count,
XtPointer continue_feedback_data);
typedef void (*DSWFinishPendingDrawingProc) (Widget w);
typedef void (*DSWAbortPendingDrawingProc) (Widget w);
typedef void (*DSWGetDrawingInfoProc) (Widget w, DSWDrawableType *type,
Drawable *drawable, DPSGState *gstate, DPSContext *context);
typedef void (*DSWUpdateDrawingProc) (Widget w, float *rects, int count);
typedef void (*DSWGetScrollInfoProc) (Widget w, int *h_value, int *h_size,
int *h_max, int *v_value, int *v_size,
int *v_max);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#define InheritSetScale ((DSWSetScaleProc) _XtInherit)
#define InheritScrollPoint ((DSWScrollPointProc) _XtInherit)
#define InheritScrollBy ((DSWScrollByProc) _XtInherit)
#define InheritScrollTo ((DSWScrollToProc) _XtInherit)
#define InheritSetScaleAndScroll ((DSWSetScaleAndScrollProc) _XtInherit)
#define InheritConvertXToPS ((DSWConvertXToPSProc) _XtInherit)
#define InheritConvertPSToX ((DSWConvertPSToXProc) _XtInherit)
#define InheritAddToDirtyArea ((DSWAddToDirtyAreaProc) _XtInherit)
#define InheritTakeFeedbackPixmap ((DSWTakeFeedbackPixmapProc) _XtInherit)
#define InheritGiveFeedbackPixmap ((DSWGiveFeedbackPixmapProc) _XtInherit)
#define InheritStartFeedbackDrawing ((DSWStartFeedbackDrawingProc) _XtInherit)
#define InheritEndFeedbackDrawing ((DSWEndFeedbackDrawingProc) _XtInherit)
#define InheritSetFeedbackDirtyArea ((DSWSetFeedbackDirtyAreaProc) _XtInherit)
#define InheritFinishPendingDrawing ((DSWFinishPendingDrawingProc) _XtInherit)
#define InheritAbortPendingDrawing ((DSWAbortPendingDrawingProc) _XtInherit)
#define InheritGetDrawingInfo ((DSWGetDrawingInfoProc) _XtInherit)
#define InheritUpdateDrawing ((DSWUpdateDrawingProc) _XtInherit)
#define InheritGetScrollInfo ((DSWGetScrollInfoProc) _XtInherit)
typedef struct {
DSWSetScaleProc set_scale;
DSWScrollPointProc scroll_point;
DSWScrollByProc scroll_by;
DSWScrollToProc scroll_to;
DSWSetScaleAndScrollProc set_scale_and_scroll;
DSWConvertXToPSProc convert_x_to_ps;
DSWConvertPSToXProc convert_ps_to_x;
DSWAddToDirtyAreaProc add_to_dirty_area;
DSWTakeFeedbackPixmapProc take_feedback_pixmap;
DSWGiveFeedbackPixmapProc give_feedback_pixmap;
DSWStartFeedbackDrawingProc start_feedback_drawing;
DSWEndFeedbackDrawingProc end_feedback_drawing;
DSWSetFeedbackDirtyAreaProc set_feedback_dirty_area;
DSWFinishPendingDrawingProc finish_pending_drawing;
DSWAbortPendingDrawingProc abort_pending_drawing;
DSWGetDrawingInfoProc get_drawing_info;
DSWUpdateDrawingProc update_drawing;
DSWGetScrollInfoProc get_scroll_info;
XtPointer extension;
} DPSScrolledWindowClassPart;
typedef struct _DPSScrolledWindowClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
DPSScrolledWindowClassPart sw_class;
} DPSScrolledWindowClassRec, *DPSScrolledWindowWidgetClass;
extern DPSScrolledWindowClassRec dpsScrolledWindowClassRec;
#endif