Lines Matching refs:pointer

1 # @ohos.multimodalInput.pointer (Mouse Pointer) (System API)
3 The **pointer** module provides APIs related to pointer attribute management.
9 …tails about its public APIs, see [@ohos.multimodalInput.pointer (Mouse Pointer)](js-apis-pointer.m…
14 import { pointer } from '@kit.InputKit';
17 ## pointer.setPointerSpeed
21 Sets the moving speed of the mouse pointer. This API uses an asynchronous callback to return the re…
31 | speed | number | Yes | Moving speed of the mouse pointer. The value range…
47 pointer.setPointerSpeed(5, (error: Error) => {
49 console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
52 console.log(`Set pointer speed success`);
55 console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
59 ## pointer.setPointerSpeed
63 Sets the moving speed of the mouse pointer. This API uses a promise to return the result.
73 | speed | number | Yes | Moving speed of the mouse pointer. The value ranges from **1** to **11**…
94 pointer.setPointerSpeed(5).then(() => {
95 console.log(`Set pointer speed success`);
98 console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
102 ## pointer.setPointerSpeedSync<sup>10+</sup>
106 Sets the moving speed of the mouse pointer. This API returns the result synchronously.
116 | speed | number | Yes | Moving speed of the mouse pointer. The value ranges from **1** to **11**…
131 let speed = pointer.setPointerSpeedSync(5);
132 console.log(`Set pointer speed success`);
134 console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
138 ## pointer.getPointerSpeed
142 Obtains the moving speed of the mouse pointer. This API uses an asynchronous callback to return the…
167 pointer.getPointerSpeed((error: Error, speed: number) => {
169 console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
172 console.log(`Get pointer speed success, speed: ${JSON.stringify(speed)}`);
175 console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
179 ## pointer.getPointerSpeed
183 Obtains the moving speed of the mouse pointer. This API uses a promise to return the result.
199 pointer.getPointerSpeed().then(speed => {
200 console.log(`Get pointer speed success, speed: ${JSON.stringify(speed)}`);
203 console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
207 ## pointer.getPointerSpeedSync<sup>10+</sup>
211 Obtains the moving speed of the mouse pointer. This API returns the result synchronously.
221 | number | Moving speed of the mouse pointer.|
236 let speed = pointer.getPointerSpeedSync();
237 console.log(`Get pointer speed success, speed: ${JSON.stringify(speed)}`);
239 console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
243 ## pointer.setHoverScrollState<sup>10+</sup>
273 pointer.setHoverScrollState(true, (error: Error) => {
285 ## pointer.setHoverScrollState<sup>10+</sup>
320 pointer.setHoverScrollState(true).then(() => {
328 ## pointer.getHoverScrollState<sup>10+</sup>
357 pointer.getHoverScrollState((error: Error, state: boolean) => {
365 ## pointer.getHoverScrollState<sup>10+</sup>
394 pointer.getHoverScrollState().then((state: boolean) => {
402 ## pointer.setMousePrimaryButton<sup>10+</sup>
416 | primary | [PrimaryButton](js-apis-pointer.md#primarybutton10) | Yes | ID of the primary mous…
432 pointer.setMousePrimaryButton(pointer.PrimaryButton.RIGHT, (error: Error) => {
444 ## pointer.setMousePrimaryButton<sup>10+</sup>
458 | primary | [PrimaryButton](js-apis-pointer.md#primarybutton10) | Yes | ID of the primary mouse b…
479 pointer.setMousePrimaryButton(pointer.PrimaryButton.RIGHT).then(() => {
487 ## pointer.getMousePrimaryButton<sup>10+</sup>
501 | callback | AsyncCallback&lt;[PrimaryButton](js-apis-pointer.md#primarybutton10)&gt; | Yes | Cal…
516 pointer.getMousePrimaryButton((error: Error, primary: pointer.PrimaryButton) => {
524 ## pointer.getMousePrimaryButton<sup>10+</sup>
538 | Promise&lt;[PrimaryButton](js-apis-pointer.md#primarybutton10)&gt; | Promise used to return the r…
553 pointer.getMousePrimaryButton().then((primary: pointer.PrimaryButton) => {
561 ## pointer.setMouseScrollRows<sup>10+</sup>
591 pointer.setMouseScrollRows(1, (error: Error) => {
603 ## pointer.setMouseScrollRows<sup>10+</sup>
638 pointer.setMouseScrollRows(20).then(() => {
646 ## pointer.getMouseScrollRows<sup>10+</sup>
675 pointer.getMouseScrollRows((error: Error, rows: number) => {
683 ## pointer.getMouseScrollRows<sup>10+</sup>
687 Obtains the moving speed of the mouse pointer. This API uses a promise to return the result.
712 pointer.getMouseScrollRows().then((rows: number) => {
720 ## pointer.setTouchpadScrollSwitch<sup>10+</sup>
750 pointer.setTouchpadScrollSwitch(true, (error: Error) => {
762 ## pointer.setTouchpadScrollSwitch<sup>10+</sup>
797 pointer.setTouchpadScrollSwitch(false).then(() => {
805 ## pointer.getTouchpadScrollSwitch<sup>10+</sup>
834 pointer.getTouchpadScrollSwitch((error: Error, state: boolean) => {
842 ## pointer.getTouchpadScrollSwitch<sup>10+</sup>
871 pointer.getTouchpadScrollSwitch().then((state) => {
879 ## pointer.setTouchpadScrollDirection<sup>10+</sup>
909 pointer.setTouchpadScrollDirection(true, (error: Error) => {
921 ## pointer.setTouchpadScrollDirection<sup>10+</sup>
956 pointer.setTouchpadScrollDirection (false).then(() => {
964 ## pointer.getTouchpadScrollDirection<sup>10+</sup>
993 pointer.getTouchpadScrollDirection ((error: Error, state: boolean) => {
1001 ## pointer.getTouchpadScrollDirection<sup>10+</sup>
1030 pointer.getTouchpadScrollDirection().then((state: boolean) => {
1038 ## pointer.setTouchpadTapSwitch<sup>10+</sup>
1068 pointer.setTouchpadTapSwitch(true, (error: Error) => {
1080 ## pointer.setTouchpadTapSwitch <sup>10+</sup>
1115 pointer.setTouchpadTapSwitch(false).then(() => {
1123 ## pointer.getTouchpadTapSwitch<sup>10+</sup>
1152 pointer.getTouchpadTapSwitch((error: Error, state: boolean) => {
1160 ## pointer.getTouchpadTapSwitch<sup>10+</sup>
1189 pointer.getTouchpadTapSwitch().then((state: boolean) => {
1197 ## pointer.setTouchpadPointerSpeed<sup>10+</sup>
1201 Sets the mouse pointer moving speed of the touchpad. This API uses an asynchronous callback to retu…
1211 | speed | number | Yes |Mouse pointer moving speed of the touchpad. The value …
1227 pointer.setTouchpadPointerSpeed(1, (error: Error) => {
1239 ## pointer.setTouchpadPointerSpeed<sup>10+</sup>
1243 Sets the mouse pointer moving speed of the touchpad. This API uses a promise to return the result.
1253 | speed| number | Yes | Mouse pointer moving speed of the touchpad. The value range is [1,11]. Th…
1274 pointer.setTouchpadPointerSpeed(10).then(() => {
1282 ## pointer.getTouchpadPointerSpeed<sup>10+</sup>
1286 Obtains the mouse pointer moving speed of the touchpad. This API uses an asynchronous callback to r…
1311 pointer.getTouchpadPointerSpeed((error: Error, speed: number) => {
1319 ## pointer.getTouchpadPointerSpeed<sup>10+</sup>
1323 Obtains the mouse pointer moving speed of the touchpad. This API uses a promise to return the resul…
1348 pointer.getTouchpadPointerSpeed().then((speed: number) => {
1356 ## pointer.setTouchpadPinchSwitch<sup>10+</sup>
1386 pointer.setTouchpadTapSwitch(true, (error: Error) => {
1398 ## pointer.setTouchpadPinchSwitch<sup>10+</sup>
1433 pointer.setTouchpadPinchSwitch(false).then(() => {
1441 ## pointer.getTouchpadPinchSwitch<sup>10+</sup>
1470 pointer.getTouchpadPinchSwitch((error: Error, state: boolean) => {
1478 ## pointer.getTouchpadPinchSwitch<sup>10+</sup>
1507 pointer.getTouchpadPinchSwitch().then((state: boolean) => {
1515 ## pointer.setTouchpadSwipeSwitch<sup>10+</sup>
1545 pointer.setTouchpadSwipeSwitch(true, (error: Error) => {
1557 ## pointer.setTouchpadSwipeSwitch<sup>10+</sup>
1592 pointer.setTouchpadSwipeSwitch(false).then(() => {
1600 ## pointer.getTouchpadSwipeSwitch<sup>10+</sup>
1629 pointer.getTouchpadSwipeSwitch((error: Error, state: boolean) => {
1637 ## pointer.getTouchpadSwipeSwitch<sup>10+</sup>
1666 pointer.getTouchpadSwipeSwitch().then((state: boolean) => {
1674 ## pointer.setTouchpadRightClickType<sup>10+</sup>
1688 | type| [RightClickType](js-apis-pointer.md#rightclicktype10)| Yes |Shortcut menu type of the tou…
1704pointer.setTouchpadRightClickType(pointer.RightClickType.TOUCHPAD_RIGHT_BUTTON , (error: Error) =>…
1716 ## pointer.setTouchpadRightClickType<sup>10+</sup>
1730 | type| [RightClickType](js-apis-pointer.md#rightclicktype10)| Yes | Shortcut menu type of the to…
1751 pointer.setTouchpadRightClickType(pointer.RightClickType.TOUCHPAD_RIGHT_BUTTON).then(() => {
1759 ## pointer.getTouchpadRightClickType<sup>10+</sup>
1773 | callback | AsyncCallback\<[RightClickType](js-apis-pointer.md#rightclicktype10)> | Yes | Callba…
1788 pointer.getTouchpadRightClickType((error: Error, type: pointer.RightClickType) => {
1796 ## pointer.getTouchpadRightClickType<sup>10+</sup>
1810 | Promise\<[RightClickType](js-apis-pointer.md#rightclicktype10) > | Promise used to return the res…
1825 pointer.getTouchpadRightClickType().then((type: pointer.RightClickType) => {
1833 ## pointer.setPointerSize<sup>10+</sup>
1837 Sets the pointer size. This API uses an asynchronous callback to return the result.
1863 pointer.setPointerSize(1, (error: Error) => {
1875 ## pointer.setPointerSize<sup>10+</sup>
1879 Sets the pointer size. This API uses a promise to return the result.
1910 pointer.setPointerSize(3).then(() => {
1918 ## pointer.setPointerSizeSync<sup>10+</sup>
1922 Sets the pointer size. This API returns the result synchronously.
1947 pointer.setPointerSizeSync(5);
1954 ## pointer.getPointerSize<sup>10+</sup>
1958 Obtains the pointer size. This API uses an asynchronous callback to return the result.
1983 pointer.getPointerSize((error: Error, size: number) => {
1991 ## pointer.getPointerSize<sup>10+</sup>
1995 Obtains the pointer size. This API uses a promise to return the result.
2020 pointer.getPointerSize().then((size: number) => {
2028 ## pointer.getPointerSizeSync<sup>10+</sup>
2032 Obtains the pointer size. This API returns the result synchronously.
2057 let pointerSize = pointer.getPointerSizeSync();
2064 ## pointer.setPointerColor<sup>10+</sup>
2068 Sets the pointer color. This API uses an asynchronous callback to return the result.
2098 pointer.setPointerColor(0xF6C800, (error: Error) => {
2110 ## pointer.setPointerColor<sup>10+</sup>
2114 Sets the pointer color. This API uses a promise to return the result.
2149 pointer.setPointerColor(0xF6C800).then(() => {
2157 ## pointer.setPointerColorSync<sup>10+</sup>
2161 Sets the pointer color. This API returns the result synchronously.
2190 pointer.setPointerColorSync(0xF6C800);
2197 ## pointer.getPointerColor<sup>10+</sup>
2201 Obtains the pointer color. This API uses an asynchronous callback to return the result.
2226 pointer.getPointerColor((error: Error, color: number) => {
2234 ## pointer.getPointerColor<sup>10+</sup>
2238 Obtains the pointer color. This API uses a promise to return the result.
2263 pointer.getPointerColor().then((color: number) => {
2271 ## pointer.getPointerColorSync<sup>10+</sup>
2275 Obtains the pointer color. This API returns the result synchronously.
2300 let pointerColor = pointer.getPointerColorSync();