Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveEvent and ResizeEvent #7

Open
manveru opened this issue May 26, 2010 · 0 comments
Open

ActiveEvent and ResizeEvent #7

manveru opened this issue May 26, 2010 · 0 comments

Comments

@manveru
Copy link
Contributor

manveru commented May 26, 2010

Just so I don't forget, there are a couple more, but that's what I needed right now:

// Returns ActiveEvent or nil if event has other type
func (event *Event) Active() *ActiveEvent {
  if event.Type == ACTIVEEVENT {
    return (*ActiveEvent)(cast(event))
  }

  return nil
}

// Returns ResizeEvent or nil if event has other type
func (event *Event) Resize() *ResizeEvent {
  if event.Type == VIDEORESIZE {
    return (*ResizeEvent)(cast(event))
  }

  return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant