Merge 24f11703b3
into fea45b2d5b
This commit is contained in:
commit
49f5df0470
|
@ -27,7 +27,7 @@ int uiControlToplevel(uiControl *c)
|
||||||
return (*(c->Toplevel))(c);
|
return (*(c->Toplevel))(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
int uiControlVisible(uiControl *c)
|
int uiControlVisible(const uiControl *c)
|
||||||
{
|
{
|
||||||
return (*(c->Visible))(c);
|
return (*(c->Visible))(c);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ void uiControlHide(uiControl *c)
|
||||||
(*(c->Hide))(c);
|
(*(c->Hide))(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
int uiControlEnabled(uiControl *c)
|
int uiControlEnabled(const uiControl *c)
|
||||||
{
|
{
|
||||||
return (*(c->Enabled))(c);
|
return (*(c->Enabled))(c);
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ static int uiWindowToplevel(uiControl *c)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uiWindowVisible(uiControl *c)
|
static int uiWindowVisible(const uiControl *c)
|
||||||
{
|
{
|
||||||
uiWindow *w = uiWindow(c);
|
uiWindow *w = uiWindow(c);
|
||||||
|
|
||||||
|
|
8
ui.h
8
ui.h
|
@ -85,10 +85,10 @@ struct uiControl {
|
||||||
uiControl *(*Parent)(uiControl *);
|
uiControl *(*Parent)(uiControl *);
|
||||||
void (*SetParent)(uiControl *, uiControl *);
|
void (*SetParent)(uiControl *, uiControl *);
|
||||||
int (*Toplevel)(uiControl *);
|
int (*Toplevel)(uiControl *);
|
||||||
int (*Visible)(uiControl *);
|
int (*Visible)(const uiControl *);
|
||||||
void (*Show)(uiControl *);
|
void (*Show)(uiControl *);
|
||||||
void (*Hide)(uiControl *);
|
void (*Hide)(uiControl *);
|
||||||
int (*Enabled)(uiControl *);
|
int (*Enabled)(const uiControl *);
|
||||||
void (*Enable)(uiControl *);
|
void (*Enable)(uiControl *);
|
||||||
void (*Disable)(uiControl *);
|
void (*Disable)(uiControl *);
|
||||||
};
|
};
|
||||||
|
@ -99,10 +99,10 @@ _UI_EXTERN uintptr_t uiControlHandle(uiControl *);
|
||||||
_UI_EXTERN uiControl *uiControlParent(uiControl *);
|
_UI_EXTERN uiControl *uiControlParent(uiControl *);
|
||||||
_UI_EXTERN void uiControlSetParent(uiControl *, uiControl *);
|
_UI_EXTERN void uiControlSetParent(uiControl *, uiControl *);
|
||||||
_UI_EXTERN int uiControlToplevel(uiControl *);
|
_UI_EXTERN int uiControlToplevel(uiControl *);
|
||||||
_UI_EXTERN int uiControlVisible(uiControl *);
|
_UI_EXTERN int uiControlVisible(const uiControl *);
|
||||||
_UI_EXTERN void uiControlShow(uiControl *);
|
_UI_EXTERN void uiControlShow(uiControl *);
|
||||||
_UI_EXTERN void uiControlHide(uiControl *);
|
_UI_EXTERN void uiControlHide(uiControl *);
|
||||||
_UI_EXTERN int uiControlEnabled(uiControl *);
|
_UI_EXTERN int uiControlEnabled(const uiControl *);
|
||||||
_UI_EXTERN void uiControlEnable(uiControl *);
|
_UI_EXTERN void uiControlEnable(uiControl *);
|
||||||
_UI_EXTERN void uiControlDisable(uiControl *);
|
_UI_EXTERN void uiControlDisable(uiControl *);
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ _UI_EXTERN void uiDarwinControlChildVisibilityChanged(uiDarwinControl *);
|
||||||
return 0; \
|
return 0; \
|
||||||
}
|
}
|
||||||
#define uiDarwinControlDefaultVisible(type, handlefield) \
|
#define uiDarwinControlDefaultVisible(type, handlefield) \
|
||||||
static int type ## Visible(uiControl *c) \
|
static int type ## Visible(const uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
return uiDarwinControl(c)->visible; \
|
return uiDarwinControl(c)->visible; \
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ _UI_EXTERN void uiDarwinControlChildVisibilityChanged(uiDarwinControl *);
|
||||||
uiDarwinNotifyVisibilityChanged(uiDarwinControl(c)); \
|
uiDarwinNotifyVisibilityChanged(uiDarwinControl(c)); \
|
||||||
}
|
}
|
||||||
#define uiDarwinControlDefaultEnabled(type, handlefield) \
|
#define uiDarwinControlDefaultEnabled(type, handlefield) \
|
||||||
static int type ## Enabled(uiControl *c) \
|
static int type ## Enabled(const uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
return uiDarwinControl(c)->enabled; \
|
return uiDarwinControl(c)->enabled; \
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool
|
||||||
return 0; \
|
return 0; \
|
||||||
}
|
}
|
||||||
#define uiUnixControlDefaultVisible(type) \
|
#define uiUnixControlDefaultVisible(type) \
|
||||||
static int type ## Visible(uiControl *c) \
|
static int type ## Visible(const uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
return gtk_widget_get_visible(type(c)->widget); \
|
return gtk_widget_get_visible(type(c)->widget); \
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool
|
||||||
gtk_widget_hide(type(c)->widget); \
|
gtk_widget_hide(type(c)->widget); \
|
||||||
}
|
}
|
||||||
#define uiUnixControlDefaultEnabled(type) \
|
#define uiUnixControlDefaultEnabled(type) \
|
||||||
static int type ## Enabled(uiControl *c) \
|
static int type ## Enabled(const uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
return gtk_widget_get_sensitive(type(c)->widget); \
|
return gtk_widget_get_sensitive(type(c)->widget); \
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ _UI_EXTERN void uiWindowsControlChildVisibilityChanged(uiWindowsControl *);
|
||||||
return 0; \
|
return 0; \
|
||||||
}
|
}
|
||||||
#define uiWindowsControlDefaultVisible(type) \
|
#define uiWindowsControlDefaultVisible(type) \
|
||||||
static int type ## Visible(uiControl *c) \
|
static int type ## Visible(const uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
return uiWindowsControl(c)->visible; \
|
return uiWindowsControl(c)->visible; \
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ _UI_EXTERN void uiWindowsControlChildVisibilityChanged(uiWindowsControl *);
|
||||||
uiWindowsControlNotifyVisibilityChanged(uiWindowsControl(c)); \
|
uiWindowsControlNotifyVisibilityChanged(uiWindowsControl(c)); \
|
||||||
}
|
}
|
||||||
#define uiWindowsControlDefaultEnabled(type) \
|
#define uiWindowsControlDefaultEnabled(type) \
|
||||||
static int type ## Enabled(uiControl *c) \
|
static int type ## Enabled(const uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
return uiWindowsControl(c)->enabled; \
|
return uiWindowsControl(c)->enabled; \
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,7 +194,7 @@ static int uiWindowToplevel(uiControl *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO initial state of windows is hidden; ensure this here and make it so on other platforms
|
// TODO initial state of windows is hidden; ensure this here and make it so on other platforms
|
||||||
static int uiWindowVisible(uiControl *c)
|
static int uiWindowVisible(const uiControl *c)
|
||||||
{
|
{
|
||||||
uiWindow *w = uiWindow(c);
|
uiWindow *w = uiWindow(c);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue