Ooops
November 25, 2020, 07:31:34 AM

Author Topic: [bb] Blitz+ Event wrapper by skn3 [ 1+ years ago ]  (Read 531 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Blitz+ Event wrapper by skn3 [ 1+ years ago ]
« on: June 29, 2017, 12:28:38 AM »
Title : Blitz+ Event wrapper
Author : skn3
Posted : 1+ years ago

Description : The advantage of using this method, is that you can "fake" events, simply by calling the function.

Code :
Code: BlitzBasic
  1. repeat
  2.         event = WaitEvent()
  3.         If event
  4.                 event_source = EventSource()
  5.                 event_data   = EventData()
  6.                 event_x      = EventX()
  7.                 event_y      = EventY()
  8.                 Select event
  9.                         Case $101  : Event_KeyDown       (event_source,event_data,event_x,event_y)
  10.                         Case $102  : Event_KeyUp         (event_source,event_data,event_x,event_y)
  11.                         Case $103  : Event_KeyStroke     (event_source,event_data,event_x,event_y)
  12.                         Case $201  : Event_MouseDown     (event_source,event_data,event_x,event_y)
  13.                         Case $202  : Event_MouseUp       (event_source,event_data,event_x,event_y)
  14.                         Case $203  : Event_MouseMove     (event_source,event_data,event_x,event_y)
  15.                         Case $204  : Event_MouseWheel    (event_source,event_data,event_x,event_y)
  16.                         Case $205  : Event_MouseEnter    (event_source,event_data,event_x,event_y)
  17.                         Case $206  : Event_MouseLeave    (event_source,event_data,event_x,event_y)
  18.                         Case $401  : Event_GadgetAction  (event_source,event_data,event_x,event_y)
  19.                         Case $801  : Event_WindowMove    (event_source,event_data,event_x,event_y)
  20.                         Case $802  : Event_WindowSize    (event_source,event_data,event_x,event_y)
  21.                         Case $803  : Event_WindowClose   (event_source,event_data,event_x,event_y)
  22.                         Case $804  : Event_WindowActive  (event_source,event_data,event_x,event_y)
  23.                         Case $1001 : Event_MenuAction    (event_source,event_data,event_x,event_y)
  24.                         Case $2001 : Event_AppSuspend    (event_source,event_data,event_x,event_y)
  25.                         Case $2002 : Event_AppResume     (event_source,event_data,event_x,event_y)
  26.                         Case $2003 : Event_DisplayChange (event_source,event_data,event_x,event_y)
  27.                         Case $2004 : Event_BeginModal    (event_source,event_data,event_x,event_y)
  28.                         Case $2005 : Event_EndModal      (event_source,event_data,event_x,event_y)
  29.                         Case $4001 : Event_Timer         (event_source,event_data,event_x,event_y)
  30.                 End Select
  31.         End If
  32. forever
  33.  
  34. Function Event_KeyDown(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  35. End Function
  36.  
  37. Function Event_KeyUp(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  38. End Function
  39.  
  40. Function Event_KeyStroke(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  41. End Function
  42.  
  43. Function Event_MouseDown(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  44. End Function
  45.  
  46. Function Event_MouseUp(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  47. End Function
  48.  
  49. Function Event_MouseMove(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  50. End Function
  51.  
  52. Function Event_MouseWheel(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  53. End Function
  54.  
  55. Function Event_MouseEnter(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  56. End Function
  57.  
  58. Function Event_MouseLeave(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  59. End Function
  60.  
  61. Function Event_GadgetAction(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  62. End Function
  63.  
  64. Function Event_WindowMove(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  65. End Function
  66.  
  67. Function Event_WindowSize(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  68. End Function
  69.  
  70. Function Event_WindowClose(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  71. End Function
  72.  
  73. Function Event_WindowActive(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  74. End Function
  75.  
  76. Function Event_MenuAction(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  77. End Function
  78.  
  79. Function Event_AppSuspend(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  80. End Function
  81.  
  82. Function Event_AppResume(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  83. End Function
  84.  
  85. Function Event_DisplayChange(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  86. End Function
  87.  
  88. Function Event_BeginModal(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  89. End Function
  90.  
  91. Function Event_EndModal(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  92. End Function
  93.  
  94. Function Event_Timer(source,sourcedata,sourcex,sourcey,param1$="",param2$="",param3$="")
  95. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal