add the config header and emacs comment to all the .cc's
Dana Jansens danakj@orodu.net
21 files changed,
119 insertions(+),
20 deletions(-)
jump to
M
otk/application.cc
→
otk/application.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "application.hh" #include "eventhandler.hh" #include "widget.hh"
M
otk/appwidget.cc
→
otk/appwidget.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "appwidget.hh" #include "application.hh"
M
otk/display.cc
→
otk/display.cc
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h"
M
otk/eventdispatcher.cc
→
otk/eventdispatcher.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "eventdispatcher.hh" #include "display.hh" #include <iostream>
M
otk/eventdispatcher.hh
→
otk/eventdispatcher.hh
@@ -28,6 +28,8 @@ private:
OtkEventMap _map; OtkEventHandler *_fallback; + //! The time at which the last XEvent with a time was received + Time _lasttime; // XXX: store this! also provide an accessor! }; }
M
otk/eventhandler.cc
→
otk/eventhandler.cc
@@ -1,5 +1,11 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + +#include "display.hh" #include "eventhandler.hh" -#include <iostream> namespace otk {@@ -78,7 +84,19 @@ case SelectionNotify:
return selectionHandler(e.xselection); case SelectionRequest: return selectionRequestHandler(e.xselectionrequest); - }; + default: +#ifdef SHAPE + if (e.type == otk::OBDisplay::shapeEventBase()) + return shapeHandler((*(XShapeEvent*)&e)); +#endif // SHAPE + ; + } +} + + +void OtkEventHandler::clientMessageHandler(const XClientMessageEvent &) +{ + } }
M
otk/eventhandler.hh
→
otk/eventhandler.hh
@@ -3,6 +3,10 @@ #define __eventhandler__hh
extern "C" { #include <X11/Xlib.h> + +#ifdef SHAPE +#include <X11/extensions/shape.h> +#endif // SHAPE } namespace otk {@@ -93,9 +97,6 @@
//! Called when the colormap changes, or is installed or unistalled virtual void colorMapHandler(const XColormapEvent &) {} - //! Called when a client calls XSendEvent - virtual void clientMessageHandler(const XClientMessageEvent &) {} - //! Called when a property of a window changes virtual void propertyHandler(const XPropertyEvent &) {}@@ -107,6 +108,18 @@ virtual void selectionHandler(const XSelectionEvent &) {}
//! Called when a SelectionEvent occurs virtual void selectionRequestHandler(const XSelectionRequestEvent &) {} + + //! Called when a client calls XSendEvent + /*! + Some types of client messages are filtered out and sent to more specific + event handler functions. + */ + virtual void clientMessageHandler(const XClientMessageEvent &); + +#if defined(SHAPE) || defined(DOXYGEN_IGNORE) + //! Called when a shape extention event fires + virtual void shapeHandler(const XShapeEvent &) {}; +#endif // SHAPE virtual ~OtkEventHandler();
M
otk/focuslabel.cc
→
otk/focuslabel.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "focuslabel.hh" namespace otk {
M
otk/focuswidget.cc
→
otk/focuswidget.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "focuswidget.hh" namespace otk {
M
otk/image.cc
→
otk/image.cc
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h"
M
otk/imagecontrol.cc
→
otk/imagecontrol.cc
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h"
M
otk/label.cc
→
otk/label.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "label.hh" namespace otk {
M
otk/otk_test.cc
→
otk/otk_test.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "application.hh" #include "focuswidget.hh" #include "appwidget.hh"
M
otk/rect.cc
→
otk/rect.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "rect.hh" namespace otk {
M
otk/screeninfo.cc
→
otk/screeninfo.cc
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h"
M
otk/style.cc
→
otk/style.cc
@@ -1,6 +1,8 @@
-#ifdef HAVE_CONFIG_H -#include "../config.h" -#endif // HAVE_CONFIG_H +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif #include <assert.h> #include <iostream>
M
otk/timer.cc
→
otk/timer.cc
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h"
M
otk/timerqueuemanager.cc
→
otk/timerqueuemanager.cc
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h"
M
otk/widget.cc
→
otk/widget.cc
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + #include "widget.hh" #include "display.hh" #include "assassin.hh"
M
otk/widget.hh
→
otk/widget.hh
@@ -1,15 +1,19 @@
#ifndef __widget_hh #define __widget_hh -#include <string> -#include <list> - #include "rect.hh" #include "point.hh" #include "texture.hh" #include "style.hh" #include "eventdispatcher.hh" #include "application.hh" + +extern "C" { +#include <assert.h> +} + +#include <string> +#include <list> namespace otk {@@ -78,10 +82,10 @@ virtual void addChild(OtkWidget *child, bool front = false);
virtual void removeChild(OtkWidget *child); inline bool isStretchableHorz(void) const { return _stretchable_horz; } - void setStretchableHorz(bool s_horz) { _stretchable_horz = s_horz; } + void setStretchableHorz(bool s_horz = true) { _stretchable_horz = s_horz; } inline bool isStretchableVert(void) const { return _stretchable_vert; } - void setStretchableVert(bool s_vert) { _stretchable_vert = s_vert; } + void setStretchableVert(bool s_vert = true) { _stretchable_vert = s_vert; } inline Cursor getCursor(void) const { return _cursor; }@@ -93,7 +97,7 @@ inline Direction getDirection(void) const { return _direction; }
void setDirection(Direction dir) { _direction = dir; } inline Style *getStyle(void) const { return _style; } - void setStyle(Style *style) { _style = style; } + void setStyle(Style *style) { assert(style); _style = style; } inline OtkEventDispatcher *getEventDispatcher(void) { return _event_dispatcher; }