geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gb.c File Reference
#include "utils.h"
#include <gtk/gtk.h>
Include dependency graph for gb.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GeanyPong
 
struct  _GeanyPongClass
 

Macros

#define AREA_SIZE   300
 
#define BALL_SIZE   4
 
#define BORDER_THIKNESS   4
 
#define HANDLE_THIKNESS   4
 
#define HANDLE_SHRINK   3
 
#define GEANY_TYPE_PONG   (geany_pong_get_type())
 
#define GEANY_PONG(o)   (G_TYPE_CHECK_INSTANCE_CAST((o), GEANY_TYPE_PONG, GeanyPong))
 
#define GEANY_IS_PONG(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), GEANY_TYPE_PONG))
 

Typedefs

typedef struct _GeanyPong GeanyPong
 
typedef struct _GeanyPongClass GeanyPongClass
 

Functions

static void geany_pong_finalize (GObject *obj)
 
static void geany_pong_response (GtkDialog *self, gint response)
 
static GType geany_pong_get_type (void)
 
static gboolean geany_pong_area_draw (GtkWidget *area, cairo_t *cr, GeanyPong *self)
 
static void geany_pong_reset_ball (GeanyPong *self)
 
static void geany_pong_update_score (GeanyPong *self)
 
static gboolean geany_pong_area_timeout (gpointer data)
 
static gboolean geany_pong_area_button_press (GtkWidget *area, GdkEventButton *event, GeanyPong *self)
 
static gboolean geany_pong_area_motion_notify (GtkWidget *area, GdkEventMotion *event, GeanyPong *self)
 
static void geany_pong_class_init (GeanyPongClass *klass)
 
static void geany_pong_init (GeanyPong *self)
 
static void geany_pong_help (GeanyPong *self)
 
static GtkWidget * geany_pong_new (GtkWindow *parent)
 
static gboolean gb_on_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 

Macro Definition Documentation

◆ AREA_SIZE

#define AREA_SIZE   300

Definition at line 30 of file gb.c.

◆ BALL_SIZE

#define BALL_SIZE   4

Definition at line 31 of file gb.c.

◆ BORDER_THIKNESS

#define BORDER_THIKNESS   4

Definition at line 32 of file gb.c.

◆ GEANY_IS_PONG

#define GEANY_IS_PONG (   o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GEANY_TYPE_PONG))

Definition at line 39 of file gb.c.

◆ GEANY_PONG

#define GEANY_PONG (   o)    (G_TYPE_CHECK_INSTANCE_CAST((o), GEANY_TYPE_PONG, GeanyPong))

Definition at line 38 of file gb.c.

◆ GEANY_TYPE_PONG

#define GEANY_TYPE_PONG   (geany_pong_get_type())

Definition at line 37 of file gb.c.

◆ HANDLE_SHRINK

#define HANDLE_SHRINK   3

Definition at line 34 of file gb.c.

◆ HANDLE_THIKNESS

#define HANDLE_THIKNESS   4

Definition at line 33 of file gb.c.

Typedef Documentation

◆ GeanyPong

typedef struct _GeanyPong GeanyPong

Definition at line 42 of file gb.c.

◆ GeanyPongClass

Definition at line 43 of file gb.c.

Function Documentation

◆ gb_on_key_pressed()

static gboolean gb_on_key_pressed ( GtkWidget *  widget,
GdkEventKey *  event,
gpointer  user_data 
)
static

Definition at line 436 of file gb.c.

References geany_pong_new(), if(), text, and utils_str_equal().

Referenced by create_dialog().

◆ geany_pong_area_button_press()

static gboolean geany_pong_area_button_press ( GtkWidget *  area,
GdkEventButton *  event,
GeanyPong self 
)
static

Definition at line 259 of file gb.c.

References geany_pong_area_timeout(), _GeanyPong::handle_width, and _GeanyPong::source_id.

Referenced by geany_pong_init().

◆ geany_pong_area_draw()

static gboolean geany_pong_area_draw ( GtkWidget *  area,
cairo_t *  cr,
GeanyPong self 
)
static

◆ geany_pong_area_motion_notify()

static gboolean geany_pong_area_motion_notify ( GtkWidget *  area,
GdkEventMotion *  event,
GeanyPong self 
)
static

◆ geany_pong_area_timeout()

◆ geany_pong_class_init()

static void geany_pong_class_init ( GeanyPongClass klass)
static

Definition at line 292 of file gb.c.

References geany_pong_finalize(), and geany_pong_response().

◆ geany_pong_finalize()

static void geany_pong_finalize ( GObject *  obj)
static

Definition at line 356 of file gb.c.

References GEANY_PONG, and _GeanyPong::source_id.

Referenced by geany_pong_class_init().

◆ geany_pong_get_type()

static GType geany_pong_get_type ( void  )
static

Definition at line 75 of file gb.c.

◆ geany_pong_help()

static void geany_pong_help ( GeanyPong self)
static

Definition at line 367 of file gb.c.

References dialog, gtk_container_add(), gtk_widget_show_all(), and NULL.

Referenced by geany_pong_response().

◆ geany_pong_init()

◆ geany_pong_new()

static GtkWidget * geany_pong_new ( GtkWindow *  parent)
static

Definition at line 430 of file gb.c.

References GEANY_TYPE_PONG, and NULL.

Referenced by gb_on_key_pressed().

◆ geany_pong_reset_ball()

static void geany_pong_reset_ball ( GeanyPong self)
static

◆ geany_pong_response()

static void geany_pong_response ( GtkDialog *  self,
gint  response 
)
static

Definition at line 414 of file gb.c.

References GEANY_IS_PONG, GEANY_PONG, and geany_pong_help().

Referenced by geany_pong_class_init().

◆ geany_pong_update_score()

static void geany_pong_update_score ( GeanyPong self)
static

Definition at line 171 of file gb.c.

References _GeanyPong::score, and _GeanyPong::score_label.

Referenced by geany_pong_area_timeout().