navit  0.5.3-trunk
graphics_android.c File Reference
#include <unistd.h>
#include <glib.h>
#include <poll.h>
#include "config.h"
#include "window.h"
#include "point.h"
#include "graphics.h"
#include "color.h"
#include "item.h"
#include "xmlconfig.h"
#include "plugin.h"
#include "event.h"
#include "debug.h"
#include "callback.h"
#include "android.h"
#include "command.h"

Data Structures

struct  graphics_priv
 
struct  graphics_font_priv
 
struct  graphics_gc_priv
 
struct  graphics_image_priv
 
struct  event_timeout
 

Functions

static int find_class_global (char *name, jclass *ret)
 
static int find_method (jclass class, char *name, char *args, jmethodID *ret)
 
static int find_static_method (jclass class, char *name, char *args, jmethodID *ret)
 
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 void image_destroy (struct graphics_image_priv *img)
 
static struct graphics_image_privimage_new (struct graphics_priv *gra, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation)
 
static void initPaint (struct graphics_priv *gra, struct graphics_gc_priv *gc)
 
static void draw_lines (struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int count)
 
static int polygon_area (struct point *p, int count)
 
static int is_clockwise (struct point *p, int count)
 
static int add_vertex_to_java_array (struct point *p, int count, jint *j_p, int reverse)
 
static void draw_polygon_with_holes (struct graphics_priv *gra, 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 *gra, struct graphics_gc_priv *gc, struct point *p, int count)
 
static void draw_rectangle (struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int w, int h)
 
static void draw_circle (struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int r)
 
static void draw_text (struct graphics_priv *gra, 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 *gra, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img)
 
static void draw_image_warp (struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, int count, struct graphics_image_priv *img)
 
static void draw_drag (struct graphics_priv *gra, struct point *p)
 
static void background_gc (struct graphics_priv *gr, struct graphics_gc_priv *gc)
 
static void draw_mode (struct graphics_priv *gra, 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)
 Creates a new overlay. More...
 
static void * get_data (struct graphics_priv *this, const char *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 *gra, int disable)
 
static void overlay_resize (struct graphics_priv *gra, struct point *pnt, int w, int h, int wraparound)
 
static int set_attr (struct graphics_priv *gra, struct attr *attr)
 
int show_native_keyboard (struct graphics_keyboard *kbd)
 Displays the native input method. More...
 
void hide_native_keyboard (struct graphics_keyboard *kbd)
 Hides the native input method and frees associated private data. More...
 
static void resize_callback (struct graphics_priv *gra, int w, int h)
 
static void padding_changed_callback (struct graphics_priv *gra, int left, int top, int right, int bottom)
 
static void motion_callback (struct graphics_priv *gra, int x, int y)
 
static void keypress_callback (struct graphics_priv *gra, char *s)
 
static void button_callback (struct graphics_priv *gra, int pressed, int button, int x, int y)
 
static int set_activity (jobject graphics)
 
static int graphics_android_init (struct graphics_priv *ret, struct graphics_priv *parent, struct point *pnt, int w, int h, int wraparound, int use_camera)
 Initializes a new Android graphics instance. More...
 
static int graphics_android_fullscreen (struct window *win, int on)
 
static void graphics_android_disable_suspend (struct window *win)
 
static void graphics_android_cmd_runMenuItem (struct graphics_priv *this, char *function, struct attr **in, struct attr ***out, int *valid)
 Runs an item from the Android menu. More...
 
static void graphics_android_cmd_menu (struct graphics_priv *this, char *function, struct attr **in, struct attr ***out, int *valid)
 Shows the Android menu. More...
 
static struct graphics_privgraphics_android_new (struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl)
 Creates a new Android graphics instance. More...
 
static void event_android_main_loop_run (void)
 
static void event_android_main_loop_quit (void)
 
static void do_poll (JNIEnv *env, int fd, int cond)
 
