-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(get-page-source): add get-page-source api
- Loading branch information
1 parent
6cf1a45
commit 399d7aa
Showing
126 changed files
with
1,483 additions
and
644 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
client/python/gamium/gamium/Protocol/generated/Packets/GetPageSourceParam.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# automatically generated by the FlatBuffers compiler, do not modify | ||
|
||
# namespace: Packets | ||
|
||
import flatbuffers | ||
from flatbuffers.compat import import_numpy | ||
np = import_numpy() | ||
|
||
class GetPageSourceParam(object): | ||
__slots__ = ['_tab'] | ||
|
||
@classmethod | ||
def GetRootAs(cls, buf, offset=0): | ||
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) | ||
x = GetPageSourceParam() | ||
x.Init(buf, n + offset) | ||
return x | ||
|
||
@classmethod | ||
def GetRootAsGetPageSourceParam(cls, buf, offset=0): | ||
"""This method is deprecated. Please switch to GetRootAs.""" | ||
return cls.GetRootAs(buf, offset) | ||
# GetPageSourceParam | ||
def Init(self, buf, pos): | ||
self._tab = flatbuffers.table.Table(buf, pos) | ||
|
||
def GetPageSourceParamStart(builder): builder.StartObject(0) | ||
def Start(builder): | ||
return GetPageSourceParamStart(builder) | ||
def GetPageSourceParamEnd(builder): return builder.EndObject() | ||
def End(builder): | ||
return GetPageSourceParamEnd(builder) | ||
|
||
class GetPageSourceParamT(object): | ||
|
||
# GetPageSourceParamT | ||
def __init__(self): | ||
pass | ||
|
||
@classmethod | ||
def InitFromBuf(cls, buf, pos): | ||
getPageSourceParam = GetPageSourceParam() | ||
getPageSourceParam.Init(buf, pos) | ||
return cls.InitFromObj(getPageSourceParam) | ||
|
||
@classmethod | ||
def InitFromPackedBuf(cls, buf, pos=0): | ||
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) | ||
return cls.InitFromBuf(buf, pos+n) | ||
|
||
@classmethod | ||
def InitFromObj(cls, getPageSourceParam): | ||
x = GetPageSourceParamT() | ||
x._UnPack(getPageSourceParam) | ||
return x | ||
|
||
# GetPageSourceParamT | ||
def _UnPack(self, getPageSourceParam): | ||
if getPageSourceParam is None: | ||
return | ||
|
||
# GetPageSourceParamT | ||
def Pack(self, builder): | ||
GetPageSourceParamStart(builder) | ||
getPageSourceParam = GetPageSourceParamEnd(builder) | ||
return getPageSourceParam |
81 changes: 81 additions & 0 deletions
81
client/python/gamium/gamium/Protocol/generated/Packets/GetPageSourceResult.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# automatically generated by the FlatBuffers compiler, do not modify | ||
|
||
# namespace: Packets | ||
|
||
import flatbuffers | ||
from flatbuffers.compat import import_numpy | ||
np = import_numpy() | ||
|
||
class GetPageSourceResult(object): | ||
__slots__ = ['_tab'] | ||
|
||
@classmethod | ||
def GetRootAs(cls, buf, offset=0): | ||
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) | ||
x = GetPageSourceResult() | ||
x.Init(buf, n + offset) | ||
return x | ||
|
||
@classmethod | ||
def GetRootAsGetPageSourceResult(cls, buf, offset=0): | ||
"""This method is deprecated. Please switch to GetRootAs.""" | ||
return cls.GetRootAs(buf, offset) | ||
# GetPageSourceResult | ||
def Init(self, buf, pos): | ||
self._tab = flatbuffers.table.Table(buf, pos) | ||
|
||
# GetPageSourceResult | ||
def PageSource(self): | ||
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) | ||
if o != 0: | ||
return self._tab.String(o + self._tab.Pos) | ||
return None | ||
|
||
def GetPageSourceResultStart(builder): builder.StartObject(1) | ||
def Start(builder): | ||
return GetPageSourceResultStart(builder) | ||
def GetPageSourceResultAddPageSource(builder, pageSource): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pageSource), 0) | ||
def AddPageSource(builder, pageSource): | ||
return GetPageSourceResultAddPageSource(builder, pageSource) | ||
def GetPageSourceResultEnd(builder): return builder.EndObject() | ||
def End(builder): | ||
return GetPageSourceResultEnd(builder) | ||
|
||
class GetPageSourceResultT(object): | ||
|
||
# GetPageSourceResultT | ||
def __init__(self): | ||
self.pageSource = None # type: str | ||
|
||
@classmethod | ||
def InitFromBuf(cls, buf, pos): | ||
getPageSourceResult = GetPageSourceResult() | ||
getPageSourceResult.Init(buf, pos) | ||
return cls.InitFromObj(getPageSourceResult) | ||
|
||
@classmethod | ||
def InitFromPackedBuf(cls, buf, pos=0): | ||
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) | ||
return cls.InitFromBuf(buf, pos+n) | ||
|
||
@classmethod | ||
def InitFromObj(cls, getPageSourceResult): | ||
x = GetPageSourceResultT() | ||
x._UnPack(getPageSourceResult) | ||
return x | ||
|
||
# GetPageSourceResultT | ||
def _UnPack(self, getPageSourceResult): | ||
if getPageSourceResult is None: | ||
return | ||
self.pageSource = getPageSourceResult.PageSource() | ||
|
||
# GetPageSourceResultT | ||
def Pack(self, builder): | ||
if self.pageSource is not None: | ||
pageSource = builder.CreateString(self.pageSource) | ||
GetPageSourceResultStart(builder) | ||
if self.pageSource is not None: | ||
GetPageSourceResultAddPageSource(builder, pageSource) | ||
getPageSourceResult = GetPageSourceResultEnd(builder) | ||
return getPageSourceResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
import { | ||
InputKeyBy, | ||
UnityKeyboard, | ||
UnityKeyCode, | ||
} from "../protocols/generated"; | ||
import { InputKeyBy, UnityKeyboard, UnityKeyCode } from '../protocols/generated'; | ||
|
||
export class KeyBy { | ||
constructor(public readonly by: InputKeyBy, public readonly str: string) {} | ||
static unityKeycode(code: keyof typeof UnityKeyCode): KeyBy { | ||
return new KeyBy(InputKeyBy.UNITY_KEYCODE, code); | ||
} | ||
static unityKeyboard(key: keyof typeof UnityKeyboard): KeyBy { | ||
const casted = key.replace("Digit", ""); | ||
const casted = key.replace('Digit', ''); | ||
return new KeyBy(InputKeyBy.UNITY_KEYBOARD, casted); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.