| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KXMessages Class Reference

Sending string messages to other applications using the X Client Messages. More...

`#include <kxmessages.h>`

Inheritance diagram for KXMessages:

[legend]
Collaboration diagram for KXMessages:

[legend]
List of all members.

## Signals
void | gotMessage (const QString &message)
## Public Member Functions
| KXMessages (const char *accept_broadcast, QWidget *parent, bool obsolete)
| KXMessages (const char *accept_broadcast=NULL, QWidget *parent=NULL)
void | sendMessage (WId w, const char *msg_type, const QString &message, bool obsolete)
void | sendMessage (WId w, const char *msg_type, const QString &message)
void | broadcastMessage (const char *msg_type, const QString &message, int screen, bool obsolete)
void | broadcastMessage (const char *msg_type, const QString &message)
## Static Public Member Functions
static bool | sendMessageX (Display *disp, WId w, const char *msg_type, const QString &message, bool obsolete)
static bool | sendMessageX (Display *disp, WId w, const char *msg_type, const QString &message)
static bool | broadcastMessageX (Display *disp, const char *msg_type, const QString &message, int screen, bool obsolete)
static bool | broadcastMessageX (Display *disp, const char *msg_type, const QString &message)
## Protected Member Functions
virtual bool | x11Event (XEvent *ev)

## Detailed Description

Sending string messages to other applications using the X Client Messages.

Used internally by KStartupInfo. You usually don't want to use this, use DCOP instead.

Author:
  Lubos Lunak <l.lunak@kde.org>

Definition at line 47 of file kxmessages.h.

## Constructor & Destructor Documentation

KXMessages::KXMessages | ( | const char * | accept_broadcast,
|  | QWidget * | parent,
|  | bool | obsolete
| ) |

  | Creates an instance which will receive X messages. Parameters:
  | accept_broadcast | if non-NULL, all broadcast messages with this message type will be received.
  | parent | the parent of this widget
  | obsolete | always set to false (needed for backwards compatibility with KDE3.1 and older)
Definition at line 57 of file kxmessages.cpp. References QWidget::QWidget().

KXMessages::KXMessages | ( | const char * | accept_broadcast = `NULL`,
|  | QWidget * | parent = `NULL`
| ) |

| Deprecated: This method is equivalent to the other constructor with obsolete = true. Definition at line 40 of file kxmessages.cpp. References QWidget::QWidget().

## Member Function Documentation

void KXMessages::sendMessage | ( | WId | w,
|  | const char * | msg_type,
|  | const QString & | message,
|  | bool | obsolete
| ) |

  | Sends the given message with the given message type only to given window. Parameters:
  | w | X11 handle for the destination window
  | msg_type | the type of the message
  | message | the message itself
  | obsolete | always set to false (needed for backwards compatibility with KDE3.1 and older)
Definition at line 101 of file kxmessages.cpp. References QWidget::winId(). Referenced by sendMessage().

void KXMessages::sendMessage | ( | WId | w,
|  | const char * | msg_type,
|  | const QString & | message
| ) |

| Deprecated: This method is equivalent to sendMessage() with obsolete = true. Definition at line 96 of file kxmessages.cpp. References sendMessage().

void KXMessages::broadcastMessage | ( | const char * | msg_type,
|  | const QString & | message,
|  | int | screen,
|  | bool | obsolete
| ) |

  | Broadcasts the given message with the given message type. Parameters:
  | msg_type | the type of the message
  | message | the message itself
  | screen | X11 screen to use, -1 for the default
  | obsolete | always set to false (needed for backwards compatibility with KDE3.1 and older)
Definition at line 86 of file kxmessages.cpp. References QWidget::winId(). Referenced by broadcastMessage(), KStartupInfo::sendChange(), KStartupInfo::sendFinish(), and KStartupInfo::sendStartup().

void KXMessages::broadcastMessage | ( | const char * | msg_type,
|  | const QString & | message
| ) |

| Deprecated: This method is equivalent to broadcastMessage() with obsolete = true. Definition at line 81 of file kxmessages.cpp. References broadcastMessage().

bool KXMessages::sendMessageX | ( | Display * | disp,
|  | WId | w,
|  | const char * | msg_type,
|  | const QString & | message,
|  | bool | obsolete
| ) | `[static]`

  | Sends the given message with the given message type only to given window. Parameters:
  | disp | X11 connection which will be used instead of qt_x11display()
  | w | X11 handle for the destination window
  | msg_type | the type of the message
  | message | the message itself
  | obsolete | always set to false (needed for backwards compatibility with KDE3.1 and older)
Returns: false when an error occurred, true otherwise Definition at line 138 of file kxmessages.cpp. Referenced by sendMessageX().

bool KXMessages::sendMessageX | ( | Display * | disp,
|  | WId | w,
|  | const char * | msg_type,
|  | const QString & | message
| ) | `[static]`

| Deprecated: This method is equivalent to sendMessageX() with obsolete = true. Definition at line 132 of file kxmessages.cpp. References sendMessageX().

bool KXMessages::broadcastMessageX | ( | Display * | disp,
|  | const char * | msg_type,
|  | const QString & | message,
|  | int | screen,
|  | bool | obsolete
| ) | `[static]`

  | Broadcasts the given message with the given message type. Parameters:
  | disp | X11 connection which will be used instead of qt_x11display()
  | msg_type | the type of the message
  | message | the message itself
  | screen | X11 screen to use, -1 for the default
  | obsolete | always set to false (needed for backwards compatibility with KDE3.1 and older)
Returns: false when an error occurred, true otherwise Definition at line 115 of file kxmessages.cpp. Referenced by broadcastMessageX(), KStartupInfo::sendChangeX(), KStartupInfo::sendFinishX(), and KStartupInfo::sendStartupX().

bool KXMessages::broadcastMessageX | ( | Display * | disp,
|  | const char * | msg_type,
|  | const QString & | message
| ) | `[static]`

| Deprecated: This method is equivalent to broadcastMessageX() with obsolete = true. Definition at line 109 of file kxmessages.cpp. References broadcastMessageX().

void KXMessages::gotMessage | ( | const QString & | message | ) | `[signal]`

  | Emitted when a message was received. Parameters:
  | message | the message that has been received

The documentation for this class was generated from the following files:

- kxmessages.h
- kxmessages.cpp

This file is part of the documentation for kdecore Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:19:14 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003