Renamed EXPERIMENTAL_WM_API to NEW_WM_API

This commit is contained in:
hurikhan 2015-02-15 18:26:49 +08:00
parent ee81d4b359
commit f5d2e1f42c
6 changed files with 15 additions and 15 deletions

View file

@ -176,7 +176,7 @@ bool _OS::is_video_mode_fullscreen(int p_screen) const {
}
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
int _OS::get_screen_count() const {
return OS::get_singleton()->get_screen_count();
}
@ -706,7 +706,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("is_video_mode_resizable","screen"),&_OS::is_video_mode_resizable,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0));
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
ObjectTypeDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count);
ObjectTypeDB::bind_method(_MD("get_screen"),&_OS::get_screen);
ObjectTypeDB::bind_method(_MD("set_screen"),&_OS::set_screen);

View file

@ -108,7 +108,7 @@ public:
bool is_video_mode_resizable(int p_screen=0) const;
Array get_fullscreen_mode_list(int p_screen=0) const;
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
virtual int get_screen_count() const;
virtual int get_screen() const;
virtual void set_screen(int p_screen);

View file

@ -150,7 +150,7 @@ public:
virtual VideoMode get_video_mode(int p_screen=0) const=0;
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const=0;
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
virtual int get_screen_count() const=0;
virtual int get_screen() const=0;
virtual void set_screen(int p_screen)=0;

View file

@ -53,7 +53,7 @@ def get_opts():
('use_llvm','Use llvm compiler','no'),
('use_sanitizer','Use llvm compiler sanitize address','no'),
('pulseaudio','Detect & Use pulseaudio','yes'),
('experimental_wm_api', 'Use experimental window management API','no'),
('new_wm_api', 'Use experimental window management API','no'),
]
def get_flags():
@ -153,7 +153,7 @@ def configure(env):
env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )
#env.Append( BUILDERS = { 'HLSL9' : env.Builder(action = methods.build_hlsl_dx9_headers, suffix = 'hlsl.h',src_suffix = '.hlsl') } )
if(env["experimental_wm_api"]=="yes"):
env.Append(CPPFLAGS=['-DEXPERIMENTAL_WM_API'])
if(env["new_wm_api"]=="yes"):
env.Append(CPPFLAGS=['-DNEW_WM_API'])
env.ParseConfig('pkg-config xinerama --cflags --libs')

View file

@ -36,7 +36,7 @@
#include "servers/physics/physics_server_sw.h"
#include "X11/Xutil.h"
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
#include "X11/Xatom.h"
#include "X11/extensions/Xinerama.h"
// ICCCM
@ -187,7 +187,7 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD));
}
#ifndef EXPERIMENTAL_WM_API
#ifndef NEW_WM_API
// borderless fullscreen window mode
if (current_videomode.fullscreen) {
// needed for lxde/openbox, possibly others
@ -552,7 +552,7 @@ void OS_X11::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) cons
}
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
#if 0
// Just now not needed. Can be used for a possible OS.set_border(bool) method
void OS_X11::set_wm_border(bool p_enabled) {
@ -1133,7 +1133,7 @@ void OS_X11::process_xevents() {
case FocusIn:
minimized = false;
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
if(current_videomode.fullscreen) {
set_wm_fullscreen(true);
visual_server->init();
@ -1149,7 +1149,7 @@ void OS_X11::process_xevents() {
break;
case FocusOut:
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
if(current_videomode.fullscreen) {
set_wm_fullscreen(false);
set_minimized(true);
@ -1269,7 +1269,7 @@ void OS_X11::process_xevents() {
Point2i rel = pos - last_mouse_pos;
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
if (mouse_mode==MOUSE_MODE_CAPTURED) {
pos.x = current_videomode.width / 2;
pos.y = current_videomode.height / 2;

View file

@ -159,7 +159,7 @@ class OS_X11 : public OS_Unix {
int joystick_count;
Joystick joysticks[JOYSTICKS_MAX];
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
unsigned int capture_idle;
bool maximized;
//void set_wm_border(bool p_enabled);
@ -220,7 +220,7 @@ public:
virtual VideoMode get_video_mode(int p_screen=0) const;
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const;
#ifdef EXPERIMENTAL_WM_API
#ifdef NEW_WM_API
virtual int get_screen_count() const;
virtual int get_screen() const;
virtual void set_screen(int p_screen);