mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13:55 +00:00
update code style
This commit is contained in:
parent
567604a5e1
commit
28c7ccf563
@ -8,6 +8,16 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#include "bitmap_class.h"
|
||||
#include "bitmap_find_c.h"
|
||||
#include "../base/color_find_c.h"
|
||||
// #include "../screen/screen_c.h"
|
||||
#include "../base/io_c.h"
|
||||
#include "../base/pasteboard_c.h"
|
||||
#include "../base/str_io_c.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// class BMP
|
||||
// {
|
||||
// public:
|
||||
@ -18,15 +28,6 @@
|
||||
// uint8_t bytesPerPixel;
|
||||
// uint8_t *image;
|
||||
// };
|
||||
#include "bitmap_class.h"
|
||||
#include "bitmap_find_c.h"
|
||||
#include "../base/color_find_c.h"
|
||||
// #include "../screen/screen_c.h"
|
||||
#include "../base/io_c.h"
|
||||
#include "../base/pasteboard_c.h"
|
||||
#include "../base/str_io_c.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Returns false and sets error if |bitmap| is NULL. */
|
||||
bool bitmap_ready(MMBitmapRef bitmap){
|
||||
|
@ -99,22 +99,22 @@ MMSize get_screen_size(){
|
||||
|
||||
char* set_XDisplay_name(char* name){
|
||||
#if defined(USE_X11)
|
||||
setXDisplay(name);
|
||||
return "success";
|
||||
setXDisplay(name);
|
||||
return "success";
|
||||
#else
|
||||
return "setXDisplayName is only supported on Linux";
|
||||
return "setXDisplayName is only supported on Linux";
|
||||
#endif
|
||||
}
|
||||
|
||||
char* get_XDisplay_name(){
|
||||
#if defined(USE_X11)
|
||||
const char* display = getXDisplay();
|
||||
char* sd = (char*)calloc(100, sizeof(char*));
|
||||
if(sd)strcpy(sd, display);
|
||||
const char* display = getXDisplay();
|
||||
char* sd = (char*)calloc(100, sizeof(char*));
|
||||
if(sd)strcpy(sd, display);
|
||||
|
||||
return sd;
|
||||
return sd;
|
||||
#else
|
||||
return "getXDisplayName is only supported on Linux";
|
||||
return "getXDisplayName is only supported on Linux";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ MMBitmapRef copyMMBitmapFromDisplayInRect(MMRect rect){
|
||||
bufferSize = CFDataGetLength(imageData);
|
||||
buffer = malloc(bufferSize);
|
||||
|
||||
CFDataGetBytes(imageData, CFRangeMake(0,bufferSize), buffer);
|
||||
CFDataGetBytes(imageData, CFRangeMake(0, bufferSize), buffer);
|
||||
|
||||
bitmap = createMMBitmap(buffer,
|
||||
CGImageGetWidth(image),
|
||||
|
Loading…
Reference in New Issue
Block a user