KKBSwitch – keyboard layout indicator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kbswitchintf_skel.cpp 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /****************************************************************************
  2. **
  3. ** DCOP Skeleton created by dcopidl2cpp from kbswitchintf.kidl
  4. **
  5. ** WARNING! All changes made in this file will be lost!
  6. **
  7. *****************************************************************************/
  8. #include "./kbswitchintf.h"
  9. #include <kdatastream.h>
  10. static const char* const KBSwitchIntf_ftable[5][3] = {
  11. { "int", "getNumKbdGroups()", "getNumKbdGroups()" },
  12. { "ASYNC", "selectNextGroup()", "selectNextGroup()" },
  13. { "ASYNC", "selectGroup(int)", "selectGroup(int groupno)" },
  14. { "TQStringList", "getGroupNames()", "getGroupNames()" },
  15. { 0, 0, 0 }
  16. };
  17. static const int KBSwitchIntf_ftable_hiddens[4] = {
  18. 0,
  19. 0,
  20. 0,
  21. 0,
  22. };
  23. bool KBSwitchIntf::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
  24. {
  25. if ( fun == KBSwitchIntf_ftable[0][1] ) { // int getNumKbdGroups()
  26. replyType = KBSwitchIntf_ftable[0][0];
  27. TQDataStream _replyStream( replyData, IO_WriteOnly );
  28. _replyStream << getNumKbdGroups( );
  29. } else if ( fun == KBSwitchIntf_ftable[1][1] ) { // void selectNextGroup()
  30. replyType = KBSwitchIntf_ftable[1][0];
  31. selectNextGroup( );
  32. } else if ( fun == KBSwitchIntf_ftable[2][1] ) { // void selectGroup(int)
  33. int arg0;
  34. TQDataStream arg( data, IO_ReadOnly );
  35. arg >> arg0;
  36. replyType = KBSwitchIntf_ftable[2][0];
  37. selectGroup(arg0 );
  38. } else if ( fun == KBSwitchIntf_ftable[3][1] ) { // TQStringList getGroupNames()
  39. replyType = KBSwitchIntf_ftable[3][0];
  40. TQDataStream _replyStream( replyData, IO_WriteOnly );
  41. _replyStream << getGroupNames( );
  42. } else {
  43. return DCOPObject::process( fun, data, replyType, replyData );
  44. }
  45. return true;
  46. }
  47. QCStringList KBSwitchIntf::interfaces()
  48. {
  49. QCStringList ifaces = DCOPObject::interfaces();
  50. ifaces += "KBSwitchIntf";
  51. return ifaces;
  52. }
  53. QCStringList KBSwitchIntf::functions()
  54. {
  55. QCStringList funcs = DCOPObject::functions();
  56. for ( int i = 0; KBSwitchIntf_ftable[i][2]; i++ ) {
  57. if (KBSwitchIntf_ftable_hiddens[i])
  58. continue;
  59. TQCString func = KBSwitchIntf_ftable[i][0];
  60. func += ' ';
  61. func += KBSwitchIntf_ftable[i][2];
  62. funcs << func;
  63. }
  64. return funcs;
  65. }