#include "os_gfx_meta.c"


root_function B32
OS_key_press(OS_EventList *events, OS_Handle window, OS_Key key)
{
  B32 result = 0;
  for(OS_Event *e = events->first; e != 0; e = e->next)
  {
    
    if(e->kind == OS_EventKind_Press && OS_handle_match(window, e->window) && e->key == key)
      // TODO(anton): modifiers
    {
      OS_consume_event(events, e);
      result = 1;
      break;
    }
  }
  return result;
}