<commit_before>#include "rubybasic/BindApplication.hpp"

#include "mruby.h"
#include "mrubybind.h"
#include "ofAppRunner.h"

namespace {
    static float get_frame_rate() { return ofGetFrameRate(); }
    static void set_window_pos(int x, int y) { ofSetWindowPosition(x, y); }
    static void set_window_size(int width, int height) { ofSetWindowShape(width, height); }
    static int window_pos_x() { return ofGetWindowPositionX(); }
    static int window_pos_y() { return ofGetWindowPositionY(); }
    static int window_width() { return ofGetWidth(); }
    static int window_height() { return ofGetHeight(); }
}

//--------------------------------------------------------------------------------
void BindApplication::Bind(mrb_state* mrb)
{
    mrubybind::MrubyBind b(mrb);

    b.bind("get_frame_rate", get_frame_rate);
    b.bind("set_window_pos", set_window_pos);
    b.bind("set_window_size", set_window_size);
    b.bind("window_pos_x", window_pos_x);
    b.bind("window_pos_y", window_pos_y);
    b.bind("window_width", window_width);
    b.bind("window_height", window_height);
}

//EOF<commit_msg>Add screen_witdh, height. Change window_height, width base function.<commit_after>#include "rubybasic/BindApplication.hpp"

#include "mruby.h"
#include "mrubybind.h"
#include "ofAppRunner.h"

namespace {
    static float get_frame_rate() { return ofGetFrameRate(); }
    static void set_window_pos(int x, int y) { ofSetWindowPosition(x, y); }
    static void set_window_size(int width, int height) { ofSetWindowShape(width, height); }
    static int window_pos_x() { return ofGetWindowPositionX(); }
    static int window_pos_y() { return ofGetWindowPositionY(); }
    // static int window_width() { return ofGetWidth(); }
    // static int window_height() { return ofGetHeight(); }
    static int window_width() { return ofGetWindowWidth(); }
    static int window_height() { return ofGetWindowHeight(); }
    static int screen_width() { return ofGetScreenWidth(); }
    static int screen_height() { return ofGetScreenHeight(); }
}

//--------------------------------------------------------------------------------
void BindApplication::Bind(mrb_state* mrb)
{
    mrubybind::MrubyBind b(mrb);

    b.bind("get_frame_rate", get_frame_rate);
    b.bind("set_window_pos", set_window_pos);
    b.bind("set_window_size", set_window_size);
    b.bind("window_pos_x", window_pos_x);
    b.bind("window_pos_y", window_pos_y);
    b.bind("window_width", window_width);
    b.bind("window_height", window_height);
    b.bind("screen_width", screen_width);
    b.bind("screen_height", screen_height);
}

//EOF
{'fraction_non_alphanumeric': 0.18809980806142035, 'fraction_numerical': 0.0, 'mean_word_length': 3.555944055944056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2370325', 'n_tokens_mistral': 833, 'n_tokens_neox': 822, 'n_words': 170}