aboutsummaryrefslogtreecommitdiff
path: root/addons/library.xbmc.gui
diff options
context:
space:
mode:
authorxbmc <fernetmenta@online.de>2012-11-20 08:57:01 +0100
committerxbmc <fernetmenta@online.de>2013-03-01 13:24:00 +0100
commit091fddbdf4ea795b0b65b93cbea250fef6f86c76 (patch)
tree08607d88998b2bf9f253a63b63d9739ccf62b07e /addons/library.xbmc.gui
parentf8705193bf014f362c87e05c0d6054c79df1405d (diff)
expose GUIRenderingControl to addongui lib
Diffstat (limited to 'addons/library.xbmc.gui')
-rw-r--r--addons/library.xbmc.gui/libXBMC_gui.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/addons/library.xbmc.gui/libXBMC_gui.h b/addons/library.xbmc.gui/libXBMC_gui.h
index 3fccaf0453..87a9f7974e 100644
--- a/addons/library.xbmc.gui/libXBMC_gui.h
+++ b/addons/library.xbmc.gui/libXBMC_gui.h
@@ -43,6 +43,7 @@ class CAddonGUISpinControl;
class CAddonGUIRadioButton;
class CAddonGUIProgressControl;
class CAddonListItem;
+class CAddonGUIRenderingControl;
class CHelper_libXBMC_gui
{
@@ -154,6 +155,14 @@ public:
dlsym(m_libXBMC_gui, "GUI_ListItem_destroy");
if (GUI_ListItem_destroy == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
+ GUI_control_get_rendering = (CAddonGUIRenderingControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId))
+ dlsym(m_libXBMC_gui, "GUI_control_get_rendering");
+ if (GUI_control_get_rendering == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
+
+ GUI_control_release_rendering = (void (*)(CAddonGUIRenderingControl* p))
+ dlsym(m_libXBMC_gui, "GUI_control_release_rendering");
+ if (GUI_control_release_rendering == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
+
m_Callbacks = GUI_register_me(m_Handle);
return m_Callbacks != NULL;
@@ -234,6 +243,16 @@ public:
return GUI_ListItem_destroy(p);
}
+ CAddonGUIRenderingControl* Control_getRendering(CAddonGUIWindow *window, int controlId)
+ {
+ return GUI_control_get_rendering(m_Handle, m_Callbacks, window, controlId);
+ }
+
+ void Control_releaseRendering(CAddonGUIRenderingControl* p)
+ {
+ return GUI_control_release_rendering(p);
+ }
+
protected:
void* (*GUI_register_me)(void *HANDLE);
void (*GUI_unregister_me)(void *HANDLE, void* CB);
@@ -252,6 +271,8 @@ protected:
void (*GUI_control_release_progress)(CAddonGUIProgressControl* p);
CAddonListItem* (*GUI_ListItem_create)(void *HANDLE, void* CB, const char *label, const char *label2, const char *iconImage, const char *thumbnailImage, const char *path);
void (*GUI_ListItem_destroy)(CAddonListItem* p);
+ CAddonGUIRenderingControl* (*GUI_control_get_rendering)(void *HANDLE, void* CB, CAddonGUIWindow *window, int controlId);
+ void (*GUI_control_release_rendering)(CAddonGUIRenderingControl* p);
private:
void *m_libXBMC_gui;
@@ -355,6 +376,7 @@ class CAddonGUIWindow
friend class CAddonGUISpinControl;
friend class CAddonGUIRadioButton;
friend class CAddonGUIProgressControl;
+friend class CAddonGUIRenderingControl;
public:
CAddonGUIWindow(void *hdl, void *cb, const char *xmlFilename, const char *defaultSkin, bool forceFallback, bool asDialog);
@@ -385,6 +407,7 @@ public:
virtual void SetCurrentListPosition(int listPos);
virtual int GetCurrentListPosition();
virtual void SetControlLabel(int controlId, const char *label);
+ virtual void MarkDirtyRegion();
virtual bool OnClick(int controlId);
virtual bool OnFocus(int controlId);
@@ -402,3 +425,29 @@ protected:
void *m_Handle;
void *m_cb;
};
+
+class CAddonGUIRenderingControl
+{
+public:
+ CAddonGUIRenderingControl(void *hdl, void *cb, CAddonGUIWindow *window, int controlId);
+ virtual ~CAddonGUIRenderingControl();
+ virtual void Init();
+
+ virtual bool Create(int x, int y, int w, int h, void *device);
+ virtual void Render();
+ virtual void Stop();
+ virtual bool Dirty();
+
+ GUIHANDLE m_cbhdl;
+ bool (*CBCreate)(GUIHANDLE cbhdl, int x, int y, int w, int h, void *device);
+ void (*CBRender)(GUIHANDLE cbhdl);
+ void (*CBStop)(GUIHANDLE cbhdl);
+ bool (*CBDirty)(GUIHANDLE cbhdl);
+
+private:
+ CAddonGUIWindow *m_Window;
+ int m_ControlId;
+ GUIHANDLE m_RenderingHandle;
+ void *m_Handle;
+ void *m_cb;
+};