static struct event_watchevent_android_add_watch (int h, enum event_watch_cond cond, struct callback *cb)
 
static void event_android_remove_watch (struct event_watch *ev)
 
static void event_android_remove_timeout (struct event_timeout *priv)
 
static void event_android_handle_timeout (struct event_timeout *priv)
 
static struct event_timeoutevent_android_add_timeout (int timeout, int multi, struct callback *cb)
 
static struct event_idleevent_android_add_idle (int priority, struct callback *cb)
 
static void event_android_remove_idle (struct event_idle *ev)
 
static void event_android_call_callback (struct callback_list *cb)
 
static struct event_privevent_android_new (struct event_methods *meth)
 
void plugin_init (void)
 

Variables

static GHashTable * image_cache_hash = NULL
 
static struct graphics_font_methods font_methods
 
static struct graphics_gc_methods gc_methods
 
static struct graphics_image_methods image_methods
 
static struct graphics_methods graphics_methods
 
static jclass NavitClass
 
static jmethodID Navit_disableSuspend
 
static jmethodID Navit_exit
 
static jmethodID Navit_fullscreen
 
static jmethodID Navit_runOptionsItem
 
static jmethodID Navit_showMenu
 
static jmethodID Navit_showNativeKeyboard
 
static jmethodID Navit_hideNativeKeyboard
 
static struct command_table commands []
 
static jclass NavitTimeoutClass
 
static jmethodID NavitTimeout_init
 
static jmethodID NavitTimeout_remove
 
static jclass NavitIdleClass
 
static jmethodID NavitIdle_init
 
static jmethodID NavitIdle_remove
 
static jclass NavitWatchClass
 
static jmethodID NavitWatch_init
 
static jmethodID NavitWatch_remove
 
static struct event_methods event_android_methods
 

Function Documentation

◆ add_vertex_to_java_array()

static int add_vertex_to_java_array ( struct point p,
int  count,
jint *  j_p,
int  reverse 
)
static

References p.

Referenced by draw_polygon_with_holes().

◆ background_gc()

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

◆ button_callback()

static void button_callback ( struct graphics_priv gra,
int  pressed,
int  button,
int  x,
int  y 
)
static

◆ do_poll()

static void do_poll ( JNIEnv *  env,
int  fd,
int  cond 
)
static

◆ draw_circle()

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

◆ draw_drag()

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

◆ draw_image()

◆ draw_image_warp()

static void draw_image_warp ( struct graphics_priv gr,
struct graphics_gc_priv fg,
struct point p,
int  count,
struct graphics_image_priv img 
)
static

◆ draw_lines()

◆ draw_mode()

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

◆ draw_polygon()

◆ draw_polygon_with_holes()

◆ draw_rectangle()

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

◆ draw_text()

◆ event_android_add_idle()

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

◆ event_android_add_timeout()

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

◆ event_android_add_watch()

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

◆ event_android_call_callback()

static void event_android_call_callback ( struct callback_list cb)
static

References dbg, and lvl_debug.

◆ event_android_handle_timeout()

static void event_android_handle_timeout ( struct event_timeout priv)
static

◆ event_android_main_loop_quit()

static void event_android_main_loop_quit ( void  )
static

◆ event_android_main_loop_run()

static void event_android_main_loop_run ( void  )
static

References dbg, and lvl_debug.

◆ event_android_new()

◆ event_android_remove_idle()

static void event_android_remove_idle ( struct event_idle ev)
static

◆ event_android_remove_timeout()

static void event_android_remove_timeout ( struct event_timeout priv)
static

◆ event_android_remove_watch()

static void event_android_remove_watch ( struct event_watch ev)
static

References dbg, jnienv, lvl_debug, and NavitWatch_remove.

◆ find_class_global()

static int find_class_global ( char *  name,
jclass *  ret 
)
static

References dbg, jnienv, lvl_error, and name.

Referenced by event_android_new(), and graphics_android_init().

