content top

Process Class

Process Class

  About Process Class   Process class is mainly used to retrieve info about running processes.   Process Class Methods   Process.Exists( string ProcessName ) returns true if the specified process exists or false otherwise. string ProcessName: process name.   Process.Count( string ProcessName ) returns the total number of processes running with the given name. string ProcessName: process name.   Code Example using System.Collections; using System.Collections.Generic; using UnityEngine; using Giavapps.Windows.API; public class CodeExample : MonoBehaviour { private string ProcessName = "notepad.exe"; void Start() { Plugin.Initialize();//Initializes Giavapps Windows API } void Update() { //Checks if the specified input has been pressed if(Input.GetKeyDown(KeyCode.Space)) { Debug.Log("PROCESS EXISTS: "+Process.Exists(ProcessName).ToString()); Debug.Log("PROCESS COUNT: "+Process.Count(ProcessName).ToString()); } } void OnApplicationQuit() { Plugin.Deinitialize();//Deinitializes Giavapps Windows API } }   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More

Mouse Class

Mouse Class

  About Mouse Class   Mouse class is mainly used for managing mouse inputs for specific windows. Note that you must still use Input class for managing inputs for Unity window.   Mouse Class Methods   Mouse.Clear( long WindowHandle ) clears all mouse states for the given window. long WindowHandle: window handle.   Mouse.GetButton( long WindowHandle, long Button ) returns true if the specified button is held down or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetButtonDown( long WindowHandle, long Button ) simulates a button press. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.GetButtonDown( long WindowHandle, long Button ) returns true when the user starts pressing down the specified button or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetButtonUp( long WindowHandle, long Button ) simulates a button release. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.GetButtonUp( long WindowHandle, long Button ) returns true when the user releases the specified button or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetButtonDoubleClicked( long WindowHandle, long Button ) simulates a double button click. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.GetButtonDoubleClicked( long WindowHandle, long Button ) returns true when the user double clicks the specified button or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetWheelUp( long WindowHandle ) simulates the rotation of the mouse wheel upwards. long WindowHandle: window handle.   Mouse.GetWheelUp( long WindowHandle ) returns true when the user rotates the mouse wheel upwards or false otherwise. long WindowHandle: window handle.   Mouse.SetWheelDown( long WindowHandle ) simulates the rotation of the mouse wheel downwards. long WindowHandle: window handle.   Mouse.GetWheelDown( long WindowHandle ) returns true when the user rotates the mouse wheel downwards or false otherwise. long WindowHandle: window handle.   Code Example using System.Collections; using System.Collections.Generic; using UnityEngine; using Giavapps.Windows.API; public class CodeExample : MonoBehaviour { private long WindowHandle = 0; void Start() { Plugin.Initialize();//Initializes Giavapps Windows API WindowHandle = Window.Create(0, 100, 100, 400, 400, Constant.WS_VISIBLE | Constant.WS_SYSMENU |...

Read More

Keyboard Class

Keyboard Class

  About Keyboard Class   Keyboard class is mainly used for managing keyboard inputs for specific windows. Note that you must still use Input class for managing inputs for Unity window.   Keyboard Class Methods   Keyboard.Clear( long WindowHandle ) clears all keyboard states for the given window. long WindowHandle: window handle.   Keyboard.GetKey( long WindowHandle, long Key ) returns true if the specified key is held down or false otherwise. long WindowHandle: window handle. long Key: this parameter can be one of the virtual-key codes constants.   Keyboard.SetKeyDown( long WindowHandle, long Key ) simulates a key press. long WindowHandle: window handle. long Key: this parameter can be one of the virtual-key codes constants.   Keyboard.GetKeyDown( long WindowHandle, long Key ) returns true when the user starts pressing down the specified key or false otherwise. long WindowHandle: window handle. long Key: this parameter can be one of the virtual-key codes constants.   Keyboard.SetKeyUp( long WindowHandle, long Key ) simulates a key release. long WindowHandle: window handle. long Key: this parameter can be one of the virtual-key codes constants.   Keyboard.GetKeyUp( long WindowHandle, long Key ) returns true when the user releases the specified key or false otherwise. long WindowHandle: window handle. long Key: this parameter can be one of the virtual-key codes constants.   Code Example using System.Collections; using System.Collections.Generic; using UnityEngine; using Giavapps.Windows.API; public class CodeExample : MonoBehaviour { private long WindowHandle = 0; void Start() { Plugin.Initialize();//Initializes Giavapps Windows API WindowHandle = Window.Create(0, 100, 100, 400, 400, Constant.WS_VISIBLE | Constant.WS_SYSMENU | Constant.WS_MINIMIZEBOX | Constant.WS_MAXIMIZEBOX | Constant.WS_SIZEBOX, Constant.WS_EX_TOPMOST);//Creates a new window Control.SetText(WindowHandle, "Giavapps Windows API");//Sets a new title for the specified window } void Update() { //Checks if the specified window has been closed if(Window.GetClosed(WindowHandle)) { Control.Destroy(WindowHandle);//Destroys the specified window } //Checks if the specified keyboard key has been pressed if(Keyboard.GetKeyDown(WindowHandle, Constant.VK_SPACE)) { Debug.Log("SPACE KEY PRESSED!"); } //Checks if the specified keyboard key has been released else if(Keyboard.GetKeyUp(WindowHandle, Constant.VK_SPACE)) { Debug.Log("SPACE KEY RELEASED!"); } } void OnApplicationQuit() { Plugin.Deinitialize();//Deinitializes Giavapps Windows API } }   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More

IPAddress Class

IPAddress Class

    About IPAddress Class   IPAddress class is mainly used for creating and managing IP address controls.   IPAddress Class Methods   IPAddress.Create( long ParentHandle, long X, long Y, long Width, long Height, long Style, long ExStyle ) creates an IP address control. If the function succeeds, the return value is a handle to the new control. If the function fails, the return value is 0. long ParentHandle: a handle to the parent or owner control of the control being created. long X: x coordinate. You can also use CW_USEDEFAULT constant for this argument. long Y: y coordinate. You can also use CW_USEDEFAULT constant for this argument. long Width: width. You can also use CW_USEDEFAULT constant for this argument. long Height: height. You can also use CW_USEDEFAULT constant for this argument. long Style: the style of the control being created. This parameter can be a combination of the window style. long ExStyle: the extended style of the control being created. This parameter can be a combination of the extended window styles.   IPAddress.Exists( long IPAddressHandle ) returns true if the specified control was created with IPAddress.Create() method and not destroyed yet or false otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. long IPAddressHandle: IP address control handle.   IPAddress.Count() returns the total number of controls created with IPAddress.Create() method and not destroyed yet. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children.   IPAddress.GetHandleByIndex( ulong IPAddressIndex ) returns the handle from an index if the specified control was created with IPAddress.Create() method and not destroyed yet or 0 otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. IPAddressIndex parameter should be less or equal to IPAddress.Count()-1. ulong IPAddressIndex: zero-based index of the IP address control.   IPAddress.SetAddress( long IPAddressHandle, long Field0, long Field1, long Field2, long Field3 ) sets the address values for all four fields in the IP address control. long IPAddressHandle: IP address control handle. long Field0: identifies the first field. This argument can be a value from 0 to 255. long Field1: identifies the second field. This argument can be a value from 0 to 255. long Field2: identifies the third field. This argument can be a value from 0 to 255. long Field3: identifies the fourth field. This argument can be a value from 0 to 255.   IPAddress.GetAddress(...

Read More

ProgressBar Class

ProgressBar Class

    About ProgressBar Class   ProgressBar class is mainly used for creating and managing progress bars.   ProgressBar Class Methods   ProgressBar.Create( long ParentHandle, long X, long Y, long Width, long Height, long Style, long ExStyle ) creates a progress bar. If the function succeeds, the return value is a handle to the new control. If the function fails, the return value is 0. long ParentHandle: a handle to the parent or owner control of the control being created. long X: x coordinate. You can also use CW_USEDEFAULT constant for this argument. long Y: y coordinate. You can also use CW_USEDEFAULT constant for this argument. long Width: width. You can also use CW_USEDEFAULT constant for this argument. long Height: height. You can also use CW_USEDEFAULT constant for this argument. long Style: the style of the control being created. This parameter can be a combination of the window styles and progress bar styles. long ExStyle: the extended style of the control being created. This parameter can be a combination of the extended window styles.   ProgressBar.Exists( long ProgressBarHandle ) returns true if the specified control was created with ProgressBar.Create() method and not destroyed yet or false otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. long ProgressBarHandle: progress bar handle.   ProgressBar.Count() returns the total number of controls created with ProgressBar.Create() method and not destroyed yet. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children.   ProgressBar.GetHandleByIndex( ulong ProgressBarIndex ) returns the handle from an index if the specified control was created with ProgressBar.Create() method and not destroyed yet or 0 otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. ProgressBarIndex parameter should be less or equal to ProgressBar.Count()-1. ulong ProgressBarIndex: zero-based index of the progress bar.   ProgressBar.SetRange( long ProgressBarHandle, long Minimum, long Maximum ) sets the minimum and maximum values for a progress bar and redraws the bar to reflect the new range. long ProgressBarHandle: progress bar handle. long Minimum: minimum range value. By default, the minimum value is 0. long Maximum: maximum range value. This value must be greater than Minimum. By default, the maximum value is 100.   ProgressBar.GetRange( long ProgressBarHandle, bool MinimumOrMaximum ) retrieves information about the current minimum and maximum values of a given progress bar control. long ProgressBarHandle: progress bar handle. bool MinimumOrMaximum: returns the minimum value (false)...

Read More

ImageList Class

ImageList Class

  About ImageList Class   ImageList class is mainly used for loading and managing image lists.   ImageList Class Methods   ImageList.Add( long Width, long Height) Adds a new image list. If the function succeeds, the return value is the handle of the newly loaded resource. If the function fails, the return value is 0. long Width: the width, in pixels, of each image. long Height: the height, in pixels, of each image.   ImageList.AddBitmap( long ImageListHandle, long BitmapHandle) adds a bitmap to an image list. This method returns the index of the new image if successful, or -1 otherwise. long ImageListHandle: image list handle. long BitmapHandle: bitmap handle.   ImageList.AddCursor( long ImageListHandle, long CursorHandle) adds a cursor to an image list. This method returns the index of the new image if successful, or -1 otherwise. long ImageListHandle: image list handle. long CursorHandle: cursor handle.   ImageList.AddIcon( long ImageListHandle, long IconHandle) adds an icon to an image list. This method returns the index of the new image if successful, or -1 otherwise. long ImageListHandle: image list handle. long IconHandle: icon handle.   ImageList.GetImageCount( long ImageListHandle) returns the number of images in an image list. long ImageListHandle: image list handle.   ImageList.DeleteImage( long ImageListHandle, long ImageIndex) removes an image from an image list. This method returns true if successful, or false otherwise. long ImageListHandle: image list handle. long ImageIndex: zero-based index of the image. If this parameter is -1, the function removes all images.   ImageList.Delete( long ImageListHandle ) Deletes an image list and frees any memory the image list occupied. If the function succeeds, the return value is true. If the function fails, the return value is false. long ImageListHandle: image list handle.   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More
content top