*** empty log message ***
authorroot <root>
Thu, 29 Jul 2004 14:05:27 +0000 (14:05 +0000)
committerroot <root>
Thu, 29 Jul 2004 14:05:27 +0000 (14:05 +0000)
src/encoding.h
src/rxvtcolor.C
src/rxvtcolor.h

index 2f94315..aa1f5da 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ENCODING_H
 #define ENCODING_H
 
-#include <stdint.h>
+#include <inttypes.h>
 
 typedef uint32_t unicode_t;
 
index 92bfa42..dfa3e87 100644 (file)
@@ -104,6 +104,7 @@ refcache<T>::~refcache ()
 
 /////////////////////////////////////////////////////////////////////////////
 
+#ifdef USE_XIM
 static void
 im_destroy_cb (XIM unused1, XPointer client_data, XPointer unused3)
 {
@@ -138,6 +139,7 @@ rxvt_xim::~rxvt_xim ()
   if (xim)
     XCloseIM (xim);
 }
+#endif
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -185,7 +187,9 @@ bool rxvt_display::init ()
   fcntl (fd, F_SETFD, FD_CLOEXEC);
 
   XSelectInput (display, root, PropertyChangeMask);
+#ifdef USE_XIM
   xa_xim_servers = XInternAtom (display, "XIM_SERVERS", 0);
+#endif
 
   flush ();
 
@@ -200,11 +204,13 @@ rxvt_display::~rxvt_display ()
     XCloseDisplay (display);
 }
 
+#ifdef USE_XIM
 void rxvt_display::im_change_cb ()
 {
   for (im_watcher **i = imw.begin (); i != imw.end (); ++i)
     (*i)->call ();
 }
+#endif
 
 void rxvt_display::x_cb (io_watcher &w, short revents)
 {
@@ -215,10 +221,12 @@ void rxvt_display::x_cb (io_watcher &w, short revents)
 
       //printf ("T %d w %lx\n", xev.type, xev.xany.window);//D
 
+#ifdef USE_XIM
       if (xev.type == PropertyNotify
           && xev.xany.window == root
           && xev.xproperty.atom == xa_xim_servers)
         im_change_cb ();
+#endif
 
       for (int i = xw.size (); i--; )
         {
@@ -258,6 +266,15 @@ void rxvt_display::unreg (xevent_watcher *w)
     xw[w->active - 1] = 0;
 }
 
+void rxvt_display::set_selection_owner (rxvt_term *owner)
+{
+  if (selection_owner && selection_owner != owner)
+    selection_owner->selection_clear ();
+
+  selection_owner = owner;
+}
+
+#ifdef USE_XIM
 void rxvt_display::reg (im_watcher *w)
 {
   imw.push_back (w);
@@ -268,14 +285,6 @@ void rxvt_display::unreg (im_watcher *w)
   imw.erase (find (imw.begin (), imw.end (), w));
 }
 
-void rxvt_display::set_selection_owner (rxvt_term *owner)
-{
-  if (selection_owner && selection_owner != owner)
-    selection_owner->selection_clear ();
-
-  selection_owner = owner;
-}
-
 rxvt_xim *rxvt_display::get_xim (const char *locale, const char *modifiers)
 {
   char *id;
@@ -301,6 +310,7 @@ void rxvt_display::put_xim (rxvt_xim *xim)
 {
   xims.put (xim);
 }
+#endif
 
 Atom rxvt_display::atom (const char *name)
 {
index 47796d7..1adedfb 100644 (file)
@@ -48,6 +48,7 @@ struct refcache : vector<T *> {
 
 /////////////////////////////////////////////////////////////////////////////
 
+#ifdef USE_XIM
 struct rxvt_xim : refcounted {
   void destroy ();
   rxvt_display *display;
@@ -59,6 +60,7 @@ struct rxvt_xim : refcounted {
   bool init ();
   ~rxvt_xim ();
 };
+#endif
 
 struct rxvt_display : refcounted {
   Atom xa_xim_servers;
@@ -67,10 +69,12 @@ struct rxvt_display : refcounted {
 
   io_watcher x_ev; void x_cb (io_watcher &w, short revents);
 
+#ifdef USE_XIM
   refcache<rxvt_xim> xims;
   vector<im_watcher *> imw;
 
   void im_change_cb ();
+#endif
 
 //public
   Display  *display;
@@ -87,19 +91,23 @@ struct rxvt_display : refcounted {
 
   void flush ();
 
+  void set_selection_owner (rxvt_term *owner);
+
   void reg (xevent_watcher *w);
   void unreg (xevent_watcher *w);
+
+#ifdef USE_XIM
   void reg (im_watcher *w);
   void unreg (im_watcher *w);
 
-  void set_selection_owner (rxvt_term *owner);
-
   rxvt_xim *get_xim (const char *locale, const char *modifiers);
   void put_xim (rxvt_xim *xim);
+#endif
 
   Atom atom (const char *name);
 };
 
+#ifdef USE_XIM
 struct im_watcher : watcher, callback0<void> {
   template<class O1, class O2>
   im_watcher (O1 *object, void (O2::*method) ())
@@ -115,6 +123,7 @@ struct im_watcher : watcher, callback0<void> {
     display->unreg (this);
   }
 };
+#endif
 
 struct xevent_watcher : watcher, callback1<void, XEvent &> {
   Window window;