diff options
Diffstat (limited to 'src/osd/osdepend.h')
-rw-r--r-- | src/osd/osdepend.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/osd/osdepend.h b/src/osd/osdepend.h index 3e5b7d91e8f..b6ab45003e1 100644 --- a/src/osd/osdepend.h +++ b/src/osd/osdepend.h @@ -10,14 +10,18 @@ #pragma once -#ifndef __OSDEPEND_H__ -#define __OSDEPEND_H__ +#ifndef MAME_OSD_OSDEPEND_H +#define MAME_OSD_OSDEPEND_H #include "emucore.h" #include "osdcore.h" #include "unicode.h" #include "cliopts.h" +#include <memory> +#include <string> +#include <vector> + // forward references class input_type_entry; // FIXME: including emu.h does not work because emu.h includes osdepend.h @@ -32,11 +36,22 @@ class input_type_entry; // FIXME: including emu.h does not work because emu. class osd_font { public: - virtual ~osd_font() {} + typedef std::unique_ptr<osd_font> ptr; + + virtual ~osd_font() { } - virtual bool open(const char *font_path, const char *name, int &height) = 0; + /** attempt to "open" a handle to the font with the given name */ + virtual bool open(std::string const &font_path, std::string const &name, int &height) = 0; + + /** release resources associated with a given OSD font */ virtual void close() = 0; - virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) = 0; + + /*! + * allocate and populate a BITMAP_FORMAT_ARGB32 bitmap containing + * the pixel values rgb_t(0xff,0xff,0xff,0xff) or + * rgb_t(0x00,0xff,0xff,0xff) for each pixel of a black & white font + */ + virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) = 0; }; // ======================> osd_interface @@ -68,7 +83,8 @@ public: virtual slider_state *get_slider_list() = 0; // font interface - virtual osd_font *font_alloc() = 0; + virtual osd_font::ptr font_alloc() = 0; + virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) = 0; // command option overrides virtual bool execute_command(const char *command) = 0; @@ -80,4 +96,4 @@ protected: virtual ~osd_interface() { } }; -#endif /* __OSDEPEND_H__ */ +#endif // MAME_OSD_OSDEPEND_H |