From 94a9c7c10aaf2c6e625e947d7c602cee251e3ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 11 Jan 2021 15:57:14 +0100 Subject: [PATCH] tidy up C files. --- internal/capture/gst/gst.c | 2 -- internal/capture/gst/gst.h | 9 ++------- internal/desktop/clipboard/clipboard.go | 3 +-- internal/desktop/gtk/gtk.go | 3 +-- internal/desktop/xevent/xevent.go | 3 +-- internal/desktop/xevent/xevent.h | 2 -- internal/desktop/xorg/xorg.go | 3 +-- internal/desktop/xorg/xorg.h | 6 ------ 8 files changed, 6 insertions(+), 25 deletions(-) diff --git a/internal/capture/gst/gst.c b/internal/capture/gst/gst.c index 4e78974d..7c11c8a5 100644 --- a/internal/capture/gst/gst.c +++ b/internal/capture/gst/gst.c @@ -1,7 +1,5 @@ #include "gst.h" -#include - typedef struct SampleHandlerUserData { int pipelineId; } SampleHandlerUserData; diff --git a/internal/capture/gst/gst.h b/internal/capture/gst/gst.h index 7c6965f4..cf274e3e 100644 --- a/internal/capture/gst/gst.h +++ b/internal/capture/gst/gst.h @@ -1,10 +1,7 @@ -#ifndef GST_H -#define GST_H +#pragma once -#include #include -#include -#include +#include extern void goHandlePipelineBuffer(void *buffer, int bufferLen, int samples, int pipelineId); @@ -15,5 +12,3 @@ void gstreamer_send_play_pipeline(GstElement *pipeline); void gstreamer_send_stop_pipeline(GstElement *pipeline); void gstreamer_send_start_mainloop(void); void gstreamer_init(void); - -#endif diff --git a/internal/desktop/clipboard/clipboard.go b/internal/desktop/clipboard/clipboard.go index b01c2958..a5047498 100644 --- a/internal/desktop/clipboard/clipboard.go +++ b/internal/desktop/clipboard/clipboard.go @@ -1,8 +1,7 @@ package clipboard /* -#cgo linux CFLAGS: -I/usr/src -I/usr/local/include/ -#cgo linux LDFLAGS: /usr/local/lib/libclipboard.a -L/usr/src -L/usr/local/lib -lxcb +#cgo linux LDFLAGS: /usr/local/lib/libclipboard.a -lxcb #include "clipboard.h" */ diff --git a/internal/desktop/gtk/gtk.go b/internal/desktop/gtk/gtk.go index d4dc81de..58d64dce 100644 --- a/internal/desktop/gtk/gtk.go +++ b/internal/desktop/gtk/gtk.go @@ -1,8 +1,7 @@ package gtk /* -#cgo linux CFLAGS: -I/usr/src -I/usr/local/include/ -#cgo pkg-config: gdk-3.0 gtk+-3.0 +#cgo pkg-config: gtk+-3.0 #include "gtk.h" */ diff --git a/internal/desktop/xevent/xevent.go b/internal/desktop/xevent/xevent.go index 9f8d6343..3c24701b 100644 --- a/internal/desktop/xevent/xevent.go +++ b/internal/desktop/xevent/xevent.go @@ -1,8 +1,7 @@ package xevent /* -#cgo linux CFLAGS: -I/usr/src -I/usr/local/include/ -#cgo linux LDFLAGS: -L/usr/src -L/usr/local/lib -lX11 -lxcb -lXfixes +#cgo linux LDFLAGS: -lX11 -lXfixes #include "xevent.h" */ diff --git a/internal/desktop/xevent/xevent.h b/internal/desktop/xevent/xevent.h index e735c0c4..743061dd 100644 --- a/internal/desktop/xevent/xevent.h +++ b/internal/desktop/xevent/xevent.h @@ -3,9 +3,7 @@ #include #include #include -#include #include -#include extern void goXEventCursorChanged(XFixesCursorNotifyEvent event); extern void goXEventClipboardUpdated(); diff --git a/internal/desktop/xorg/xorg.go b/internal/desktop/xorg/xorg.go index d05d3ee0..e1add2a3 100644 --- a/internal/desktop/xorg/xorg.go +++ b/internal/desktop/xorg/xorg.go @@ -1,8 +1,7 @@ package xorg /* -#cgo linux CFLAGS: -I/usr/src -I/usr/local/include/ -#cgo linux LDFLAGS: -L/usr/src -L/usr/local/lib -lX11 -lxcb -lXrandr -lXtst -lXfixes +#cgo linux LDFLAGS: -lX11 -lXrandr -lXtst -lXfixes #include "xorg.h" */ diff --git a/internal/desktop/xorg/xorg.h b/internal/desktop/xorg/xorg.h index 4b228f9e..4a83026a 100644 --- a/internal/desktop/xorg/xorg.h +++ b/internal/desktop/xorg/xorg.h @@ -1,14 +1,10 @@ #pragma once -#ifndef XDISPLAY_H -#define XDISPLAY_H - #include #include #include #include #include -#include #include #include @@ -32,5 +28,3 @@ short XGetScreenRate(); void SetKeyboardLayout(char *layout); void SetKeyboardModifiers(int num_lock, int caps_lock, int scroll_lock); XFixesCursorImage *XGetCursorImage(void); - -#endif