/* If n[FOO].width is 0, it means to not draw at all, so set the
clipping to some impossible value. */
if (r[0].width <= 0)
- BView_ClipToRect (FRAME_HAIKU_VIEW (s->f),
+ BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f),
FRAME_PIXEL_WIDTH (s->f),
FRAME_PIXEL_HEIGHT (s->f),
10, 10);
else
{
- BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), r[0].x,
+ BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), r[0].x,
r[0].y, r[0].width, r[0].height);
- BView_invalidate_region (FRAME_HAIKU_VIEW (s->f), r[0].x,
+ BView_invalidate_region (FRAME_HAIKU_DRAWABLE (s->f), r[0].x,
r[0].y, r[0].width, r[0].height);
}
}
/* If n[FOO].width is 0, it means to not draw at all, so set the
clipping to some impossible value. */
if (r[1].width <= 0)
- BView_ClipToRect (FRAME_HAIKU_VIEW (s->f),
+ BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f),
FRAME_PIXEL_WIDTH (s->f),
FRAME_PIXEL_HEIGHT (s->f),
10, 10);
else
{
- BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), r[1].x, r[1].y,
+ BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), r[1].x, r[1].y,
r[1].width, r[1].height);
- BView_invalidate_region (FRAME_HAIKU_VIEW (s->f), r[1].x,
+ BView_invalidate_region (FRAME_HAIKU_DRAWABLE (s->f), r[1].x,
r[1].y, r[1].width, r[1].height);
}
}
static void
haiku_clip_to_string_exactly (struct glyph_string *s, struct glyph_string *dst)
{
- BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), s->x, s->y,
+ BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), s->x, s->y,
s->width, s->height);
- BView_invalidate_region (FRAME_HAIKU_VIEW (s->f), s->x,
+ BView_invalidate_region (FRAME_HAIKU_DRAWABLE (s->f), s->x,
s->y, s->width, s->height);
}
haiku_clear_frame_area (struct frame *f, int x, int y,
int width, int height)
{
- void *vw = FRAME_HAIKU_VIEW (f);
+ void *vw = FRAME_HAIKU_DRAWABLE (f);
block_input ();
BView_draw_lock (vw, true, x, y, width, height);
BView_StartClip (vw);
static void
haiku_clear_frame (struct frame *f)
{
- void *view = FRAME_HAIKU_VIEW (f);
+ void *view = FRAME_HAIKU_DRAWABLE (f);
mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
int right_x, int bottom_y, int hwidth, int vwidth,
bool left_p, bool right_p, struct haiku_rect *clip_rect)
{
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
struct face *face = s->face;
BView_SetHighColor (view, face->box_color);
uint32_t color_white, color_black;
void *view;
- view = FRAME_HAIKU_VIEW (s->f);
+ view = FRAME_HAIKU_DRAWABLE (s->f);
haiku_calculate_relief_colors (s, &color_white, &color_black);
BView_SetHighColor (view, raised_p ? color_white : color_black);
dy = wave_height - 1;
y = s->ybase - wave_height + 3;
xmax = x + width;
- view = FRAME_HAIKU_VIEW (s->f);
+ view = FRAME_HAIKU_DRAWABLE (s->f);
BView_StartClip (view);
haiku_clip_to_string (s);
if (s->hl == DRAW_CURSOR)
haiku_merge_cursor_foreground (s, &cursor_color, NULL);
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
if (face->underline)
{
haiku_draw_plain_background (struct glyph_string *s, struct face *face,
int x, int y, int width, int height)
{
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
unsigned long cursor_color;
if (s->hl == DRAW_CURSOR)
unsigned long foreground, background;
void *view;
- view = FRAME_HAIKU_VIEW (s->f);
+ view = FRAME_HAIKU_DRAWABLE (s->f);
rec = haiku_get_bitmap_rec (s->f, s->face->stipple);
if (explicit_colors_p)
else
x = s->x;
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
if (s->font_not_found_p)
{
else
color = s->face->foreground;
- BView_SetHighColor (FRAME_HAIKU_VIEW (s->f), color);
- BView_SetPenSize (FRAME_HAIKU_VIEW (s->f), 1);
- BView_StrokeRectangle (FRAME_HAIKU_VIEW (s->f),
+ BView_SetHighColor (FRAME_HAIKU_DRAWABLE (s->f), color);
+ BView_SetPenSize (FRAME_HAIKU_DRAWABLE (s->f), 1);
+ BView_StrokeRectangle (FRAME_HAIKU_DRAWABLE (s->f),
x, s->ybase - glyph->ascent,
glyph->pixel_width,
glyph->ascent + glyph->descent);
if (s->row->reversed_p)
x -= width;
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
unsigned long cursor_color;
haiku_merge_cursor_foreground (s, NULL, &cursor_color);
static void
haiku_start_clip (struct glyph_string *s)
{
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
BView_StartClip (view);
}
static void
haiku_end_clip (struct glyph_string *s)
{
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
BView_EndClip (view);
}
width = window_width;
height = row->visible_height;
- BView_ClipToRect (FRAME_HAIKU_VIEW (f), x, y, width, height);
+ BView_ClipToRect (FRAME_HAIKU_DRAWABLE (f), x, y, width, height);
}
static void
{
int i, j, x;
struct font *font = s->font;
- void *view = FRAME_HAIKU_VIEW (s->f);
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);
struct face *face = s->face;
/* If first glyph of S has a left box line, start drawing the text
if (s->slice.y == 0)
y += box_line_vwidth;
- view = FRAME_HAIKU_VIEW (s->f);
+ view = FRAME_HAIKU_DRAWABLE (s->f);
bitmap = s->img->pixmap;
s->stippled_p = face->stipple != 0;
static void
haiku_draw_glyph_string (struct glyph_string *s)
{
- void *view = FRAME_HAIKU_VIEW (s->f);;
+ void *view = FRAME_HAIKU_DRAWABLE (s->f);;
struct face *face = s->face;
block_input ();
block_input ();
if (face)
{
- void *view = FRAME_HAIKU_VIEW (f);
+ void *view = FRAME_HAIKU_DRAWABLE (f);
BView_draw_lock (view, false, 0, 0, 0, 0);
BView_StartClip (view);
BView_SetHighColor (view, (face->background_defaulted_p
BView_FillRectangle (view, 0, y, width, height);
BView_FillRectangle (view, FRAME_PIXEL_WIDTH (f) - width,
y, width, height);
- BView_invalidate_region (FRAME_HAIKU_VIEW (f),
+ BView_invalidate_region (FRAME_HAIKU_DRAWABLE (f),
0, y, width, height);
BView_invalidate_region (view, FRAME_PIXEL_WIDTH (f) - width,
y, width, height);
void *view;
f = XFRAME (WINDOW_FRAME (w));
- view = FRAME_HAIKU_VIEW (f);
+ view = FRAME_HAIKU_DRAWABLE (f);
/* Get the glyph the cursor is on. If we can't tell because
the current matrix is invalid or such, give up. */
}
else
{
- view = FRAME_HAIKU_VIEW (f);
+ view = FRAME_HAIKU_DRAWABLE (f);
face = FACE_FROM_ID (f, cursor_glyph->face_id);
/* If the glyph's background equals the color we normally draw
struct face *face;
face = FACE_FROM_ID_OR_NULL (f, VERTICAL_BORDER_FACE_ID);
- void *view = FRAME_HAIKU_VIEW (f);
+ void *view = FRAME_HAIKU_DRAWABLE (f);
BView_draw_lock (view, true, x, y_0, 1, y_1);
BView_StartClip (view);
if (face)
unsigned long color_last = (face_last
? face_last->foreground
: FRAME_FOREGROUND_PIXEL (f));
- void *view = FRAME_HAIKU_VIEW (f);
+ void *view = FRAME_HAIKU_DRAWABLE (f);
BView_draw_lock (view, true, x0, y0, x1 - x0 + 1, y1 - y0 + 1);
BView_StartClip (view);
void *view;
f = XFRAME (WINDOW_FRAME (w));
- view = FRAME_HAIKU_VIEW (f);
+ view = FRAME_HAIKU_DRAWABLE (f);
block_input ();
bar = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, prev, PVEC_OTHER);
width = window_width;
top = WINDOW_SCROLL_BAR_AREA_Y (w);
height = WINDOW_CONFIG_SCROLL_BAR_HEIGHT (w);
- view = FRAME_HAIKU_VIEW (WINDOW_XFRAME (w));
+ view = FRAME_HAIKU_DRAWABLE (WINDOW_XFRAME (w));
block_input ();
left = WINDOW_SCROLL_BAR_AREA_X (w);
width = WINDOW_SCROLL_BAR_AREA_WIDTH (w);
- view = FRAME_HAIKU_VIEW (WINDOW_XFRAME (w));
+ view = FRAME_HAIKU_DRAWABLE (WINDOW_XFRAME (w));
block_input ();
if (NILP (w->vertical_scroll_bar))
uint32 col;
f = XFRAME (WINDOW_FRAME (w));
- view = FRAME_HAIKU_VIEW (f);
+ view = FRAME_HAIKU_DRAWABLE (f);
face = p->face;
block_input ();
haiku_scroll_run (struct window *w, struct run *run)
{
struct frame *f = XFRAME (w->frame);
- void *view = FRAME_HAIKU_VIEW (f);
+ void *view = FRAME_HAIKU_DRAWABLE (f);
int x, y, width, height, from_y, to_y, bottom_y;
window_box (w, ANY_AREA, &x, &y, &width, &height);
continue;
}
- BView_draw_lock (FRAME_HAIKU_VIEW (f), false, 0, 0, 0, 0);
- BView_resize_to (FRAME_HAIKU_VIEW (f), width, height);
- BView_draw_unlock (FRAME_HAIKU_VIEW (f));
+ BView_draw_lock (FRAME_HAIKU_DRAWABLE (f), false, 0, 0, 0, 0);
+ BView_resize_to (FRAME_HAIKU_DRAWABLE (f), width, height);
+ BView_draw_unlock (FRAME_HAIKU_DRAWABLE (f));
if (width != FRAME_PIXEL_WIDTH (f)
|| height != FRAME_PIXEL_HEIGHT (f)
int flash_left = FRAME_INTERNAL_BORDER_WIDTH (f);
int flash_right = FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f);
int width = flash_right - flash_left;
- void *view = FRAME_HAIKU_VIEW (f);
+ void *view = FRAME_HAIKU_DRAWABLE (f);
object_wait_info info;
bigtime_t wakeup;
? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID)
: INTERNAL_BORDER_FACE_ID));
struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
- void *view = FRAME_HAIKU_VIEW (f);
+ void *view = FRAME_HAIKU_DRAWABLE (f);
block_input ();
BView_draw_lock (view, true, 0, 0, FRAME_PIXEL_WIDTH (f),
struct frame *f;
f = WINDOW_XFRAME (XWINDOW (bar->window));
- view = FRAME_HAIKU_VIEW (f);
+ view = FRAME_HAIKU_DRAWABLE (f);
block_input ();
BView_forget_scroll_bar (view, bar->left, bar->top,