navit  0.5.3-trunk
gui_gtk_window.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <locale.h>
#include <gdk/gdkkeysyms.h>
#include <X11/XF86keysym.h>
#include <gtk/gtk.h>
#include "config.h"
#include "item.h"
#include "xmlconfig.h"
#include "navit.h"
#include "debug.h"
#include "gui.h"
#include "coord.h"
#include "point.h"
#include "plugin.h"
#include "graphics.h"
#include "gui_gtk.h"
#include "transform.h"
#include "callback.h"
#include "layout.h"
#include "vehicle.h"
#include "map.h"
#include "event.h"
#include "bookmarks.h"
#include "route.h"
#include "navit_nls.h"

Data Structures

struct  action_cb_data
 
struct  gui_menu_info
 

Macros

#define GDK_KEY_Book   XF86XK_Book
 
#define GDK_KEY_Calendar   XF86XK_Calendar
 
#define KEY_ZOOM_IN   GDK_KEY_Book
 
#define KEY_ZOOM_OUT   GDK_KEY_Calendar
 
#define KEY_UP   GDK_KEY_Up
 
#define KEY_DOWN   GDK_KEY_Down
 
#define KEY_LEFT   GDK_KEY_Left
 
#define KEY_RIGHT   GDK_KEY_Right
 

Functions

GdkPixbuf * geticon (const char *name)
 Get a pixbuf representing an icon for the catalog. More...
 
static gboolean keypress (GtkWidget *widget, GdkEventKey *event, struct gui_priv *this)
 
static int gui_gtk_set_graphics (struct gui_priv *this, struct graphics *gra)
 
static void gui_gtk_route_callback (struct gui_priv *gui)
 
static void gui_gtk_add_bookmark_do (struct gui_priv *gui)
 
static int gui_gtk_add_bookmark (struct gui_priv *gui, struct pcoord *c, char *description)
 
static gboolean gui_gtk_delete (GtkWidget *widget, GdkEvent *event, struct navit *nav)
 
static void gui_gtk_toggle_init (struct gui_priv *this)
 
static void gui_gtk_action_activate (GtkAction *action, struct action_cb_data *data)
 
static void gui_gtk_del_menu (struct gui_priv *this, struct gui_menu_info *meninfo)
 
static struct gui_menu_info gui_gtk_add_menu (struct gui_priv *this, char *name, char *label, char *path, int submenu, struct action_cb_data *data)
 
static void gui_gtk_action_toggled (GtkToggleAction *action, struct action_cb_data *data)
 
static void gui_gtk_add_toggle_menu (struct gui_priv *this, char *name, char *label, char *path, struct action_cb_data *data, gboolean active)
 
static void gui_gtk_action_changed (GtkRadioAction *action, GtkRadioAction *current, struct action_cb_data *data)
 
static struct gui_menu_info gui_gtk_add_radio_menu (struct gui_priv *this, char *name, char *label, char *path, struct action_cb_data *data, GSList **g)
 
static void gui_gtk_layouts_init (struct gui_priv *this)
 
static void gui_gtk_projections_init (struct gui_priv *this)
 
static void gui_gtk_vehicles_update (struct gui_priv *this)
 
static void gui_gtk_vehicles_init (struct gui_priv *this)
 
static void gui_gtk_maps_init (struct gui_priv *this)
 
static void gui_gtk_destinations_update (struct gui_priv *this)
 
static void gui_gtk_destinations_init (struct gui_priv *this)
 
static void gui_gtk_bookmarks_update (struct gui_priv *this)
 
static void gui_gtk_bookmarks_init (struct gui_priv *this)
 
static void gui_gtk_init (struct gui_priv *this, struct navit *nav)
 
static struct gui_privgui_gtk_new (struct navit *nav, struct gui_methods *meth, struct attr **attrs, struct gui *gui)
 
void plugin_init (void)
 

Variables

struct gui_methods gui_gtk_methods
 
static int gtk_argc
 
static char ** gtk_argv = {NULL}
 

Macro Definition Documentation

◆ GDK_KEY_Book

#define GDK_KEY_Book   XF86XK_Book

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.

◆ GDK_KEY_Calendar

#define GDK_KEY_Calendar   XF86XK_Calendar

◆ KEY_DOWN

#define KEY_DOWN   GDK_KEY_Down

◆ KEY_LEFT

#define KEY_LEFT   GDK_KEY_Left

◆ KEY_RIGHT

#define KEY_RIGHT   GDK_KEY_Right

◆ KEY_UP

#define KEY_UP   GDK_KEY_Up

◆ KEY_ZOOM_IN

#define KEY_ZOOM_IN   GDK_KEY_Book

◆ KEY_ZOOM_OUT

#define KEY_ZOOM_OUT   GDK_KEY_Calendar

Function Documentation

