Skip to content

Instantly share code, notes, and snippets.

@naaando
Last active December 17, 2018 15:37
Show Gist options
  • Save naaando/88846627e32b34ff13d83f344a868066 to your computer and use it in GitHub Desktop.
Save naaando/88846627e32b34ff13d83f344a868066 to your computer and use it in GitHub Desktop.
Vala Facade example
public interface Pomodoro.Service : Object {
public State get_next_state ();
public int count_state (State state);
public uint count_time_per_state (State state);
public void start_next () { start (seq.next_state ()); }
public void start_work () { start (State.WORKING); }
public void start_short_break () { start (State.SHORT_BREAK); }
public void start_long_break () { start (State.LONG_BREAK); }
public virtual signal void start (State state = State.WORKING);
public void pause ();
public virtual signal void stop (bool was_canceled = false);
protected virtual Timer create_timer (State state);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment