-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add aqua2 theme which checks system colors
- Loading branch information
1 parent
01176b0
commit cbfad7e
Showing
11 changed files
with
511 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bindgen src/cocoa_helper.h -o src/cocoa_helper.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#[cfg(target_os = "macos")] | ||
fn main() { | ||
let mut build = cc::Build::new(); | ||
build.file("src/cocoa_helper.m"); | ||
build.compile("cocoa"); | ||
} | ||
|
||
#[cfg(not(target_os = "macos"))] | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,5 +35,6 @@ fn main() { | |
}; | ||
theme.apply(); | ||
}); | ||
|
||
a.run().unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#ifndef COCOA_COLOR_DEFINITION | ||
|
||
#define COLOR_GET(color) \ | ||
void my_##color(double *r, double *g, double *b, double *a); | ||
|
||
#else | ||
|
||
#define COLOR_GET(color) \ | ||
void my_##color(double *r, double *g, double *b, double *a) { \ | ||
NSColor *i = [NSColor color]; \ | ||
NSColor *c = [i colorUsingColorSpace:[NSColorSpace genericRGBColorSpace]]; \ | ||
[c getRed:r green:g blue:b alpha:a]; \ | ||
} | ||
|
||
#endif | ||
|
||
COLOR_GET(windowBackgroundColor) | ||
|
||
COLOR_GET(labelColor) | ||
|
||
COLOR_GET(controlBackgroundColor) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
#define COCOA_COLOR_DEFINITION | ||
#include "cocoa_helper.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* automatically generated by rust-bindgen 0.57.0 */ | ||
|
||
extern "C" { | ||
pub fn my_windowBackgroundColor(r: *mut f64, g: *mut f64, b: *mut f64, a: *mut f64); | ||
} | ||
extern "C" { | ||
pub fn my_labelColor(r: *mut f64, g: *mut f64, b: *mut f64, a: *mut f64); | ||
} | ||
extern "C" { | ||
pub fn my_controlBackgroundColor(r: *mut f64, g: *mut f64, b: *mut f64, a: *mut f64); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.