laf icon indicating copy to clipboard operation
laf copied to clipboard

Prepare API for the first release

Open dacap opened this issue 5 years ago • 1 comments

Some changes that must be done for a probable first release of the library (some of these items are implemented in an internal beta version that will be published in the near future):

  • [x] update to Skia m81
  • [x] ~~add Surface::drawText()~~ expand the current os::draw_text() function (#12) and remove freetype usage if possible, use Skia directly to draw text, SkShaper module uses harfbuzz+icu
  • [x] rename os::Display::setTitleBar() -> setTitle()
  • [x] os::Surface::bounds() -> Rect(0, 0, width, height)
  • [x] os::Display::invalidate() = os::Display->invalidateRegion(display->surface->bounds)
  • [x] what to do with os::ScopedHandle? add os::DisplayHandle and os::SurfaceHandle aliases? or use move semantic and pimpl idiom?
  • [x] rename os::Display -> os::Window?
  • [x] add API to get main monitor/screen, list of monitors/screen, bounds of each monitor, etc.
  • [x] create an example that can create 4 windows in a 2x2 grid of windows on each monitor
  • [x] add a new kind of coordinate/position for os::Display that is bounds + monitor/screen
  • [x] ~~getEvent() -> replace bool arg with an enum { WaitForEvents, DontWait }~~ we've replaced the parameter with a timeout
  • [x] enable GPU support again and create a simple OpenGL example
  • [x] create an example about complex text layout / new text API
  • [ ] merge all os::Surface::drawSurface()/blitTo() in one member function with a os::Paint argument
  • [ ] decide if constants should have k prefix (e.g. os::Event::ResizeDisplay vs os::kArrowCursor; or os::Key::Esc instead of os::kKeyEsc) / Check web KeyboardEvent codes as a reference / #50
  • [ ] create test about color spaces
  • [ ] prepare API documentation / tutorial
  • [ ] ...

dacap avatar Jul 20 '19 15:07 dacap

I'm not 100% sure if we should use uppercase or lowercase in the initial letter of static member functions, e.g.

  • class System { ... static System* instance(); ... } or
  • class System { ... static System* Instance(); ... }

dacap avatar Mar 20 '24 12:03 dacap