Commit 6908dbda by Jessica Hawkwell

Refactored includes

1 parent b2146bfe
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
*/ */
#include "NUtils.h" #include "NUtils.h"
#include <X11/Xatom.h>
#include <unordered_map>
#include <utility>
void NUtils::frameWindow (Window w) { void NUtils::frameWindow (Window w) {
frameWindow(w, false); frameWindow(w, false);
......
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
#ifndef NUTILS_H #ifndef NUTILS_H
#define NUTILS_H #define NUTILS_H
#include "NitroWin.h" #include "NitroWin.h"
#include "NWMAction.h" #include "NWMAction.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/X.h>
#include <iostream> #include <iostream>
class NUtils { class NUtils {
......
...@@ -32,8 +32,11 @@ ...@@ -32,8 +32,11 @@
*/ */
#include "NWMAction.h" #include "NWMAction.h"
#include "NUtils.h" #include "NUtils.h"
#include <iostream> #include <iostream>
//#include <vector> //#include <vector>
// MOVING WINDOWS // MOVING WINDOWS
......
...@@ -33,13 +33,17 @@ ...@@ -33,13 +33,17 @@
#ifndef NWMACTION_H #ifndef NWMACTION_H
#define NWMACTION_H #define NWMACTION_H
#include "NitroWin.h" #include "NitroWin.h"
#include <X11/Xlib.h>
#include <vector>
#include <unordered_map>
#include <NPosition.h> #include <NPosition.h>
#include "NSize.h" #include <NSize.h>
#include <unordered_map>
#include <vector>
template <class T> class NSize;
template <typename T> class NPosition;
class NWMAction { class NWMAction {
protected: protected:
......
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
*/ */
#include "NWManager.h" #include "NWManager.h"
#include "NWMAction.h"
#include "NUtils.h"
#include <iostream> #include <iostream>
#include <iterator> #include <utility>
#include <unordered_map>
#include "NUtils.h"
#include "NWMAction.h"
bool NWManager::wm_detected = false; bool NWManager::wm_detected = false;
......
...@@ -26,10 +26,8 @@ ...@@ -26,10 +26,8 @@
#ifndef NWMANAGER_H #ifndef NWMANAGER_H
#define NWMANAGER_H #define NWMANAGER_H
#include "NitroWin.h"
#include <X11/X.h> #include "NitroWin.h"
#include <X11/Xlib.h>
#include <unordered_map> #include <unordered_map>
class NWManager { class NWManager {
......
...@@ -41,5 +41,8 @@ ...@@ -41,5 +41,8 @@
#define NITROWIN_VERSION_TWEAK 0 #define NITROWIN_VERSION_TWEAK 0
#define NITROWIN_VERSION "1.0.0.0" #define NITROWIN_VERSION "1.0.0.0"
#include <X11/Xlib.h>
#include <X11/X.h>
#endif /* NITROWIN_H */ #endif /* NITROWIN_H */
...@@ -41,5 +41,8 @@ ...@@ -41,5 +41,8 @@
#define NITROWIN_VERSION_TWEAK @Nitrogen_VERSION_TWEAK@ #define NITROWIN_VERSION_TWEAK @Nitrogen_VERSION_TWEAK@
#define NITROWIN_VERSION "@Nitrogen_VERSION_MAJOR@.@Nitrogen_VERSION_MINOR@.@Nitrogen_VERSION_PATCH@.@Nitrogen_VERSION_TWEAK@" #define NITROWIN_VERSION "@Nitrogen_VERSION_MAJOR@.@Nitrogen_VERSION_MINOR@.@Nitrogen_VERSION_PATCH@.@Nitrogen_VERSION_TWEAK@"
#include <X11/Xlib.h>
#include <X11/X.h>
#endif /* NITROWIN_H */ #endif /* NITROWIN_H */
#include "NitroWin.h" #include "NitroWin.h"
#include <iostream>
#include "NWManager.h"
#include <Color.h> #include <Color.h>
#include <NPosition.h> #include <NObject.h>
#include "NWManager.h"
#include <iostream>
int main ( int argc, char** argv ) int main ( int argc, char** argv )
{ {
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <nde.h> #include "NPosition.h"
#include <NPosition.h>
//#include <string>
/*template <typename T> /*template <typename T>
NPosition<T>::NPosition(T x, T y) { NPosition<T>::NPosition(T x, T y) {
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#define NPOSITION_H #define NPOSITION_H
#include <nde.h> #include <nde.h>
#include <string>
template <typename T> template <typename T>
class NPosition : public gc { class NPosition : public gc {
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <nde.h> #include "NSize.h"
#include <NSize.h>
//#include <string>
void testNSizeInt() { void testNSizeInt() {
NSize<int> rawr = NSize<int>(1,1); NSize<int> rawr = NSize<int>(1,1);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#ifndef NSIZE_H #ifndef NSIZE_H
#define NSIZE_H #define NSIZE_H
#include <nde.h> #include <nde.h>
template <class T> template <class T>
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#define NDE_VERSION "1.0.0.0" #define NDE_VERSION "1.0.0.0"
#include <typeinfo> #include <typeinfo>
#include <iosfwd>
#include <string> #include <string>
namespace nitrogen { namespace nitrogen {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#define NDE_VERSION "@Nitrogen_VERSION_MAJOR@.@Nitrogen_VERSION_MINOR@.@Nitrogen_VERSION_PATCH@.@Nitrogen_VERSION_TWEAK@" #define NDE_VERSION "@Nitrogen_VERSION_MAJOR@.@Nitrogen_VERSION_MINOR@.@Nitrogen_VERSION_PATCH@.@Nitrogen_VERSION_TWEAK@"
#include <typeinfo> #include <typeinfo>
#include <iosfwd>
#include <string> #include <string>
namespace nitrogen { namespace nitrogen {
......
...@@ -24,5 +24,3 @@ ...@@ -24,5 +24,3 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <nde.h>
#include <typeinfo>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
*/ */
#include "Color.h" #include "Color.h"
#include <string>
namespace nitrogen { namespace nitrogen {
Color::Color(unsigned int c) { Color::Color(unsigned int c) {
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#ifndef COLOR_H #ifndef COLOR_H
#define COLOR_H #define COLOR_H
#include <ntk.h> #include <ntk.h>
namespace nitrogen { namespace nitrogen {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
*/ */
#include "Component.h" #include "Component.h"
namespace nitrogen { namespace nitrogen {
Component::Component() { Component::Component() {
......
...@@ -33,12 +33,14 @@ ...@@ -33,12 +33,14 @@
#ifndef COMPONENT_H #ifndef COMPONENT_H
#define COMPONENT_H #define COMPONENT_H
#include <list>
#include <ntk.h> #include <ntk.h>
#include <Color.h> #include <Color.h>
#include <NSize.h> #include <NSize.h>
#include <NPosition.h> #include <NPosition.h>
#include <list>
namespace nitrogen { namespace nitrogen {
class Component : public NObject { class Component : public NObject {
public: public:
......
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
*/ */
#include "Font.h" #include "Font.h"
#include <ntk.h>
#include <string>
namespace nitrogen { namespace nitrogen {
Font::Font(std::string* fn, int st, unsigned int si) { Font::Font(std::string* fn, int st, unsigned int si) {
fontName = fn; fontName = fn;
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#define FONT_H #define FONT_H
#include <ntk.h> #include <ntk.h>
#include <ostream>
namespace nitrogen { namespace nitrogen {
class Font : public NObject { class Font : public NObject {
......
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
*/ */
#include "FontMetrics.h" #include "FontMetrics.h"
#include <ntk.h>
#include <string>
#include "Font.h"
#include "X11/Xlib.h"
#include "ntk.h"
namespace nitrogen { namespace nitrogen {
FontMetrics::FontMetrics(Font* f) { FontMetrics::FontMetrics(Font* f) {
......
...@@ -33,13 +33,14 @@ ...@@ -33,13 +33,14 @@
#ifndef FONTMETRICS_H #ifndef FONTMETRICS_H
#define FONTMETRICS_H #define FONTMETRICS_H
#include <ntk.h> #include <ntk.h>
#include <Font.h> #include <Font.h>
#include <string>
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h>
namespace nitrogen { namespace nitrogen {
class Font;
class FontMetrics : public NObject { class FontMetrics : public NObject {
public: public:
FontMetrics(Font* f); FontMetrics(Font* f);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#ifndef GRAPHICS_H #ifndef GRAPHICS_H
#define GRAPHICS_H #define GRAPHICS_H
#include <ntk.h> #include <ntk.h>
#include <Font.h> #include <Font.h>
#include <FontMetrics.h> #include <FontMetrics.h>
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#ifndef NCOMPONENT_H #ifndef NCOMPONENT_H
#define NCOMPONENT_H #define NCOMPONENT_H
#include <ntk.h> #include <ntk.h>
#include <string>
namespace nitrogen { namespace nitrogen {
......
...@@ -31,8 +31,10 @@ ...@@ -31,8 +31,10 @@
* Created on March 16, 2018, 11:12 AM * Created on March 16, 2018, 11:12 AM
*/ */
#include <NObject.h> #include "NObject.h"
#include <typeinfo>
#include <ostream>
namespace nitrogen { namespace nitrogen {
NObject::NObject() { NObject::NObject() {
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
*/ */
#ifndef NOBJECT_H #ifndef NOBJECT_H
#define NOBJECT_H #define NOBJECT_H
#include <ntk.h> #include <ntk.h>
#include <ostream>
namespace nitrogen { namespace nitrogen {
class NObject : public gc { class NObject : public gc {
......
...@@ -43,8 +43,9 @@ ...@@ -43,8 +43,9 @@
#endif #endif
#include <nde.h> #include <nde.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <string> #include <ostream>
#define NTK_NAME "ntk" #define NTK_NAME "ntk"
#define NTK_VERSION_MAJOR 1 #define NTK_VERSION_MAJOR 1
......
...@@ -43,8 +43,9 @@ ...@@ -43,8 +43,9 @@
#endif #endif
#include <nde.h> #include <nde.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <string> #include <ostream>
#define NTK_NAME "@PROJECT_NAME@" #define NTK_NAME "@PROJECT_NAME@"
#define NTK_VERSION_MAJOR @Nitrogen_VERSION_MAJOR@ #define NTK_VERSION_MAJOR @Nitrogen_VERSION_MAJOR@
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <ntk.h> #include <ntk.h>
#include <X11/Xlib.h>
namespace nitrogen { namespace nitrogen {
void init(Display *d) { void init(Display *d) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!