BPoint (x3, y3));
}
-void
-BView_SetHighColorForVisibleBell (void *view, uint32_t color)
-{
- BView *vw = (BView *) view;
- rgb_color col;
- rgb32_to_rgb_color (color, &col);
-
- vw->SetHighColor (col);
-}
-
void
BView_InvertRect (void *view, int x, int y, int width, int height)
{
}
void
-BFont_dat (void *font, int *px_size, int *min_width, int *max_width,
- int *avg_width, int *height, int *space_width, int *ascent,
- int *descent, int *underline_position, int *underline_thickness)
+BFont_metrics (void *font, int *px_size, int *min_width, int *max_width,
+ int *avg_width, int *height, int *space_width, int *ascent,
+ int *descent, int *underline_position, int *underline_thickness)
{
BFont *ft = (BFont *) font;
struct font_height fheight;
menu->PushState ();
menu->SetFont (be_bold_font);
- BView_SetHighColorForVisibleBell (menu, 0);
+ menu->SetHighColor (ui_color (B_CONTROL_TEXT_COLOR));
BMenuItem::DrawContent ();
menu->PopState ();
}
char dummy;
};
-#define HAIKU_MODIFIER_ALT (1)
-#define HAIKU_MODIFIER_CTRL (1 << 1)
-#define HAIKU_MODIFIER_SHIFT (1 << 2)
-#define HAIKU_MODIFIER_SUPER (1 << 3)
+enum haiku_modifier_specification
+ {
+ HAIKU_MODIFIER_ALT = 1,
+ HAIKU_MODIFIER_CTRL = (1 << 1),
+ HAIKU_MODIFIER_SHIFT = (1 << 2),
+ HAIKU_MODIFIER_SUPER = (1 << 3),
+ };
struct haiku_key_event
{
extern void BWindow_Flush (void *);
extern void BFont_close (void *);
-extern void BFont_dat (void *, int *, int *, int *, int *,
- int *, int *, int *, int *, int *, int *);
+extern void BFont_metrics (void *, int *, int *, int *, int *,
+ int *, int *, int *, int *, int *, int *);
extern int BFont_have_char_p (void *, int32_t);
extern int BFont_have_char_block (void *, int32_t, int32_t);
extern void BFont_char_bounds (void *, const char *, int *, int *, int *);
int *, int32_t);
extern struct haiku_font_pattern *BFont_find (struct haiku_font_pattern *);
-
extern void BView_StartClip (void *);
extern void BView_EndClip (void *);
extern void BView_SetHighColor (void *, uint32_t);
-extern void BView_SetHighColorForVisibleBell (void *, uint32_t);
extern void BView_SetLowColor (void *, uint32_t);
extern void BView_SetPenSize (void *, int);
extern void BView_SetFont (void *, void *);
extern bool be_replay_menu_bar_event (void *, struct haiku_menu_bar_click_event *);
#ifdef __cplusplus
-extern void *find_appropriate_view_for_draw (void *);
}
extern _Noreturn void gui_abort (const char *);
+extern void *find_appropriate_view_for_draw (void *);
#endif /* _cplusplus */
#endif /* _HAIKU_SUPPORT_H_ */
avg_width, height, space_width, ascent,
descent, underline_pos, underline_thickness;
- BFont_dat (be_font, &px_size, &min_width,
- &max_width, &avg_width, &height,
- &space_width, &ascent, &descent,
- &underline_pos, &underline_thickness);
+ BFont_metrics (be_font, &px_size, &min_width,
+ &max_width, &avg_width, &height,
+ &space_width, &ascent, &descent,
+ &underline_pos, &underline_thickness);
font->pixel_size = px_size;
font->min_width = min_width;
static void
haikufont_close (struct font *font)
{
+ struct haikufont_info *info = (struct haikufont_info *) font;
+ int i;
+
if (font_data_structures_may_be_ill_formed ())
return;
- struct haikufont_info *info = (struct haikufont_info *) font;
block_input ();
if (info && info->be_font)
BFont_close (info->be_font);
- for (int i = 0; i < info->metrics_nrows; i++)
- if (info->metrics[i])
- xfree (info->metrics[i]);
+ for (i = 0; i < info->metrics_nrows; i++)
+ {
+ if (info->metrics[i])
+ xfree (info->metrics[i]);
+ }
+
if (info->metrics)
xfree (info->metrics);
- for (int i = 0; i < 0x100; ++i)
- if (info->glyphs[i])
- xfree (info->glyphs[i]);
+
+ for (i = 0; i < 0x100; ++i)
+ {
+ if (info->glyphs[i])
+ xfree (info->glyphs[i]);
+ }
+
xfree (info->glyphs);
unblock_input ();
}