◆ find_method()

static int find_method ( jclass  class,
char *  name,
char *  args,
jmethodID *  ret 
)
static

References dbg, jnienv, lvl_error, and name.

Referenced by graphics_android_init().

◆ find_static_method()

static int find_static_method ( jclass  class,
char *  name,
char *  args,
jmethodID *  ret 
)
static

References dbg, jnienv, lvl_error, and name.

Referenced by graphics_android_init().

◆ 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

◆ gc_destroy()

static void gc_destroy ( struct graphics_gc_priv gc)
static

◆ gc_new()

◆ 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,
const char *  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_android_cmd_menu()

static void graphics_android_cmd_menu ( struct graphics_priv this,
char *  function,
struct attr **  in,
struct attr ***  out,
int *  valid 
)
static

Shows the Android menu.

This is the callback function associated with the

menu()
Definition: menu.h:40

API function.

Parameters
thisThe
graohics_prov
structure
functionThe API function which was called
inParameters to pass to the API function
outPoints to a buffer which will receive a pointer to the output of the command
valid

◆ graphics_android_cmd_runMenuItem()

static void graphics_android_cmd_runMenuItem ( struct graphics_priv this,
char *  function,
struct attr **  in,
struct attr ***  out,
int *  valid 
)
static

Runs an item from the Android menu.

This is a callback function which implements multiple API functions.

Parameters
thisThe
graohics_prov
structure
functionThe API function which was called
inParameters to pass to the API function
outPoints to a buffer which will receive a pointer to the output of the command
valid

References android_activity, dbg, jnienv, lvl_debug, and Navit_runOptionsItem.

◆ graphics_android_disable_suspend()

static void graphics_android_disable_suspend ( struct window win)
static

◆ graphics_android_fullscreen()

static int graphics_android_fullscreen ( struct window win,
int  on 
)
static

◆ graphics_android_init()

static int graphics_android_init ( struct graphics_priv ret,
struct graphics_priv parent,
struct point pnt,
int  w,
int  h,
int  wraparound,
int  use_camera 
)
static

Initializes a new Android graphics instance.

This initializes a new Android graphics instance, which can either be the main view or an overlay.

Parameters
retThe new graphics instance
parentThe graphics instance that contains the new instance (
NULL
for the main view)
pThe position of the overlay in its parent (
NULL
for the main view)
wThe width of the overlay (0 for the main view)
hThe height of the overlay (0 for the main view)
wraparound(0 for the main view)
use_cameraWhether to use the camera (0 for overlays)

References android_activity, graphics_priv::Bitmap_createScaledBitmap, graphics_priv::Bitmap_getHeight, graphics_priv::Bitmap_getWidth, graphics_priv::BitmapClass, graphics_priv::BitmapFactory_decodeFile, graphics_priv::BitmapFactory_decodeResource, graphics_priv::BitmapFactoryClass, button_callback(), callback_cast, callback_new_1, graphics_priv::Context_getResources, graphics_priv::ContextClass, dbg, find_class_global(), find_method(), find_static_method(), jnienv, keypress_callback(), lvl_debug, lvl_error, motion_callback(), graphics_priv::NavitGraphics, graphics_priv::NavitGraphics_draw_circle, graphics_priv::NavitGraphics_draw_drag, graphics_priv::NavitGraphics_draw_image, graphics_priv::NavitGraphics_draw_image_warp, graphics_priv::NavitGraphics_draw_mode, graphics_priv::NavitGraphics_draw_polygon, graphics_priv::NavitGraphics_draw_polygon_with_holes, graphics_priv::NavitGraphics_draw_polyline, graphics_priv::NavitGraphics_draw_rectangle, graphics_priv::NavitGraphics_draw_text, graphics_priv::NavitGraphics_overlay_disable, graphics_priv::NavitGraphics_overlay_resize, graphics_priv::NavitGraphics_SetCamera, graphics_priv::NavitGraphicsClass, graphics_priv::packageName, graphics_priv::padding, padding_changed_callback(), graphics_priv::Paint, graphics_priv::Paint_init, graphics_priv::Paint_setARGB, graphics_priv::Paint_setStrokeWidth, graphics_priv::PaintClass, resize_callback(), graphics_priv::Resources, graphics_priv::Resources_getIdentifier, graphics_priv::ResourcesClass, set_activity(), point::x, and point::y.

