Commit Graph

1592 Commits

Author SHA1 Message Date
Bryan Schumaker
7b48c3311d ocarina: Rename gui/ to ocarina/
I think ocarina/ is a better name for this directory, and now that I've
named the executable "ocarina.bin" I can do this again.  I also added
functions for creating a page footer with the basic controls.
2011-09-07 08:12:02 -04:00
Bryan Schumaker
a097e751b2 ocarina: Remove custom icon size from button constructor
All buttons are the same size, so there is no point in requesting the
size for each button.
2011-09-06 07:57:06 -04:00
Bryan Schumaker
39a8f861c7 ocarina: Added a fast-forward button
Clicking it advances the song by 5 seconds
2011-09-03 23:15:30 -04:00
Bryan Schumaker
c2c3a1eea9 ocarina: Added a rewind button
Pressing the rewind button rewinds the song by 5 seconds.
2011-09-03 23:06:13 -04:00
Bryan Schumaker
ded2c559af libsaria: Fix up the audio seek() function
It now seeks forward or backward through a song by dt seconds.
2011-09-03 23:03:31 -04:00
Bryan Schumaker
77a7f84110 libsaria: Created a seek_to() function
This function will seek to an absolute percentage of a song, rather than
by some displaced amount.
2011-09-03 22:32:12 -04:00
Bryan Schumaker
4b3b1babbc libsaria: Add progress file
This will include code for seeking and getting the current position in
the song.  Right now I just have a function for resetting the position
to the beginning of the song.
2011-09-03 21:55:42 -04:00
Bryan Schumaker
937fbc1111 Move volume helper functions
I moved these to a volume.h file to keep them separate from controls.
2011-09-03 21:31:21 -04:00
Bryan Schumaker
e10a8e97f4 libsaria: Create convenience functions for libsaria
Now I won't have to keep using libsaria_get() to access parts of
libsaria.  This should also cut down on the number of things that need
to be recompiled when libsaria is changed...
2011-09-03 21:07:52 -04:00
Bryan Schumaker
ceddd240ca libsaria: Added a get_volume() function
I use this function to get the current volume levels.  I added and extra
variable to the Audio class to track what the current volume is.
2011-09-03 10:24:34 -04:00
Bryan Schumaker
5a8cafa4d8 libsaria: Add a VOLUME callback
This will be triggered whenever the volume changes through the libsaria
class.
2011-09-03 10:08:54 -04:00
Bryan Schumaker
f354a305ae libsaria: Change volume function
I introduced a function for directly setting the new volume level.  It
does not allow changing by some value.
2011-09-03 09:49:09 -04:00
Bryan Schumaker
cfc86bd891 Added callback.h
This should have been added a long time ago, but my include/ocarina
directory was being ignored by git...
2011-09-03 09:14:03 -04:00
Bryan Schumaker
6137ec8a83 ocarina: Added volume button
This button will eventually be used to control the libsaria volume.  It
doesn't do anything useful yet.
2011-09-02 08:26:44 -04:00
Bryan Schumaker
f6ac48219e ocarina: Move pause button code
I moved it from the generic button.cpp file to the controls.cpp file to
keep everything together.  I also changed the button list to use the new
show / hide functions.
2011-08-31 08:26:40 -04:00
Bryan Schumaker
bd907ecfe0 ocarina: Remove show_play_buttons() and hide_play_buttons()
I replaced these functions with a generic show_button_list() and
hide_button_list() functions.
2011-08-31 08:20:45 -04:00
Bryan Schumaker
8234e4072b ocarina: Move play button to new file
I moved all the button code into a new subdirectory.  From there, I
moved the play button code into a file named controls.cpp.  This should
help clean up button code.
2011-08-30 08:26:23 -04:00
Bryan Schumaker
7e9b2f9380 Switch from make to scons
Scons will track changes to my include/ directory better than make will.
I also have an easier time understanding the Sconstruct file than I did
with Makefiles.
2011-08-28 11:10:58 -04:00
Bryan Schumaker
ac03eed3f5 ocarina: Show and hide play and pause buttons
I hide the play button when music is playing and show it when music has
been stopped.  I hide the pause button when music is not playing and
show it when music has been stopped.  This can give the effect of one
button replacing the other.
2011-08-27 13:38:01 -04:00
Bryan Schumaker
31c777dc8a libsaria: Remove old function declarations
I replaced these functions with a self-contained class.  I don't need to
keep these around anymore.
2011-08-27 12:43:49 -04:00
Bryan Schumaker
feaa34b8db libsaria: Remove audio check_state() function
It was empty because I decided to go along a different route.
2011-08-27 12:40:10 -04:00
Bryan Schumaker
2888e741e8 libsaria: Added callback framework
I have created generic functions for registering and triggering
callbacks.  New callbacks can be added by creating a new constant in the
callback_t enum.
2011-08-27 12:34:19 -04:00
Bryan Schumaker
5dea1ae42a libsaria: Audio return values when changing state
play() and pause() now return true or false base on if the state change
request succeeds or fails.  This can be used later to determine if a
callback should be triggered.
2011-08-27 12:32:06 -04:00
Bryan Schumaker
1831046685 libsaria: Created a load() function
Calling this function will load a song.
2011-08-23 08:28:35 -04:00
Bryan Schumaker
20756aac14 Created an open button
Clicking the button will open a file chooser to select a file to play.
2011-08-23 08:26:23 -04:00
Bryan Schumaker
7d3769a1a2 ocarina: Clean up button code
I didn't like using macros...
2011-08-23 07:53:25 -04:00
Bryan Schumaker
b23d912f64 ocarina: Added a stop button
This calls the Libsaria stop function
2011-08-22 08:29:23 -04:00
Bryan Schumaker
6e47ec49df libsaria: Added a stop function
I stop playback, and seek to the beginning.  I do this as to different
function calls in the Libsaria class so callbacks will still trigger
(once they have been implemented).
2011-08-22 08:27:34 -04:00
Bryan Schumaker
3e2f374bf8 libsaria: created Audio() class
This class will be used to control gstreamer functions.  So far, it can
load a song, play, and pause.
2011-08-21 19:24:33 -04:00
Bryan Schumaker
ec2c848a90 Libsaria class can play and pause music
Eventually the class will contain an audio instance, so there won't be a
global play or pause function anymore.
2011-08-21 18:10:18 -04:00
Bryan Schumaker
dd5ad9e87d Began Libsaria() class
This class will act as an interface for the Ocarina front-end.
2011-08-21 15:45:15 -04:00
Bryan Schumaker
bf3d41f8d2 Set window icon
Just to my basic ocarina image for now.
2011-08-21 15:19:56 -04:00
Bryan Schumaker
b802b31d42 Set window title
I set the title based on the current version, but I do this through a
function to make it easier to change later.
2011-08-21 15:15:40 -04:00
Bryan Schumaker
ae5b3a358e Play and pause buttons work
They play and pause music...
2011-08-20 12:12:53 -04:00
Bryan Schumaker
8c49544efd Created helper for connecting signals
This should make connecting signals easier, since I don't need to use
any conversion macros.
2011-08-20 11:47:26 -04:00
Bryan Schumaker
1413a31aa7 Create wrapper function for gtk_container_add()
I don't want to have to keep typing out the conversion macros, so this
function puts them all in one place.
2011-08-20 11:36:29 -04:00
Bryan Schumaker
d75227b6af Added a wrapper function for gtk_box_pack_start()
This will call the conversion macros for packing items into a box.
2011-08-20 11:32:20 -04:00
Bryan Schumaker
467cedf828 Added a pause button
I just put in next to the play button for now.
2011-08-20 11:17:01 -04:00
Bryan Schumaker
0f5303503c Improve play button creation
I made a function to create a play button.  I suspect that
pre-configured buttons will be easier to use than having to build them
up every time.
2011-08-20 11:08:42 -04:00
Bryan Schumaker
7efcfddcde Add a button to the window
The button doesn't do anything yet, but I may eventually modify it for
playing and pausing music.
2011-08-18 08:20:56 -04:00
Bryan Schumaker
53d8718053 Open a window and play a song
I start ocarina with a file.  I play the song right away, and open a
window so that gtk_main() can quit when closed.
2011-08-15 07:53:25 -04:00
Bryan Schumaker
c0ace6fed6 Basic initializiation code
I print some messages to the screen and I have a makefile to compile
libsaria and gui code.
2011-08-14 11:35:37 -04:00