Back to index

gcompris  8.2.2
Enumerations | Functions
score.h File Reference
#include "gcompris.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ScoreStyleList { SCORESTYLE_NOTE, SCORESTYLE_LIFE }

Functions

void gc_score_start (ScoreStyleList style, guint x, guint y, guint max)
void gc_score_end ()
void gc_score_set (guint value)

Enumeration Type Documentation

Enumerator:
SCORESTYLE_NOTE 
SCORESTYLE_LIFE 

Definition at line 27 of file score.h.


Function Documentation

void gc_score_end ( )

Definition at line 72 of file score.c.

{
  if(boardRootItem!=NULL)
    gtk_object_destroy (GTK_OBJECT(boardRootItem));
  
  boardRootItem=NULL;
}

Here is the caller graph for this function:

void gc_score_set ( guint  value)

Definition at line 81 of file score.c.

{

  if(boardRootItem!=NULL)
    gtk_object_destroy (GTK_OBJECT(boardRootItem));

  boardRootItem = GNOME_CANVAS_GROUP(
                                 gnome_canvas_item_new (
                                                     gnome_canvas_root(gc_board_get_current()->canvas),
                                                     gnome_canvas_group_get_type (),
                                                     "x", (double) x,
                                                     "y", (double) y,
                                                     NULL));

  switch(currentStyle) {
  case SCORESTYLE_NOTE :
    {
      gchar *tmp;
      GdkPixbuf *button_pixmap = NULL;

      button_pixmap = gc_skin_pixmap_load("button_large.png");
      gnome_canvas_item_new (boardRootItem,
                          gnome_canvas_pixbuf_get_type (),
                          "pixbuf",  button_pixmap,
                          "x",  (double) 0,
                          "y",  (double) -gdk_pixbuf_get_height(button_pixmap)/2,
                          NULL);
      gdk_pixbuf_unref(button_pixmap);

      tmp = g_strdup_printf("%d/%d", value, max);
      display_number(boardRootItem, gdk_pixbuf_get_width(button_pixmap)+10, 0, tmp);
      g_free(tmp);
    }
    break;
  default:
    break;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gc_score_start ( ScoreStyleList  style,
guint  x,
guint  y,
guint  max 
)

Definition at line 53 of file score.c.

{

  currentStyle = style;
  x = gx;
  y = gy;
  max = gmax;


  switch(currentStyle) {
  case SCORESTYLE_NOTE :
    break;
  default:
    break;
  }
}

Here is the caller graph for this function: