navit  0.5.3-trunk
graphics_null.c File Reference
#include <glib.h>
#include "config.h"
#include "item.h"
#include "point.h"
#include "graphics.h"
#include "color.h"
#include "plugin.h"
#include "event.h"
#include "debug.h"
#include "window.h"
#include "callback.h"

Data Structures

struct  graphics_priv
 
struct  graphics_font_priv
 
struct  graphics_gc_priv
 
struct  graphics_image_priv
 

Functions

static void graphics_destroy (struct graphics_priv *gr)
 
static void font_destroy (struct graphics_font_priv *font)
 
static struct graphics_font_privfont_new (struct graphics_priv *gr, struct graphics_font_methods *meth, char *font, int size, int flags)
 
static void gc_destroy (struct graphics_gc_priv *gc)
 
static void gc_set_linewidth (struct graphics_gc_priv *gc, int w)
 
static void gc_set_dashes (struct graphics_gc_priv *gc, int w, int offset, unsigned char *dash_list, int n)
 
static void gc_set_foreground (struct graphics_gc_priv *gc, struct color *c)
 
static void gc_set_background (struct graphics_gc_priv *gc, struct color *c)
 
static struct graphics_gc_privgc_new (struct graphics_priv *gr, struct graphics_gc_methods *meth)
 
static struct graphics_image_privimage_new (struct graphics_priv *gr, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation)
 