Referenced by graphics_android_new(), and overlay_new().

◆ graphics_android_new()

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

Creates a new Android graphics instance.

This method is called when the graphics plugin is initialized. It creates the main view, i.e. the map view. Unless overlay mode is enabled, it also holds any OSD items.

Parameters
navThe navit instance.
methThe methods for the new graphics instance
attrsThe attributes for the new graphics instance
cblThe callback list for the new graphics instance
Returns
The new graphics instance

References color::a, attr_search(), attr::attrs, color::b, graphics_priv::bgcolor, padding::bottom, attr::callback_list, graphics_priv::cbl, cbl, attr::color, command_add_table(), commands, dbg, window::disable_suspend, event_request_system(), window::fullscreen, color::g, graphics_android_disable_suspend(), graphics_android_fullscreen(), graphics_android_init(), graphics_methods, image_cache_hash, jnienv, padding::left, lvl_debug, navit_object_set_attr(), graphics_priv::NavitGraphics, graphics_priv::NavitGraphics_setBackgroundColor, graphics_priv::NavitGraphicsClass, attr::num, graphics_priv::padding, window::priv, color::r, padding::right, padding::top, attr::type, attr::u, and graphics_priv::win.

Referenced by plugin_init().

◆ graphics_destroy()

static void graphics_destroy ( struct graphics_priv gr)
static

◆ hide_native_keyboard()

void hide_native_keyboard ( struct graphics_keyboard kbd)

Hides the native input method and frees associated private data.

Parameters
kbdThe
Definition: graphics.h:62
which was passed to the earlier call to show_native_keyboard(struct graphics_keyboard *). The
struct graphics_keyboard_priv * gra_priv
Definition: graphics.h:76
member of the struct will be freed by this function.

References android_activity, dbg, graphics_keyboard::gra_priv, jnienv, lvl_error, and Navit_hideNativeKeyboard.

◆ image_destroy()

static void image_destroy ( struct graphics_image_priv img)
static

◆ image_free()

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

◆ image_new()

◆ initPaint()

◆ is_clockwise()

static int is_clockwise ( struct point p,
int  count 
)
inlinestatic

References p, and polygon_area().

Referenced by draw_polygon_with_holes().

◆ keypress_callback()

static void keypress_callback ( struct graphics_priv gra,
char *  s 
)
static

◆ motion_callback()

static void motion_callback ( struct graphics_priv gra,
int  x,
int  y 
)
static

◆ overlay_disable()

