navit
0.5.3-trunk
|
#include <glib.h>
#include <pthread.h>
#include <poll.h>
#include <signal.h>
#include "config.h"
#include "debug.h"
#include "point.h"
#include "graphics.h"
#include "color.h"
#include "plugin.h"
#include "window.h"
#include "navit.h"
#include "keys.h"
#include "item.h"
#include "attr.h"
#include "callback.h"
#include "font/freetype/font_freetype.h"
#include "SDL.h"
#include <math.h>
#include "raster.h"
#include <event.h>
#include "SDL_image.h"
#include <alloca.h>
Data Structures | |
struct | graphics_priv |
struct | graphics_gc_priv |
struct | graphics_image_priv |
Macros | |
#define | DISPLAY_W 800 |
#define | DISPLAY_H 600 |
#define | OVERLAY_MAX 32 |
Functions | |
static void | graphics_destroy (struct graphics_priv *gr) |
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_priv * | gc_new (struct graphics_priv *gr, struct graphics_gc_methods *meth) |
static struct graphics_image_priv * | image_new (struct graphics_priv *gr, struct graphics_image_methods *meth, char *name, int *w, int *h, struct point *hot, int rotation) |
static void | image_free (struct graphics_priv *gr, struct graphics_image_priv *gi) |
static void | draw_polygon_with_holes (struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count, int hole_count, int *ccount, struct point **holes) |
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_lines (struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count) |
static void | set_pixel (SDL_Surface *surface, int x, int y, Uint8 r2, Uint8 g2, Uint8 b2, Uint8 a2) |
static void | resize_ft_buffer (unsigned int new_size) |
static void | display_text_draw (struct font_freetype_text *text, struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, int color, struct point *p) |
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 | 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 void | overlay_disable (struct graphics_priv *gr, int disable) |
static struct graphics_priv * | overlay_new (struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound) |
static int | window_fullscreen (struct window *win, int on) |
static void * | get_data (struct graphics_priv *this, char const *type) |
static void | draw_drag (struct graphics_priv *gr, struct point *p) |
static gboolean | graphics_sdl_idle (void *data) |
static struct graphics_priv * | graphics_sdl_new (struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl) |
void | plugin_init (void) |
Variables | |
unsigned char * | ft_buffer = NULL |
unsigned int | ft_buffer_size = 0 |
static struct graphics_gc_methods | gc_methods |
static struct graphics_methods | graphics_methods |
#define DISPLAY_H 600 |
#define DISPLAY_W 800 |
#define OVERLAY_MAX 32 |
|
static |
|
static |
References color::a, color::b, COLOR_IS_BLACK, COLOR_IS_WHITE, graphics_gc_priv::fore_a, graphics_gc_priv::fore_b, graphics_gc_priv::fore_g, graphics_gc_priv::fore_r, graphics_priv::freetype_methods, ft_buffer, color::g, font_freetype_methods::get_glyph, font_freetype_methods::get_shadow, font_freetype_text::glyph, font_freetype_text::glyph_count, p, color::r, resize_ft_buffer(), graphics_priv::screen, set_pixel(), point::x, and point::y.
Referenced by draw_text().
|
static |
References graphics_priv::aa, graphics_gc_priv::fore_a, graphics_gc_priv::fore_b, graphics_gc_priv::fore_g, graphics_gc_priv::fore_r, graphics_priv::overlay_enable, graphics_priv::overlay_mode, graphics_priv::overlay_parent, p, raster_aacircle(), raster_circle(), and graphics_priv::screen.
Referenced by draw_lines().
|
static |
References graphics_priv::overlay_x, graphics_priv::overlay_y, and p.
|
static |
|
static |
References graphics_priv::aa, dbg, draw_circle(), draw_polygon(), graphics_gc_priv::fore_a, graphics_gc_priv::fore_b, graphics_gc_priv::fore_g, graphics_gc_priv::fore_r, graphics_gc_priv::linewidth, lvl_debug, M_PI, graphics_priv::overlay_enable, graphics_priv::overlay_parent, p, raster_aaline(), raster_line(), graphics_priv::screen, point::x, and point::y.
|
static |
References dbg, graphics_priv::draw_mode, draw_mode_begin, draw_mode_end, rect::h, lvl_debug, graphics_priv::mode, graphics_priv::overlay_array, graphics_priv::overlay_enable, OVERLAY_MAX, graphics_priv::overlay_mode, graphics_priv::overlay_x, graphics_priv::overlay_y, and graphics_priv::screen.
Referenced by overlay_disable().
|
static |
References dbg, draw_polygon_with_holes(), lvl_debug, and p.
Referenced by draw_lines().
|
static |
References graphics_priv::aa, dbg, graphics_gc_priv::fore_a, graphics_gc_priv::fore_b, graphics_gc_priv::fore_g, graphics_gc_priv::fore_r, lvl_debug, graphics_priv::overlay_enable, graphics_priv::overlay_parent, p, raster_aapolygon_with_holes(), raster_polygon_with_holes(), and graphics_priv::screen.
Referenced by draw_polygon().
|
static |
|
static |
|
static |
|
static |
References gc_methods, graphics_gc_priv::gr, and graphics_gc_priv::linewidth.
|
static |
|
static |
|
static |
References c, dbg, graphics_gc_priv::fore_a, graphics_gc_priv::fore_b, graphics_gc_priv::fore_g, graphics_gc_priv::fore_r, and lvl_debug.
|
static |
References dbg, graphics_gc_priv::linewidth, and lvl_debug.
|
static |
References window::disable_suspend, window::fullscreen, window::priv, type, and window_fullscreen().
|
static |
|
static |
References callback_call_0, callback_cast, callback_destroy(), callback_list_call_0, callback_list_call_attr_0, callback_list_call_attr_1, callback_list_call_attr_2, callback_list_call_attr_3, callback_new_1, idle_task::cb, graphics_priv::cbl, cbl, attr::data, data, dbg, event_add_timeout(), event_remove_timeout(), event_sdl_watch_stopthread(), idle_tasks, lvl_debug, lvl_error, lvl_info, lvl_warning, graphics_priv::nav, navit_destroy(), navit_get_attr(), NAVIT_KEY_BACK, NAVIT_KEY_BACKSPACE, NAVIT_KEY_DOWN, NAVIT_KEY_LEFT, NAVIT_KEY_RETURN, NAVIT_KEY_RIGHT, NAVIT_KEY_UP, NAVIT_KEY_ZOOM_IN, NAVIT_KEY_ZOOM_OUT, p, idle_task::priority, quit_event_loop, graphics_priv::resize_callback_initial, graphics_priv::screen, attr::type, attr::u, attr::vehicle, vehicle_set_attr(), graphics_priv::video_bpp, and graphics_priv::video_flags.
Referenced by graphics_sdl_new().
|
static |
References attr_search(), event_timeout::cb, event_idle::cb, event_watch::cb, idle_task::cb, cbl, dbg, dbg_assert, DISPLAY_H, DISPLAY_W, event_request_system(), event_sdl_add_idle(), event_sdl_add_timeout(), event_sdl_add_watch(), event_sdl_call_callback(), event_sdl_main_loop_quit(), event_sdl_main_loop_run(), event_sdl_methods, event_sdl_new(), event_sdl_remove_idle(), event_sdl_remove_timeout(), event_sdl_remove_watch(), event_sdl_watch_startthread(), event_sdl_watch_stopthread(), event_sdl_watch_thread(), event_watch_cond_except, event_watch_cond_read, event_watch_cond_write, event_watch::fd, font_freetype_new(), graphics_methods::font_new, graphics_methods::get_text_bbox, graphics_methods, graphics_sdl_idle(), event_timeout::id, idle_tasks, lvl_debug, lvl_error, lvl_info, methods, event_timeout::multi, attr::num, orientation, event_watch::pfd, idle_task::priority, quit_event_loop, sdl_sort_idle_tasks(), sdl_timer_callback(), sdl_watch_list, sdl_watch_thread, callback::type, and attr::u.
Referenced by plugin_init().
|
static |
References graphics_image_priv::img.
|
static |
References dbg, graphics_image_priv::h, graphics_image_priv::hot, graphics_image_priv::img, lvl_error, name, graphics_image_priv::w, point::x, and point::y.
|
static |
|
static |
References dbg, font_freetype_new(), font_freetype_methods::font_new, graphics_methods::font_new, graphics_priv::freetype_methods, font_freetype_methods::get_text_bbox, graphics_methods::get_text_bbox, graphics_methods, graphics_priv::h, lvl_debug, lvl_error, graphics_priv::overlay_array, graphics_priv::overlay_enable, graphics_priv::overlay_idx, OVERLAY_MAX, graphics_priv::overlay_mode, graphics_priv::overlay_parent, graphics_priv::overlay_x, graphics_priv::overlay_y, p, graphics_priv::screen, and graphics_priv::w.
void plugin_init | ( | void | ) |
References event_sdl_new(), and graphics_sdl_new().
|
static |
References dbg, ft_buffer, ft_buffer_size, and lvl_debug.
Referenced by display_text_draw().
|
static |
References point::x, and point::y.
Referenced by display_text_draw().
|
static |
References callback_list_call_attr_2, graphics_priv::cbl, graphics_priv::nav, navit_destroy(), window::priv, graphics_priv::screen, graphics_priv::video_bpp, graphics_priv::video_flags, and graphics_priv::win.
Referenced by get_data().
unsigned char* ft_buffer = NULL |
Referenced by display_text_draw(), graphics_destroy(), and resize_ft_buffer().
unsigned int ft_buffer_size = 0 |
Referenced by resize_ft_buffer().
|
static |
Referenced by gc_new().
|
static |
Referenced by graphics_sdl_new(), and overlay_new().