@@ -62,9 +62,12 @@ class WorkspaceEvent(IpcBaseEvent):
6262 :ivar old: When the change is "focus", an old (object) property will be
6363 present with the previous workspace if it exists.
6464 :vartype old: :class:`Con` or :class:`None`
65+ :ivar ipc_data: The raw data from the i3 ipc.
66+ :vartype ipc_data: dict
6567 """
6668
6769 def __init__ (self , data , conn , _Con = con .Con ):
70+ self .ipc_data = data
6871 self .change = data ['change' ]
6972 self .current = None
7073 self .old = None
@@ -84,9 +87,12 @@ class OutputEvent(IpcBaseEvent):
8487
8588 :ivar change: The type of change (currently only "unspecified").
8689 :vartype change: str
90+ :ivar ipc_data: The raw data from the i3 ipc.
91+ :vartype ipc_data: dict
8792 """
8893
8994 def __init__ (self , data ):
95+ self .ipc_data = data
9096 self .change = data ['change' ]
9197
9298
@@ -100,9 +106,12 @@ class ModeEvent(IpcBaseEvent):
100106 :ivar pango_markup: Whether pango markup should be used for displaying this
101107 mode.
102108 :vartype pango_markup: bool
109+ :ivar ipc_data: The raw data from the i3 ipc.
110+ :vartype ipc_data: dict
103111 """
104112
105113 def __init__ (self , data ):
114+ self .ipc_data = data
106115 self .change = data ['change' ]
107116 self .pango_markup = data .get ('pango_markup' , False )
108117
@@ -117,9 +126,12 @@ class WindowEvent(IpcBaseEvent):
117126 :ivar change: The type of change.
118127 :vartype change: str
119128 :ivar container: The window's parent container.
129+ :ivar ipc_data: The raw data from the i3 ipc.
130+ :vartype ipc_data: dict
120131 """
121132
122133 def __init__ (self , data , conn , _Con = con .Con ):
134+ self .ipc_data = data
123135 self .change = data ['change' ]
124136 self .container = _Con (data ['container' ], None , conn )
125137
@@ -150,6 +162,8 @@ class BarconfigUpdateEvent(IpcBaseEvent, BarConfigReply):
150162 :ivar colors: Contains key/value pairs of colors. Each value is a color
151163 code in hex, formatted #rrggbb (like in HTML).
152164 :vartype colors: dict
165+ :ivar ipc_data: The raw data from the i3 ipc.
166+ :vartype ipc_data: dict
153167 """
154168 pass
155169
@@ -172,9 +186,12 @@ class BindingInfo:
172186 :ivar input_type: This will be "keyboard" or "mouse" depending on whether
173187 or not this was a keyboard or a mouse binding.
174188 :vartype input_type: str
189+ :ivar ipc_data: The raw data from the i3 ipc.
190+ :vartype ipc_data: dict
175191 """
176192
177193 def __init__ (self , data ):
194+ self .ipc_data = data
178195 self .command = data ['command' ]
179196 self .event_state_mask = data .get ('event_state_mask' , [])
180197 self .input_code = data ['input_code' ]
@@ -196,9 +213,12 @@ class BindingEvent(IpcBaseEvent):
196213 :vartype change: str
197214 :ivar binding: Contains details about the binding that was run.
198215 :vartype binding: :class:`BindingInfo <i3ipc.BindingInfo>`
216+ :ivar ipc_data: The raw data from the i3 ipc.
217+ :vartype ipc_data: dict
199218 """
200219
201220 def __init__ (self , data ):
221+ self .ipc_data = data
202222 self .change = data ['change' ]
203223 self .binding = BindingInfo (data ['binding' ])
204224
@@ -211,9 +231,12 @@ class ShutdownEvent(IpcBaseEvent):
211231
212232 :ivar change: The type of change.
213233 :vartype change: str
234+ :ivar ipc_data: The raw data from the i3 ipc.
235+ :vartype ipc_data: dict
214236 """
215237
216238 def __init__ (self , data ):
239+ self .ipc_data = data
217240 self .change = data ['change' ]
218241
219242
@@ -229,9 +252,12 @@ class TickEvent(IpcBaseEvent):
229252 i3 (<=4.15).
230253 :ivar payload: The payload that was sent with the tick.
231254 :vartype payload: str
255+ :ivar ipc_data: The raw data from the i3 ipc.
256+ :vartype ipc_data: dict
232257 """
233258
234259 def __init__ (self , data ):
260+ self .ipc_data = data
235261 # i3 didn't include the 'first' field in 4.15. See i3/i3#3271.
236262 self .first = data .get ('first' , None )
237263 self .payload = data ['payload' ]
@@ -244,8 +270,11 @@ class InputEvent(IpcBaseEvent):
244270 :vartype change: str
245271 :ivar input: Information about the input that changed.
246272 :vartype input: :class:`InputReply <i3ipc.InputReply>`
273+ :ivar ipc_data: The raw data from the i3 ipc.
274+ :vartype ipc_data: dict
247275 """
248276
249277 def __init__ (self , data ):
278+ self .ipc_data = data
250279 self .change = data ['change' ]
251280 self .input = InputReply (data ['input' ])
0 commit comments