◆ geticon()

GdkPixbuf* geticon ( const char *  name)

Get a pixbuf representing an icon for the catalog.

Navit, a modular navigation system. Copyright (C) 2005-2013 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.

Parameters
nameThe name of the icon to use (eg: "pharmacy.png"
Returns
A pixbuf containing this icon of NULL if the icon could not be loaded

References dbg, filename, graphics_icon_path(), lvl_error, and name.

Referenced by category_list_model(), and gui_gtk_new().

◆ gui_gtk_action_activate()

static void gui_gtk_action_activate ( GtkAction *  action,
struct action_cb_data data 
)
static

◆ gui_gtk_action_changed()

static void gui_gtk_action_changed ( GtkRadioAction *  action,
GtkRadioAction *  current,
struct action_cb_data data 
)
static

References data, and navit_set_attr().

◆ gui_gtk_action_toggled()

static void gui_gtk_action_toggled ( GtkToggleAction *  action,
struct action_cb_data data 
)
static

◆ gui_gtk_add_bookmark()

static int gui_gtk_add_bookmark ( struct gui_priv gui,
struct pcoord c,
char *  description 
)
static

◆ gui_gtk_add_bookmark_do()

static void gui_gtk_add_bookmark_do ( struct gui_priv gui)
static

◆ gui_gtk_add_menu()

static struct gui_menu_info gui_gtk_add_menu ( struct gui_priv this,
char *  name,
char *  label,
char *  path,
int  submenu,
struct action_cb_data data 
)
static

◆ gui_gtk_add_radio_menu()

static struct gui_menu_info gui_gtk_add_radio_menu ( struct gui_priv this,
char *  name,
char *  label,
char *  path,
struct action_cb_data data,
GSList **  g 
)
static

◆ gui_gtk_add_toggle_menu()

static void gui_gtk_add_toggle_menu ( struct gui_priv this,
char *  name,
char *  label,
char *  path,
struct action_cb_data data,
gboolean  active 
)
static

References active, data, gui_gtk_action_toggled(), label, and name.

Referenced by gui_gtk_maps_init().

◆ gui_gtk_bookmarks_init()

static void gui_gtk_bookmarks_init ( struct gui_priv this)
static

◆ gui_gtk_bookmarks_update()

◆ gui_gtk_del_menu()

static void gui_gtk_del_menu ( struct gui_priv this,
struct gui_menu_info meninfo 
)
static

◆ gui_gtk_delete()

static gboolean gui_gtk_delete ( GtkWidget *  widget,
GdkEvent *  event,
struct navit nav 
)
static

References exit, and navit_destroy().

Referenced by gui_gtk_new().

◆ gui_gtk_destinations_init()

static void gui_gtk_destinations_init ( struct gui_priv this)
static

◆ gui_gtk_destinations_update()

◆ gui_gtk_init()

◆ gui_gtk_layouts_init()

static void gui_gtk_layouts_init ( struct gui_priv this)
static

◆ gui_gtk_maps_init()

◆ gui_gtk_new()

◆ gui_gtk_projections_init()

static void gui_gtk_projections_init ( struct gui_priv this)
static

◆ gui_gtk_route_callback()

static void gui_gtk_route_callback ( struct gui_priv gui)
static

◆ gui_gtk_set_graphics()

static int gui_gtk_set_graphics ( struct gui_priv this,
struct graphics gra 
)
static

References graphics_get_data(), and keypress().

◆ gui_gtk_toggle_init()

static void gui_gtk_toggle_init ( struct gui_priv this)
static

◆ gui_gtk_vehicles_init()

static void gui_gtk_vehicles_init ( struct gui_priv this)
static

◆ gui_gtk_vehicles_update()

◆ keypress()

◆ plugin_init()

void plugin_init ( void  )

References gtk_argc, gtk_argv, and gui_gtk_new().

Variable Documentation

◆ gtk_argc

int gtk_argc
static

Referenced by plugin_init().

◆ gtk_argv

char** gtk_argv = {NULL}
static

Referenced by plugin_init().

◆ gui_gtk_methods

struct gui_methods gui_gtk_methods
Initial value:
= {
NULL,
NULL,
}
struct datawindow_priv * gui_gtk_datawindow_new(struct gui_priv *gui, char *name, struct callback *click, struct callback *close, struct datawindow_methods *meth)
struct menu_priv * gui_gtk_popup_new(struct gui_priv *gui, struct menu_methods *meth)
Definition: gui_gtk_action.c:616
static int gui_gtk_add_bookmark(struct gui_priv *gui, struct pcoord *c, char *description)
Definition: gui_gtk_window.c:244
static int gui_gtk_set_graphics(struct gui_priv *this, struct graphics *gra)
Definition: gui_gtk_window.c:204

Referenced by gui_gtk_new().