X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcwindowbase.h;h=36add9c76656825749f2cf2851b4fdd95c12ad0d;hb=b78b166faf60a1c7357f990b1e2fb0e70be29fee;hp=7dfc26fd1ec4fb610f4bff928ec0e176e1993cb7;hpb=45dd712aa4b2894f6b2390b4797262831dcdb47a;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/bcwindowbase.h b/cinelerra-5.1/guicast/bcwindowbase.h index 7dfc26fd..36add9c7 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.h +++ b/cinelerra-5.1/guicast/bcwindowbase.h @@ -97,7 +97,9 @@ #include #endif - +// scaled x,y unit +#define xS(v) (BC_WindowBase::get_resources()->x_scale*(v)) +#define yS(v) (BC_WindowBase::get_resources()->y_scale*(v)) #ifdef HAVE_GL //typedef void* GLXContext; @@ -201,6 +203,8 @@ public: virtual int grab_event(XEvent *event) { return 0; }; virtual void create_objects() { return; }; + static void init_resources(float scale); + static void finit_resources(); int get_window_type() { return window_type; } // Wait until event loop is running void init_wait(); @@ -237,10 +241,9 @@ public: void disable_opengl(); void flip_opengl(); -// Calls the BC_Synchronous version of the function with the window_id. -// Not run in OpenGL thread because it has its own lock. - unsigned int get_shader(char *title, int *got_it); - void put_shader(unsigned int handle, char *title); +// Calls the BC_Synchronous version of the function + int get_shader(unsigned int *handle, const char *vert, const char *frag); + void put_shader(unsigned int handle, const char *vert, const char *frag); int get_opengl_server_version(); int flash(int x, int y, int w, int h, int flush = 1); @@ -586,7 +589,7 @@ private: XFontSet get_fontset(int font); XFontSet get_curr_fontset(void); void set_fontset(int font); - int dispatch_event(XEvent *event); + int dispatch_event(); int get_key_masks(unsigned int key_state); @@ -728,7 +731,7 @@ private: // Whether the window has the focus int has_focus; - static BC_Resources resources; + static BC_Resources *resources; #ifndef SINGLE_THREAD // Array of repeaters for multiple repeating objects.