require "mspcore";
require "mspstrings";
require "sigc++-2.0";
- // The OpenGL stuff is hackish, but only way to do it right now
+ require "opengl";
if "arch!=win32"
{
require "xlib";
- require "opengl";
build_info
{
library "Xxf86vm";
{
build_info
{
- library "opengl32";
library "gdi32";
};
};
DrawContext::DrawContext(Window &w):
display(w.get_display()),
- window(w),
- image(0)
+ window(w)
{
#ifndef WIN32
::Display *dpy=display.get_display();
#endif
}
+unsigned DrawContext::get_depth() const
+{
+#ifdef WIN32
+ return 0;
+#else
+ return image->bits_per_pixel;
+#endif
+}
+
+unsigned char *DrawContext::get_data()
+{
+#ifdef WIN32
+ return 0;
+#else
+ return reinterpret_cast<unsigned char *>(image->data);
+#endif
+}
+
void DrawContext::update()
{
#ifndef WIN32
~DrawContext();
Window &get_window() const { return window; }
- unsigned get_depth() const { return image->bits_per_pixel; }
- unsigned char *get_data() { return reinterpret_cast<unsigned char *>(image->data); }
+ unsigned get_depth() const;
+ unsigned char *get_data();
void update();
};
#include "keyboard.h"
#include "keys.h"
+#define MAPVK_VK_TO_VSC 0
+
namespace Msp {
namespace Input {
return str;
#else
char buf[128];
- unsigned scan=MapVirtualKey(key_to_sys(btn), MAPVK_VK_TO_VCS);
+ unsigned scan=MapVirtualKey(key_to_sys(btn), MAPVK_VK_TO_VSC);
if(!GetKeyNameText(scan<<16, buf, sizeof(buf)))
return format("Key %d", btn);
return buf;
*/
#include <map>
-#ifndef WIN32
+#ifdef WIN32
+#include <windows.h>
+#else
#include <X11/keysym.h>
#endif
#include <msp/core/except.h>