static void overlay_disable ( struct graphics_priv gra,
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

Creates a new overlay.

This method creates a graphics instance for a new overlay. If overlay mode is enabled, a separate overlay is created for each OSD item.

Parameters
grThe parent graphics instance, i.e. the one which will contain the overlay.
methThe methods for the new graphics instance
pThe position of the overlay in its parent
wThe width of the overlay
hThe height of the overlay
wraparound
Returns
The graphics instance for the new overlay

References dbg, graphics_android_init(), graphics_methods, graphics_priv::h, lvl_debug, p, graphics_priv::w, and graphics_priv::wraparound.

◆ overlay_resize()

static void overlay_resize ( struct graphics_priv gra,
struct point pnt,
int  w,
int  h,
int  wraparound 
)
static

◆ padding_changed_callback()

static void padding_changed_callback ( struct graphics_priv gra,
int  left,
int  top,
int  right,
int  bottom 
)
static

◆ plugin_init()

void plugin_init ( void  )

◆ polygon_area()

static int polygon_area ( struct point p,
int  count 
)
static

References area(), and p.

Referenced by is_clockwise().

◆ resize_callback()

static void resize_callback ( struct graphics_priv gra,
int  w,
int  h 
)
static

◆ set_activity()

static int set_activity ( jobject  graphics)
static

◆ set_attr()

◆ show_native_keyboard()

int show_native_keyboard ( struct graphics_keyboard kbd)

Displays the native input method.

This method decides whether a native on-screen input method, such as a virtual keyboard, needs to be displayed. A typical case in which there is no need for an on-screen input method is if a hardware keyboard is present.

Note that the Android platform lacks reliable means of determining whether an on-screen input method is going to be displayed or how much screen space it is going to occupy. Therefore this method tries to guess these values. They have been tested and found to work correctly with the AOSP keyboard, and are thus expected to be compatible with most on-screen keyboards found on the market, but results may be unexpected with other input methods.

Parameters
kbdA which describes the requirements for the input method and will be populated with the data of the input method before the function returns.
Returns
True if the input method is going to be displayed, false if not.

References android_activity, dbg, graphics_keyboard::h, jnienv, lvl_error, and Navit_showNativeKeyboard.

Variable Documentation

◆ commands

struct command_table commands[]
static
Initial value:
= {
{"backup_restore_dialog",command_cast(graphics_android_cmd_runMenuItem)},
}
#define command_cast(x)
Definition: command.h:32
static void graphics_android_cmd_runMenuItem(struct graphics_priv *this, char *function, struct attr **in, struct attr ***out, int *valid)
Runs an item from the Android menu.
Definition: graphics_android.c:855
static void graphics_android_cmd_menu(struct graphics_priv *this, char *function, struct attr **in, struct attr ***out, int *valid)
Shows the Android menu.
Definition: graphics_android.c:880

The command table. Each entry consists of an API function name and the callback function which implements this command.

Referenced by graphics_android_new().

◆ event_android_methods

struct event_methods event_android_methods
static
Initial value:
= {
}
static struct event_timeout * event_android_add_timeout(int timeout, int multi, struct callback *cb)
Definition: graphics_android.c:1094
static void event_android_remove_idle(struct event_idle *ev)
Definition: graphics_android.c:1120
static void event_android_main_loop_run(void)
Definition: graphics_android.c:1011
static void event_android_remove_watch(struct event_watch *ev)
Definition: graphics_android.c:1064
static void event_android_remove_timeout(struct event_timeout *priv)
Definition: graphics_android.c:1080
static struct event_idle * event_android_add_idle(int priority, struct callback *cb)
Definition: graphics_android.c:1107
static struct event_watch * event_android_add_watch(int h, enum event_watch_cond cond, struct callback *cb)
Definition: graphics_android.c:1055
static void event_android_main_loop_quit(void)
Definition: graphics_android.c:1015
static void event_android_call_callback(struct callback_list *cb)
Definition: graphics_android.c:1132

Referenced by event_android_new().

◆ font_methods

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

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_android.c:142
static void gc_set_foreground(struct graphics_gc_priv *gc, struct color *c)
Definition: graphics_android.c:162
static void gc_set_background(struct graphics_gc_priv *gc, struct color *c)
Definition: graphics_android.c:169
static void gc_set_dashes(struct graphics_gc_priv *gc, int w, int offset, unsigned char *dash_list, int n)
Definition: graphics_android.c:151
static void gc_set_linewidth(struct graphics_gc_priv *gc, int w)
Definition: graphics_android.c:147

Referenced by gc_new().

◆ graphics_methods

Initial value:
= {
NULL,
}
int show_native_keyboard(struct graphics_keyboard *kbd)
Displays the native input method.
Definition: graphics_android.c:1227
static void draw_polygon_with_holes(struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int count, int hole_count, int *ccount, struct point **holes)
Definition: graphics_android.c:351
static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound)
Creates a new overlay.
Definition: graphics_android.c:997
void hide_native_keyboard(struct graphics_keyboard *kbd)
Hides the native input method and frees associated private data.
Definition: graphics_android.c:1246
static void draw_text(struct graphics_priv *gra, 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_android.c:449
static void draw_rectangle(struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int w, int h)
Definition: graphics_android.c:437
static void draw_polygon(struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int count)
Definition: graphics_android.c:415
static void * get_data(struct graphics_priv *this, const char *type)
Definition: graphics_android.c:505
static void background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
Definition: graphics_android.c:495
static void draw_circle(struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int r)
Definition: graphics_android.c:443
static void draw_image(struct graphics_priv *gra, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img)
Definition: graphics_android.c:462
static void draw_mode(struct graphics_priv *gra, enum draw_mode_num mode)
Definition: graphics_android.c:498
static void draw_image_warp(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, int count, struct graphics_image_priv *img)
Definition: graphics_android.c:471
static int set_attr(struct graphics_priv *gra, struct attr *attr)
Definition: graphics_android.c:543
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_android.c:516
static void draw_drag(struct graphics_priv *gra, struct point *p)
Definition: graphics_android.c:491
static void overlay_disable(struct graphics_priv *gra, int disable)
Definition: graphics_android.c:534
static void draw_lines(struct graphics_priv *gra, struct graphics_gc_priv *gc, struct point *p, int count)
Definition: graphics_android.c:272
static void overlay_resize(struct graphics_priv *gra, struct point *pnt, int w, int h, int wraparound)
Definition: graphics_android.c:538
static void image_free(struct graphics_priv *gr, struct graphics_image_priv *priv)
Definition: graphics_android.c:513
static struct graphics_gc_priv * gc_new(struct graphics_priv *gr, struct graphics_gc_methods *meth)
Definition: graphics_android.c:180
static void graphics_destroy(struct graphics_priv *gr)
Definition: graphics_android.c:122
static struct graphics_font_priv * font_new(struct graphics_priv *gr, struct graphics_font_methods *meth, char *font, int size, int flags)
Definition: graphics_android.c:133
static struct graphics_image_priv * image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation)
Definition: graphics_android.c:199

