Sha256: 17856725ceb85b53fe2c190e7525855f81f87cea6eaecc06724b7258dd059987

Contents?: true

Size: 1.81 KB

Versions: 3

Compression:

Stored size: 1.81 KB

Contents

// -*- c++ -*-
#pragma once
#ifndef __REFLEX_RUBY_WINDOW_H__
#define __REFLEX_RUBY_WINDOW_H__


#include <rucy/rucy.h>
#include <rucy/class.h>
#include <rucy/extension.h>
#include <reflex/window.h>
#include <reflex/ruby/key.h>
#include <reflex/ruby/points.h>


namespace Reflex
{


	Rucy::Class window_class ();
	// class Reflex::Window


	template <typename T>
	class RubyWindow : public Rucy::ClassWrapper<T>
	{

		public:

			virtual bool show ()
			{
				SYM(show);
				return this->value.call(show);
			}

			virtual bool hide ()
			{
				SYM(hide);
				return this->value.call(hide);
			}

			virtual bool close ()
			{
				SYM(close);
				return this->value.call(close);
			}

			virtual void update (float dt)
			{
				SYM(update);
				this->value.call(update, dt);
			}

			virtual void draw ()
			{
				SYM(draw);
				this->value.call(draw);
			}

			virtual void moved (coord x, coord y)
			{
				SYM(moved);
				this->value.call(moved, x, y);
			}

			virtual void resized (coord width, coord height)
			{
				SYM(resized);
				this->value.call(resized, width, height);
			}

			virtual void key_down (const Key& key)
			{
				SYM(key_down);
				this->value.call(key_down, Rucy::value(key));
			}

			virtual void key_up (const Key& key)
			{
				SYM(key_up);
				this->value.call(key_up, Rucy::value(key));
			}

			virtual void points_down (const Points& points)
			{
				SYM(points_down);
				this->value.call(points_down, Rucy::value(points));
			}

			virtual void points_up (const Points& points)
			{
				SYM(points_up);
				this->value.call(points_up, Rucy::value(points));
			}

			virtual void points_moved (const Points& points)
			{
				SYM(points_moved);
				this->value.call(points_moved, Rucy::value(points));
			}

	};// RubyWindow


}// Reflex


RUCY_WRAPPER_VALUE_FROM_TO(Reflex::Window, Reflex::window_class())


#endif//EOH

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reflexion-0.1.6 include/reflex/ruby/window.h
reflexion-0.1.5 include/reflex/ruby/window.h
reflexion-0.1.4 include/reflex/ruby/window.h