From a2e0c92b2f4edfd067f8671dab18c92835143528 Mon Sep 17 00:00:00 2001 From: Rr42 Date: Sun, 27 May 2018 18:09:03 +0530 Subject: Added RGB convertion for GTK --- ldmicro/includes/linuxUI/linuxUI.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'ldmicro/includes') diff --git a/ldmicro/includes/linuxUI/linuxUI.h b/ldmicro/includes/linuxUI/linuxUI.h index 02691b5..bfbf3bc 100644 --- a/ldmicro/includes/linuxUI/linuxUI.h +++ b/ldmicro/includes/linuxUI/linuxUI.h @@ -17,18 +17,19 @@ /// typedefs //typedef int64_t __int64; typedef bool BOOL; -typedef GdkRGBA COLORREF; typedef unsigned char BYTE; typedef unsigned int DWORD; /// all handles will hold a GtkWindow* type typedef void* PVOID; -typedef GtkWindow* HANDLE; +typedef GtkWidget* HANDLE; typedef HANDLE HINSTANCE; typedef HANDLE HWND; typedef HANDLE HDC; typedef HANDLE HMENU; +typedef GtkApplication* HAPP; + /* /// Check if system is x64 or x86 using GCC #if __GNUC__ @@ -52,7 +53,27 @@ typedef unsigned int UINT_PTR; typedef UINT_PTR WPARAM; typedef unsigned int UINT; +/// custom classes +class COLORREF : public GdkRGBA{ + public: + COLORREF() + { + this->red = 0.0; + this->green = 0.0; + this->blue = 0.0; + this->alpha = 1.0; + } + COLORREF(int r, int g, int b) + { + this->red = r/255.0; + this->green = g/255.0; + this->blue = b/255.0; + this->alpha = 1.0; + } +}; + /// common windows referances for linux - end /// functions -BOOL isFocus(HWND); \ No newline at end of file +BOOL isFocus(HWND); +COLORREF RGB(int, int, int); \ No newline at end of file -- cgit