Referenced by graphics_android_new(), and overlay_new().

◆ image_cache_hash

GHashTable* image_cache_hash = NULL
static

◆ image_methods

struct graphics_image_methods image_methods
static
Initial value:
= {
}
static void image_destroy(struct graphics_image_priv *img)
Definition: graphics_android.c:190

◆ Navit_disableSuspend

jmethodID Navit_disableSuspend
static

◆ Navit_exit

jmethodID Navit_exit
static

◆ Navit_fullscreen

jmethodID Navit_fullscreen
static

◆ Navit_hideNativeKeyboard

jmethodID Navit_hideNativeKeyboard
static

◆ Navit_runOptionsItem

jmethodID Navit_runOptionsItem
static

◆ Navit_showMenu

jmethodID Navit_showMenu
static

Referenced by event_android_new().

◆ Navit_showNativeKeyboard

jmethodID Navit_showNativeKeyboard
static

◆ NavitClass

jclass NavitClass
static

Referenced by event_android_new().

◆ NavitIdle_init

jmethodID NavitIdle_init
static

◆ NavitIdle_remove

jmethodID NavitIdle_remove
static

◆ NavitIdleClass

jclass NavitIdleClass
static

◆ NavitTimeout_init

jmethodID NavitTimeout_init
static

◆ NavitTimeout_remove

jmethodID NavitTimeout_remove
static

◆ NavitTimeoutClass

jclass NavitTimeoutClass
static

◆ NavitWatch_init

jmethodID NavitWatch_init
static

◆ NavitWatch_remove

jmethodID NavitWatch_remove
static

◆ NavitWatchClass

jclass NavitWatchClass
static