mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 00:50:53 +00:00
fix oo bindings
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@437 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -12,6 +12,10 @@ class ListBox : public MwOO::Base {
|
|||||||
void InsertMultiple(int index, int count, MwLLPixmap* pixmap, ...);
|
void InsertMultiple(int index, int count, MwLLPixmap* pixmap, ...);
|
||||||
void VaInsert(int index, MwLLPixmap pixmap, va_list va);
|
void VaInsert(int index, MwLLPixmap pixmap, va_list va);
|
||||||
void VaInsertMultiple(int index, int count, MwLLPixmap* pixmap, va_list va);
|
void VaInsertMultiple(int index, int count, MwLLPixmap* pixmap, va_list va);
|
||||||
|
void Delete(int index);
|
||||||
|
const char* Get(int index);
|
||||||
|
void SetWidth(int index, int width);
|
||||||
|
void Reset(void);
|
||||||
void SetLeftPadding(int value);
|
void SetLeftPadding(int value);
|
||||||
int GetLeftPadding(void);
|
int GetLeftPadding(void);
|
||||||
void SetBackground(const char* value);
|
void SetBackground(const char* value);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace MwOO {
|
|||||||
class Menu : public MwOO::Base {
|
class Menu : public MwOO::Base {
|
||||||
public:
|
public:
|
||||||
Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||||
|
MwMenu Add(MwMenu menu, const char* name);
|
||||||
void SetBackground(const char* value);
|
void SetBackground(const char* value);
|
||||||
const char* GetBackground(void);
|
const char* GetBackground(void);
|
||||||
void SetForeground(const char* value);
|
void SetForeground(const char* value);
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ namespace MwOO {
|
|||||||
class OpenGL : public MwOO::Base {
|
class OpenGL : public MwOO::Base {
|
||||||
public:
|
public:
|
||||||
OpenGL(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
OpenGL(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||||
|
void MakeCurrent(void);
|
||||||
|
void* GetProcAddress(const char* name);
|
||||||
|
void SwapBuffer(void);
|
||||||
void SetBackground(const char* value);
|
void SetBackground(const char* value);
|
||||||
const char* GetBackground(void);
|
const char* GetBackground(void);
|
||||||
void SetForeground(const char* value);
|
void SetForeground(const char* value);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace MwOO {
|
|||||||
class ScrollBar : public MwOO::Base {
|
class ScrollBar : public MwOO::Base {
|
||||||
public:
|
public:
|
||||||
ScrollBar(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
ScrollBar(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||||
|
int GetVisibleLength(void);
|
||||||
void SetAreaShown(int value);
|
void SetAreaShown(int value);
|
||||||
int GetAreaShown(void);
|
int GetAreaShown(void);
|
||||||
void SetValue(int value);
|
void SetValue(int value);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace MwOO {
|
|||||||
class SubMenu : public MwOO::Base {
|
class SubMenu : public MwOO::Base {
|
||||||
public:
|
public:
|
||||||
SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||||
|
void Appear(MwMenu menu, MwPoint* point);
|
||||||
void SetBackground(const char* value);
|
void SetBackground(const char* value);
|
||||||
const char* GetBackground(void);
|
const char* GetBackground(void);
|
||||||
void SetForeground(const char* value);
|
void SetForeground(const char* value);
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ namespace MwOO {
|
|||||||
class Viewport : public MwOO::Base {
|
class Viewport : public MwOO::Base {
|
||||||
public:
|
public:
|
||||||
Viewport(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
Viewport(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||||
|
MwOO::Base GetViewport(void);
|
||||||
|
void SetSize(int w, int h);
|
||||||
void SetBackground(const char* value);
|
void SetBackground(const char* value);
|
||||||
const char* GetBackground(void);
|
const char* GetBackground(void);
|
||||||
void SetForeground(const char* value);
|
void SetForeground(const char* value);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Vulkan : public MwOO::Base {
|
|||||||
void EnableExtension(void);
|
void EnableExtension(void);
|
||||||
void EnableLayer(void);
|
void EnableLayer(void);
|
||||||
void Configure(void);
|
void Configure(void);
|
||||||
|
void* GetField(MwVulkanField field, MwErrorEnum* out);
|
||||||
VkBool32 Supported(void);
|
VkBool32 Supported(void);
|
||||||
void SetBackground(const char* value);
|
void SetBackground(const char* value);
|
||||||
const char* GetBackground(void);
|
const char* GetBackground(void);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace MwOO {
|
|||||||
class Window : public MwOO::Base {
|
class Window : public MwOO::Base {
|
||||||
public:
|
public:
|
||||||
Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||||
|
void MakeBorderless(int toggle);
|
||||||
void SetTitle(const char* value);
|
void SetTitle(const char* value);
|
||||||
const char* GetTitle(void);
|
const char* GetTitle(void);
|
||||||
void SetMain(int value);
|
void SetMain(int value);
|
||||||
|
|||||||
@@ -27,6 +27,24 @@ void MwOO::ListBox::VaInsertMultiple(int index, int count, MwLLPixmap* pixmap, v
|
|||||||
MwListBoxVaInsertMultiple(this->widget, index, count, pixmap, va);
|
MwListBoxVaInsertMultiple(this->widget, index, count, pixmap, va);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MwOO::ListBox::Delete(int index){
|
||||||
|
MwListBoxDelete(this->widget, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* MwOO::ListBox::Get(int index){
|
||||||
|
const char* ret;
|
||||||
|
ret = MwListBoxGet(this->widget, index);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MwOO::ListBox::SetWidth(int index, int width){
|
||||||
|
MwListBoxSetWidth(this->widget, index, width);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MwOO::ListBox::Reset(void){
|
||||||
|
MwListBoxReset(this->widget);
|
||||||
|
}
|
||||||
|
|
||||||
void MwOO::ListBox::SetLeftPadding(int value){
|
void MwOO::ListBox::SetLeftPadding(int value){
|
||||||
MwSetInteger(this->widget, MwNleftPadding, value);
|
MwSetInteger(this->widget, MwNleftPadding, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
MwOO::Menu::Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwMenuClass, widget_name, parent, x, y, w, h){
|
MwOO::Menu::Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwMenuClass, widget_name, parent, x, y, w, h){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MwMenu MwOO::Menu::Add(MwMenu menu, const char* name){
|
||||||
|
MwMenu ret;
|
||||||
|
ret = MwMenuAdd(this->widget, menu, name);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void MwOO::Menu::SetBackground(const char* value){
|
void MwOO::Menu::SetBackground(const char* value){
|
||||||
MwSetText(this->widget, MwNbackground, value);
|
MwSetText(this->widget, MwNbackground, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,20 @@
|
|||||||
MwOO::OpenGL::OpenGL(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwOpenGLClass, widget_name, parent, x, y, w, h){
|
MwOO::OpenGL::OpenGL(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwOpenGLClass, widget_name, parent, x, y, w, h){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MwOO::OpenGL::MakeCurrent(void){
|
||||||
|
MwOpenGLMakeCurrent(this->widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void* MwOO::OpenGL::GetProcAddress(const char* name){
|
||||||
|
void* ret;
|
||||||
|
ret = MwOpenGLGetProcAddress(this->widget, name);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MwOO::OpenGL::SwapBuffer(void){
|
||||||
|
MwOpenGLSwapBuffer(this->widget);
|
||||||
|
}
|
||||||
|
|
||||||
void MwOO::OpenGL::SetBackground(const char* value){
|
void MwOO::OpenGL::SetBackground(const char* value){
|
||||||
MwSetText(this->widget, MwNbackground, value);
|
MwSetText(this->widget, MwNbackground, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
MwOO::ScrollBar::ScrollBar(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwScrollBarClass, widget_name, parent, x, y, w, h){
|
MwOO::ScrollBar::ScrollBar(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwScrollBarClass, widget_name, parent, x, y, w, h){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MwOO::ScrollBar::GetVisibleLength(void){
|
||||||
|
int ret;
|
||||||
|
ret = MwScrollBarGetVisibleLength(this->widget);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void MwOO::ScrollBar::SetAreaShown(int value){
|
void MwOO::ScrollBar::SetAreaShown(int value){
|
||||||
MwSetInteger(this->widget, MwNareaShown, value);
|
MwSetInteger(this->widget, MwNareaShown, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
MwOO::SubMenu::SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwSubMenuClass, widget_name, parent, x, y, w, h){
|
MwOO::SubMenu::SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwSubMenuClass, widget_name, parent, x, y, w, h){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MwOO::SubMenu::Appear(MwMenu menu, MwPoint* point){
|
||||||
|
MwSubMenuAppear(this->widget, menu, point);
|
||||||
|
}
|
||||||
|
|
||||||
void MwOO::SubMenu::SetBackground(const char* value){
|
void MwOO::SubMenu::SetBackground(const char* value){
|
||||||
MwSetText(this->widget, MwNbackground, value);
|
MwSetText(this->widget, MwNbackground, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,16 @@
|
|||||||
MwOO::Viewport::Viewport(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwViewportClass, widget_name, parent, x, y, w, h){
|
MwOO::Viewport::Viewport(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwViewportClass, widget_name, parent, x, y, w, h){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MwOO::Base MwOO::Viewport::GetViewport(void){
|
||||||
|
MwOO::Base ret;
|
||||||
|
ret = MwOO::Base(MwViewportGetViewport(this->widget));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MwOO::Viewport::SetSize(int w, int h){
|
||||||
|
MwViewportSetSize(this->widget, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
void MwOO::Viewport::SetBackground(const char* value){
|
void MwOO::Viewport::SetBackground(const char* value){
|
||||||
MwSetText(this->widget, MwNbackground, value);
|
MwSetText(this->widget, MwNbackground, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ void MwOO::Vulkan::Configure(void){
|
|||||||
MwVulkanConfigure(this->widget);
|
MwVulkanConfigure(this->widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* MwOO::Vulkan::GetField(MwVulkanField field, MwErrorEnum* out){
|
||||||
|
void* ret;
|
||||||
|
ret = MwVulkanGetField(this->widget, field, out);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
VkBool32 MwOO::Vulkan::Supported(void){
|
VkBool32 MwOO::Vulkan::Supported(void){
|
||||||
VkBool32 ret;
|
VkBool32 ret;
|
||||||
ret = MwVulkanSupported(this->widget);
|
ret = MwVulkanSupported(this->widget);
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
MwOO::Window::Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwWindowClass, widget_name, parent, x, y, w, h){
|
MwOO::Window::Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwWindowClass, widget_name, parent, x, y, w, h){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MwOO::Window::MakeBorderless(int toggle){
|
||||||
|
MwWindowMakeBorderless(this->widget, toggle);
|
||||||
|
}
|
||||||
|
|
||||||
void MwOO::Window::SetTitle(const char* value){
|
void MwOO::Window::SetTitle(const char* value){
|
||||||
MwSetText(this->widget, MwNtitle, value);
|
MwSetText(this->widget, MwNtitle, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ foreach my $f (@files) {
|
|||||||
@props = split(/[ \t]+/, $1);
|
@props = split(/[ \t]+/, $1);
|
||||||
}
|
}
|
||||||
elsif ($l =~
|
elsif ($l =~
|
||||||
/^MWDECL[ \t]+(.+)[ \t]+Mw${name}([^ \t]+)[ \t]*\([^,\)]+(?:,(.*))?\);(?: \/\*(.+))?$/
|
/^(?:MWDECL|MwInline)[ \t]+(.+)[ \t]+Mw${name}([^ \t]+)[ \t]*\([^,\)]+(?:,(.*))?\)(?:;|[ \t]+\{)(?: \/\*(.+))?$/
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
my $arg = $3;
|
my $arg = $3;
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# $Id$
|
||||||
|
|
||||||
if [[ $1 -eq "" ]]; then
|
if [[ $1 -eq "" ]]; then
|
||||||
echo "Blank argument."
|
echo "Blank argument."
|
||||||
exit
|
exit
|
||||||
|
|||||||
Reference in New Issue
Block a user