From: TimePath Date: Sun, 30 Jul 2017 05:20:04 +0000 (+1000) Subject: Remove a few gdk includes in headers X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5ee5024bb98350799255e46b0e430e42cf74f398;p=xonotic%2Fnetradiant.git Remove a few gdk includes in headers --- diff --git a/plugins/textool/StdAfx.h b/plugins/textool/StdAfx.h index 4a3f8435..f884c53e 100644 --- a/plugins/textool/StdAfx.h +++ b/plugins/textool/StdAfx.h @@ -23,7 +23,6 @@ // precompiled headers // standard headers -#include #include #include diff --git a/radiant/windowobservers.cpp b/radiant/windowobservers.cpp index 4d5c2897..3bd2334d 100644 --- a/radiant/windowobservers.cpp +++ b/radiant/windowobservers.cpp @@ -149,3 +149,18 @@ void GlobalWindowObservers_connectWidget( ui::Widget widget ){ widget.connect( "button_release_event", G_CALLBACK( modifiers_button_release ), &g_window_observers ); widget.connect( "motion_notify_event", G_CALLBACK( modifiers_motion ), &g_window_observers ); } + +ModifierFlags modifiers_for_state(unsigned int state) +{ + ModifierFlags modifiers = c_modifierNone; + if ( state & GDK_SHIFT_MASK ) { + modifiers |= c_modifierShift; + } + if ( state & GDK_CONTROL_MASK ) { + modifiers |= c_modifierControl; + } + if ( state & GDK_MOD1_MASK ) { + modifiers |= c_modifierAlt; + } + return modifiers; +} diff --git a/radiant/windowobservers.h b/radiant/windowobservers.h index 9785d9dc..37fe2f15 100644 --- a/radiant/windowobservers.h +++ b/radiant/windowobservers.h @@ -24,7 +24,6 @@ #include "windowobserver.h" -#include #include #include "math/vector.h" @@ -47,19 +46,7 @@ inline ButtonIdentifier button_for_button( unsigned int button ){ return c_buttonInvalid; } -inline ModifierFlags modifiers_for_state( unsigned int state ){ - ModifierFlags modifiers = c_modifierNone; - if ( state & GDK_SHIFT_MASK ) { - modifiers |= c_modifierShift; - } - if ( state & GDK_CONTROL_MASK ) { - modifiers |= c_modifierControl; - } - if ( state & GDK_MOD1_MASK ) { - modifiers |= c_modifierAlt; - } - return modifiers; -} +ModifierFlags modifiers_for_state( unsigned int state ); inline WindowVector WindowVector_forDouble( double x, double y ){ return WindowVector( static_cast( x ), static_cast( y ) );