static void draw_lines (struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
 
static void draw_polygon (struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
 
static void draw_rectangle (struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int w, int h)
 
static void draw_circle (struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int r)
 
static void draw_text (struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy)
 
static void draw_image (struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img)
 
static void draw_drag (struct graphics_priv *gr, struct point *p)
 
static void background_gc (struct graphics_priv *gr, struct graphics_gc_priv *gc)
 
static void draw_mode (struct graphics_priv *gr, enum draw_mode_num mode)
 
static struct graphics_privoverlay_new (struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound)
 
static void resize_callback (int w, int h)
 
static int graphics_null_fullscreen (struct window *w, int on)
 
static void graphics_null_disable_suspend (struct window *w)
 
static void * get_data (struct graphics_priv *this, char const *type)
 
static void image_free (struct graphics_priv *gr, struct graphics_image_priv *priv)
 
static void get_text_bbox (struct graphics_priv *gr, struct graphics_font_priv *font, char *text, int dx, int dy, struct point *ret, int estimate)
 
static void overlay_disable (struct graphics_priv *gr, int disable)
 
static void overlay_resize (struct graphics_priv *gr, struct point *p, int w, int h, int wraparound)
 
static struct graphics_privgraphics_null_new (struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl)
 
static void event_null_main_loop_run (void)
 
static void event_null_main_loop_quit (void)
 
static struct event_watchevent_null_add_watch (int h, enum event_watch_cond cond, struct callback *cb)
 
static void event_null_remove_watch (struct event_watch *ev)
 
static struct event_timeoutevent_null_add_timeout (int timeout, int multi, struct callback *cb)
 
static void event_null_remove_timeout (struct event_timeout *to)
 
static struct event_idleevent_null_add_idle (int priority, struct callback *cb)
 
static void event_null_remove_idle (struct event_idle *ev)
 
static void event_null_call_callback (struct callback_list *cb)
 
static struct event_privevent_null_new (struct event_methods *meth)
 
void plugin_init (void)
 

Variables

static struct callback_listcallbacks
 
static struct graphics_priv graphics_priv
 
static struct graphics_font_priv graphics_font_priv
 
static struct graphics_gc_priv graphics_gc_priv
 
static struct graphics_image_priv graphics_image_priv
 
static struct graphics_font_methods font_methods
 
static struct graphics_gc_methods gc_methods
 
static struct graphics_methods graphics_methods
 
static struct event_methods event_null_methods
 

Function Documentation

◆ background_gc()

static void background_gc ( struct graphics_priv gr,
struct graphics_gc_priv gc 
)
static

◆ draw_circle()

static void draw_circle ( struct graphics_priv gr,
struct graphics_gc_priv gc,
struct point p,
int  r 
)
static

◆ draw_drag()

static void draw_drag ( struct graphics_priv gr,
struct point p 
)
static

◆ draw_image()

static void draw_image ( struct graphics_priv gr,
struct graphics_gc_priv fg,
struct point p,
struct graphics_image_priv img 
)
static

◆ draw_lines()

static void draw_lines ( struct graphics_priv gr,
struct graphics_gc_priv gc,
struct point p,
int  count 
)
static

◆ draw_mode()

static void draw_mode ( struct graphics_priv gr,
enum draw_mode_num  mode 
)
static

◆ draw_polygon()

static void draw_polygon ( struct graphics_priv gr,
struct graphics_gc_priv gc,
struct point p,
int  count 
)
static

◆ draw_rectangle()

static void draw_rectangle ( struct graphics_priv gr,
struct graphics_gc_priv gc,
struct point p,
int  w,
int  h 
)
static

◆ draw_text()

static void draw_text ( struct graphics_priv gr,
struct graphics_gc_priv fg,
struct graphics_gc_priv bg,
struct graphics_font_priv font,
char *  text,
struct point p,
int  dx,
int  dy 
)
static

◆ event_null_add_idle()

static struct event_idle* event_null_add_idle ( int  priority,
struct callback cb 
)
static

References dbg, and lvl_debug.

◆ event_null_add_timeout()

static struct event_timeout* event_null_add_timeout ( int  timeout,
int  multi,
struct callback cb 
)
static

References dbg, and lvl_debug.

◆ event_null_add_watch()

static struct event_watch* event_null_add_watch ( int  h,
enum event_watch_cond  cond,
struct callback cb 
)
static

References dbg, and lvl_debug.

◆ event_null_call_callback()

static void event_null_call_callback ( struct callback_list cb)
static

References dbg, and lvl_debug.

◆ event_null_main_loop_quit()

static void event_null_main_loop_quit ( void  )
static

References dbg, and lvl_debug.

◆ event_null_main_loop_run()

static void event_null_main_loop_run ( void  )
static

References dbg, and lvl_debug.

◆ event_null_new()

static struct event_priv* event_null_new ( struct event_methods meth)
static

References event_null_methods.

Referenced by plugin_init().

◆ event_null_remove_idle()

static void event_null_remove_idle ( struct event_idle ev)
static

References dbg, and lvl_debug.

◆ event_null_remove_timeout()

static void event_null_remove_timeout ( struct event_timeout to)
static

References dbg, and lvl_debug.

◆ event_null_remove_watch()

static void event_null_remove_watch ( struct event_watch ev)
static

References dbg, and lvl_debug.

◆ font_destroy()

static void font_destroy ( struct graphics_font_priv font)
static

◆ font_new()

static struct graphics_font_priv* font_new ( struct graphics_priv gr,
struct graphics_font_methods meth,
char *  font,
int  size,
int  flags 
)
static

References font_methods, and graphics_font_priv.

◆ gc_destroy()

static void gc_destroy ( struct graphics_gc_priv gc)
static

◆ gc_new()

static struct graphics_gc_priv* gc_new ( struct graphics_priv gr,
struct graphics_gc_methods meth 
)
static

References gc_methods, and graphics_gc_priv.

◆ gc_set_background()

static void gc_set_background ( struct graphics_gc_priv gc,
struct color c 
)
static

◆ gc_set_dashes()

static void gc_set_dashes ( struct graphics_gc_priv gc,
int  w,
int  offset,
unsigned char *  dash_list,
int  n 
)
static

◆ gc_set_foreground()

static void gc_set_foreground ( struct graphics_gc_priv gc,
struct color c 
)
static

◆ gc_set_linewidth()

static void gc_set_linewidth ( struct graphics_gc_priv gc,
int  w 
)
static

◆ get_data()

static void* get_data ( struct graphics_priv this,
char const *  type 
)
static

◆ get_text_bbox()

static void get_text_bbox ( struct graphics_priv gr,
struct graphics_font_priv font,
char *  text,
int  dx,
int  dy,
struct point ret,
int  estimate 
)
static

◆ graphics_destroy()

static void graphics_destroy ( struct graphics_priv gr)
static

◆ graphics_null_disable_suspend()

static void graphics_null_disable_suspend ( struct window w)
static

Referenced by get_data().

◆ graphics_null_fullscreen()

static int graphics_null_fullscreen ( struct window w,
int  on 
)
static

Referenced by get_data().

◆ graphics_null_new()

static struct graphics_priv* graphics_null_new ( struct navit nav,
struct graphics_methods meth,
struct attr **  attrs,
struct callback_list cbl 
)
static

◆ image_free()

static void image_free ( struct graphics_priv gr,
struct graphics_image_priv priv 
)
static

◆ image_new()

static struct graphics_image_priv* image_new ( struct graphics_priv gr,
struct graphics_image_methods meth,
char *  path,
int *  w,
int *  h,
struct point hot,
int  rotation 
)
static

References graphics_image_priv.

◆ overlay_disable()

static void overlay_disable ( struct graphics_priv gr,
int  disable 
)
static

◆ overlay_new()

static struct graphics_priv * overlay_new ( struct graphics_priv gr,
struct graphics_methods meth,
struct point p,
int  w,
int  h,
int  wraparound 
)
static

References graphics_methods, and graphics_priv.

◆ overlay_resize()

static void overlay_resize ( struct graphics_priv gr,
struct point p,
int  w,
int  h,
int  wraparound 
)
static

◆ plugin_init()

void plugin_init ( void  )

◆ resize_callback()

static void resize_callback ( int  w,
int  h 
)
static

References callback_list_call_attr_2, and callbacks.

Referenced by get_data(), and graphics_null_new().

Variable Documentation

◆ callbacks

struct callback_list* callbacks
static

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Referenced by graphics_null_new(), and resize_callback().

◆ event_null_methods

struct event_methods event_null_methods
static
Initial value:
= {
}
static void event_null_remove_idle(struct event_idle *ev)
Definition: graphics_null.c:266
static void event_null_call_callback(struct callback_list *cb)
Definition: graphics_null.c:270
static struct event_timeout * event_null_add_timeout(int timeout, int multi, struct callback *cb)
Definition: graphics_null.c:251
static void event_null_remove_watch(struct event_watch *ev)
Definition: graphics_null.c:246
static struct event_watch * event_null_add_watch(int h, enum event_watch_cond cond, struct callback *cb)
Definition: graphics_null.c:241
static void event_null_remove_timeout(struct event_timeout *to)
Definition: graphics_null.c:256
static void event_null_main_loop_quit(void)
Definition: graphics_null.c:237
static struct event_idle * event_null_add_idle(int priority, struct callback *cb)
Definition: graphics_null.c:261
static void event_null_main_loop_run(void)
Definition: graphics_null.c:229

Referenced by event_null_new().

◆ font_methods

struct graphics_font_methods font_methods
static
Initial value:
= {
}
static void font_destroy(struct graphics_font_priv *font)
Definition: graphics_null.c:60

Referenced by font_new().

◆ gc_methods

struct graphics_gc_methods gc_methods
static
Initial value:
= {
}
static void gc_destroy(struct graphics_gc_priv *gc)
Definition: graphics_null.c:74
static void gc_set_foreground(struct graphics_gc_priv *gc, struct color *c)
Definition: graphics_null.c:83
static void gc_set_background(struct graphics_gc_priv *gc, struct color *c)
Definition: graphics_null.c:86
static void gc_set_dashes(struct graphics_gc_priv *gc, int w, int offset, unsigned char *dash_list, int n)
Definition: graphics_null.c:80
static void gc_set_linewidth(struct graphics_gc_priv *gc, int w)
Definition: graphics_null.c:77

Referenced by gc_new().

◆ graphics_font_priv

Referenced by font_new().

◆ graphics_gc_priv

Referenced by gc_new().

◆ graphics_image_priv

Referenced by image_new().

◆ graphics_methods

Initial value:
= {
NULL,
NULL,
NULL,
}
static void * get_data(struct graphics_priv *this, char const *type)
Definition: graphics_null.c:151
static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound)
Definition: graphics_null.c:202
static void draw_drag(struct graphics_priv *gr, struct point *p)
Definition: graphics_null.c:128
static void overlay_disable(struct graphics_priv *gr, int disable)
Definition: graphics_null.c:171
static void draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int w, int h)
Definition: graphics_null.c:113
static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img)
Definition: graphics_null.c:124
static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy)
Definition: graphics_null.c:120
static void background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
Definition: graphics_null.c:131
static struct graphics_image_priv * image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation)
Definition: graphics_null.c:102
static void draw_lines(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
Definition: graphics_null.c:107
static void get_text_bbox(struct graphics_priv *gr, struct graphics_font_priv *font, char *text, int dx, int dy, struct point *ret, int estimate)
Definition: graphics_null.c:167
static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
Definition: graphics_null.c:134
static void draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
Definition: graphics_null.c:110
static void image_free(struct graphics_priv *gr, struct graphics_image_priv *priv)
Definition: graphics_null.c:164
static struct graphics_gc_priv * gc_new(struct graphics_priv *gr, struct graphics_gc_methods *meth)
Definition: graphics_null.c:97
static void overlay_resize(struct graphics_priv *gr, struct point *p, int w, int h, int wraparound)
Definition: graphics_null.c:174
static void draw_circle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int r)
Definition: graphics_null.c:116
static void graphics_destroy(struct graphics_priv *gr)
Definition: graphics_null.c:57
static struct graphics_font_priv * font_new(struct graphics_priv *gr, struct graphics_font_methods *meth, char *font, int size, int flags)
Definition: graphics_null.c:68

Referenced by graphics_null_new(), and overlay_new().

◆ graphics_priv