Dwayne Harris
2 years ago
commit
08533d4911
8 changed files with 245 additions and 0 deletions
-
55.gitignore
-
93.kdev4/screen-recorder.kdev4
-
17Makefile
-
5README.md
-
10main.cpp
-
40recording-window.cpp
-
21recording-window.hpp
-
4screen-recorder.kdev4
@ -0,0 +1,55 @@ |
|||||
|
|
||||
|
# Created by https://www.toptal.com/developers/gitignore/api/linux,c++ |
||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=linux,c++ |
||||
|
|
||||
|
### C++ ### |
||||
|
# Prerequisites |
||||
|
*.d |
||||
|
|
||||
|
# Compiled Object files |
||||
|
*.slo |
||||
|
*.lo |
||||
|
*.o |
||||
|
*.obj |
||||
|
|
||||
|
# Precompiled Headers |
||||
|
*.gch |
||||
|
*.pch |
||||
|
|
||||
|
# Compiled Dynamic libraries |
||||
|
*.so |
||||
|
*.dylib |
||||
|
*.dll |
||||
|
|
||||
|
# Fortran module files |
||||
|
*.mod |
||||
|
*.smod |
||||
|
|
||||
|
# Compiled Static libraries |
||||
|
*.lai |
||||
|
*.la |
||||
|
*.a |
||||
|
*.lib |
||||
|
|
||||
|
# Executables |
||||
|
*.exe |
||||
|
*.out |
||||
|
*.app |
||||
|
|
||||
|
### Linux ### |
||||
|
*~ |
||||
|
|
||||
|
# temporary files which can be created if a process still has a handle open of a deleted file |
||||
|
.fuse_hidden* |
||||
|
|
||||
|
# KDE directory preferences |
||||
|
.directory |
||||
|
|
||||
|
# Linux trash folder which might appear on any partition or disk |
||||
|
.Trash-* |
||||
|
|
||||
|
# .nfs files are created when an open file is removed but is still being accessed |
||||
|
.nfs* |
||||
|
|
||||
|
# End of https://www.toptal.com/developers/gitignore/api/linux,c++ |
||||
|
|
@ -0,0 +1,93 @@ |
|||||
|
[Buildset] |
||||
|
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x1e\x00s\x00c\x00r\x00e\x00e\x00n\x00-\x00r\x00e\x00c\x00o\x00r\x00d\x00e\x00r) |
||||
|
|
||||
|
[Cppcheck] |
||||
|
useSystemIncludes=true |
||||
|
|
||||
|
[CustomBuildSystem] |
||||
|
CurrentConfiguration=BuildConfig0 |
||||
|
|
||||
|
[CustomBuildSystem][BuildConfig0] |
||||
|
BuildDir= |
||||
|
Title=Make |
||||
|
|
||||
|
[CustomBuildSystem][BuildConfig0][ToolBuild] |
||||
|
Arguments= |
||||
|
Enabled=true |
||||
|
Environment= |
||||
|
Executable=file:make |
||||
|
Type=0 |
||||
|
|
||||
|
[CustomBuildSystem][BuildConfig0][ToolClean] |
||||
|
Arguments=clean |
||||
|
Enabled=true |
||||
|
Environment= |
||||
|
Executable=file:make |
||||
|
Type=3 |
||||
|
|
||||
|
[CustomBuildSystem][BuildConfig0][ToolConfigure] |
||||
|
Arguments= |
||||
|
Enabled=false |
||||
|
Environment= |
||||
|
Executable= |
||||
|
Type=1 |
||||
|
|
||||
|
[CustomBuildSystem][BuildConfig0][ToolInstall] |
||||
|
Arguments= |
||||
|
Enabled=false |
||||
|
Environment= |
||||
|
Executable= |
||||
|
Type=2 |
||||
|
|
||||
|
[CustomBuildSystem][BuildConfig0][ToolPrune] |
||||
|
Arguments= |
||||
|
Enabled=false |
||||
|
Environment= |
||||
|
Executable= |
||||
|
Type=4 |
||||
|
|
||||
|
[CustomDefinesAndIncludes][ProjectPath0] |
||||
|
Path=. |
||||
|
parseAmbiguousAsCPP=true |
||||
|
parserArguments=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++17 |
||||
|
parserArgumentsC=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c99 |
||||
|
parserArgumentsCuda=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11 |
||||
|
parserArgumentsOpenCL=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -cl-std=CL1.1 |
||||
|
|
||||
|
[CustomDefinesAndIncludes][ProjectPath0][Compiler] |
||||
|
Name=GCC |
||||
|
|
||||
|
[CustomDefinesAndIncludes][ProjectPath0][Includes] |
||||
|
1=/usr/include/gtkmm-3.0/ |
||||
|
2=/usr/include/ |
||||
|
3=/usr/lib/x86_64-linux-gnu/ |
||||
|
4=/usr/include/sigc++-2.0/ |
||||
|
|
||||
|
[Launch] |
||||
|
Launch Configurations=Launch Configuration 0 |
||||
|
|
||||
|
[Launch][Launch Configuration 0] |
||||
|
Configured Launch Modes=execute |
||||
|
Configured Launchers=nativeAppLauncher |
||||
|
Name=New Compiled Binary Launcher |
||||
|
Type=Native Application |
||||
|
|
||||
|
[Launch][Launch Configuration 0][Data] |
||||
|
Arguments= |
||||
|
Debugger Shell= |
||||
|
Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00) |
||||
|
Dependency Action=Nothing |
||||
|
Display Demangle Names=true |
||||
|
Display Static Members=false |
||||
|
EnvironmentGroup= |
||||
|
Executable=file:///home/parallels/Projects/Progrium/screen-recorder/screenrecorder |
||||
|
External Terminal=konsole --noclose --workdir %workdir -e %exe |
||||
|
GDB Path= |
||||
|
Project Target= |
||||
|
Remote GDB Config Script= |
||||
|
Remote GDB Run Script= |
||||
|
Remote GDB Shell Script= |
||||
|
Start With=ApplicationOutput |
||||
|
Use External Terminal=false |
||||
|
Working Directory= |
||||
|
isExecutable=true |
@ -0,0 +1,17 @@ |
|||||
|
CC = g++ |
||||
|
CFLAGS = -g -Wall --std=c++17 |
||||
|
GCFLAGS = `pkg-config --cflags --libs gtkmm-3.0` -lobs |
||||
|
|
||||
|
TARGET = screenrecorder |
||||
|
|
||||
|
$(TARGET): main.o recording-window.o |
||||
|
$(CC) $(CFLAGS) -o $(TARGET) main.o recording-window.o $(GCFLAGS) |
||||
|
|
||||
|
main.o: |
||||
|
$(CC) $(CFLAGS) -c main.cpp $(GCFLAGS) |
||||
|
|
||||
|
recording-window.o: recording-window.cpp recording-window.hpp |
||||
|
$(CC) $(CFLAGS) -c recording-window.cpp $(GCFLAGS) |
||||
|
|
||||
|
clean: |
||||
|
rm $(TARGET) main.o recording-window.o |
@ -0,0 +1,5 @@ |
|||||
|
# Screen Recorder |
||||
|
|
||||
|
## Dependencies |
||||
|
|
||||
|
`apt install libobs-dev libgtkmm-3.0-dev` |
@ -0,0 +1,10 @@ |
|||||
|
#include "recording-window.hpp"
|
||||
|
#include <gtkmm/application.h>
|
||||
|
|
||||
|
int main(int argc, char *argv[]) |
||||
|
{ |
||||
|
auto app = Gtk::Application::create(argc, argv, "xyz.dwayne.screenrecorder"); |
||||
|
RecordingWindow win; |
||||
|
|
||||
|
return app->run(win); |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
#include "recording-window.hpp"
|
||||
|
#include <iostream>
|
||||
|
#include <obs/obs.h>
|
||||
|
|
||||
|
RecordingWindow::RecordingWindow() |
||||
|
: m_box_main(Gtk::Orientation::ORIENTATION_VERTICAL, 2), |
||||
|
m_button_start("Start Recording"), |
||||
|
m_label_version("Version: ") |
||||
|
{ |
||||
|
set_title("New Recording"); |
||||
|
set_default_size(640, 480); |
||||
|
set_border_width(10); |
||||
|
m_button_start.signal_clicked().connect(sigc::mem_fun(*this, &RecordingWindow::on_button_clicked)); |
||||
|
|
||||
|
//m_box_main.set_margin(10);
|
||||
|
m_box_main.add(m_button_start); |
||||
|
m_box_main.add(m_label_version); |
||||
|
|
||||
|
m_button_start.show(); |
||||
|
m_label_version.show(); |
||||
|
|
||||
|
add(m_box_main); |
||||
|
m_box_main.show(); |
||||
|
|
||||
|
std::string version = "OBS Version: "; |
||||
|
version.append(obs_get_version_string()); |
||||
|
|
||||
|
m_label_version.set_text(version); |
||||
|
} |
||||
|
|
||||
|
RecordingWindow::~RecordingWindow() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
void RecordingWindow::on_button_clicked() |
||||
|
{ |
||||
|
std::cout << "Clicked" << std::endl; |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,21 @@ |
|||||
|
#ifndef SCREEN_RECORDER_RECORDING_WINDOW_H
|
||||
|
#define SCREEN_RECORDER_RECORDING_WINDOW_H
|
||||
|
|
||||
|
#include <gtkmm/box.h>
|
||||
|
#include <gtkmm/button.h>
|
||||
|
#include <gtkmm/label.h>
|
||||
|
#include <gtkmm/window.h>
|
||||
|
|
||||
|
class RecordingWindow : public Gtk::Window |
||||
|
{ |
||||
|
public: |
||||
|
RecordingWindow(); |
||||
|
virtual ~RecordingWindow(); |
||||
|
protected: |
||||
|
void on_button_clicked(); |
||||
|
Gtk::Box m_box_main; |
||||
|
Gtk::Button m_button_start; |
||||
|
Gtk::Label m_label_version; |
||||
|
}; |
||||
|
|
||||
|
#endif
|
@ -0,0 +1,4 @@ |
|||||
|
[Project] |
||||
|
CreatedFrom= |
||||
|
Manager=KDevCustomBuildSystem |
||||
|
Name=screen-recorder |
Write
Preview
Loading…
Cancel
Save
Reference in new issue