diff options
author | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-05-14 06:44:12 +0000 |
---|---|---|
committer | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-05-14 06:44:12 +0000 |
commit | 9f5f80bae8111ccbd7d89a2e36c5dee5f7b18f45 (patch) | |
tree | 34038aed5c3220a42756ee098babfe2456a1fe7f /navit/gui/win32 | |
parent | 9a07f047f61207934dda3d77f5cb5f363bb33a73 (diff) | |
download | navit-9f5f80bae8111ccbd7d89a2e36c5dee5f7b18f45.tar.gz |
Fix:Win32:Clean up Win32 gui, remove duplicate of win32_gui.h and make gui_win32 work again.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2269 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/gui/win32')
-rw-r--r-- | navit/gui/win32/gui_win32.c | 26 | ||||
-rw-r--r-- | navit/gui/win32/win32_gui.h | 76 |
2 files changed, 12 insertions, 90 deletions
diff --git a/navit/gui/win32/gui_win32.c b/navit/gui/win32/gui_win32.c index a47e89f16..0bdf023b0 100644 --- a/navit/gui/win32/gui_win32.c +++ b/navit/gui/win32/gui_win32.c @@ -5,7 +5,7 @@ #include "config.h" #include "plugin.h" #include "gui.h" -#include "win32_gui.h" +#include "../../graphics/win32/graphics_win32.h" #include "point.h" #include "menu.h" #include "item.h" @@ -13,6 +13,8 @@ #include "callback.h" #include <commctrl.h> #include "debug.h" +#include "util.h" +#include "navit.h" #include "navit_nls.h" #ifdef __CEGCC__ #include <sipapi.h> @@ -31,11 +33,10 @@ static GArray *popup_menu_array; const TCHAR g_szClassName[] = TEXT("navit_gui_class"); -static menu_id = 0; -static POINT menu_pt; +static UINT_PTR menu_id = 0; - -gboolean message_pump( gpointer data ) +#if 0 +static gboolean message_pump( gpointer data ) { MSG messages; @@ -52,11 +53,7 @@ gboolean message_pump( gpointer data ) return TRUE; } - - -//extern struct graphics_priv *g_gra; - -BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam) +static BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam) { LPRECT rcParent; int idChild; @@ -73,6 +70,7 @@ BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam) return TRUE; } +#endif #ifndef GET_WHEEL_DELTA_WPARAM #define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam)) @@ -408,7 +406,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l return 0; } -HANDLE CreateWin32Window( void ) +static HANDLE CreateWin32Window( void ) { #ifdef HAVE_API_WIN32_CE WNDCLASS wc; @@ -418,7 +416,7 @@ HANDLE CreateWin32Window( void ) wc.hIconSm = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_NAVIT)); #endif HWND hwnd; - MSG Msg; +// MSG Msg; wc.style = 0; wc.lpfnWndProc = WndProc; @@ -572,7 +570,7 @@ static void popup_deactivate( struct menu_priv *menu ) DestroyMenu( menu->hMenu ); } -struct menu_priv* win32_gui_popup_new(struct gui_priv *this_, struct menu_methods *meth) +static struct menu_priv* win32_gui_popup_new(struct gui_priv *this_, struct menu_methods *meth) { struct menu_priv* ret = NULL; @@ -634,7 +632,7 @@ static struct gui_priv *win32_gui_new( struct navit *nav, struct gui_methods *me this_->nav=nav; this_->hwnd = CreateWin32Window(); - SetWindowLongPtr( this_->hwnd , DWLP_USER, this_ ); + SetWindowLongPtr( this_->hwnd , DWLP_USER, (LONG_PTR)this_ ); return this_; } diff --git a/navit/gui/win32/win32_gui.h b/navit/gui/win32/win32_gui.h deleted file mode 100644 index f9fb7e231..000000000 --- a/navit/gui/win32/win32_gui.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef WIN32_GUI_INCLUDED -#define WIN32_GUI_INCLUDED - -#include "resources/resource.h" -#include "coord.h" -#include "point.h" -#include "graphics.h" - -#define ID_CHILD_GFX 100 -#define ID_CHILD_TOOLBAR (ID_CHILD_GFX + 1) -#define ID_CHILD_1 (ID_CHILD_TOOLBAR + 1) -#define ID_CHILD_2 (ID_CHILD_1 + 1) -#define ID_CHILD_3 (ID_CHILD_2 + 1) -#define ID_CHILD_4 (ID_CHILD_4 + 1) - -#define ID_DISPLAY_ZOOMIN 200 -#define ID_DISPLAY_ZOOMOUT 201 -#define ID_DISPLAY_REFRESH 202 -#define ID_DISPLAY_CURSOR 203 -#define ID_DISPLAY_ORIENT 204 - -#define ID_FILE_EXIT 9001 -#define ID_STUFF_GO 9002 - -#define _(text) gettext(text) - -#define POPUP_MENU_OFFSET 4000 - -struct statusbar_methods; -struct menu_methods; -struct datawindow_methods; -struct navit; -struct callback; - - -struct menu_priv { - HWND wnd_handle; - HMENU hMenu; - struct callback* cb; -}; - -struct gui_priv { - struct navit *nav; - HANDLE hwnd; -}; - - -struct graphics_priv { - struct point p; - int width; - int height; - int library_init; - int visible; - HANDLE wnd_parent_handle; - HANDLE wnd_handle; - COLORREF bg_color; - - - void (*resize_callback)(void *data, int w, int h); - void *resize_callback_data; - void (*motion_callback)(void *data, struct point *p); - void *motion_callback_data; - void (*button_callback)(void *data, int press, int button, struct point *p); - void *button_callback_data; - enum draw_mode_num mode; -}; - -struct menu_priv *gui_gtk_menubar_new(struct gui_priv *gui, struct menu_methods *meth); -struct menu_priv *gui_gtk_toolbar_new(struct gui_priv *gui, struct menu_methods *meth); -struct statusbar_priv *gui_gtk_statusbar_new(struct gui_priv *gui, struct statusbar_methods *meth); -struct menu_priv *gui_gtk_popup_new(struct gui_priv *gui, struct menu_methods *meth); -struct datawindow_priv *gui_gtk_datawindow_new(struct gui_priv *gui, char *name, struct callback *click, struct callback *close, struct datawindow_methods *meth); - -struct graphics_priv* win32_graphics_new( struct graphics_methods *meth, struct attr **attrs); - -#endif |