e - fix e widgets to use evas size hints - this unifies sizing elm vs e

devs/bu5hm4n/econfigure2
Carsten Haitzler 8 years ago
parent 619afde7e5
commit ab975cc349
  1. 1419
      src/bin/e_randr.c
  2. 88
      src/bin/e_randr.h
  3. 12
      src/bin/e_widget.c

File diff suppressed because it is too large Load Diff

@ -1,88 +0,0 @@
#ifdef E_TYPEDEFS
typedef struct _E_Config_Randr_Output E_Config_Randr_Output;
typedef struct _E_Config_Randr E_Config_Randr;
typedef struct _E_Randr_Output E_Randr_Output;
typedef struct _E_Randr_Crtc E_Randr_Crtc;
typedef struct _E_Randr E_Randr;
#else
# ifndef E_RANDR_H
# define E_RANDR_H
#define E_RANDR_VERSION_1_1 ((1 << 16) | 1)
#define E_RANDR_VERSION_1_2 ((1 << 16) | 2)
#define E_RANDR_VERSION_1_3 ((1 << 16) | 3)
#define E_RANDR_VERSION_1_4 ((1 << 16) | 4)
#define E_RANDR_CONFIG_FILE_EPOCH 5
#define E_RANDR_CONFIG_FILE_GENERATION 1
#define E_RANDR_CONFIG_FILE_VERSION \
((E_RANDR_CONFIG_FILE_EPOCH * 1000000) + E_RANDR_CONFIG_FILE_GENERATION)
struct _E_Config_Randr_Output
{
const char *name;
const char *edid;
unsigned int orient; // value of the ecore_x_randr_orientation
Eina_Rectangle geo; // geometry
double refresh_rate; // calculated refresh rate
Eina_Bool connect; // does the user want this output connected
};
struct _E_Config_Randr
{
int version; // INTERNAL CONFIG VERSION
Eina_List *outputs;
unsigned char restore;
unsigned long config_timestamp;
unsigned int primary;
};
struct _E_Randr_Output
{
unsigned int xid; // ecore_x_randr output id (xid)
unsigned int mode; // ecore_x_randr mode id (xid)
char *name; // name of output
char *edid; // edid as a hex string
Eina_Bool is_lid; // is this a laptop panel
Eina_Bool active; // if this output is active
Ecore_X_Randr_Connection_Status status;
E_Config_Randr_Output *cfg;
E_Randr_Crtc *crtc;
};
struct _E_Randr_Crtc
{
unsigned int xid; // ecore_x_randr output id (xid)
Eina_Rectangle geo; // geometry
unsigned int orient; // value of the ecore_x_randr_orientation
unsigned int mode; // ecore_x_randr mode id (xid)
Eina_List *outputs; // list of outputs for this crtc
};
struct _E_Randr
{
int active; // number of active outputs
Eina_List *crtcs; // list of crtcs
Eina_List *outputs; // list of outputs
};
EINTERN Eina_Bool e_randr_init(void);
EINTERN int e_randr_shutdown(void);
EAPI Eina_Bool e_randr_config_save(void);
EAPI void e_randr_config_apply(void);
EAPI double e_randr_mode_refresh_rate_get(Ecore_X_Randr_Mode_Info *mode);
extern EAPI E_Config_Randr *e_randr_cfg;
extern EAPI E_Randr *e_randr;
# endif
#endif

@ -130,18 +130,13 @@ e_widget_data_get(Evas_Object *obj)
EAPI void
e_widget_size_min_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
{
API_ENTRY return;
if (minw >= 0) sd->minw = minw;
if (minh >= 0) sd->minh = minh;
evas_object_size_hint_min_set(obj, minw, minh);
}
EAPI void
e_widget_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
{
API_ENTRY return;
if (minw) *minw = sd->minw;
if (minh) *minh = sd->minh;
evas_object_size_hint_min_get(obj, minw, minh);
}
static void
@ -508,8 +503,9 @@ e_widget_pointer_get(Evas_Object *obj)
EAPI void
e_widget_size_min_resize(Evas_Object *obj)
{
API_ENTRY return;
evas_object_resize(obj, sd->minw, sd->minh);
Evas_Coord minw, minh;
evas_object_size_hint_min_get(obj, &minw, &minh);
evas_object_resize(obj, minw, minh);
}
/* local subsystem functions */

Loading…
Cancel
Save